Page 1 of 1

regression: IM 6.8.8 cannot convert PDF images anymore

Posted: 2014-03-24T20:56:28-07:00
by donovaly
- take e.g. this PDF:
http://uwe-sthr.weebly.com/files/theme/Tachyonen.pdf
- use IM 6.8.8 and run the command

convert -define pdf:use-cropbox=true Tachyonen.pdf Tachyonen.png

Result:
convert.exe: `%s' (%d) "C:/Program Files/gs/gs9.10/bin/gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dUseCropBox "-sOutputFile=C:\DOCUME~1\muso\LOCALS~1\Temp\magick-3848F9ncL-q357Kt-1" "-fC:\DOCUME~1\muso\LOCALS~1\Temp\magick-3848bbjPx7VXMQ9I" "-fC:\DOCUME~1\muso\LOCALS~1\Temp\magick-3848cSrmpM3PHg2k" @ error/utility.c/SystemCommand/2036.
convert.exe: Postscript delegate failed `Tachyonen.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/713.
convert.exe: no images defined `Tachyonen.png' @ error/convert.c/ConvertImageCommand/3150.

But when I do the same with IM 6.8.0 I get no error and the result is correct. -> regression

I use Ghostscript 9.10.

Re: regression: IM 6.8.8 cannot convert PDF images anymore

Posted: 2014-03-24T21:32:51-07:00
by fmw42
Your command works fine for me with both IM 6.8.8.8 and IM 6.8.8.9 Q16 Mac OSX and gs 9.06

Perhaps it is a bug in GS 9.10 or an error installing it?

What do you have for delegates from

convert -version

Does it list gslib? If not, then GS is not installed or not found by IM.

Your pdf has transparency. What do you have set for the PS:alpha sDEVICE in your delegates.xml file?

Mine is pngalpha


<delegate decode="ps:alpha" stealth="True" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>

If you do not want transparency, then set the background to white

Code: Select all

convert -define pdf:use-cropbox=true Tachyonen.pdf -background white -flatten Tachyonen.png

Re: regression: IM 6.8.8 cannot convert PDF images anymore

Posted: 2014-03-25T15:22:23-07:00
by donovaly
> Perhaps it is a bug in GS 9.10 or an error installing it?

This cannot be because I did not touch GS after its installation. When I now uninstall IM 6.8.8-9 and install IM 6.8.0-4 everything works fine. When I then uninstall IM 6.8.0-4 and install IM 6.8.8-9 I can no longer convert my PDF.

> What do you have set for the PS:alpha sDEVICE in your delegates.xml file?

I did never modified any of the xml files, I just installed IM. However, there I see "pngalpha". I don't care about the transparency, I just want to be able to convert my PDFs to a PNG with respect to their cropbox.

Re: regression: IM 6.8.8 cannot convert PDF images anymore

Posted: 2014-03-25T16:52:57-07:00
by fmw42
What do you have for delegates from

convert -version

Does it list gslib? If not, then GS is not installed or not found by IM.

Re: regression: IM 6.8.8 cannot convert PDF images anymore

Posted: 2014-03-25T17:32:13-07:00
by donovaly
> convert -version
> Does it list gslib?

IM 6.8.8:
Version: ImageMagick 6.8.8-9 Q16 x86 2014-03-16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib

IM 6.8.0:
Version: ImageMagick 6.8.0-4 2012-10-30 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

But IM 6.8.0 works. I tried now different versions of IM and IM 6.8.5-3 from May 2013 does also not work. So the bug must have been introduced between November 2012 and May 2013.

I also see the bug when I use GS9.06 - IM 6.8.8 fails while 6.8.0 works.

Re: regression: IM 6.8.8 cannot convert PDF images anymore

Posted: 2014-03-25T17:51:16-07:00
by fmw42
Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib
Your delegates do not llist gslib. So, IM cannot find GS or it was not installed properly.

To find the delegates for 6.8.0 or earlier or any version, you need to run

Code: Select all

convert -list configure
and look at the line starting with DELEGATES. It may list it as gslib or just gs.

Re: regression: IM 6.8.8 cannot convert PDF images anymore

Posted: 2014-03-25T18:32:14-07:00
by snibgo
Your delegates do not list gslib. So, IM cannot find GS or it was not installed properly.
With respect, not so. My delegates (in 6.8.8-7 on Windows 8.1) don't list gs or gslib, and it works fine.

The OP doesn't say, but this sems to be a Windows installation.

For this thread, I've installed 6.8.8-9 on Windows 8.1. I confirm it can't read the pdf from the OP, or any other pdf. I can't see an obvious problem with delegates.xml.

Re: regression: IM 6.8.8 cannot convert PDF images anymore

Posted: 2014-03-25T18:46:02-07:00
by donovaly
> I confirm it can't read the pdf from the OP, or any other pdf.

Good to hear that I am not the only one seeing this bug.

For the records, convert -list configure gives:
Name Value
-------------------------------------------------------------------------------
CC vs10
COPYRIGHT Copyright (C) 1999-2012 ImageMagick Studio LLC
DELEGATES bzlib freetype jpeg jp2 lcms png tiff x11 xml wmf zlib
FEATURES OpenMP
HOST Windows
LIB_VERSION 0x680
LIB_VERSION_NUMBER 6,8,0,3
NAME ImageMagick
RELEASE_DATE 2012-11-01
VERSION 6.8.0
WEBSITE http://www.imagemagick.org

Although that gslib is not listed it works fine.

Re: regression: IM 6.8.8 cannot convert PDF images anymore

Posted: 2014-03-25T19:10:18-07:00
by fmw42
All I can say is that on Unix, it will list gslib if it is installed. I know little about installations on windows. For me, on Mac OSX with IM 6.8.8.8 or 6.8.8.9 and GS 9.06, it works fine.

So it appears to be a Windows only issue.

Re: regression: IM 6.8.8 cannot convert PDF images anymore

Posted: 2014-03-26T00:21:26-07:00
by dlemstra
It is a windows only issue. I just submitted a patch for ImageMagick 6.8.8-10 Beta.

Re: regression: IM 6.8.8 cannot convert PDF images anymore

Posted: 2014-10-17T20:09:52-07:00
by thebrieze
I got this when GS and ImageMagick had different 32/64 bitness. I installed the 32 bit version of ImageMagick (gs was 32bit) and the error went away.

With the 32 bit version (no error), convert -version still does not list gslib.
Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib