magic print filter with auto file type
[file ...] (lpd
[file ...] (LPRng
is a magic print filter which allows you
to print different document types “automagically” without having
to convert them manually into a document format which is understood by your
uses third-party software to convert
every supported file type into PostScript (PS) first. If you have a real PS
printer, the data stream is then sent directly to the PS printer, otherwise it
is piped through the famous PS interpreter gs(1)
which supports a wide range of output devices.
Thus the question whether a particular printer is supported by
is actually the question of it either
understanding PS directly, or being supported by
in some way (possibly using some emulation
of another printer's software interface, like Epson's ESC/P2 or HP's PCL).
Another important thing to remember is that the required driver support has to
be present in the installed gs(1)
lists (among others) which drivers are
currently compiled in. SETUP warns when a selected driver is missing and
guides in choosing another driver.
The FreeBSD ports collection
offers an easy and
comfortable framework for FreeBSD users to configure and install apsfilter,
, gs third-party driver and filter programs
for their personal needs.
script is designed to avoid temporary
files as much as possible. So it is very efficient in use and doesn't fill up
filesystems even when printing large printjobs in high resolution and best
offers a wide range of customization
options through config files and lpr(1)
line options, see below.
and its SETUP is completely written in a
script language (see sh(1)
). So it is easy to
understand and modify even for users and admins who are quite new to the Unix
is highly customizable and its
developement since 1994 has shown that it scales very well with the still
growing demand of additional features.
Apsfilter supports locally connected serial, parallel and USB printers.
Remote printing cababilities: Unix remote printing (lpd protocol), printing to
an AppleTalk remote printer via pap(1)
as well as
Windows remote printing via SAMBAs smbclient(1)
on Windows 95/98/NT/2000 printer as guest user or using a real password
protected Windows account.
's SETUP utility supports in installing
all supported printer types, no matter if local or remote printer, into the
printer capability database /etc/printcap
ar, arc, arj, ASCII, BMP, CAB, cpio, DATA, DVI, FBM, FIG, FITS, GIF, Group 3
FAX, HTML, IFF ILBM, JPEG, Kodak Photo CD (PCD), LHA, MGR, MIFF, PAM, PGM,
PBM, PNM, PPM, PDF, PNG, Postscript (PS), RAR, RLE, RPM, SGI, Sketch,
Sunraster, TAR, Targa (TGA), TIFF ROFF, WMF, WorPerfect graphics, XCF, X
Pixmap (XPM), X Window dump (XWD), ZIP, ZOO. Note that actual support depends
on the installed filter programs.
Extract the tarball and execute ./configure
directory (maybe with some options; use
to see a listing).
After that, login as root and call make install
then you can set up printers with
SETUP adds the printer to the /etc/printcap database to make it available to the
print spooler, and configures
for operation with that printer.
After successfull installation, SETUP remembers its previous configuration
settings in a file called SETUP.cfg
Several command line options to apsfilter
available which allow the user to influence the printing quality, color mode,
paper size etc. The handbook
includes a detailed
- Draft quality.
- Low quality.
- Medium quality.
- High quality.
- Photo quality.
- Uni-/bi-directional sweeps.
- Plain paper.
- Coated (inkjet) paper.
- Glossy paper.
- Premium (photo) paper.
- Color printing.
- Gray printing.
- B/W printing.
- Automatic filetype recognition and data conversion.
- Force printing as ASCII document. For example to print
Postscript source code without actually interpreting it.
- Pass-through mode, your print data won't be changed by any
- Paper size.
- Text file filter to use, when printing ASCII
- Paper feed tray number.
- highlight level for pretty-printing (N=0,1,2)
- Whether you want headers in your text prints.
- Whether you want borders in your text prints.
- Pages per sheet.
- Paper orientation.
- Output pages in "book" format, implies
- Whether to use duplex mode or not.
- Paper binding edge.
- Number of copies.
lpr -C high:color:glossy file.gif tex.dvi.gz
prints some files of different types no matter whether compressed or not on the
Unix default printer (see lpr(1)
option to the
command sets additional ghostscript
driver-specific options. Here, ‘
means high resolution
(e. g. 600 dpi for an HP
Printer using gs's “cdj850” printer driver),
(e.g. 32 bits per pixel), and the
paper type is set to glossy paper
lpr -C duplex somefile
enables pseudo duplex printing
by halting the print
queue after printing a documents even pages and so giving the user a chance to
flip paper and restart printing after executing a special user command on the
User gets a notification mail containing a session oriented magic
which restarts printing of the odd pages of
the print job.
The so called magic command
makes sure that only
the initiator of the print job is able to restart printing after reinserting
if you have nasty users, this can cause
print jobs to hang, filling up the print queue and at least the /var file
- printer capability data base
- apsfilter script
- printer installation script, creates/updates
- saved settings from last printer setup
- the apsfilter handbook in HTML format
- configuration directory
- global configuration file
- printer specific configuration directory
- printer specific configuration file
- user definable printer specific configuration file
- smbclient config file for printing on Windows remote
- pap config file for printing on AppleTalk printer
- config file for remote printer that needs special
See apsfilter software center -
- for new versions, bugfixes
and known bugs.
Please use the new tool apsfilter-bug(1)
bug- or problem reports. It automatically presents you a
in an editor window which asks you some
standard questions. If you save and quit the editor session, then this report
is sent automatically via e-mail
to the proper
If apsfilter fails to print something or prints it in a way you wouldn't expect
and you want to report an apsfilter error then please save the debugging
output of one print session using the new
utility by typing
aps2file -D -Z options file > /dev/null 2>
and including the debugging output in the file
into the edit session of the
utility, so that it is included
into the mail to the apsfilter mailinglist.
Please note that you need to run /bin/sh (Bourne Shell), bash or a compatible
shell, so that the above mentioned output redirection works. Under C-shell
(/bin/csh) or tcsh it would't work. If you don't know, then simply make sure
you use the Bournce shell by typing /bin/sh
, then you should have no problems with
redirection of stdout
(> /dev/null 2> file.debug).
See official apsfilter homepage
- Apsfilter Handbook including the Frequently Asked Questions
Please send questions to the official apsfilter help channel
. The above section
and the file
tells you how to report bugs. If
you want to know how to troubleshoot your apsfilter installation, please read
the manpage aps2file(1)
as well as the
manpage appeared first in apsfilter V