PDF view in IPhone? - iphone

I have an IPhone application in which i need to have pdf pages view like a book.Is there any way to load a PDF document in a UIWebview so that it can scroll horizontally instead of vertically? Is it possible?If so some one give me the way to do this .Can someone help me?

You cannot do that using a UIWebView neither a QLPreviewController. They do what they do and are no customizable. They use a vertical scroll to present pages from a pdf document.
Your only chance is to open PDF with Quartz framework and access to each page, there are good apple tutorials for this topic. Then you can present separate pages as you want in a UIScrollView with a UIPageControl, much better, a UIPageViewController.

I found an open project. i think it's use full
https://github.com/iamruinous/Reader

Related

I want add pdf page to UIPageViewController view

I am new in iPhone application development, I am developing one iPad application development. In this application i am using UIPageViewController. Now i want pdf file page to display UIPageViewControlller view. how to read pdf page and how to add UIPageViewController please give some me example.
Thanks in advance
You can draw a PDF page to a CALayer or to a UIImage. Apple even have sample code to show how draw a large PDF in a , Zoomable UIScrollview and for page view controller i havent try out this but may be this link will help you out
Apple has a sample code project called ZoomingPDFReader. It's a simple app that displays a page of a PDF. Put this into your app. Keep track of the page number, and then display the corresponding PDF page.
You can download the source code Here

iOS create pdf from UIWebView

I will create the pdf from UIWebView.
I created the pdf by cropping the UIWebView screen.
Then, I have gotten pdf of only part that is currently displayed on the screen of phone.
I want to get pdf of all webview contents.
Does anyone know to solve this problem?
Please help me.
You could set scalesPageToFit to YES. Or scroll the webview after rendering each page.

pdf thumbnails like in ibooks on the ipad or iphone

i need to create a pdf reader with an overview page showing thumbnails of the pdf. like with the pdfs in ibooks.
what would be the best approach for that?
i am thinking about using a uiscrollview and placing uiviews with tiledlayers for pdf rendering? how can i best determine which view is visible and recycle them accordingly?
thanks
joerg
Apple has sample code to get a PDF thumbnail on their developer site. I believe it is in the Quartz2d Programming Guide (unfortunately the site is down for me at the minute so I can't confirm).

IPhone phonegap pdf issue

I have a strange issue in phonegap framework. I want to display PDF file in my application, when I am trying to add PDF file with iFrame tag it doesn't show a PDF with horizontal scroll and with a big zoom size. so getting out of screen.
I tried by another way using embed tag, its also having same problem with addition to that its showing PDF for only first time in the application.
If anybody know how to display a PDF in phonegap with specified zoom level or with scroll bar. Above code is working fine in iPhone mobile safari, but not in phonegap. Any Idea?
Thanks.
To display pdf in phonegap,
have lots of trouble,
but best solution so far,is to used ChildBrowser Plugin for phonegap here is the link-
https://github.com/purplecabbage/phonegap-plugins/tree/master/iPhone/ChildBrowser
this will help you to call child native uiwebview in your application(only for iphone),
so you can easily enjoy pinch zoom feature
Using Phonegap you'll have only one UIWebView so probably the best idea is to open the pdf as a new object link using rel=external
Other suggestion is look at the view-port size, maybe you'll have to increase it's size to allow the pinch and zoom.

UIScrollView as image viewer

I have to use UIScrollView as image viewer like Photo app. The UIScrollView is supposed to show photos with swiping, zooming and rotating with interface rotation.i have to load minimum 20 images.is it possible? which is the best way? plz post some sample codes.
I've written a simple and easy to use photo browser called MWPhotoBrowser which you should be able to look at and dissect.
It is an implementation of a photo viewer that I wrote allowing the user to view one or more images in a similar way to the native Photos app. It can display one or more images by providing either UIImage objects, file paths to images on the device, or URLs images online. Photos can also be zoomed, panned, and navigated with previous/next buttons.
View MWPhotoBrowser on GitHub
Hope this helps!
Refer to the sample application page control here https://developer.apple.com/iphone/library/samplecode/PageControl/ , it should help you get started, they have a scroll view that you can use to scroll through a bunch of pages, you can modify this to do pictures. It doesnt do zooming o rotationg but its a good place to start