printing to Kyocera FS-1030D

Polytropon freebsd at edvax.de
Thu Aug 4 00:35:41 UTC 2011


On Wed, 3 Aug 2011 20:18:53 +0200, Matthias Apitz wrote:
> So, what? If you can only print PCL, just raster the Postscript file
> with ghostscript to PCL (using CUPS, this also can be done on the fly);

Why the emphasize of CUPS? Even printer filter collections
like apsfilter are "too fat" for that job. If I want to
get a nail into the wall, I don't hammer it with the
tool box. :-)

In fact, apsfilter just uses gs with some parameters to
turn PS - the _default_ printing output format - into
PCL. You can install the ghostscript port (gs) and then
add a very simple gs filter. It can be activated in
/etc/printcap, pointing to that filter script.

Here's an example of what such a filter can do (in my
case: for a HP Laserjet 4000 duplex in PCL mode for
two-sided priting):

gs -q -dBATCH -dFIXEDMEDIA -dPARANOIDSAFER -dQUIET \
	-dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs \
	-sDeviceManufacturer="HEWLETT-PACKARD" \
	-sDeviceModel="HP LaserJet" -dDuplex=true \
	-dIjsUseOutputFD -sPAPERSIZE=a4 -r600

The corresponding /etc/printcap entry is this:

Laserjet|ljet4d;r=600x600;q=high;c=full;p=a4;m=auto:\
	:lp=/dev/lpt0:\
	:if=/usr/local/etc/apsfilter/basedir/bin/apsfilter:\
	:sd=/var/spool/lpd/Laserjet:\
	:lf=/var/spool/lpd/Laserjet/log:\
	:af=/var/spool/lpd/Laserjet/acct:\
	:mx#0:\
	:sh:

(And: Yes, it's a parallel attached printer in fact.)

You can easily deduct what the certain parameters do.
In fact, apsfilter doesn't do much more, although it
has a "pretty printing pre-filter" that allows you
tricks like

	% lpr somepicture.png

or even

	% lpr foo/bar/bla.c

with "syntax highlighting" in the output, if you need.

For printing from within X, _any_ program, be it OpenOffice
or an image processing tool, accessing the proper printer
queue is fully sufficient. Keep in mind that _some_ programs
require you to check printer settings (like Gimp for example)
for format and resolution.



> > > > # cat <ps-file> |lpr -Plp
> 
> To the OP: You won the todays "Useless Use of Cat Award" :-)
> The same would do:
> 
> 	lpr -Plp < ps-file
> 	or
> 	lpr -Plp ps-file
> 
> :-)

Just in case "lp" is still your default printer queue name
(no $PRINTER set to override), -Plp can also be omitted.
Useless use of -Plp, because that's the default. :-)


When you _can_, set the printer to PS mode. It's the easiest
thing. You just need the system's (!) lpr subsystem to feed
the PS jobs into the printer. If PS is not possible, use
PCL. If you really, REALLY require features of the printer
that need to be addressed by the PPD mechanism, use CUPS,
even if I can't imagine such features (because gs lets you
address things like paper tray preference, duplexer and
so on through PCL commands).




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


More information about the freebsd-questions mailing list