0

I am developing a file manager WEB application based on Azure Blob Storage, ASP.NET and C#.

I need to get a thumbnail of a PDF file to display it as an icon of the file.

How to achieve this goal in a proper way? Do I need to download PDF file first and than generate a thumbnail on WEB server or there is way to get it done using Azure Blob Storage API or SDK?

Dmitry Kazakov
  • 1,639
  • 3
  • 27
  • 47

2 Answers2

0

Finally, I have solved it by using Ghostscript. I have developed my own wrapper for C#. There is example available on net:

A Simple C# Wrapper for Ghostscript

There are other solutions also available

Convert PDF to Image(s) using ImageMagick

Windows API Code Pack Thumbnail Preview Thumb of PDF

Windows API Code Pack 1.1.0 - download link

Community
  • 1
  • 1
Dmitry Kazakov
  • 1,639
  • 3
  • 27
  • 47
-1

Of course, you will have to download the PDF and then generate the thumnail. But to optimize performances, you can use an "Azure WebJob" or an "Azure Function" to delegate this job and do not block your web app.

Thibaut Ranise
  • 705
  • 4
  • 12