Theme: default | dark | nature

PDFThumbnailHandler

Download Download

I had to scour the net to find all the pieces to make this work. Use this HTTP Handler to dynamically create thumbnails of your PDF documents!

In your web.config file, add a section like this:

<?xml version="1.0"?>
<system.web>
    <httpHandlers>
        <add verb="GET" path="PDF.axd" validate="false" type="GLC.Tools.Handlers.PDFThumbnailHandler, GLC.Tools"/>
    </httpHandlers>
...
</system.web>

To use the handler, you can reference it in an image tag or link to it directly like:

<img src="PDF.axd?pdf=/path/to/my/file.pdf&w=60" />

You must specify the parameter pdf. You can optionally specify the thumbnail width as w in pixels. The default value is 100 (pixels).

Contact us today! Free consulting with no obligation.