Display PDF using PDFViewCTRL in Xamarin
About PTPDFViewCtrl
The PTPDFViewCtrl is a UIView that displays a PDF.
If your app is displaying a PDF, a PTPDFViewCtrl will be used in one of two ways:
Directly, by adding it as a subview to another view in your app.
As a component piece of a
PTDocumentControllerorPTTabbedDocumentViewController. (It is accessible via thepdfViewCtrlproperty.)
Use PTPDFViewCtrl as a stand-alone component
These instructions assume that you've initialized Apryse.
Add a PDF to your project:
Right click on
ResourcesClick on
Add>Add FilesChoose a file (in this tutorial, let's say we added a
sample.pdf) and confirm addMake sure the
Build Actionof the file is set toBundleResource
Instantiate a new
PDFDoc:
Create a new
PDFViewCtrland add it as a child to the current view:Running the app will now display the PDFsample.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 .
Last updated
Was this helpful?