Skip to content

Commit 6573028

Browse files
author
Owen Prime
committed
Support older iWorks files by reading the embedded Preview.pdf file #8
1 parent 7ed3c56 commit 6573028

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pages.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ func ConvertPages(input io.Reader) (string, map[string]string) {
4040
archiveInfoData, err := ioutil.ReadAll(io.LimitReader(bReader, archiveLength))
4141
archiveInfo := &TSP.ArchiveInfo{}
4242
err = proto.Unmarshal(archiveInfoData, archiveInfo)
43-
4443
fmt.Println("archiveInfo:", archiveInfo, err)
44+
} else if f.Name == "QuickLook/Preview.pdf" {
45+
rc, _ := f.Open()
46+
defer rc.Close()
47+
return ConvertPdf(rc)
4548
}
4649
}
4750

0 commit comments

Comments
 (0)