---
name: "printbill"
section: "1"
platform: "linux"
package: "printbill"
version: "4.1.2-1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/printbill"
---

# printbill(1)

print filter front-end to printbilld

## NAME

printbill - print filter front-end to printbilld

## SYNOPSIS

**printbill --type \<foo\> \[--printbill\_secondary \<bar1\>\]** **\[--printbill\_printer \<bar2\>\]**

## DESCRIPTION

**printbill** is the front-end to [printbilld(1)](/printbilld/1.md), the printbill daemon which actually performs billing/accounting/quote generation. It is designed to be called by lprng via the as=blah option in the [printcap(5)](/printcap/5.md) file. It accepts the standard default command-line options presented to it by lprng, as well as several additional options which modify its behaviour. These parameters are then sent to [printbilld(1)](/printbilld/1.md) via a Unix-domain socket, as a semicolon-delimited list terminated by a newline.

The script attempts to open a connection, and read a version string from the server. If this matches the version number wired into [printbill(1)](/printbill/1.md), the command-line parameters passed to [printbill(1)](/printbill/1.md) from lprng are then sent to [printbilld(1)](/printbilld/1.md) via a Unix-domain socket, as a semicolon-delimited list terminated by a newline. [printbilld(1)](/printbilld/1.md) should then perform the specified operation, and return JSUCC (0) or JREMOVE (3) to the [printbill(1)](/printbill/1.md) script depending on the results of the operation.

The [printcap(5)](/printcap/5.md) file should have a pair of lines which look like this:

 :achk=true\
  :as=\|/usr/sbin/printbill --type foo

foo can be --bill (pre-printing billing), in which case --printbill\_secondary \<printer\> must also be present in the command line, --lazybill for lazy print billing (post-printing billing), --account (no billing, only accounting) or --quote, in which case --printbill\_printer \<printer\> can also be specified (but \<printer\> can be the same as the print queue itself if you want - you can make it different so you can have a printer called "bill" and a quote-queue called "quote" which quotes for "bill". printbill --type quote calculates the bill and sends an e-mail/winpopup message containing the results back to the user.

If you wish to use --bill, you should have something more like this:

lp\|Laser printer (scheduler queue - print to this)\
  :lp=/dev/null\
  :achk=true\
  :as=\|/usr/sbin/printbill --type bill --printbill\_secondary real\
  :sd=/var/spool/lpd/lp

real\|Laser printer (real queue - you can't print to this)\
  :lp=/dev/lp0\
  :achk=true\
  :as=\|/usr/sbin/printbill\_printer\
  :if=.... (if you need an input filter, e.g. PS -\> PCL)\
  :sd=/var/spool/lpd/lp\_real\
  :mx#0\
  :sh

You could add this too, to generate quotes:

quote\|Quote generator for laser printer\
  :lp=/dev/null\
  :achk=true\
  :as=\|/usr/sbin/printbill --type quote --printbill\_printer lp\
  :sd=/var/spool/lpd/lp

Please consult [printbill(8)](/printbill/8.md) for a more detailed description of how this works. Note that [printbilld(1)](/printbilld/1.md) must be running before this print filter will work.

## OPTIONS

- *--type bill\|lazybill\|account\|quote*

  causes [printbilld(1)](/printbilld/1.md) to do different things - refer to [printbilld(1)](/printbilld/1.md) for details.

- *--printbill\_secondary \<printer\>*

  specifies the secondary printer if --type is "bill".

- *--printbill\_printer \<printer\>*

  specifies the actual printer we are generating quotes for if --type is "quote". If not specified, it defaults to the default settings (naturally).

- *-j \<jobnum\>*

  specifies the job number (automatically sent by lprng).

- *-H hostname*

  specifies the hostname where the job originated (automatically sent by lprng).

- *-n \<name\>*

  specifies the username for this job (automatically sent by lprng).

- *-P \<printer\>*

  specifies the name of the print queue (automatically sent by lprng).

- *-k \<filename\>*

  specifies the control file name (automatically sent by lprng).

- *-d \<directory\>*

  specifies the spool directory for this queue (automatically sent by lprng).

## INSTALLATION

Please see the accompanying README file for installation instructions. Chances are if you're reading this it's correctly installed.

## AUTHORS

**printbill and the accompanying utilities were written by Daniel** Franklin (d.franklin@ieee.org). The web interface was written by Phil Ciufo (phil@snrc.uow.edu.au).

## AVAILABILITY

You can always grab the latest and greatest version from **http://ieee.uow.edu.au/~daniel/software/printbill**

## SEE ALSO

*[printbill(8)](/printbill/8.md),* *[printbilld(1)](/printbilld/1.md),* *[printbill\_configure(8)](/printbill_configure/8.md),* *[printbill\_grapher(1)](/printbill_grapher/1.md),* *[percentblack(1)](/percentblack/1.md),* *[percentcolour(1)](/percentcolour/1.md),* *[percent\_cmy(1)](/percent_cmy/1.md),* *[pqcheck(1)](/pqcheck/1.md),* *[printquote(1)](/printquote/1.md),* *[printbill\_printer(1)](/printbill_printer/1.md),* *[printbillrc(5)](/printbillrc/5.md),* *[printcap(5)](/printcap/5.md),* *[pqm(8)](/pqm/8.md).*
