Some test text!


Get started

Quick start - view a documentDownload PDFTron SDKIntegrate with GradleIntegrate manuallyRun samplesAdd license keyUpdate to latest versionTroubleshooting


System requirementsDocument lockingDocument savingRun project in Android StudioRun project with source codePDFTron full vs. standardReduce size of APK

Document Viewer

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

Document Viewer components

OverviewPDFViewCtrlReflowQuick menuCustomize quick menuAnnotation toolbarAnnotation style editorCustomize annotation style editorPage sliderList containerAnnotation listDocument outlineUser bookmark listThumbnail browserAdd pages dialogCrop pages dialogRotate pages dialogView mode dialog

Annotation and collaboration

OverviewRead only modeDisable annotation creation and editingDefault annotation propertiesChange tool modeEventsOverride annotation handlingShow and hide existing annotationsUndo and redoRealtime collaboration

Advanced customization

OverviewAdd a custom view to a pageCreate a custom toolPage coloring modePage fit modePage layout modeScrolling directionRight-to-left support


Convert documents to PDFConvert HTML to PDF

Parsing and extraction


Digital signatures



Text search

Advanced topics

PrintUnderstand coordinatesGenerate page thumbnailsChange annotation propertiesDelete annotationsTool class hierarchy

Other frameworks



Multidex build errorReduce 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
Page fit modekeyboard_arrow_down

Page fit mode

In this document
chevron_rightPage view modes
chevron_rightSet the default page fit mode
chevron_rightSet the page fit mode dynamically

PDFViewCtrl's page view mode controls the default zoom level of pages and documents. New documents will automatically open at the zoom level specified by the mode.

If you configured PDFViewCtrl by using AppUtils.setupPDFViewCtrl, the page view mode and zoom level is maintained automatically. Click here to learn more about setting up PDFViewCtrl.

linkPage view modes

PDFViewCtrl supports the following page view modes:

Page view mode DescriptionScreenshot-portraitScreenshot-landscape
PageViewMode.FIT_PAGEThe zoom is set so that the entire page is visible without scrolling.
PageViewMode.FIT_WIDTHThe zoom is set so that the page's width matches the viewer's width.
PageViewMode.FIT_HEIGHTThe zoom is set so that the page's height matches the viewer's height.
PageViewMode.ZOOMThe viewer's zoom is not adjusted based on the page.

linkSet the default page fit mode

You can set a default page fit mode in your PDFViewCtrl by using setPageRefViewMode(PageViewMode).

linkSet the page fit mode dynamically

If you want to dynamically change the page fit mode, use setPageViewMode(PageViewMode). Note that when the user flips the page, the page view mode will be automatically reset to the default mode set by setPageRefViewMode.

It is also possible to maintain the zoom level when switching pages.

PDFViewCtrl allows users to zoom in and out with touch gestures. To maintain zoom level when flipping pages, call setMaintainZoomEnabled(boolean). Note that when you double tap PDFViewCtrl will end zooming and reset the page view mode to preferred page view mode. To set preferred page view mode, callsetPreferredViewMode(PageViewMode).