APSFILTER(1)

NAME
apsfilter - magic print filter with auto file type recognition

SYNOPSIS
lpr [-Pprinter] [-C class] [file ...]

DESCRIPTION
Apsfilter 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 printer hardware.

Apsfilter 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 apsfilter is actually the question of it either understanding PS directly, or being supported by gs(1) 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) binary. gs -h 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(1), gs third-party driver and filter programs for their personal needs.

The apsfilter 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 print quality.

Apsfilter offers a wide range of customization options through config files and lpr(1) command line options, see Class support below (-C option).

  Advantages over other magic filters
Apsfilter 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 business.

Apsfilter is highly customizable and its developement since 1994 has shown that it scales very well with the still growing demand of additional features.

  Supported printers
Apsfilter supports locally connected serial and parallel printers.

Remote printing cababilities: Unix remote printing (lpd protocol) as well as Windows remote printing via SAMBAs smbprint(1) on Windows 95/98/NT/2000 printer as guest user or using a real password protected Windows account.

Apsfilter 's SETUP utility supports in installing serial, parallel and remote printers into the printer capability database /etc/printcap.

  Supported file types
gzip, bzip2, compress, freeze, pack, ASCII, BMP, data (PCL, etc.), DVI, FBM, FIG, FITS, GIF, Group 3 fax, HTML, IFF ILBM, JPEG, Kodak Photo CD, MGR, MIFF, PBM/PGM/PNM/PPM, PDF, PNG, PostScript, RLE, SGI, Sketch, Sun raster, Targa, TIFF, troff, WPG, X pixmap, XCF. Note that actual support depends on the installed filter programs.

  Installation
Login as root, change to Apsfilter 's installation directory (usually /usr/local/share/apsfilter) and execute ./SETUP.

SETUP adds the printer to the printcap database to make it available to the lpd(8) print spooler, and configures apsfilter for operation with that printer.

After successfull installation, SETUP remembers its previous configuration settings in a file called SETUP.cfg.

  Class support
The so called class support enables the selection of several features of the gs(1) driver or PostScript options by using the -C class option of the lpr(1) command.

To see what features are supported by apsfilter, the apsfilter script could be examined with a text editor. There is a section named Class Support, where the options available for the various gs drivers are listed.

  Duplex printing
Enable duplex printing by using the duplex class option.

EXAMPLES
    lpr -C high:32bpp:glossy:present file.gif tex.dvi.gz file.html ...

prints some files of different types no matter whether compressed or not on the Unix default printer (see lpr(1) ).

The -C option to the lpr command sets additional ghostscript driver-specific options. Here, ‘high’ means high resolution (e. g. 600 dpi for an HP Printer using gs's “cdj850” printer driver), color depth is 32bpp (bits per pixel), paper type is set to glossy paper and the print quality has been set to presentation quality

    lpr -C duplex somefile

enables pseudo duplex printing by halting the print queue after printing a documents odd pages and so giving the user a chance to flip paper and restart printing after executing a special user command on the command line.

User gets a notification mail containing a session oriented magic wakeup command and key which restarts printing of the even 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 the paper.

Beware, if you have nasty users, this can cause print jobs to hang, filling up the print queue and at least the /var file system.

FILES
/etc/printcap
    printer capability data base
PREFIX/share/apsfilter/bin/apsfilter
    apsfilter script
PREFIX/share/apsfilter/SETUP
    printer installation script, creates/updates /etc/printcap
PREFIX/share/apsfilter/SETUP.cfg
    saved settings from last printer setup
PREFIX/share/doc/apsfilter/handbook.html
    the apsfilter handbook in HTML format
PREFIX/etc/apsfilter/
    configuration directory
PREFIX/etc/apsfilter/apsfilterrc
    global configuration file
PREFIX/etc/apsfilter/apsN/
    printer specific configuration directory
PREFIX/etc/apsfilter/apsN/apsfilterrc
    printer specific configuration file
$HOME/.apsfilter/apsfilterrc.apsN
    user definable printer specific configuration file
PREFIX/etc/apsfilter/apsN/smbclient.conf
    smbclient config file for printing on Windows remote printer
PREFIX/etc/apsfilter/apsN/pap.conf
    pap config file for printing on AppleTalk printer
PREFIX/etc/apsfilter/apsN/lpr.conf
    config file for remote printer that needs special treatment

SEE ALSO
gs(1), gs-hpdj(1), lpr(1), sh(1), smbprint(1), apsfilterrc(5), printcap(5), lpd(8)

BUGS
See apsfilter software center, http://www.apsfilter.org/, for new versions, bugfixes and known bugs.

DOCUMENTATION
See official apsfilter homepage
http://www.apsfilter.org/handbook.html
    Apsfilter Handbook
http://www.apsfilter.org/docs/faq/
    Apsfilter Frequently Asked Questions

USER FORUM
Please send questions to the official apsfilter help channel apsfilter-help@apsfilter.org. The file HOWTO-BUGREPORTS tells you how to report bugs. If you want to know how to troubleshoot your apsfilter installation, please read the file FAQ carefully.

HISTORY
The apsfilter manpage appeared in apsfilter V 5.4.0.