OnWorks favicon

apsfilter - Online in the Cloud

Run apsfilter in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command apsfilter that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



apsfilter — magic print filter with auto file type recognition


lpr [-Pprinter] [-C option1:...:optionN] [file ...] (lpd style)
lpr [-Pprinter] [-Z option1:...:optionN] [file ...] (LPRng style)
lp [-d printer] [-o option1:...:optionN] [file ...] (Solaris style)


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 below.

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

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, 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

Apsfilter 's SETUP utility supports in installing all supported printer types, no matter if
local or remote printer, into the printer capability database /etc/printcap.

Supported file types
ar, arc, arj, ASCII, BMP, CAB, cpio, DATA, DVI, FBM, FIG, FITS, GIF, Group 3 FAX, HTML, IFF
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 in the apsfilter directory (maybe with some
options; use ./configure --help 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 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.

Command line options
Several command line options to apsfilter are available which allow the user to influence
the printing quality, color mode, paper size etc. The handbook includes a detailed listing.

draft Draft quality.

lo|low Low quality.

med|medium Medium quality.

hi|high High quality.

photo Photo quality.

uni|bi Uni-/bi-directional sweeps.

plain Plain paper.

coated Coated (inkjet) paper.

glossy Glossy paper.

premium Premium (photo) paper.

trans Transparencies.

color|colour Color printing.

gray|grey Gray printing.

mono B/W printing.

auto Automatic filetype recognition and data conversion.

ascii Force printing as ASCII document. For example to print Postscript
source code without actually interpreting it.

raw Pass-through mode, your print data won't be changed by any filter.

Paper size.

Text file filter to use, when printing ASCII documents.

tray0...tray9 Paper feed tray number.

pretty=N highlight level for pretty-printing (N=0,1,2)

header|noheader Whether you want headers in your text prints.

border|noborder Whether you want borders in your text prints.

1pps|2pps|4pps|8pps Pages per sheet.

landscape|portrait Paper orientation.

book Output pages in "book" format, implies "2pps,duplex,shortbind"

duplex|simplex Whether to use duplex mode or not.

shortbind|longbind Paper binding edge.

copies=N Number of copies.


lpr -C high:color:glossy 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 output (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 command line.

User gets a notification mail containing a session oriented magic wakeup command and key
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 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.

Use apsfilter online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Join us in Gitter!
    Enable the URPMS repository in your
    system -
    Download unitedrpms
  • 2
    Boost C++ Libraries
    Boost C++ Libraries
    Boost provides free portable
    peer-reviewed C++ libraries. The
    emphasis is on portable libraries which
    work well with the C++ Standard Library.
    See http://www.bo...
    Download Boost C++ Libraries
  • 3
    VirtualGL redirects 3D commands from a
    Unix/Linux OpenGL application onto a
    server-side GPU and converts the
    rendered 3D images into a video stream
    with which ...
    Download VirtualGL
  • 4
    Library to enable user space
    application programs to communicate with
    USB devices. Audience: Developers, End
    Users/Desktop. Programming Language: C.
    Download libusb
  • 5
    SWIG is a software development tool
    that connects programs written in C and
    C++ with a variety of high-level
    programming languages. SWIG is used with
    Download SWIG
  • 6
    WooCommerce Nextjs React Theme
    WooCommerce Nextjs React Theme
    React WooCommerce theme, built with
    Next JS, Webpack, Babel, Node, and
    Express, using GraphQL and Apollo
    Client. WooCommerce Store in React(
    contains: Products...
    Download WooCommerce Nextjs React Theme
  • 7
    Package repo for ArchLabs This is an
    application that can also be fetched
    It has been hosted in OnWorks in...
    Download archlabs_repo
  • More »

Linux commands

  • 1
    acdc - Test an application ACD file ...
    Run acdce
  • 2
    acdcheck Use acdcheckp online using
    onworks.net services. ...
    Run acdcheckp
  • 3
    sim4dbutils - utilities to work with
    sim4db-generated alignment files
    convertPolishes - convert between sim4db
    and GFF3 formats filterPolishes - filter
    Run convertToAtac
  • 4
    sim4dbutils - utilities to work with
    sim4db-generated alignment files
    convertPolishes - convert between sim4db
    and GFF3 formats filterPolishes - filter
    Run convertToExtent
  • 5
    gbacorr - Compute
    auto/cross-correlation coefficients ...
    Run gbacorr
  • 6
    gbak � Backup/restore Firebird database
    Run gbak
  • More »