Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show a PDF page by page using horizontal swipe in iphone?

I want to create a page by page PDF reader.

I know how UIWebView can be used to show the PDF but It will load the entire PDF and want to show one page at a time.

The PDF is stored locally. Next and previous PDF Pages should be loaded depending on the horizontal swipe.

How to show a single page along with horizontal Swipe and Zooming functionalities ? What is the best approach for such problem? Is there any tutorial for this?

EDIT : I have used CGPDF APIs to show the PDF page by page. I am using the PDF page as image. But zooming is not working properly as UIPageControl is also used. How to zoom these images along with page control ?

like image 652
Roger_iPhone Avatar asked Sep 20 '10 07:09

Roger_iPhone


People also ask

How do I make a horizontal scroll in PDF?

Or you can right click anywhere in the PDF and choose Vertical or Horizontal, Single Page or Two Page, tick Continuous Scroll and click Read Mode On or Off from the pop-up menu.

How do I get my iPhone to auto scroll PDF?

Tap "View" on the main menu and choose "Auto Scroll".


1 Answers

You can use Leaves View, you can find tutorial from

https://github.com/brow/leaves

second option is FastPDFKit, you can get it from

http://mobfarm.eu/

According to me leaves is more preferable because memory management is good and it is more user friendly.

EDIT:

You can consider two more options which provide some good features for PDF.

  1. Reader on Github
  2. PSPDFKit

Note: PSPDFKit is not free.

EDIT: Since iOS 5, you can add an effect of swiping the page like iBooks. To do it that way you can use UIPageViewController. To get some basic idea, just create an app with page-based application from your Xcode template or you can refer to this link.

like image 85
Ankur Avatar answered Sep 28 '22 04:09

Ankur