Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

PDF in WebView

I have linked a .PDF file in my application and I did it through WebView.


It loads fine, looks fine, I can zoom and scroll.


My only issue...


Its over 500 pages. Thats just WAYYYY too much finger scrolling...

WebView recognizes its a PDF and shows me page numbers so there must be a way to jump between pages.




User uploaded file



Is there a tutorial anywhere on how I can make it so an interface pops up and the user can jump right to a page, like you can in Safari?


Any help is appreciated.

iPhone 4, iOS 4.3.3

Posted on Jul 30, 2011 12:55 AM

Reply
8 replies

Jul 30, 2011 12:38 PM in response to AnthonyLombardi

You're right, we're not on the same page. If you had the skills (drawing w/Quartz) to incorporate the navigation you desire into that PDF, you wouldn't be asking how to do it. Asking means you don't have the skills. Not having the skills mean you need to seek alternatives. epub'in is it until your skills come up and those skills can't be gained over night.


I'm trying to save you wasted effort trying to do it the most comprehensive way, which isn't easy (I'll be right back with an interim low-effort shortcut/compromise...*), but if you want to waste your time coming to the same conclusion, see the iOS Dev Center and search on: pdf


Good luck in any case.


* http://www.macresearch.org/cocoa-scientists-xxx-developing-iphone


The section titled 'Source Code' has the example app. I used it as a template in the app store 3 years ago, and it might get you going, but I haven't tested it with any recent SDK.

Jul 30, 2011 1:11 PM in response to K T

I'm not trying to gain the skills overnight, by any means. I have a very long way to go before I could remotely publish anything worthy of the app store. However I am trying to gain knowledge about this skill because it is something that would seem to be very useful.


If there is a way I can do what you suggested, turning it into an ePub or iBook and finding a way to link it directly to the app, I'm all for it.


Again, just for reference, the Catalog is one of 10 other Views present in my app. It is not the sole idea of the app. I just want to make it as user friendly as possible, even if that does mean more work for me. Admin at my school said if the app is created well enough, they will gladly buy it from me.


*MainView

- Catalog

- Map

- Blackboard

- Campus Police

- Police website

- Athletics

- Athletics website

- Student Ticket Lottery

- Staff Directory

- News

- Student Login (for our school website)


Like I said, if I can do what you said and still keep it in the application I have so far (it's taken me long enough to make what I have) then I'm all ears (eyes).

Jul 30, 2011 1:30 PM in response to AnthonyLombardi

You can certainly keep it in the application, but again, it's non-trivial if you want high-level PDF navigation, which in this case requires Cocoa. The fact that you're using a webview suggests you're not Cocoa-capable.


Having the skills is a good thing, of course, but I took your question as looking for a solution today that is within your means.


I'm trying to get you to take an approach now that will let you get on with delivering the information and possibly provide time while you sharpen your skills.


I'd think tho (with the info about the rest of the app and using a WebView to display the PDF) that unless you can as an example adopt the JS in the linked app, your only choice is to delay the 500+ page PDF until your skills come up. No doubt such a comprensive app would have value at that point, but the catalogs will be outdated and you may have left school by that time 🙂. Having an opportunity to make a profit isn't much of an opportunity if it requires significant skills that don't yet exist.


There's no free lunch...either stick with low-impact WebViews, etc. or start cracking the Obj-C & Cocoa books.

PDF in WebView

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.