Some test text!

keyboard_arrow_down

Get started

Download PDFTron SDKIntegrate with GradleIntegrate manuallyRun samplesAdd PDFTron license keyQuick start - view a documentProGuardUpdate to latest versionTroubleshooting
keyboard_arrow_down

Document Viewer

keyboard_arrow_down

Document Viewer components

PDFViewCtrlReflowFloating context menuCustomize floating context menuAnnotation toolbarAnnotation style editorCustomize annotation style editorPage sliderAnnotation listDocument outlineUser bookmark listList containerThumbnail browserAdd pages dialogRotate pages dialogView mode dialogCrop pages dialog
keyboard_arrow_down

Annotation and collaboration

OverviewToolManager setupRead only modeDisable annotation creation/editingDefault annotation propertiesAnnotation propertiesEventsOverride annotation handlingShow and hide existing annotationsUndo and redoRealtime collaboration
keyboard_arrow_down

Advanced customization

Add a custom view to a pageCreate a custom toolPage coloring modePage fit modePage layout mode
keyboard_arrow_down

Conversion

Convert documents to PDFConvert HTML to PDF
keyboard_arrow_down

Search

Text search
keyboard_arrow_down

Other Frameworks

keyboard_arrow_down

Advanced topics

Understand coordinatesDocument savingDocument lockingGenerate page thumbnailsTool class hierarchy
keyboard_arrow_down

FAQ

System RequirementsRun project in Android StudioRun project with source codePDFTron full vs. standardLocalizationIcon cheat sheetReduce size of APKEnable multidexOut of memory when rotating device multiple timesReduce memory consumptionDetachCurrentThread warning
keyboard_arrow_down

PDF Processing API

What is PDFNet?Opening a documentSerializing (saving) a documentWorking with pagesWorking with Page ContentWorking with BookmarksWorking with Interactive Forms (AcroForms)PDF SecurityLow-level PDF APIError handling
Run project with source codekeyboard_arrow_down

Run project with source code

The sample referred to in this guide is introduced in the details here. Please make sure you have read the getting started guide before proceeding.

As an example, in this guide we will go through how to run CompleteReader sample project from source.

Before we begin, let's clean the project. In Android Studio, Build -> Clean Project, or gradle clean from command line.

First, open /samples/CompleteReader/build.gradle.

Replace:

implementation "com.pdftron:pdftron@aar"

implementation "com.pdftron:floatingactionbutton@aar"
implementation "com.pdftron:pagecropper@aar"

with:

implementation project(':pdftron')

implementation project(':FloatingActionButton')
implementation project(':PageCropper')

Open /samples/CompleteReader/settings.gradle. Add:

include ':pdftron'
project(':pdftron').projectDir = new File(rootProject.projectDir, '../../lib/src/pdftron')
include ':PDFViewCtrlTools'
project(':PDFViewCtrlTools').projectDir = new File(rootProject.projectDir, '../../lib/src/PDFViewCtrlTools')
include ':pdfnet-demo-utils'
project(':pdfnet-demo-utils').projectDir = new File(rootProject.projectDir, '../../lib/src/pdfnet-demo-utils')
include ':PageCropper'
project(':PageCropper').projectDir = new File(rootProject.projectDir, '../../lib/src/PageCropper')
include ':FloatingActionButton'
project(':FloatingActionButton').projectDir = new File(rootProject.projectDir, '../../lib/src/FloatingActionButton')

Then, open /samples/CompleteReader/app/build.gradle. Replace:

implementation "com.pdftron:tools@aar"
implementation "com.pdftron:demo@aar"

with:

implementation project(':PDFViewCtrlTools')
implementation project(':pdfnet-demo-utils')

Lastly, go back to the root folder, in /lib/src, create a new folder with name pdftron.

Then, create a new file with name build.gradle, and add content:

configurations.maybeCreate("default")
artifacts.add("default", file('pdftron.aar'))

Copy /lib/full/pdftron.aar into /lib/src/pdftron folder.

Sync and run the project if you are using Android Studio, or simply run gradle appStart from command line.

Now CompleteReader sample project is running from source!