Reputation:
I have a PDF loaded in an iPhone app using UIWebView and it displays page numbers when the pages are scrolled manually. But I've had no luck figuring out how to access those numbers and set the page displayed. Any suggestions would be welcomed. Thanks.
Upvotes: 2
Views: 2734
Reputation: 1
Get the length of the scroll view content and then divide it by page number.
That will give you length of each page. There is a way to get number of pages from uiwebview
.
Upvotes: 0
Reputation: 2786
You can use Quartz to do it, as explained here : http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html
Upvotes: 1
Reputation: 4897
Since you're using a uiwebview it can interpret javascript for navigation, even with a pdf. determine the pixel size of each page, and you can theoretically calculate your location on any given page and and navigate accordingly.
Upvotes: 1
Reputation: 60110
There's no way to do this using the methods available through the SDK. If you really need this functionality you can file a bug report.
Upvotes: 1