Some test text!

menu
search
Create 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 thumbnail browser.

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

The following example request thumbnail for page 3:

pdfViewCtrl.addThumbAsyncListener(new PDFViewCtrl.ThumbAsyncListener() {
    @Override
    public void onThumbReceived(int page, int[] buf, int width, int height) {
        try {
            Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
            // use the bitmap 
        } catch (OutOfMemoryError oom) {
            // error
        }
  }
});

// request thumbnail for page 3
pdfViewCtrl.getThumbAsync(3);

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().

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.

PDFTron Receives USD$71 Million Growth Investment Led By Silversmith Capital Partners

Learn More
close