Converting PDF to TIFF, color management

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
MARTES

Converting PDF to TIFF, color management

Post by MARTES »

Hello!

We try to convert files from PDF to TIFF using "convert" command:

Code: Select all

# convert -density 72 test.pdf -colorspace cmyk test.tiff
After converting file to "test.tiff" colors does not match to colors in "test.pdf" :( What is wrong?
yellow color is CMYK(0%, 4%, 74%, 0%), must be CMYK(0%, 0%, 100%, 0%),
black color has the matched value CMYK(0%, 0%, 0%, 100%).

used files:
http://www.martes.de/test.pdf
http://www.martes.de/test.tiff

Thanks for any ideas/support :)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting PDF to TIFF, color management

Post by fmw42 »

does the pdf have an image that is cmyk already? if so

convert -density 72 -colorspace RGB image.pdf image.tif


Also best colormatching uses profiles. see http://www.imagemagick.org/Usage/formats/#profiles

When I try your image, I get errors. Perhaps my gs device needs changing.

convert -density 72 test.pdf test.tif
Unknown device: bmpsep8
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
defaultdevice
convert: Postscript delegate failed `test.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/638.
convert: missing an image filename `test.tif' @ error/convert.c/ConvertImageCommand/2919.

Anyone know how to fix this error? Is this a windows only device?


OK, the suggestion is to add -colorspace RGB before reading the image as above. But when I do that I get another error:

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.


Nevertheless, it does produce test.tif which looks to me the same as test.pdf
Post Reply