Bug: Thumbnail image not generated for PDF files

Bug: Thumbnail image not generated for PDF files

By | 2016-12-01T16:37:50+00:00 May 24th, 2011|Bugs|3 Comments

Today I discovered a bug that affects all galleries upgraded from a version earlier than 2.4.3. You are affected if all of the following are true:

  • You have PDF files in your gallery.
  • You originally installed GSP before version 2.4.3 and then upgraded to one of the later versions.
  • Your site is running in Full Trust.
  • You installed the Gallery Server Pro Binary Pack.

In short, this is a bug in the SQL upgrade script that shipped in 2.4.3 and later. Fortunately, there is an easy fix.

First, some background: In a default installation GSP creates a generic thumbnail image for PDF files, like this:


When you install the Gallery Server Pro Binary Pack, GSP uses the ImageMagick and GhostScript utilities to generate a thumbnail image that is an actual preview of the PDF file:


Today I discovered a bug, introduced in 2.4.3, where PDF files *always* get the generic thumbnail image, even when the binary pack is installed. The cause of this is a typo in the SQL upgrade script for 2.4.3:


[gs_GallerySetting] SET [SettingValue] = ‘pdf,.txt,.eps,.psd,.tif,.tiff’
WHERE [SettingName] = ‘ImageMagickFileTypes’;

See the typo? I missed the period in front of ‘pdf’. To fix your gallery, update the setting to include the period. You can use this SQL:

UPDATE [gs_GallerySetting] SET [SettingValue] = ‘.pdf,.txt,.eps,.psd,.tif,.tiff’
WHERE [SettingName] = ‘ImageMagickFileTypes’;

Since these settings are cached, recycle the IIS application pool to force the gallery to get a fresh copy from the database.

The next version of GSP will include a fix for this.

About the Author:

Founder and Lead Developer of Gallery Server


  1. mkmorrison04 September 8, 2011 at 9:03 am

    What is the quickest method to implement this update to the GalleryServerPro_Data.sdf file? In my case it is not running in SQL database, it is just a stand alone file.

  2. mkmorrison04 September 8, 2011 at 10:29 am

    Regarding my last post, I found the immediate fix was dropping vcomp100.dll to the bin directory.

  3. Roger Martin September 8, 2011 at 10:37 am

    This bug should not exist once you upgrade to 2.5.

Leave A Comment