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.

RoLYroLLs
  • 3,113
  • 4
  • 38
  • 57
  • 2
    @Josh No, he's trying to write an *app*. That's programming. – SamB Apr 09 '10 at 17:50
  • Ah, I thought he was trying to redirect the PDF on an already existing page or something. – Josh K Apr 09 '10 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 Apr 09 '10 at 22:02
  • 1
    I guess this is still an issue, or developers who found their own ways aren't sharing yet? =) – RoLYroLLs Apr 13 '10 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 Jul 17 '10 at 20:32
  • @chaitanya: Are you asking if I am able to do a text search in the iPhone app I am making? If that is your question, then NO I haven't. I actually gave up on app I was making and turned to another solution without PDF's. Instead I'm using HTML pages. – RoLYroLLs Jul 19 '10 at 12:26
  • @RoLYroLLS: yes i am asking about the text search in pdf only.. ok..i am also able to do search in html pages but i am facing a problem in pdf pages.. ok..if at all you find anything on this pdf search please let me know..and i vil do the same ok.. thank you.. – CKT Jul 19 '10 at 13:37
  • RoLYroLLs, did you manage to successfully implement the UIWebView and loading a PDF with hyperlinks that work? I'm also looking at implementing this feature, similar to GoodReader, but with no luck as yet. –  Feb 03 '11 at 01:30
  • No I have not succeeded with this. – RoLYroLLs Feb 03 '11 at 01:30

1 Answers1

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.

jbm
  • 1,482
  • 11
  • 26
  • 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. – Jesse Naugher Sep 01 '10 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 Sep 19 '10 at 20:43