[cups.general] Create color / black and white queues from color printer

Helge Blischke h.blischke at acm.org
Mon Oct 17 13:15:52 PDT 2011


Daniel J. Soto wrote:

> Hi,
> 
> I'm testing in two printers: one is de PDF printer (virtual printer) and
> another is a HP5500, both installed in an Ubuntu 10.04. The interpreter of
> PostScript is Ghostscript by default (the interpreter for linux systems).
> In both cases CUPS seems don't use the ppd file due to all the changes I
> made in them don't take effect in absolute. In both cases the printer
> prints in color if the file is writen in color.
> 
> There are another way to set a queue in black and white and other in color
> for the same printer? Using CUPS of course...
> 
> I'm very surprised with this... in the first moment I think that resolve
> the problem could be easy but after more than 10 days searching and
> reading a lot of docs I begin to think that is a much more complicated
> problem it seems at the begining...
> 
> In my system I launch the jobs to the printer using 'lp -d PDF/hp5500
> job.pdf' with the printer properly configured (ppd file in
> /etc/cups/ppd/xxx.ppd), in fact, the printer prints the doc but always in
> color.
> 
> Thanks in advance,
> 
> regards,
> Daniel.
> 
> 2011/10/17 Helge Blischke <h.blischke at acm.org>
> 
>> Daniel J. Soto wrote:
>>
>> > Hi,
>> >
>> > thank for your reply again.
>> >
>> > I've tried your solution and still get the job in color!
>> >
>> > Really I begin to be a bit desperate :-(
>> >
>> > I my opinion, the changes I do in the ppd file don't take effect in
>> > CUPS... I don't understand the reason but it seems to be so...
>> >
>> > It is possible that another driver is been used? Another generic driver
>> > (foomatic?)?
>> >
>> > My PDF.ppd, for your recomended options, is.
>> >
>> > [...]
>> > *ColorDevice: False
>> > *DefaultColorSpace: Gray
>> > *JobPatchFile 1:"<</ProcessColorModel /DeviceGray>>setpagedevice"
>> > [...]
>> >
>> > Note that I restart CUPS after change the ppd file.
>> >
>> > ¿Another idea?
>> >
>> > Thanks in advance!
>> > Daniel.
>> >
>> > 2011/10/17 Helge Blischke <h.blischke at acm.org>
>> >
>> >> Daniel J. Soto wrote:
>> >>
>> >> > Hi,
>> >> >
>> >> > thanks for your reply.
>> >> >
>> >> > I have tried your option but my PDF printer (I'm using this for
>> >> > test) still print in color... It is like CUPS doesn't use the ppd
>> >> > files... it's possible?
>> >> >
>> >> > In the other hand, how I can change the appropiate value with a
>> command
>> >> > line? lpoption?
>> >> >
>> >> > Thanks in advance,
>> >> > Daniel.
>> >> >
>> >> > 2011/10/17 Helge Blischke <h.blischke at acm.org>
>> >> >
>> >> >> Daniel J. Soto wrote:
>> >> >>
>> >> >> > Hello all,
>> >> >> >
>> >> >> > it is possible that another people have been asked the same
>> question
>> >> >> > but I'm googling from last ten days and I have not found anything
>> >> about
>> >> >> > this that I can use...
>> >> >> >
>> >> >> > I'm looking for a way to create two queues from the same color
>> >> printer,
>> >> >> > one for printing in color and one for printing in black and white
>> >> >> > (or grayscale). I've tryed to modify the ppd file manually
>> >> >> > setting de attribute ColorDevice to false but it doesn't work. My
>> >> >> > objetive is to do this internally from my (php) program but I'm
>> >> >> > trying to do manually
>> >> >> before
>> >> >> > for understanding the process... It's seems CUPS doesn't read the
>> >> >> > ppd
>> >> >> file
>> >> >> > before printing (ubuntu)...
>> >> >> >
>> >> >> > Perphaps anybody have had the same problem before... or knows how
>> >> >> > I do that or where I can find info about doing that...
>> >> >> >
>> >> >> > I would be much obliged for any hepful information...
>> >> >> >
>> >> >> > Regards,
>> >> >> > Daniel.
>> >> >>
>> >> >> Don't touch the ColorDevice attribute but instead change the
>> >> >> *DefaultColorSpace: xxxx
>> >> >> (xxxx will be CMYK or RGB) to
>> >> >> *DefaultColorSpace: Gray
>> >> >>
>> >> >> Helge
>> >> >> for the grayscale queue.
>> >> >>
>> >> >> _______________________________________________
>> >> >> cups mailing list
>> >> >> cups at easysw.com
>> >> >> http://lists.easysw.com/mailman/listinfo/cups
>> >> >>
>> >>
>> >> Well, then in addition insert the following lines into your PPDs
>> >> (folowing the DefaultColorSpace line:
>> >>
>> >> *JobPatchFile 1 : "<</ProcessColorModel /DeviceXXX>>setpagedevice"
>> >>
>> >> where XXX = Gray for the grayscale queue and XXX = CMYK or RGB
>> >> (whatever is listed in the DefaultColorSpace line).
>> >>
>> >> Helge
>> >>
>> >> _______________________________________________
>> >> cups mailing list
>> >> cups at easysw.com
>> >> http://lists.easysw.com/mailman/listinfo/cups
>> >>
>>
>> What kind of printer is it? The job patch file statement is only
>> applicable to native PostScript printers, and it depends on the
>> implementation of the PS interpreter if it works (it works for PS
>> interpreters by Adobe and a lot of others which tightly stick to Adobe's
>> specs).
>>
>> And it will not work if Ghostscript is used as PostScript interpreter.
>>
>> Helge
>>
>> _______________________________________________
>> cups mailing list
>> cups at easysw.com
>> http://lists.easysw.com/mailman/listinfo/cups
>>

If your real printer is the "HP DesignJet 5500 PS3", which is a native 
PostScript device, it *does* honour the /ProcessColorModel setting. But note 
that the PPD supplied by HP provides a UI option "HPColorAsGray" which is 
set to false by default. For this printer with this PPD you don't need the 
JobPatchFile but only configure the "DefaultHPColorAsGray" to true.

But if your HP printer is *not* the native PostScript device (only PCL or 
RTL) then you are out of luck.

As for the PDF virtual printer, it depends on the Ghostscript version you 
are using (execute gs -v to get the version). It requires a sufficiently 
recent version of Ghostscript to honour the ProcessColorModel for the 
pdfwrite device.

Helge





More information about the cups mailing list