Page 1 of 1

possible bug in reading pdf file

Posted: 2010-02-24T13:02:19-07:00
by fmw42
IM 6.5.9-10 Q16 Mac OSX Tiger

I was trying to read a pdf file provided by another user: http://www.martes.de/test.pdf

when I do

identify -verbose test.pdf
Unknown device: bmpsep8
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
defaultdevice
identify: Postscript delegate failed `test.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/638.


I have looked at this page:

http://www.gnu.org/software/ghostscript/devices.html

...
bmpsep8 Separated 8-bit CMYK .BMP file format, primarily for testing
...

and it says to do

gs -h

to get a list of devices and bmpsep8 is listed on my system.


Is this a problem with IM or with GS? Using GS 8.61

Other PDFs I can read and process with no problem. I also get the same problem reading eps files as well. Is this associated with cmyk bmp files embedded in the pdf or eps?

Re: possible bug in reading pdf file

Posted: 2010-02-24T13:26:05-07:00
by magick
ImageMagick uses the bmpsep8 device for PDF's with colors in the CMYK or ICCBased colorspaces. If your version of Ghostscript does not support this device or if there is a bug in Ghostscript you will get an exception thrown. In the mean-time, for a workaround, add -colorspace RGB *before* the PDF image file name on the convert command line.

Re: possible bug in reading pdf file

Posted: 2010-02-24T16:06:28-07:00
by fmw42
magick wrote:ImageMagick uses the bmpsep8 device for PDF's with colors in the CMYK or ICCBased colorspaces. If your version of Ghostscript does not support this device or if there is a bug in Ghostscript you will get an exception thrown. In the mean-time, for a workaround, add -colorspace RGB *before* the PDF image file name on the convert command line.

My GS reports that it does have bmpsep8 device. But I should have tried adding -colorspace RGB as I know that is needed when reading CMYK pdf. But when I do that, I get this

convert -colorspace RGB test.pdf test.tiff
**** Warning: File has an invalid xref entry: 2. Rebuilding xref table.

**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> itext-paulo-155 (itextpdf.sf.net-lowagie.com) <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.


So I assume the input pdf is not valid and have reported that back to the original topic. Nevertheless, it did produce a valid looking result!

Thanks for the help.