Starting with eac29c74c5e4ad815fe3ebc5607917ff278c7b2e the attached PostScript file generates an rgb PDF file instead of the monochrome PDF file generated by earlier versions. The command line I'm using: bin/gs -sDEVICE=pdfwrite -o test.pdf ./monochrome.ps commit eac29c74c5e4ad815fe3ebc5607917ff278c7b2e Author: Michael Vrhel <michael.vrhel@artifex.com> Date: Tue Nov 16 14:48:31 2010 +0000 Fix so that the initial gray color spaces in the graphic state are properly color managed. Previously, if we immediately started drawing in the document with a gray color space, the initial un-managed c olor space in the graphic state was used and this was not associated with the specified gray source profile. With this fix we initialize the stroking and filling color spaces to be ICC color spaces associated with the profile for default_gray in the icc manager. Also a fix for an issue in littleCMS. When merging profiles, littleCMS will often do an optimization where it approximates 1-D LUTs with an exponent operation for use during merging and interpolation of the profile structures. If the curve is very steep, as in like a step function, it should not do this approximation. This was an issue when we had profiles that provided thresholding operations with their 1-D LUTs. I spoke with Marti about this issue a couple weeks ago. This commit will create over 6000 differences in the regression test. I reviewed many of these and they all are minor differences in gray colors as expected. These are differences where we were drawing unmanaged colors. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11902 a1074d23-0009-0410-80fe-cf8c14f379e6
Created attachment 8522 [details] monochrome.ps
Ken suggests that the input file is at fault: From the setdistillerparams at the start of the file: /ColorConversionStrategy /sRGB
Created attachment 8527 [details] monochrome.pdf If I run the monochrome.ps file through distiller the resultant pdf file (attached) is monochrome, as shown by gs with -dPDFDEBUG: /BitsPerComponent 1 /ColorSpace /DeviceGray /DecodeParms
The customer reports: I tried removing /ColorConversionStrategy /sRGB and the file is still coming out in RGB.
The file applies <</ColorConversionStrategy /sRGB>> twice. Both instances should be removed to get DeviceGray color space. Ghostscript handles ColorConversionStrategy differently than distiller. See the Acrobat Distiller Parameters spec for details.
(In reply to comment #5) > The file applies <</ColorConversionStrategy /sRGB>> twice. > Both instances should be removed to get DeviceGray color space. > > Ghostscript handles ColorConversionStrategy differently than distiller. > See the Acrobat Distiller Parameters spec for details. As Alex correctly says the file sets ColorConversionStrategy (amongst other things) *twice*. You need to remove them both. If you do this then the default is used, which is /LeaveColorUnchanged. As Alex also points out our implementation of this parameter differs from the Acrobat implementation. The Distiller implementation does not make sense to me, it leaves Gray objects in Gray space, despite the fact that the ColorConversionStrategy descibes the setting as 'Convert All Colors to sRGB'. Clearly this is not true, since it does not convert Gray. Our implementation does what it says, it converts all colours to the specified space. Note that our default value also differs from teh Distiller default of sRGB. We don't support maintaining objects in DeviceGray while converting objects in other colour spaces. If the customer wants to maintain Gray objects in DeviceGray space, they need to leave 'ColorConversionStrategy' set to /LeaveColorUnchanged.