We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to display/generate PDF pages as thumbnails?

The WinForms PDF Viewer does not support displaying PDF pages as thumbnail. However, as a workaround, the PDF document pages can be viewed as thumbnail by exporting them as images using the PdfLoadedDocument.ExportAsImage() API. Clicking on the thumbnail image will navigate to the corresponding page in PdfViewerControl.


Refer to the following code snippet.
C#.
In this sample, we have used the TableLayoutPanel to view the PDF pages as thumbnail.

Load the PDF document into PDF Viewer using the Load API and hook the DocumentLoaded event of PDF Viewer to export the PDF pages as images.


The DocumentLoaded event will be triggered every time when loading new PDF document in PDF Viewer. So, perform ExportAsImage functionality in the DocumentLoaded event for converting the PDF pages of newly loaded PDF document into thumbnail images.

 

Convert the PDF pages as images using the ExportAsImage API of PDF Viewer and set the converted bitmap image to the Picture control. Finally, add the picture controls to the TableLayoutPanel to view the PDF as thumbnail images. Please find the UG documentation link for ExportAsImage API.
https://help.syncfusion.com/windowsforms/pdfviewer/working-with-pdf-viewer#exporting-pdf


Use the GoToPageAtIndex API of PDF Viewer to navigate to the specified page while clicking the thumbnail image. Please find the UG documentation link for GotToPageAtIndex API.
https://help.syncfusion.com/windowsforms/pdfviewer/how-to/load-a-specific-page


Sample link:
http://www.syncfusion.com/downloads/support/directtrac/general/ze/SampleWF1656308284

Please find the output of thumbnail view sample.


Article ID: Published Date: Last Revised Date: Platform: Control:
8863 06/21/2018 11/27/2018 WinForms PdfViewer
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon