Discussion:
Can't use CMYK images with Zend_Pdf
Jack Sleight
2007-10-01 09:28:03 UTC
Permalink
Hi,
I need some help. I'm trying to create a PDF, and the images need to be
CMYK, but they are coming out wrong in the final PDF. If I use JPEG's
the image colours appear inverted, if I use TIFF the images are complete
corrupt, all you get is a black box covered in noise, and if I use PNG
all the colours are blown out, as though the brightness has been turned
right up.

Any help would be appreciated,
Thanks,
--
Jack
Kevin McArthur
2007-10-01 15:29:19 UTC
Permalink
I tested several CMYK images while writing the parsers but they always
worked fine. Please log the bug in the tracker and include whatever image is
giving you greif and we can look into it.

Kevin
----- Original Message -----
From: "Jack Sleight" <jack.sleight-***@public.gmane.org>
To: <fw-formats-***@public.gmane.org>
Sent: Monday, October 01, 2007 2:28 AM
Subject: [fw-formats] Can't use CMYK images with Zend_Pdf
Post by Jack Sleight
Hi,
I need some help. I'm trying to create a PDF, and the images need to be
CMYK, but they are coming out wrong in the final PDF. If I use JPEG's the
image colours appear inverted, if I use TIFF the images are complete
corrupt, all you get is a black box covered in noise, and if I use PNG all
the colours are blown out, as though the brightness has been turned right
up.
Any help would be appreciated,
Thanks,
--
Jack
Jack Sleight
2007-10-01 17:03:42 UTC
Permalink
I've done some further investigating, and the JPEG problem still exists
(I've created a new issue: ZF-2020). The TIFF issue was down to the TIFF
files that ImageMagick outputs. If I save a CMYK TIFF from Photoshop it
works fine, so I don't think this was a Zend_Pdf problem.

One other odd thing is that all vertical measurements start from the
bottom of the page, is this intended behaviour?
Post by Kevin McArthur
I tested several CMYK images while writing the parsers but they always
worked fine. Please log the bug in the tracker and include whatever
image is giving you greif and we can look into it.
Kevin
----- Original Message ----- From: "Jack Sleight"
Sent: Monday, October 01, 2007 2:28 AM
Subject: [fw-formats] Can't use CMYK images with Zend_Pdf
--
Jack
Kevin McArthur
2007-10-01 17:19:30 UTC
Permalink
Post by Jack Sleight
I've done some further investigating, and the JPEG problem still exists
(I've created a new issue: ZF-2020).
Jpeg is the only parser I _didn't_ write =P It's provided by GD. There is
already an 'upgrade image subclass' task in the tracker which will result in
a jpeg parser being written when we get time. If you set that task as a
blocker to this bug, then it should keep it organized but this wont likely
be fixed any time soon.

As a quick workaround you can use imagick to convert the jpeg to rgb before
adding it to the pdf; a hack if you're going to print it, but probably fine
if its for screen display.
Post by Jack Sleight
The TIFF issue was down to the TIFF files that ImageMagick outputs.
Any details of what Imagick was doing (identify --verbose) would be useful
for figuring out how to adjust the parser. The tiff parser works 99% with
the official tiff test image suite. (found here
http://remotesensing.org/libtiff/images.html)
Post by Jack Sleight
If I save a CMYK TIFF from Photoshop it works fine, so I don't think this
was a Zend_Pdf problem.
Good to hear.
Post by Jack Sleight
One other odd thing is that all vertical measurements start from the
bottom of the page, is this intended behaviour?
Yes, Pdf documents have a 0,0 of bottom-left as per the pdf standards.
Counter-intuitive I know, and theres been discussion of an inversion flag
but it never really went anywhere.

Kevin
Post by Jack Sleight
Post by Kevin McArthur
I tested several CMYK images while writing the parsers but they always
worked fine. Please log the bug in the tracker and include whatever image
is giving you greif and we can look into it.
Kevin
----- Original Message ----- From: "Jack Sleight"
Sent: Monday, October 01, 2007 2:28 AM
Subject: [fw-formats] Can't use CMYK images with Zend_Pdf
--
Jack
Loading...