How can I try annotations through PDFNet for Xamarin.Forms on UWP?

52 views
Skip to first unread message

Aaron

unread,
Feb 5, 2018, 2:30:41 PM2/5/18
to PDFTron PDFNet SDK
Q:

I have a Xamarin.Forms app on UWP.  I'd like to bring up PDFNet within my project and try out annotations.  What steps are required?

A:

Our sample for Xamarin.Forms runs on UWP (as well as iOS and Android) out of the box.  You can request a link to the PDFNet for Xamarin download page from https://www.pdftron.com/pdfnet/mobile/xamarin_pdf_library.html.  A link to the Xamarin.Forms sample is at the bottom of the PDFNet for Xamarin download page.

To start using annotations within that sample, you will need the tools library for PDFNet for UWP.  That library is included with PDFNet for UWP.  You can request a link to the PDFNet for UWP download page from https://www.pdftron.com/pdfnet/mobile/windowsmobile_pdf_library.html.

Open the UWP download package, and locate the Tools project: "\Samples\PDFViewCtrlTools_VS2015".

In your solution, add the PDFViewCtrlTools project to your solution.

In your Xamarin.Forms UWP project, add a dependency to include PDFViewCtrlTools project.

Then add the following code add code to FormsDemo\FormsDemo.UWP\ViewerPageRenderer.cs:

ToolManager = new ToolManager(PDFViewCtrl);
ToolManager.EnablePopupMenuOnLongPress = true;
ToolManager.PanToolTextSelectionMode = ToolManager.TextSelectionBehaviour.Mixed;
ToolManager.TextMarkupAdobeHack = true;

Reply all
Reply to author
Forward
0 new messages