printcap configuration problem

Polytropon freebsd at
Sat Jul 19 15:20:22 UTC 2014

On Fri, 18 Jul 2014 18:44:03 -0600 (MDT), Warren Block wrote:
> On Sat, 19 Jul 2014, Polytropon wrote:
> > This is an example of how I have been working (outside of CUPS),
> > the /opt/libexec/ filter:
> >
> > 	#!/bin/sh
> > 	/usr/bin/printf "\033&k2G" || exit 2
> > 	/usr/local/bin/gs -q -dBATCH -dNOPAUSE -dPARANOIDSAFER \
> > 		-dSAFER -sPAPERSIZE=a4 -r600x600 \
> > 	        -sDEVICE=ljet4d -dDuplex=true \
> > 	        -sOutputFile=- - && exit 0
> > 	exit 2
> >
> > You can see that I've been using gs (ghostscript) with the options
> > defining the required paper size (ISO A4) and resolution (600 dpi).
> > The printer driver used by gs is "ljet4d" which works with the
> > HP LaserJet 4000 DN I'm still using.
> The LJ4000 is a PostScript printer.

In fact, it has many personalities, PS is one of them. It also
handles PCL, and additionally ASCII. Therefore it has a multiple
personality disorder, but that's actually fine, because each of
them has its advantage.

Personalities can be selected at the operator panel of the printer.
Setting AUTO usually causes the correct output to appear.

> The trick of modifying the incoming 
> PS file to set the page size will be faster.  Here, gs has to build and 
> send a multi-megabyte bitmap.

I found that using PS directly is slower than using gs, but I'm
going with this solution with just works (TM) for many years now.
The reason might be that I also had other printers in the same
location (HP Laserjet 4, Lexmark Optra something, Kyocera FS-600)
which all understand the gs-generated data without me having to
change anything. That's a very lazy man's solution, I know. :-)

Currently I'm using CUPS with a PPD file, so I think things are
kept in PS the whole way (PPD used to modify PS).

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list