Some test text!
This guide demonstrates how to display a PDF. To begin working with PDFTron SDK, you must have first added it to your project.
Add a PDF to your project:
sample.pdf) and confirm add
Build Actionof the file is set to
PDFTron must be initialized with a key that is provided during trial registration or after licensing. This only needs to be done once, and must be done before using any PDFTron classes. This is done as shown:
At the top of your source file, import PDFNet and Tools.
using pdftron; using pdftron.PDF.Controls;
The following shows how to create a document viewer, set the document to display, and present it on screen.
// Create a PTDocumentViewController var documentController = new PTDocumentViewController(); // The PTDocumentViewController must be in a navigation controller before a document can be opened var navigationController = new UINavigationController(documentViewController); // Open an existing local file URL. var fileURL = NSBundle.MainBundle.GetUrlForResource("sample", "pdf"); bool success = documentController.OpenDocumentWithURL(fileURL); // Show navigation (and document) controller. this.PresentViewController(navigationController, true, null);
Get the answers you need: Support