Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Static Library to be embedded on iOS applications to display pdf documents derived from Fast PDF

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Bundle
Octocat-spinner-32 Classes
Octocat-spinner-32 Doc
Octocat-spinner-32 FPKCore
Octocat-spinner-32 FastPdfKit.embeddedframework
Octocat-spinner-32 FastPdfKit.xcodeproj
Octocat-spinner-32 OtherSources
Octocat-spinner-32 Resources
Octocat-spinner-32 img
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.md
README.md

FastPdfKit

This repository contains the FastPdfKit iOS library with some sample projects.

FastPdfKit is a library that let you show pdf documents in iOS applications bypassing all performances and missing features problems related to QuickLook.

Side scrolling, search with highlighted results, preview and thumbnails, text extraction, overlay views, embedded multimedia, optimization for every device, single and double page are just some of countless features included in FastPdfKit.

For more information, see the FastPdfKit website and the Support website.

Interface iPadSearch iPad

Interface iPhoneSearch iPhone

Features

Reading

Multimedia and Annotations

Kiosk

Text

Miscellanous

Opportunities

Targets

In the Xcode project you'll find some targets

  • FastPdfKit: framework with everything needed to add just the reader to your app;
  • FPKKioskApp: a Kiosk project with document download and ready to use reader class;
  • FPKSimpleApp: a basic project with custom reader;
  • FPKReaderLib: a static library with the ReaderViewControllerand its dependencies;
  • FPKKioskLib: a static library with the kiosk classes;
  • FPKioskBundle: bundle of resources for needed for the kiosk;
  • FPReaderBundle: bundle of resources for needed by the ReaderViewController.

In FastPdfKit.framework and FPKReaderLib the libFastPdfKit.athat contains the compiled core rendering engine.

All the other classes are public and can be customized or subclassed at will.

Every target can be compiled and recompiled for your needs.

Usage guide

This guide is also available as screencast number 4.

  • Clone the repository from github or just grab the compressed archive;
  • Open your existing project in Xcode;
  • Open the downloaded folder in the Finder and locate FastPdfKit.embeddedframework;
  • Drag the framework on the Xcode workspace;
  • Inherit the project options: select the Project an from info tab and configurations line choose FastPdfKitFramework from the drop down list;
  • Open the framework's Resource folder and locate the Snippets.txt document;
  • Copy in you controller interface these lines:

    #import <FastPdfKit/FastPdfKit.h>
    @class MFDocumentManager;
    -(IBAction)actionOpenPlainDocument:(id)sender;
    
  • Copy in your controller implementation these other lines:

    -(IBAction)actionOpenPlainDocument:(id)sender{
        /** Set document name */
        NSString *documentName = @"Manual";
    
        /** Get temporary directory to save thumbnails */
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    
        /** Set thumbnails path */
        NSString *thumbnailsPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@",documentName]];
    
        /** Get document from the App Bundle */
        NSURL *documentUrl = [NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:documentName ofType:@"pdf"]];
    
        /** Instancing the documentManager */
        MFDocumentManager *documentManager = [[MFDocumentManager alloc]initWithFileUrl:documentUrl];
    
        /** Instancing the readerViewController */
        ReaderViewController *pdfViewController = [[ReaderViewController alloc]initWithDocumentManager:documentManager];
    
        /** Set resources folder on the manager */
        documentManager.resourceFolder = thumbnailsPath;
    
        /** Set document id for thumbnail generation */
        pdfViewController.documentId = documentName;
    
        /** Present the pdf on screen in a modal view */
        [self presentModalViewController:pdfViewController animated:YES]; 
    
        /** Release the pdf controller*/
        [pdfViewController release];
    }
    
  • Choose a pdf from the finder and drop it in the project;

  • Change the documentName to the corresponding name;
  • Call the actionOpenPlainDocument method to open the document;
  • Enjoy.

Changelog

Update 3.0 (November 4th, 2011)

  • Internal changes of the view hierarchy to provide more flexibility and overlay transitions.
  • Revamped ReaderViewController user interface.
  • Better thumbnail scroll view and generation.
  • Added support to video overlay control parameters in the uri.
  • Search now works for terms of unitary length.
  • Added a method to retrieve annotations from the document and provide them as overlays.
  • Slightly changes to MFDocumentViewControllerDelegate callbacks.
  • New activation method with key FPKLicenseKey from Info.plist: no need to pull to get the activated version.

Update 2.1.3 (September 27th, 2011)

Disabled the 2.1.1 font cache due to an implementation oversight. Will be re-introduced as soon as it will behave as expected.

Update 2.1.2 (September 21th, 2011)

  • Cleaned up text search and extraction a little bit. More fixes incoming.

Update 2.1.1 (September 15th, 2011)

  • Added a font cache system for text extraction and search, which should give sensible improvement in search speed especially on documents with a large amount of different fonts.

Update 2.1.0 (September 14th, 2011)

  • Added Overflow page mode to previous Single and Double. Basically, the pdf page will now fill the screen along its width, overflowing under the bottom of the screen if necessary.
  • Added autoMode property. It will tell the MFDocumentViewController to what mode switch when in landscape if automodeOnRotation is YES. Default is MFAutoModeDouble, other option are MFAutoModeSingle and MFAutoModeOverflow.

Update 2.0.3 (August 10th, 2011)

  • Fixed a bug in the transformation returned on double page mode for page with an angle not equal to 0.
  • Added guard to iOS 4.x only methods.

Update 2.0.2 (August 09th, 2011)

  • Added support to link annotation with Remote Go-To actions.
  • Updated manual with latest methods.
  • Added methods to convert points and rect to and from different coordinate systems. Take a look at the MFDocumentViewController for details.
  • Documented the method to get the cropbox and rotation angle for each document page.
  • Finally fixed the bad behavior of the detail (tiled) view on retina device.
  • Fixed a bug involving rendering of the preview pages at low res on retina display introduced a few updates ago.
  • The -didGoToPage callback is now called once when a page is changed on user scroll input.

Update 2.0.1 (July 21th, 2011)

  • Bleeding of the pdf cover images fixed.
  • The embedded UIWebView is now embedded a bit better.

Update 2.0.0-devel (July 12th, 2011)

  • Multimedia support
  • Reorganized project
  • Many other improvements

If you have any other question please post it in the Support Site

Something went wrong with that request. Please try again.