tags:

views:

404

answers:

6

Hi,

I have question about view for displaying multipage PDFs in my app. I have found solutions with webview but they lack ability to zoom and scroll between pages horizontally. Also found solutions using Quartz2D but the same problem as above.

Is there any way to present PDF like in iBooks? You can pinch-i/out zoom, list between pages horizontally. And also how to do taht with single PDF file, not split PDF to pages.

Thanks a lot.

A: 

Hi, I can't give you the answer, but i can redirect you to a example project that is able to load and render a multipage pdf page by page.
To be honest this application it's manly on the iBook curl effect (forget it, it's a private API, no way) but inside there is a class that render on a view a pdf page, I'm sure that if you play a little with that code, CGAffineTransformMakeScale, CGAffineTransformMakeTranslation and touch control you will be able to obtain that effect.

Link to the project:
http://blog.steventroughtonsmith.com/2010/02/apples-ibooks-dynamic-page-curl.html

Cesar
A: 

That page is interesting indeed, but i have found it about 5days ago :) I don`t intend to use page-curl effect. I only want view PDFs like iBooks app (not eBooks but PDFs - try it, it is displayed differently)

rackom
A: 

Check out GoodReader. I can read 80MB PDFs with no problems.

Mike Wills
A: 

GoodReader isn`t open-source as I know :) I want make my own application and view PDFs in it. Anyway thanks :)

rackom
My misunderstanding. Sorry about that.
Mike Wills
A: 

Maybe I am wrong but iOS4 should have pdf reading support. ?!

Adrian Pirvulescu
Yes, you can present PDFs in your app in WebView, but scrolling vertically ins`t that I want. Also you can`t zoom in/out.
rackom
+1  A: 

Checkout this sample code from Apple:

http://developer.apple.com/library/ios/samplecode/ZoomingPDFViewer/Introduction/Intro.html

It tells you how to efficiently display and zoom PDF documents.

For paging, see this link:

http://www.random-ideas.net/posts/42

Between the two of those you should be all set.

Duane Fields