Appcelerator Titanium Bridge for PSPDFKit for iOS
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

PSPDFKit for iOS Appcelerator Bindings

PSPDFKit - The Leading Mobile PDF Framework for iOS and Android.

How to build

Note: Read the Alloy section before building the module if you're using the Alloy framework.

  1. Checkout the project: git clone
  2. Make sure you have Titanium 7.4.0.GA or later installed:
  3. Download the binary build of PSPDFKit from your customer portal:
  4. Open the downloaded .dmg and copy PSPDFKit.framework and PSPDFKitUI.framework into the checked out folder.
  5. Call appc ti build -p ios --build-only in the Appcelerator-iOS folder.
  6. Unzip the created .zip into the Titanium folder (and optionally remove the .zip afterwards): unzip ./ -d ~/Library/Application\ Support/Titanium
  7. Copy PSPDFKit.framework and PSPDFKitUI.framework into your project's Resources/iphone.
  8. Modify your project's tiapp.xml to contain the following entries:
<ti:app xmlns:ti="">
    <module platform="iphone">com.pspdfkit</module>

Note: PSPDFKit 8 for iOS needs at least Xcode 10 or higher and supports iOS 10+.

The ti.dynamiclib module hook in hooks/ti.dynamiclib.js embeds PSPDFKit.framework and PSPDFKitUI.framework into your app. You can find more info about it here.

Using the PSPDFKit module

To use the module in code, you will need to require it, before using it.

var pspdfkit = require('com.pspdfkit');
var pdfView = pspdfkit.createView({
    filename : 'PSPDFKit.pdf',
    options : {
        pageMode : 0, // PSPDFPageModeSingle
        pageTransition : 2 // PSPDFPageCurlTransition
    documentOptions : {
        title : "Custom Title Here"


'PSPDFKit.h' file not found

If PSPDFKit.h can't be found you need to add the directory that contains PSPDFKit.h to the "Header Search Paths" build setting in the Xcode project (PSPDFKit-Titanium.xcodeproj). The correct directories are $(SRCROOT)/PSPDFKit.framework/Headers and $(SRCROOT)/PSPDFKitUI.framework/Headers (recursive).

Build error

[ERROR] :  The following build commands failed:
[ERROR] :   Ld build/Products/Debug-iphonesimulator/ normal x86_64
[ERROR] :  (1 failure)

If you get the above build error when running the project, you likely forgot to include the PSPDFKit module in the tiapp.xml:

    <module platform="iphone">com.pspdfkit</module>


Alloy overwrites all files in the Resources folder everytime the application is built. This means you need to copy PSPDFKit.framework and PSPDFKitUI.framework into a different folder than the default Resources/iphone, for example Frameworks. You also need to do the following before building the module:

  • Modify FRAMEWORK_SEARCH_PATHS in module.xcconfig to point to the new folder, for example replace "$(SRCROOT)/../../Resources/iphone" with "$(SRCROOT)/../../Frameworks".
  • Modify hooks/ti.dynamiclib.js to use the new framework path, for example replace ../../Resources/iphone/PSPDFKit.framework with ../../Frameworks/PSPDFKit.framework and ../../Resources/iphone/PSPDFKitUI.framework with ../../Frameworks/PSPDFKitUI.framework.


This project can be used for evaluation or if you have a valid PSPDFKit license.
All items and source code Copyright © 2010-2018 PSPDFKit GmbH.

See LICENSE for details.


Please ensure you signed our CLA so we can accept your contributions.