Microsoft Xamarin

Developers can use Xamarin to write native iOS and Android apps with a shared C# codebase. We provide separate bindings for iOS and Android, as they are different SDKs that each have an API that closely matches their respective underlying system.

We offer bindings for PSPDFKit for Android and regularly update them to be compatible with new releases. A recent version of Visual Studio for macOS or Windows is required. See the project README for details.

Xamarin.Forms

Xamarin.Forms does not support embedding Fragments. However, you can show a new Activity, so fullscreen PDF display is possible. See the provided Xamarin.Forms example for more details.

Xamarin.Forms does not allow hijacking the ContentPage, so by default, only fullscreen presentation is allowed. With the new Xamarin.Forms embedding, you can take any ContentPage and add it to your native applications. This technique is also showcased by our PSPDFCatalog example app.

Open a PDF

Opening a PDF with PSPDFKit for Xamarin is as simple as this:

Copy
1
2
3
4
5
6
var pspdfkitConfiguration = new PdfActivityConfiguration.Builder (ApplicationContext)
	.PageMode (PSPDFPageMode.Single)
	.PageTransition (PSPDFPageTransition.ScrollContinuous)
	.ScrollDirection (PSPDFScrollDirection.Vertical)

PdfActivity.ShowDocument (this, docUri, pspdfkitConfiguration);