Skip to content

Commit

Permalink
Support older iWorks files by reading the embedded Preview.pdf file #8
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen Prime committed Apr 27, 2015
1 parent 7ed3c56 commit 6573028
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pages.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ func ConvertPages(input io.Reader) (string, map[string]string) {
archiveInfoData, err := ioutil.ReadAll(io.LimitReader(bReader, archiveLength))
archiveInfo := &TSP.ArchiveInfo{}
err = proto.Unmarshal(archiveInfoData, archiveInfo)

fmt.Println("archiveInfo:", archiveInfo, err)
} else if f.Name == "QuickLook/Preview.pdf" {
rc, _ := f.Open()
defer rc.Close()
return ConvertPdf(rc)
}
}

Expand Down

0 comments on commit 6573028

Please sign in to comment.