Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PDF hyperlinks on iPhone/iPad

Tags:

xcode

pdf

iphone

I've been looking around Google and SO and haven't quite found an answer to my question, or at least a more recent answer.

I have a PDF with hyperlinks/hotspots in it and would like to display the PDF file in my own iPhone/iPad app. When the user clicks on a hyperlink/hotspot I would like the user to be taken to the appropriate location of the link (whether another page on the PDF or a webpage outside of the app).

I have found many questions like this on here, but most dated over 6 moths ago. While that might not be so long ago, it kind of is in-spite of newer technologies and the probability of someone comping up with new code/way to do it. I looked into the QuartzDemo sample app and edited the PDF to have a hotspot and it does not work. Maybe the ability is there, but not implemented?

I have found one app that DOES work great! The GoodReader app displays my PDF and allows the clicking of hotspots in my PDF. However, I'd like this implemented in my own app.

So, has anyone been playing around with this? Anyone find a solution? Can anyone point others in a direction?

Thanks for your time.

like image 851
RoLYroLLs Avatar asked Apr 09 '10 17:04

RoLYroLLs


People also ask

Do PDF links work on iPhone?

Labels: Mobile. Share.


1 Answers

The "hotspots" you speak of are PDF links. Look up the PDF spec, particularly section 8.4 on Link Annotations. Then look over the Quartz 2D Programming Guide including the section on Inspecting PDF Document Structure. You'll want to get familiar with the CGPDF* API calls.

like image 104
jbm Avatar answered Oct 11 '22 10:10

jbm