Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Aug 2011 02:35:36 +0200
From:      Polytropon <>
Subject:   Re: printing to Kyocera FS-1030D
Message-ID:  <>
In-Reply-To: <20110803181852.GA1079@tiny>
References:  <> <> <20110803181852.GA1079@tiny>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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):

	-dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs \
	-sDeviceManufacturer="HEWLETT-PACKARD" \
	-sDeviceModel="HP LaserJet" -dDuplex=true \
	-dIjsUseOutputFD -sPAPERSIZE=a4 -r600

The corresponding /etc/printcap entry is this:


(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).

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

Want to link to this message? Use this URL: <>