[Mediawiki-l] PdfHandler: Thumbnail creation fails

Matthias Korn matsch at rockinchina.com
Fri Jan 22 21:43:03 UTC 2010

I have a problem with the PdfHandler extension to display thumbnails of
PDF files

When uploading a PDF file the thumbnail and pages are not generated
giving the following error instead of the image (I've tried different

Error creating thumbnail: convert: no decode delegate for this image
format `/tmp/magick-XXY76lVk'.
convert: missing an image filename

Some debugging seems to show that Ghostscript may be to blame. If
writing the Ghostscript output to a file instead of piping it to
convert in the PHP script I get:

Unrecoverable error: stackunderflow in .setdistillerparams

Issueing the same command from the command line works fine and produces
a thumbnail:

('/usr/bin/gs' -sDEVICE=jpeg -sOutputFile=- -dFirstPage=1 -dLastPage=1
-r150 -dBATCH -dNOPAUSE -q '/var/www/w/images/8/84/Poster.pdf' | sudo
'/usr/bin/convert' -depth 8 -resize 424 -

Linux 2.6.26-2-vserver-amd64
gs-gpl 8.62.dfsg.1-3.2lenny1
imagemagick 7:
php5-cgi 5.2.6.dfsg.1-1+lenny4

How can I further debug?
Hope anyone can help!


Rock in China

More information about the MediaWiki-l mailing list