Some test text!

Getting started

keyboard_arrow_down
Running samplesTry demo in your projectDownloading PDFTronIntegrating PDFTron via GradleManually integrating PDFTronUpgradingAdding PDFTron license keyUsing ProGuardTroubleshooting integration

Fundamentals

keyboard_arrow_down
Document lockingSaving PDF documentsUnderstanding coordinates

Basics

keyboard_arrow_down
Using an ActivityUsing a FragmentUsing PDFViewCtrlViewer configConverting and viewing other document typesConverting HTML to PDF

Viewer

keyboard_arrow_down
PDFViewCtrl color modesPDFViewCtrl page view modePDFViewCtrl page presentation modeGenerating thumbnails in PDF

Features

keyboard_arrow_down
Day/Night themesUndo and redoText searchAnnotation syncingRotating PDF pagesPDFViewCtrl read onlyUsing PDFViewCtrl with minimum memory

Tools

keyboard_arrow_down
Tools overviewSetting Up ToolManagerChanging and disabling toolsIntercepting annotation handlingToolManager eventsDefault annotation propertiesTool subclasses

Annotations

keyboard_arrow_down

UI components

keyboard_arrow_down
Quick menuAnnotation toolbarAnnotation style dialogThumbnail sliderAnnotations listOutline listUser bookmarks listBookmarks dialogPage thumbnails dialogAdd page dialogRotate pages dialogView mode dialogCrop page dialogReflow

Advanced

keyboard_arrow_down
Adding a custom view to a PDF pageCustom toolCustomizing quick menuCustomizing annotation style dialog

FAQ

keyboard_arrow_down
Running project in Android StudioSystem RequirementsPDFTron full vs. standardLocalizationIcon cheat sheetRunning sample with sourceReducing size of APKEnable multidexOut of memory when rotating device multiple timesDetachCurrentThread warning

PDF Processing API

keyboard_arrow_down
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
Day/Night themeskeyboard_arrow_down

Day/Night themes

AppCompat has a new theme called DayNight since Support Lib 23.2.0. So, if your activity's theme extends from one of the DayNight variants then you can switch between dark theme and light theme in your activity as follows.



As you can see, to take any effect for changing night mode the activity should be re-created.

For example, in our DocumentActivity, we change the device UI night mode when the PDFViewCtrl's color mode is updated:



You can also have different styles for device day/night modes by creating new resources for night. This involves adding a new directory to the resources folder, using the night qualifier, to re-define the resources. In the following example, primary colors and accent color are different in day and night mode:

res/values/styles.xml

<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
        <item name="colorPrimary">@color/color_primary_day</item>
        <item name="colorPrimaryDark">@color/color_primary_dark_day</item>
        <item name="colorAccent">@color/color_accent_day</item>
    </style>

res/values-night/styles.xml

<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
    <item name="colorPrimary">@color/color_primary_night</item>
    <item name="colorPrimaryDark">@color/color_primary_dark_night</item>
    <item name="colorAccent">@color/color_accent_night</item>
</style>