Some test text!

keyboard_arrow_down

Get started

Download PDFTron SDK
play_arrow

Quick start - view a document

Integrate with NuGetIntegrate manuallyAdd license keyPermissions (Android)Run samplesUpdate to latest version
keyboard_arrow_down

Xamarin.Forms

keyboard_arrow_down

Fundamentals

Java binding (Android)Objective-C binding (iOS)Code sharingDocument lockingDocument saving
keyboard_arrow_down

Document Viewer

play_arrow

Xamarin.Android

OverviewShow a document in an ActivityShow a document in a FragmentViewer configurationToolManager configurationDay and Night themes
play_arrow

Xamarin.iOS

Open from online URL
keyboard_arrow_down

Document Viewer components

Overview
play_arrow

PDFViewCtrl

play_arrow

Reflow

Quick menuCustomize quick menu
play_arrow

Annotation toolbar

play_arrow

Annotation style editor

play_arrow

Page slider

play_arrow

List container

Xamarin.AndroidXamarin.iOS
play_arrow

Annotation list

play_arrow

Document outline

play_arrow

User bookmark list

play_arrow

Thumbnail browser

Add pages dialogCrop pages dialogRotate pages dialogView mode dialog
keyboard_arrow_down

Annotation and collaboration

OverviewToolManager setupRead only mode
play_arrow

Disable annotation creation and editing

Xamarin.AndroidXamarin.iOS
play_arrow

Default annotation properties

play_arrow

Change tool mode

play_arrow

Events

play_arrow

Override annotation handling

Show and hide existing annotationsRealtime collaboration
keyboard_arrow_down

Advanced customization

play_arrow

Add a custom view to a page

Xamarin.AndroidXamarin.iOSCreate a custom toolPage color modePage fit modePage layout modeScrolling direction
keyboard_arrow_down

Conversion

play_arrow

Convert documents to PDF

Xamarin.AndroidXamarin.iOS
play_arrow

Convert HTML to PDF

Xamarin.AndroidXamarin.iOS
keyboard_arrow_down

Parsing and extraction

keyboard_arrow_down

Digital signatures

keyboard_arrow_down

Form filling

keyboard_arrow_down

Search

play_arrow

Text search

Xamarin.AndroidXamarin.iOS
keyboard_arrow_down

Redaction

keyboard_arrow_down

Advanced topics

PrintUnderstand coordinatesGenerate page thumbnails
keyboard_arrow_down

Reference

LocalizationIcon cheat sheet
keyboard_arrow_down

PDF Processing API

Xamarin.Androidkeyboard_arrow_down

Convert documents to PDF

In this document
chevron_rightView a document
chevron_rightOption 1: from local device storage
chevron_rightOption 2: from content uri
This tutorial only applies to Xamarin.Android.
Conversion requires full version of PDFTron library. See PDFTron full or standard?
If you are already using any of DocumentActivity or PdfViewCtrlTabHostFragment, you will not need to go through this article as viewing of other document types is already taken care of internally. Continue reading this article if you are not planning to use any of the above.
Saving annotations back to non-PDF formats is not supported. You can instead save the annotated PDFDoc to a PDF file.

PDFViewCtrl has a powerful and seamless conversion system which allows you to stream documents during conversion to PDF. It supports the following file types:

  • Office file conversion: .docx, .pptx, .xlsx, .doc. (with the office conversion Add-On module)
  • Image conversion: .bmp, .jpg, .tif, .png, .gif
  • Image collections (zip archives with any type of image listed above)
  • Markdown: .md

In this tutorial you will be able to display a non-PDF file in PDFViewCtrl.

Before going forward, please make sure you have finished setting up PDFViewCtrl as described in Using PDFViewCtrl.

linkView a document

The easiest way to display a non-PDF file in PDFViewCtrl is through the PDFViewCtrl.openNonPDFUri API.

linkOption 1: from local device storage

To access device storage, add the following permissions to AndroidManifest.xml file in the <manifest> tag (outside of the <application> tag):

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Then add the following when you would like to show the document, typically onCreate or onResume of your Activity or Fragment:

linkOption 2: from content uri

Add the following when you would like to show the document, typically onCreate or onResume of your Activity or Fragment:

To monitor the conversion event, do: