LPF(1)

πŸ“¦
version 3.8.B Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– LPF(1) β€” the lpf filter, aka the general printer filter πŸ’–

okay bestie, sit down, hydrate, and let me tell you about lpf β€” it's the general printer filter, and it's giving backbone of your print queue energy. πŸŽ€


✨ NAME ✨

lpf β€” general printer filter πŸ–¨οΈπŸ’…


✨ SYNOPSIS ✨

lpf -Pprinter -wwidth -llength -xwidth -ylength [ -c ] -Kcontrolfilename
-Lbnrname [ -iindent ] [ -Zoptions ] [ -Cclass ] [ -Jjob ] [ -Raccntname
] -nlogin -hHost -Fformat [ -T[crlf,debug] -Dlevel ] [ affile ]

look at all those flags. it's a lot. we're gonna go through every single one, no skips, no cap. 🫢


✨ DESCRIPTION ✨

So lpf is a general printer filter. Usually it lives inside the printcap file as a filter, and it gets called by lpd. That's its whole thing. It's the little guy doing the actual work while everyone else takes credit. 😀

Two spicy behaviors up top, real quick:

  • The -Tcrlf option will suppress translation of LF to CR/LF pairs.
  • The -Tdebug option will increment the debug level.

🌸 Options that lpd passes by default

These ones? lpd just hands them over automatically. You don't have to do anything. Iconic behavior honestly.

  • -Pprinter β€” the name of the printer. that's it, that's the printer. πŸ–¨οΈ
  • -wwidth β€” the page width in chars, exactly as given in the :pw field in the printcap file.
  • -llength β€” the page length in lines, as given in the :pl field in the printcap file.
  • -xwidth β€” the page width in pixels, as given in the :px field in the printcap file.
  • -ylength β€” the page length in pixels, as given in the :py field in the printcap file.
  • -Kcontrolfilename β€” the name of the control file.
  • -Lbnrname β€” the banner name. this one is set by the lpr -T option.
  • -nlogin β€” the user login name. πŸ‘€
  • -hHost β€” the host where the job was submitted.
  • -Fformat β€” the job format, from the lpr -F option or other option.

🌈 Options that lpd sets optionally

  • -Zoptions β€” extra options. They are passed from the -Z parameter given on the lpr command line, and the filter can interpret them however it wants. it's a free-for-all, lowkey. πŸ¦‹

πŸ‘‘ Options you can add yourself in the printcap file

These remaining ones? You can add them to the filter entry in the printcap file. Your house, your rules. 🏠✨

  • -c β€” ignore control characters. Set by the lpr -b (binary) or -l (literal) options.
  • -iindent β€” the indentation amount, set by the lpr -i indent option.
  • -Cclass β€” the class name, set by the lpr -C class option.
  • -Jjob β€” the job name, set by the lpr -J job option.
  • -Raccntname β€” the name of the accounting file, from printcap information. πŸ’Έ
  • -Dlevel β€” sets the debug level. The level must be an integer, and a nonzero value switches debugging on.
  • -Tcrlf β€” turn LF to CR/LF translation off.
  • -Tdebug β€” increment the debug level. yes again. it's here twice. it's just that important. πŸ™ˆ

✨ EXIT STATUS ✨

The following exit values are returned, and they are not subtle:

  • zero (0) β€” successful completion. slay. πŸŽ‰
  • non-zero (!=0) β€” an error occurred. πŸ’€

✨ FILES ✨

The files used by LPRng are set by values in the printer configuration file. The following are a commonly used set of default values β€” your mileage may vibe differently.

/etc/lprng/lpd.conf                          LPRng configuration file
${HOME}/.printcap                            user printer description file
/etc/printcap                                printer description file
/etc/lprng/lpd.perms                         permissions
/var/run/lprng/lpd                           lock file for queue control
/var/spool/lpd                               spool directories
/var/spool/lpd/QUEUE/control                 queue control
/var/spool/lpd/QUEUE/log                     trace or debug log file
/var/spool/lpd/QUEUE/acct                    accounting file
/var/spool/lpd/QUEUE/status                  status file

✨ SEE ALSO ✨

lpd.conf(5), lpc(8), lpd(8), lpr(1), lpq(1), lprm(1), printcap(5), lpd.perms(5), pr(1), lprng_certs(1), lprng_index_certs(1).

the whole friend group, basically. πŸ«‚


✨ AUTHOR ✨

Patrick Powell <papowell@lprng.com>. the king who wrote this. πŸ‘‘


✨ DIAGNOSTICS ✨

Most of the diagnostics are self explanatory. But if you are puzzled over the exact cause of failure, set the debugging level on (-D5) and run again. The debugging information will help you to pinpoint the exact cause of failure. fr fr, -D5 is your bestie here. πŸ”


✨ HISTORY ✨

LPRng is an enhanced printer spooler system with functionality similar to the Berkeley LPR software. The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; subscribe by visiting https://lists.sourceforge.net/lists/listinfo/lprng-devel or sending mail to lprng-request@lists.sourceforge.net with the word subscribe in the body.

The software is available via http://lprng.sourceforge.net. 🌐


okay that's the whole page bestie, you're officially an lpf scholar πŸ’œ

this was brought to you by the LPRng girlies, dated 2006-12-09 β€” yes the date is ancient, and yes she still ate. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from