printing b/w instead of color

Helge Blischke h.blischke at acm.org
Thu Jun 4 07:29:20 PDT 2009


Christoph Litauer wrote:

> Helge Blischke schrieb:
>> Christoph Litauer wrote:
>> 
>>> Hi,
>>>
>>> I have a problem printing color pages on a color laserjet printer, that
>>> is configured to print b/w by default (ppd file).
>>>
>>> Environment:
>>> SuSE SLES 10sp1
>>> cups-1.1.23
>>> cups-windows-6.0.1
>>> printer is a HP Color LaserJet CP4005
>>>
>>> I configured the printer to print b/w by default ("Print Color as Gray"
>>> to "on" via cups interface). Then cupsaddsmb'd the driver. When printing
>>> from windows all pages are printed b/w, regardless if I switch "print
>>> color as gray" to on or off in the printers extended options.
>>>
>>> I tracked the problem down a bit: The file generated by the windows
>>> (cups) driver is printed in color. Filtering this file through pstops or
>>> the alternate pstops leads to a postscript file that has all the printer
>>> defaults included, that are defined in the printers ppd-description. As
>>> the default is "print in b/w", the page is printed b/w.
>>> I lookup up the source of the alternate pstops and found a comment that
>>> prevents the inclusion of the ppd defaults if the postscript code
>>> contains %cupsJobTicket: supress-setup-features-from-ppd
>>>
>>> I proofed this by including this line in the postscript file by hand.
>>> All worked fine now.
>>>
>>> My question is: I think the windows cups driver (cupsdrv6.dll) should
>>> generate that pseudo comment, shouldn't it? But looking for strings like
>>> cupsJobTicket in the dll only leads to:
>>>
>>> %%cupsJobTicket: job-billing="%s"
>>> %%cupsJobTicket: page-label="%s"
>>>
>>> Some configuration mistake? And ideas? Thanks in advance for any hints!
>>> Please email a copy as I do not read this group very regularly.
>>>
>> 
>> The "%cupsJobTicket: supress-setup-features-from-ppd" comment
>> is not generated by the PPD as modified by cupsaddsmb.
>> 
>> You need to edit the PPD on your Windows box(es) like this:
>> Look for the Keywords
>> *JCLBegin
>> and
>> *JCLToPSInterpreter
>> until
>> *JCLend
>> and change them to the following:
>> ---snip---
>> *JCLBegin: "%!PS-Adobe-3.0<0A>"
>> *JCLToPSInterpreter: "%cupsJobTicket:
>> supress-setup-features-from-ppd<0A>" *End
>> *JCLEnd: ""
>> ---snip---
>> This will do what you need (only when using the alternate pstops filter,
>> of course).
> 
> Thanks for your quick response Helge,
> 
> this is a very clever trick and it worked - in principle ...
> 
> I added your remarks to my ppd file (it didn't contain any JCL
> definitions). But after updating the windows driver using cupsaddsmb
> this section looks like this:
> 
> *%========================================================
> *% JCL Features
> *%========================================================
> *% Commented out by cupsaddsmb...
> *%JCLBegin: "%!PS-Adobe-3.0<0A>"
> *% Commented out by cupsaddsmb...
> *%JCLToPSInterpreter: "%cupsJobTicket:
> supress-setup-features-from-ppd<0A>" *End
> *% Commented out by cupsaddsmb...
> *%JCLEnd: ""
> 
> 
> I deleted the comments manually. Now my prints are colored. But why does
> cupsaddsmb remove these configuration entries?
> 

Sory, I suggested to edit the respective PPD(s) on the Windows side after 
installing by cupsaddsmb.

For my own use, I did a Perl script, cupsforwindows.pl, which modifies the 
PPD as described (and adds some more things) and populates a folder
with the modified PPDs (for all printers configured for CUPS), the 
cupsforwindows files, and an .inf file. This folder - shared by SAMBA -
can then be used as an installation medium.

If you like, you can get this script.

Helge






More information about the cups mailing list