15
votes

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.

1
@Josh No, he's trying to write an app. That's programming.SamB
Ah, I thought he was trying to redirect the PDF on an already existing page or something.Josh K
@Josh Sorry if it sounded confusing. Sam is right, I'm trying to write an app which will show a PDF and support the hyperlinks/hotspots in the PDF file.RoLYroLLs
I guess this is still an issue, or developers who found their own ways aren't sharing yet? =)RoLYroLLs
RoLYroLLs ... please let me know if you are able to do a text search (string) within a pdf page and highlight it.. i am nt getting any idea to implement this...can you please share with me if you are able to do???CKT

1 Answers

8
votes

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.