Free Support Forum - groupdocs.com

How to: Retrieval of thumbnail URLs (GroupDocs.Viewer)


#1

Hello,


I just want to ask if there is a way that we can retrieve the thumbnail of the files being previewed programmatically? We want to use those thumbnails as a profile image. Below is a sample link of a file thumbnail.

https://testsite.com/document-viewer/GetDocumentPageImage?path=temp\S\Test_PPTFILE.pdf&width=150&quality=20&usePdf=True&useHtmlBasedEngine=True&rotate=False&locale=en-US&pageIndex=0

#2

Hello,


Thank you for the request. Unfortunately GroupDocs.Viewer doesn’t have special method to obtain document thumbnails. But you can try to get them via the URL from your request. You should do next:
1. Generate document cache how described here
2. Use the URL to get thumbnails with such header parameters: http://prntscr.com/90ouf1
Where:

path - file name
pageindex - page number
useHtmlBasedEngine:False - should be false always.

Best regards.