Step 2: View a document in Xamarin.iOS

  1. If you do not already have an existing application, create a new Visual Studio iOS App project with Single View App.
  2. Add these namespaces to ViewController.cs:

C#

1using pdftron;
2using pdftron.PDF.Controls;
  1. Add a new NavigationController as the entry point and make the existing ViewController the root view controller:

Apryse Docs Image

Your final setup should look like this:

Apryse Docs Image
  1. Add the following lines to the ViewDidLoad() method:

C#

1var documentController = new PTDocumentController();
2this.NavigationController.PushViewController(documentController, true);
3documentController.OpenDocumentWithURL(new Uri("https://pdftron.s3.amazonaws.com/downloads/pdfref.pdf"));
  1. Run the application in debug mode and you should see the DocumentController start up:
Apryse Docs Image

Next step

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales