Some test text!


Get started

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

Document Viewer

OverviewShow a document in an ActivityShow a document in a FragmentViewer configurationDay and Night themesOpen from online URL

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

Annotation and collaboration

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

Advanced customization

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


Convert documents to PDFConvert HTML to PDF


Text search

Other Frameworks

XamarinReact Native

Advanced topics

Understand coordinatesDocument savingDocument lockingGenerate page thumbnailsTool class hierarchy


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

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
View mode dialogkeyboard_arrow_down

View mode dialog

In this document
chevron_rightShowing view mode dialog
chevron_rightSetting view mode dialog listener

ViewModePickerDialogFragment allows users to pick PDF page presentation mode, select page color mode, rotate pages, and crop pages.

linkShowing view mode dialog

To show view mode dialog in your activity, create a new instance of ViewModePickerDialogFragment by using newInstance(PDFViewCtrl.PagePresentationMode, boolean, boolean, int), and call show(FragmentManager, String):

where activity is an instance of Activity.

linkSetting view mode dialog listener

In order to let users to pick PDF page presentation mode, color mode, etc. You need to set view mode dialog listener. To set view mode dialog listener, call: ViewModePickerDialogFragment.setViewModePickerDialogFragmentListener(ViewModePickerDialogFragment.ViewModePickerDialogFragmentListener). Override each method in the listener to change page presentation mode, colr mode, reflow, etc.

In function onViewModeSelected(String), the selected view mode values include fowllowing:

To learn about setting page presentation mode, see PDFViewCtrl page presentation mode.
To learn about setting page color mode, see PDFViewCtrl color modes.
To learn about reflow, see reflow.
To learn about cropping pages, see crop page dialog.