Some test text!


Migrate to the New Viewer UI

The new UI is in beta. If you have any feedback or questions, please let us know


  • Updated PDFTron libraries to version 8.0.0 (see changelog for more info)

linkMigrating from a PTDocumentViewController to a PTDocumentController

linkMigrating when using a PTTabbedDocumentViewController

The tabbed document view controller instantiates PTDocumentViewController instances by default. To use the new UI, set the viewControllerClass property of the tabbed document view controller to PTDocumentController.

The property types and method signatures of the PTTabbedDocumentViewController class have changed to reference the PTDocumentBaseViewController abstract base class. The existing PTDocumentViewController class and the new PTDocumentController class both inherit from the abstract base class. Care should be taken in Objective-C to use the correct class/type, but in Swift the compiler should guide you in making the necessary changes.

linkDelegate methods

The type of the documentViewController parameter of the tabbedDocumentViewController:willAddDocumentViewController: delegate method has changed from PTDocumentViewController to the abstract base class PTDocumentBaseViewController. This means that you must change the parameter type in your implementation of the PTTabbedDocumentViewControllerDelegate protocol. In Swift if the parameter type in your implementation does not match the type declared in the protocol then your implementation of the method will not be called.

linkUpdate API-based customizations

The new UI's API is almost entirely additive, so migrating will in many cases be a case of changing only the class name of the instantiated view controller.

Below lists APIs that have changed.


Most properties operate as before. These are the ones that have been removed, and how to accomplish the same thing with a PTDocumentController.

Removed PTDocumentViewController propertiesHow to achieve the same functionality with a PTDocumentController.
freehandButtonHiddenOne-touch access to freehand annotations is now found in the toolbar. It (and any other tool's button) can be hidden as described in the customize guide.
annotationToolbarButtonHiddenThe visibility of the toolbar is now controlled via the toolbar switcher. The switcher can be hidden as described in the customize guide.
freehandButtonItemA freehand button no longer exists by default in the the navigation items, but one can be added described in the customize guide.
annotationButtonItemThe toolbar's visibility is now controlled by a PTAnnotationModeIndicatorView.
undoButtonItemThis property is now part of PTAnnotationModeManager.
redoButtonItemThis property is now part of PTAnnotationModeManager.
annotationToolbarThe customize guide shows how to programmatically customize the new annotation toolbar. The old annotation toolbar class, PTAnnotationToolbar, is still available if your app requires it.
annotationToolbarHiddenThe customize guide shows how to hide and show the new annotation toolbar.

linkDelegate methods

  1. Change the conforming delegate from PTDocumentViewControllerDelegate to PTDocumentControllerDelegate.
  2. Change the delegate methods to reference the PTDocumentController, both in method name and parameter type, eg:
- (void)documentViewControllerDidOpenDocument:(PTDocumentViewController *)documentViewController;

is now

- (void)documentControllerDidOpenDocument:(PTDocumentController *)documentController;

linkAnnotation toolbar

The PTAnnotationToolbar is no longer used, as the new classes are far more versatile and customizable. The old class is available for direct integration if your app requires it.

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.

Join our upcoming webinar to find out about built-in, full-functioning document capabilities directly in Salesforce.

Save your seat