Some test text!


Get started integrating PDFTron iOS SDK

Welcome to PDFTron. This guide will help you integrate a free trial of the PDFTron iOS SDK into your Xcode projects for iOS applications. You can either integrate PDFTron frameworks automatically using CocoaPods, or install them manually by downloading the SDK. Pick whichever your option you prefer, but integrating with CocoaPods is the recommended approach. Your free trial includes unlimited trial usage and support from solution engineers.

Swift Package Manager Integration for iOS

No trial license key required.
The trial of PDFTron SDK works without a license key. A commercial license key is required for use in a production environment. Please fill out our licensing form if you do not have a valid license key.
Keep your commercial license key confidential.
License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).

linkIntegrating PDFTron SDK for your iOS application

Apple has information on using Swift Package Manager, which you may review for topics not covered in this guide.

PDFTron is available as a Swift Package from the following URL:

To include it, open your project's Swift Package Manager pane:

Enter the github link to the package. Add a high maximum version number to ensure you are always up-to-date. PDFTron versioning does not strictly follow a semantic versioning system. (We very rarely make changes that break public APIs.)

linkAdd Required Permissions

PDFTron uses a select number AppStore permissions to allow certain functionality such as adding image stamps and detecting the Apple Pencil. Your app's plist must include the following keys (with whatever description is appropriate for your app), or it will be rejected from the AppStore.

<string>This will allow you to use the image from your camera.</string>
<string>This will allow you to add images to your photo library.</string>
<string>This will allow you to create signatures and annotations from images in your photo library.</string>
<string>This will allow us to detect if an Apple Pencil is paired, enabling palm rejection and the ability to scroll with one finger while annotating.</string>
<string>This will allow us detect if an Apple Pencil is paired, enabling palm rejection and the ability to scroll with one finger while annotating.</string>

linkInitialize PDFTron

You only need to explicitly initialize PDFTron when you have purchased a license key.

Initialize PDFTron before you use any PDFTron related classes or methods. This only needs to be done once.

The best practice to do this is to use the optional application:willFinishLaunchingWithOptions: method in the AppDelegate class found in either the AppDelegate.swift or AppDelegate.m file in the left pane depending on your choice of language:

// In AppDelegate.swift
import UIKit
import PDFNet
class AppDelegate: UIResponder, UIApplicationDelegate {
    var window: UIWindow?
    //... Any methods already here
    func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions:[UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        PTPDFNet.initialize("Insert Commercial License Key Here After Purchase")
        return true

While you are trialing PDFTron, you can pass any string to the initialize method. A string that is not a license key will enable demo mode, where all pages are lightly watermarked.

You can now use PDFTron SDK to view, annotate and edit documents.

Note: SPM distributes the dynamic .xcframework only. If you wish to use the .framework, you will need to use CocoaPods or Manual integration. If you wish to use the static framework, you will have to integrate it manually.

linkNext step

View a document

Get the answers you need: Support


Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.