Dotnaught
Dotnaught

Reputation:

UIWebView: How do I control page display with a PDF?

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

Answers (5)

Jigar Shah
Jigar Shah

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

Vish
Vish

Reputation: 41

You can do this using Quartz Core Api in Iphone SDK.

Upvotes: 1

isaac
isaac

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

Tim
Tim

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

Related Questions