Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
I have a program that reads graphic commands from a postscript file and draws a logo on existing PDF pages.
PDF commands are written using PDPageContentStream which works OK except when I pass colors in CMYK color space - in this case the colors are "off".
It appears that setStrokingColor(Color color) and setNonStrokingColor(Color color) set the magenta component wrong, they pass yellow instead.
Here is the problematic line. Notice the second argument, it should be colorComponents[1], not colorComponents[2]
setStrokingColor( colorComponents[0], colorComponents[2], colorComponents[2], colorComponents[3] );
The patch and a unit test are attached.
Regards,
Yegor