Some test text!
PDFTron for Xamarin SDK takes advantage of PInvoke which allows calling C functions from C# directly. As a result, majority of PDFTron classes share the same API between Xamarin.Android and Xamarin.iOS. For example, you can find
iOSMiscellaneousSamples in the download packages which share all of their source code.
This guide demonstrates how to structure your project to allow code sharing. Platform specific classes will be listed at the end of this guide.
First, create a
Common folder outside of both apps, for example:
MyProject/ |__Common/ |__MyAndroidApp/ |__MyiOSApp/
Common folder will be where all the shared source files live.
For example, let's say we have a
Common/CreateSticky.cs file for creating sticky note annotations.
Now, when open each of the Xamarin.iOS or Xamarin.Android project in Visual Studio, add
CreateSticky.cs as a linked item:
In Visual Studio for Mac:
Add a linkin the
Add File To Folderdialog
In Visual Studio 2017:
Common/CreateSticky.cs, in the same dialog, instead of
Addbutton, click the down arrow and select
Add As Link
And that is it! You can use PDFTron
pdftron.PDF.Annot class to create the sticky note in a file that is now shared between Xamarin.Android and Xamarin.iOS apps.
List of platform specific classes:
Get the answers you need: Support
Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.
Select a platform to get started with your free trial.
Unlimited usage. No email address required.
Upcoming webinar: How to add document collaboration to your appLearn More