Some test text!


Get started

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

Document Viewer


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

OverviewRead 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


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
Generate page thumbnailskeyboard_arrow_down

Generate page thumbnails

PDFTron's library provides a page thumbnail dialog which shows thumbnails of all PDF document pages. Fore more information, see page thumbnails dialog fragment.

With PDFViewCtrl, you can get a thumbnail Bitmap image of each page in PDF document.

  1. To add a async listener for receiving a page thumbnail image, call PDFViewCtrl.addThumbAsyncListener(PDFViewCtrl.ThumbAsyncListener). When the page thumbnail is ready, onThumbReceived(int, int[], int, int) will be invoked. The second parameter represents the received thumbnail image buffer.

  2. To create a Bitmap object from the image buffer, call: Bitmap.createBitmap(int[], int, int, Bitmap.Config).

    For example, the following code snippet puts received thumbnail image buffer to an ImageView when a page thumbnail is received.


    where pdfViewCtrl is an instance of PDFViewCtrl, and imageView is an instance of ImageView.

As the size of ImageView may not be as large as the thumbnail image, it's recommended to resize the bitmap to save memory. Alternatively, you can also use Utils.manageOOM(PDFViewCtrl) to free up memory if an out of memory error occurs.
  1. To request a page thumbnail, call PDFViewCtrl.getThumbAsync(int). Please note that if multiple requests are made, the thumnails will be processed starting with the last request.


    where pdfViewCtrl is an instance of PDFViewCtrl.

    It is recommended you cancel all thumbnail requests once they are no longer needed. To cancel all thumbnail request, use PDFViewCtrl.cancelAllThumbRequests().