Some test text!

Displaying a PTPDFViewCtrl

For most use cases, we recommend using the PTDocumentViewer or PTTabbedDocumentViewer, which are UIViewController objects that present a complete PDF experience including an annotation toolbar, buttons for changing the page layout, searching text, etc. APIs allow convenient customization.

This guide describes a lower-level control, PTPDFViewCtrl, which is a UIView (and is used by the PTDocumentViewer and PTTabbedDocumentViewer).

  1. This guide assumes that the PDF document sample.pdf has been added to your app's bundle (see step 1), and that you've initialized PDFTron.
  1. Instantiate a new PTPDFDoc:

  2. Create a new PTPDFViewCtrl and add it as a child to the current view:


    Running the app will now display the PDF sample.pdf. However, it will not support annotation creation, editing, text selection, or any other UI aspect that is handled by Tools.framework. To add support for annotations and text selection you need to incorporate the tools framework.