[PDFOutline destination] returns NULL
[PDFOutline destination] returns NULL
- Subject: [PDFOutline destination] returns NULL
- From: Joe Chan <email@hidden>
- Date: Fri, 20 Apr 2007 22:03:40 -0400
While playing around with TeXShop and Unicode fonts, I found an
interesting behavior of PDFKit. For some reason PDFs generated by
xelatex contains bookmarks that doesn't work in Preview.app; clicking
on them does nothing. The same PDF will work just find in Acrobat
Reader. To debug this problem, I built the PDFViewer sample code, and
put a breakpoint right at the call to "destination". Lo and behold,
the reason that it didn't work was because "destination" returns NULL.
Digging a bit further, it appears that difference is likely due to
how the PDF is written. Looking up the PDF spec, section 8.2.1 about
destinations, it appear that PDFKit can't deal with explicit
destinations. For PDFs with working hyperlinks, they all appear in
the PDF with named destinations:
<< /S /GoTo /D (section.1) >>
while PDFs with non-working hyperlinks, they all are all explicit
destinations:
<< /Type /Action /S /GoTo /D [0 /XYZ 110.854296 666.201743 null] >>
So my question is: is PDFKit's inability to deal with explicit
destinations (which translate to the behavior where [PDFOutline
destination] returns NULL for a valid outline item) a bug, or is it
functioning as design?
-----------
Joe Chan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden