Generate a PDF page thumbnail

You can generate images of pages in documents.

Generate PDF page thumbnails in Xamarin.Android

This tutorial only applies to Xamarin.Android.

Apryse'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:

C#

1pdfViewCtrl.ThumbAsync += (sender, e) =>
2{
3 var bitmap = Bitmap.CreateBitmap(e.Width, e.Height, Bitmap.Config.Argb8888);
4 bitmap.SetPixels(e.Buf, 0, e.Width, 0, 0, e.Width, e.Height);
5 // use the bitmap
6};
7
8// request thumbnail for page 3
9pdfViewCtrl.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().

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales