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
Deleting annotationsAnnotation styleShow/hide annotations

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
Changing and disabling toolskeyboard_arrow_down

Changing and disabling tools

In this document
chevron_rightChanging tool

linkChanging tool

When ToolManager is being set up, the default Tool is the Pan Tool. To change the tool, use ToolManager.setTool(ToolManager.Tool) API.

For example, to switch to the Text Highlighting tool, do the following:

mToolManager.setTool(mToolManager.createTool(ToolMode.TEXT_HIGHLIGHT, mToolManager.getTool()));

linkDisabling tools in ToolManager

The default QuickMenu and AnnotationToolbar will show a default set of tools unless you explicitly disable tools. Once a Tool is disabled, ToolManager will never switch to it. Instead, it will switch to the Pan tool. Pan tool cannot be disabled.

Tools can be disabled using the disableToolMode (ToolMode[]) API. For example, the following code removes the Text Highlight tool from the Quick Menu and the Annotation Toolbar, and makes tapping on links not do anything:

// disable LinkAction tool, TextHighlightCreate tool
mToolManager.disableToolMode(new ToolMode[]{
    ToolManager.ToolMode.LINK_ACTION,
    ToolManager.ToolMode.TEXT_HIGHLIGHT}
);