15

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.

9
  • 2
    @Josh No, he's trying to write an app. That's programming.
    – SamB
    Commented Apr 9, 2010 at 17:50
  • Ah, I thought he was trying to redirect the PDF on an already existing page or something.
    – Josh K
    Commented Apr 9, 2010 at 18:30
  • @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
    Commented Apr 9, 2010 at 22:02
  • 1
    I guess this is still an issue, or developers who found their own ways aren't sharing yet? =)
    – RoLYroLLs
    Commented Apr 13, 2010 at 15:30
  • 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
    Commented Jul 17, 2010 at 20:32

1 Answer 1

8

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.

2
  • he is right, the CGPDF* calls are what will allow this.. and i would suggest getting QUITE familiar with the PDF document structure and the Adobe PDF Spec. Commented Sep 1, 2010 at 21:45
  • Thank you guys. I'll have to try them one day, as I took another route for this project. I'll look back at this when I decide to revisit this method.
    – RoLYroLLs
    Commented Sep 19, 2010 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.