[gs-devel] why pswrite device converts cmyk to rgb ?

Ken Sharp ken.sharp at artifex.com
Wed Sep 2 00:52:12 PDT 2009


At 22:52 01/09/2009 -0700, victorp wrote:


>I am trying the following:
>
>gswin32c -q -sColourModel#CMYK -dNOPAUSE -dSAFER -dBATCH
>-dDEVICEWIDTHPOINTS#899 -dDEVICEHEIGHTPOINTS#1270 -sOutputFile#merged.ps
>-dLanguageLevel#2 -sDEVICE#pswrite 2.ps 317x448.ps

I believe ColourModel is incorrect, to start with. The correct switch is 
ProcessColorModel, note the US spelling.

Secondly you should not use pswrite but should use ps2write instead, unless 
you absolutely require DSC compliant output. pswrite is barely maintained 
and we hope to replace it completely with ps2write in the long term.


>The resulting merged.ps is NOT CMYK !!!!!!

[snip]

Sorry, but I only believe the contents of the files, I am not convinced by 
converting to a different format using a different device and displaying in 
Acrobat.


>Is it a bug or am i making something wrong?

Well the switch appears to be incorrect, but more than that is impossible 
to tell from the information. If you truly believe this is a bug then 
please open a bug report for it. Don't forget to attach specimen files to 
work on.


>Also, a question: is there a way to overlay one postscript page into
>another?

Yes, several. Firstly you can redefine the 'showpage' operator to do 
nothing. Run the first job, then run the second job, then execute the 
original showpage operator. Note that this will *NOT* work for files 
containing multiple pages.

You can also use the BeginPage/EndPage procedures which have more 
flexibility and are intended for page level control, but these only work 
with level 2 or better interpreters.


>Like watermarks, or background?
>I need to put color bars (317x448.ps) over 2.ps
>I am merging 2 separate .ps files into one file and putting them one over
>another with pstops.
>Is this possible to do it with ghostscript? Or are there other better
>solutions?

There are many potential solutions, which is better depends on your 
criteria, for example you could load the files into Illustrator and add 
crop/register/colour marks there. You could convert to PDF and do likewise 
in Acrobat. You could invest in an expensive heavyweight application like 
OneVision's Asura product.

There are almost certainly other possibilities.

             Ken


More information about the gs-devel mailing list