Library tutorials & articles

Generate Thumbnail Images from PDF Documents in .NET

The Download

Visual Studio.NET Solution

The project you can download has all the VB.NET code and the COM Interop DLL that was generated. Even though the application is actually a console application we still need System.Windows.Form as the clipboard dataformats are from there.

Use the app.config to set the input and output paths for the .pdf files and .png files respectively. By default it reads and write to C:\thumbnails\.

Output

Running the PDFThumbnail.exe console application will enumerate all the .pdf files in the directory specified in the .config file writing out a .png image of the first page.

Console output

Which we can see in the screenshot below.

Explorer view


Further Enhancements

Further improvements might be to:

  • Render directly to an off-screen bitmap rather than to the clipboard.
  • Remove the reliance on having a full version of Adobe Acrobat by using Ghostscript libraries instead.

One case we had was documents that could be viewed internally but were blocked due to compliance issues for external users, by designing different templates and rendering them with the page it was obviously the document was private further enhancing usuability, eg.

Comments

  1. 04 Nov 2006 at 12:20

    Hai,

             This is very use full and working exactly... But i cant use it for an Online application.....Is there any way to create thumbnail for PDF in online application....Or else Is there any possibilites to call the Existing Console application from Online application

     

    Thanks a lot

  2. 10 Jan 2006 at 08:42

    I do not seem to be able to download the v5 SDK, the only one on the link provided is the UNIX sdk

  3. 01 Jan 1999 at 00:00

    This thread is for discussions of Generate Thumbnail Images from PDF Documents in .NET.

Leave a comment

Sign in or Join us (it's free).

Jonathan Hodgson
AddThis

Related discussion

Related podcasts

  • Interview Dragos Manolescua

    Podcast (MP3): Download Hosts: Markus Guests: Dragos Manolescu Recording venue: JAOO 2006 In this Episode we discuss software architecture evaluation with Dragos Manolescu, an architect at Microsoft's patterns & practices group. We start off the discussion by...

We'd love to hear what you think! Submit ideas or give us feedback