Some test text!


This tutorial only applies to Xamarin.iOS.

For most use cases, we recommend using the PTDocumentViewController or PTTabbedDocumentViewController, which are UIViewController classes 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, PDFViewCtrl, which is a UIView (and is used by the PTDocumentViewController and PTTabbedDocumentViewController).

  1. This guide assumes that you've initialized PDFTron.
  1. Add a PDF to your project:

    • Right click on Resources
    • Click on Add > Add Files
    • Choose a file (in this tutorial, let's say we added a sample.pdf) and confirm add
    • Make sure the Build Action of the file is set to BundleResource
  1. Instantiate a new PDFDoc:

  2. Create a new PDFViewCtrl 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 package. To add support for annotations and text selection you need to incorporate the tools package.