Solved [SOLVED]Printing In Color

I use CUPS to print on a networked printer - I tried using @wblock@'s lpd directions and wasn't able to get the printer to work.

The problem I'm having is the printer only prints in black and white. I searched the forum, and used Google and DuckDuckGo and was only able to find an old article which showed options that I don't see in the CUPS UI. I'm sure I missed something somewhere. Thanks in advance for any suggestions.

Edit:

Solution was to switch from the PS to HP PCL driver. UGH!
 
Last edited by a moderator:
Whether something prints in color depends on what is being sent. CUPS uses PPD files to tell whether a printer supports features like color. How to get it to use those features is a different matter (I don't use CUPS).

With the base system lpr(1)/lpd(8), it's up to the application. Color PostScript will print in color if the printer is capable, or just in monochrome on black and white printers.
 
If CUPS uses PPD files then I'm surprised I couldn't print in color with the HP PS driver but I can with the HP PCL driver (which I understand is HP's printer language). Where does the conversion happen after I click the "Print" button?
 
Sorry, I don't know. To me, CUPS is like an inkjet printer, more of a way to prevent printing than make it easy. Somehow, you have to select a PPD for the printer that allows the use of color. Separate PPDs may be supplied for both black and white and color, so users can limit expensive color printing. After getting the PPD set in CUPS, there may still be a separate option to enable color in CUPS or in the application print dialog.
 
I'm going over your lpd tutorial again and was able to print directly with nc this time. Which I find is a good sign. My issue right now is with gs. If I run
Code:
#!/bin/sh
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=ljet4 -sOutputFile=- -
then it just hangs at the prompt. If I run

Code:
#!/bin/sh
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=ljet4 -sOutputFile=/usr/local/libexec/ps2pcl
or
Code:
#!/bin/sh
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=ljet4 -sOutputFile=/usr/local/libexec/ps2pcl-
or
Code:
#!/bin/sh
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=ljet4 -sOutputFile=-/usr/local/libexec/ps2pcl-
then I'm left at the GhostScript prompt.

I know this deviates from the original post, but hopefully no one will read past the first post - which has the answer. :)
 
tzoi516 said:
I'm going over your lpd tutorial again and was able to print directly with nc this time. Which I find is a good sign. My issue right now is with gs. If I run
Code:
#!/bin/sh
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=ljet4 -sOutputFile=- -
then it just hangs at the prompt.

As a filter, it expects input from stdin, and will wait for it if not supplied. But why are you using gs if the printer understands PostScript?
 
OK, @wblock@, I'm now using lpd. When I first tried your instructions I was using FreeBSD 9.1-RELEASE and was unsuccessful. However, with 10.0-RELEASE it's working. Similar thing with the KMS drivers, wouldn't work under 9, but when I started using the 10.0-BETAs my graphics were correct.
 
Last edited by a moderator:
lpd(8) has not changed recently, and should work identically under FreeBSD 9 or 10 (or 7 or 8). But if you have CUPS installed, remember that it installs different lpd and lpr commands that duplicate the existing ones from the base system but do not work the same.

ps2pcl is a filter. It takes PostScript input on stdin and gives PCL output on stdout. So:
cat test.ps | /usr/local/libexec/ps2pcl > /tmp/test.pcl
or the direct form:
cat test.ps | gs -dSAFER -dNOPAUSE -q -sDEVICE=ljet4 -sOutputFile=- -

With a PostScript printer, no filter is needed, just send the file directly to the printer without using Ghostscript at all. That can be done with lpd(8) by having no input filter.

It might be useful to have filters that add or modify portions of the PostScript code, for instance, to enable duplex printing, or color.
 
Back
Top