APSFILTER(1)

✨ APSFILTER(1) ✨

okay bestie, welcome to the apsfilter manpage, aka the magic print filter with auto file type recognition πŸ’… this is a General Commands Manual situation and honestly? it's giving legend behavior. sit down, grab a strawberry πŸ“, we're doing this.


πŸ¦‹ SYNOPSIS πŸ¦‹

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)

🌸 DESCRIPTION 🌸

Apsfilter is a magic print filter β€” no cap, it lets you print literally every different kind of document "automagically" 😭✨ without you having to manually convert them into whatever format your printer hardware actually understands. it's the friend who translates for the whole group chat.

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 just gets sent straight to the PS printer, periodt. if not, it's piped through the famous PS interpreter gs(1), which supports a wide range of output devices πŸ‘‘

so the question "is my printer supported by apsfilter?" is actually the question of whether it either understands PS directly, or is 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). iykyk πŸ’œ

another important thing to remember: the required driver support has to actually be present in the installed gs(1) binary. gs -h lists (among others) which drivers are currently compiled in. SETUP warns you when a selected driver is missing and guides you 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. iconic.

the apsfilter script is designed to avoid temporary files as much as possible. so it's 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's easy to understand and modify even for users and admins who are quite new to the Unix business. we love an accessible queen πŸ’…

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

πŸŽ€ 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 account. versatile much?

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 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 πŸ’€

⭐ Installation ⭐

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 /usr/share/apsfilter/SETUP.

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.
  • a3|a4|legal|ledger|tabloid β€” Paper size.
  • a2ps|mpage|enscript|recode β€” 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.

πŸ”₯ EXAMPLES πŸ”₯

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 bestie, 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
  • /usr/share/apsfilter/bin/apsfilter β€” apsfilter script
  • /usr/share/apsfilter/SETUP β€” printer installation script, creates/updates /etc/printcap
  • /usr/share/apsfilter/SETUP.cfg β€” saved settings from last printer setup
  • /usr/share/doc/apsfilter/handbook.html β€” the apsfilter handbook in HTML format
  • /etc/apsfilter/ β€” configuration directory
  • /etc/apsfilter/apsfilterrc β€” global configuration file
  • /etc/apsfilter/apsN/ β€” printer specific configuration directory
  • /etc/apsfilter/apsN/apsfilterrc β€” printer specific configuration file
  • $HOME/.apsfilter/apsfilterrc.apsN β€” user definable printer specific configuration file
  • /etc/apsfilter/apsN/smbclient.conf β€” smbclient config file for printing on Windows remote printer
  • /etc/apsfilter/apsN/pap.conf β€” pap config file for printing on AppleTalk printer
  • /etc/apsfilter/apsN/lpr.conf β€” config file for remote printer that needs special treatment

πŸ’œ SEE ALSO πŸ’œ

aps2file(1), apsfilter-bug(1), apspreview(1), gs(1), gs-hpdj(1), lpr(1), smbclient(1), apsfilterrc(5), printcap(5), lpd(8)


πŸ’€ BUGS πŸ’€

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

Please use the new tool apsfilter-bug(1) to release bug- or problem reports. It automatically presents you a form 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 apsfilter mailinglist. so convenient, we stan 🫢

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 aps2file(1) utility by typing

aps2file -D -Z options file > /dev/null 2> file.debug

and including the debugging output in the file file.debug into the edit session of the apsfilter-bug 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 or bash, then you should have no problems with redirection of stdout and stderr (> /dev/null 2> file.debug).

πŸ™ˆ do NOT skip the shell note, bestie, your redirect will just not work and you'll be sad.

πŸ“š DOCUMENTATION πŸ“š

See official apsfilter homepage http://www.apsfilter.org/handbook.html β€” Apsfilter Handbook including the Frequently Asked Questions (FAQ)


🌈 USER FORUM 🌈

Please send questions to the official apsfilter help channel apsfilter-help@apsfilter.org. The above section BUGS and the file HOWTO-BUGREPORTS tells you how to report bugs. If you want to know how to troubleshoot your apsfilter installation, please read the manpage aps2file(1) and apsfilter-bug(1) as well as the Apsfilter Handbook carefully.


πŸŽ€ HISTORY πŸŽ€

The apsfilter manpage appeared first in apsfilter V 5.4.0.


and that's the whole vibe check, bestie ✨ this page came from the Debian crew and it's dated May 19, 2001 β€” so it's vintage, but it ate and left no crumbs πŸ’… go print something gorgeous πŸ¦‹πŸ’–

πŸ“¦ where this page comes from