Please help me test this file

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
phy9pas

Please help me test this file

Post by phy9pas »

I'm having trouble thumbnailing some PDFs. Some work fine, some don't.

I'm inclined to think this is a ghostscript version problem, but I want to confirm this before I go to the hassle of update gs on the server.

It would be a great help if somebody could test this on a recent version and tell me whether it works or not.

The following file works:
http://www.previewyoursite.co.uk/xb9test/success.pdf

This one doesn't:
http://www.previewyoursite.co.uk/xb9test/fail.pdf

I'm testing it by calling gs directly (to confirm it's not an IM problem) using the following script:

Code: Select all

$source = 'fail.pdf';
$dest = 'fail.jpg';
$command = "gs -sDEVICE=jpeg -sOutputFile=$dest $source";
$response = passthru($command);	
echo $command.'<br/>';
echo $response.'<br/>';
Sorry for posting this in IM when it's really a GS problem - but I figured that the two are so closely linked that somebody here would be able to help.

The output tells me that the gs version is ESP Ghostscript 815.02 (2006-04-19)
The IM version is 6.2.8

Thanks

Pete
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Please help me test this file

Post by Drarakel »

Your 'fail.pdf' is a PDF 1.7 file. Maybe your old Ghostscript doesn't recognize that relatively new format properly.
You could either use something like pdftk to copy the files into a more compatible PDF 1.4 format before reading it with Ghostscript, or - as you suggested - update your Ghostscript version. I would recommend updating.
I'm using a current GPL Ghostscript (v8.71), and have no problems with your files.
(Note that you will get false colors with your simple Ghostscript command. But I understand that's just for testing.)
phy9pas

Re: Please help me test this file

Post by phy9pas »

Thanks for your help.

Going to go for the upgrade... fingers frossed!
Post Reply