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).
Related
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
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
I've written an iPhone App that downloads a PDF. I want to present this PDF to the user but not draw it in an UIView in my App itself. Is this even possible?
You can use Quartz APIs. CGContextDrawPDFPage and the related samples would be a nudge in the right direction.
UIWebView is another approach. As WTP noted below: UIWebView automatically does pagination and allows the user to scroll, zoom and select content.
UIWebView is the typical 'free' approach, but you may need Quartz APIs if you have special needs.
I am using Quartz to display a PDF if my iPad app rather than a webview as I dont link the borders and drop shadow effects the webview adds.
Can I still use embedded links in the PDFs? If so do I need to do anything special or will they just work?
See this question:
Get PDF hyperlinks on iOS with Quartz
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.