0

I am using the code in the following question (Extract thumbnail for any file in Windows) to extract thumbnails from files using C#.

It works great except for PDF files. When I open a given folder in Windows Explorer I can see the PDF thumbnails (I configured Adobe PDF reader DC to show thumbnails in Explorer) when using the code supplied, the app takes around 30 s and it returns only the PDF icon instead of the thumbnail shown in Explorer. Other types of file (PPTX, png, jpg) return the thumbnail almost instantly.

Has anyone got any idea of what could be done to make this work? Could it be a version (32 vs 64 bit) issue between shell and Adobe reader extension? Thanks!

Update

I have created a console APP in visual studio with a simple test and it worked as expected. Also checked that running the console app with the Network Service account worked with success.

Then I've created a webapi project with the same simple test and here is where it gets interesting:

When I run the webapp directly from VS it works as expected and I get the preview thumbnail.

If I deploy the webapp to my Local IIS, it does not work and only produces the thumbnail with the icon.

So I think it has something to do with IIS.

I have tried running the app pool with different accounts (Local Service, Network Service and even my account) with no better results.

M Vaz
  • 23
  • 4
  • How large are said pdf files? – Nyerguds Apr 23 '20 at 13:03
  • Hi, I have tried with small and large files (from a single page to large documents). In Windows File Explorer, the thumbnail is generated in less than a second. – M Vaz Apr 23 '20 at 14:17

0 Answers0