code: func ConvertPages(r io.Reader) (string, map[string]string, error) {
  	meta := make(map[string]string)
  	var textBody string
  
  	b, err := ioutil.ReadAll(r)
  	if err != nil {
  		return "", nil, fmt.Errorf("error reading data: %v", err)
  	}
  
  	zr, err := zip.NewReader(bytes.NewReader(b), int64(len(b)))
  	if err != nil {
  		return "", nil, fmt.Errorf("error unzipping data: %v", err)
  	}
  
  	for _, f := range zr.File {
  		if strings.HasSuffix(f.Name, "Preview.pdf") {
  			// There is a preview PDF version we can use
  			if rc, err := f.Open(); err == nil {
  				return ConvertPDF(rc)
  			}
  		}
  		if f.Name == "index.xml" {
  			// There's an XML version we can use
  			if rc, err := f.Open(); err == nil {
  				return ConvertXML(rc)
  			}
  		}
  		if f.Name == "Index/Document.iwa" {
  			rc, _ := f.Open()
  			defer rc.Close()
  			bReader := bufio.NewReader(snappy.NewReader(io.MultiReader(strings.NewReader("\xff\x06\x00\x00sNaPpY"), rc)))
  			archiveLength, err := binary.ReadVarint(bReader)
  			archiveInfoData, err := ioutil.ReadAll(io.LimitReader(bReader, archiveLength))
  			archiveInfo := &TSP.ArchiveInfo{}
  			err = proto.Unmarshal(archiveInfoData, archiveInfo)
  			fmt.Println("archiveInfo:", archiveInfo, err)
  		}
  	}
  
  	return textBody, meta, nil
  }
docs: // ConvertPages converts a Pages file to text.