iOS PDF Viewer App v1.0.2

Now available on GitHub is version 1.0.2 of the open source iOS PDF Viewer App (based on the open source iOS PDF Reader Core):

  • Pulled in PDF Reader Core for iOS v2.6.2 code (UIButton exclusiveTouch=YES).
  • Updated the project for Xcode 4.6.2 (iOS 4.3 is now the minimum iOS Deployment Target).

Full resolution screen captures can be found in the README.

Posted in iOS | Comments Off

iOS PDF Reader Core v2.6.2

Now available on GitHub is version 2.6.2 of the open source iOS PDF Reader Core:

  • Touching two UIButtons at the same time could cause a crash (oops). Fixed it by setting exclusiveTouch to YES on all UIControl subclasses (UIButton, UISegmentControl, etc).
  • Updated the project for Xcode 4.6.2 (iOS 4.3 is now the minimum iOS Deployment Target).
Posted in iOS | Comments Off

iOS PDF Viewer App v1.0.1

Now available on GitHub is version 1.0.1 of the open source iOS PDF Viewer App (based on the open source iOS PDF Reader Core):

  • Pulled in PDF Reader Core for iOS v2.6.1 code.
  • Universal: runs on iPad, iPhone and iPod touch.
  • Uses Core Data to keep track of PDF documents.
  • PDF documents can be organized into folders.
  • Supports iTunes File Sharing for file transfers.
  • Handles “Open In…” from other apps (Mail, etc).
  • Multithreaded giving it a responsive UI.
  • In-App HTML-based help.
Posted in iOS | Comments Off

iOS PDF Reader Core v2.6.1

Now available on GitHub is version 2.6.1 of the open source iOS PDF Reader Core:

  • Greatly improved thumb operation cancel handling.
  • iOS 4 support and various other miscellaneous fixes.
  • Refactored to use ARC memory management (iOS 4 and up).
  • General code cleanup and modernization (bye-bye @private cruft).
  • Added ReaderDocumentOutline class (table of contents support).
  • Tested under Xcode 4.5 and iOS 6 (simulator only for iPhone 5).
Posted in iOS | Comments Off

iOS PDF Reader/Viewer v2.5

Now available on GitHub is version 2.5.6 of the open source iOS PDF Reader/Viewer:

  • Now loads and decodes thumbnail PNGs on a background thread.
  • Added READER_DISABLE_RETINA #define performance option.
  • Some performance improvements on iPad 3rd generation.
  • Bug fix to PDF link handling with cropboxed PDF files.
  • Handles PDF web links without http:// as the prefix.
  • Tested under Xcode 4.3.2 and iOS 5.1.
Posted in iOS | Comments Off

iOS PDF Reader/Viewer v2.4

Now available on GitHub is version 2.4 of the open source iOS PDF Reader/Viewer:

  • Replaced UIToolbars with custom toolbars.
  • Some more assorted bug fixes and tweaks.
Posted in iOS | Comments Off

iOS PDF Reader/Viewer v2.3

Now available on GitHub is version 2.3 of the open source iOS PDF Reader/Viewer:

  • Added page thumbnail document navigation.
  • Added support for page bookmarks.
Posted in iOS | Comments Off

iOS PDF Reader/Viewer v2.2

Now available on GitHub is version 2.2.1 of the open source iOS PDF Reader/Viewer:

  • A medium resolution page preview image is now shown first.
  • The page bar now uses small page thumbs instead of a simple slider.
  • Added password handling to ReaderDocument plist unarchive.
Posted in iOS | Comments Off

iOS PDF Reader/Viewer v2.1

Now available on GitHub is version 2.1.1 of the open source iOS PDF Reader/Viewer:

  • Added PDF link (URI and page target) support.
  • Assorted code cleanup, optimizations and bug fixes.
  • Fixed rotation handling when in a UITabBarController.
Posted in iOS | Comments Off

iOS PDF Reader/Viewer v2.0

Now available on GitHub is version 2.0 of the open source iOS PDF Reader/Viewer.

I’ve crafted this open source PDF reader/viewer for fellow iOS developers struggling with wrangling PDF files onto iOS device screens.

The code is universal and does not require any XIBs (as all UI elements are code generated, allowing for greatest flexibility). It runs on iPad, iPhone and iPod touch with iOS 4.0 and up. Also supported are the Retina displays in all new devices and is ready to be fully internationalized. The idea was to provide a complete project template that you could start building from, or, just pull the required files into an existing project to enable PDF reading/viewing in your app(s).

Document navigation is very similar to iBooks: After launching the sample app, tap on the left hand side of the screen to go back a page. Tap on the right hand side to go to the next page. You can also swipe left and right to change pages. Tap on the screen to fade in the toolbar and page slider. Double-tap with one finger (or pinch out) to zoom in. Double tap with two fingers (or pinch in) to zoom out.

This implementation has been tested with large PDF files (over 250MB in size and over 2800 pages in length) and with PDF files of all flavors (from text only documents to graphics heavy magazines). It also works rather well on older devices (such as the iPod touch 2nd generation and iPhone 3G) and takes advantage of the dual-core processor (via CATiledLayer and multi-threading) in new devices.

The overall PDF reader/viewer functionality is encapsulated in the ReaderViewController class. To present a document with this class, you first need to create a ReaderDocument object with the file path to the PDF document and then initialize a new ReaderViewController with this ReaderDocument object. The ReaderViewController class uses a ReaderDocument object to store information about the document and to keep track of document properties (thumb cache directory path, bookmarks and the current page number for example).

An initialized ReaderViewController can then be presented modally, pushed onto a UINavigationController stack, placed in a UITabBarController tab, or be used as a root view controller. Please note that since ReaderViewController implements its own toolbar, you need to hide the UINavigationController navigation bar before pushing it and then show the navigation bar after popping it. The ReaderDemoController class shows how this is done with a bundled PDF file. To create a ‘book as an app’, have a look at the ReaderBookDelegate class.

Please see the README file for more details and information.

Revised 2012-10-05

Posted in iOS | Comments Off