- Get link
- X
- Other Apps
CUPS - Common UNIX Printing System
CUPS Process
After a print command execution:
- The scheduler validates the command and processes the print job:
- Creates job files according to the settings specified in the configuration files.
- Records activities in the log files.
- Job files are processed with the help of the filter, printer driver, and backend, and then sent to the printer.
Scheduler
Scheduler manages:
- Print jobs
- Handles administrative commands
- Allows users to query the printer status
- Manages the flow of data through all CUPS components
- cupsd.conf
System settings, no printer details. Mainly network security. - printers.conf
Printer settings.
Job Files
The instances to print are in the form of print requests stored in files under /var/spool/cups/.
Those files are put into a Print Queue and removed after printing. They are of 2 types:
- Data files, starting with the letter d.
- Control files, starting with the letter c.
Log files
Store in /var/log/cups.
Filters, Printer Drivers, and Backends
- Job files are converted in printable format by filters.
- Printer drivers are contained in /etc/cups/ppd/ directory.
- The print data is then sent to the printer through another filter, and via a backend that helps to locate devices connected to the system.
Managing CUPS
To use CUPS, CUPS daemon need to be activated and properly managed:
- $ systemctl status cups
- $ sudo systemctl [enable|disable] cups
- $ sudo systemctl [start|stop|restart] cups
A webserver is already provided by CUPS at the address http://localhost:631.
Commands for printing
$ lp <filename>
To print the file to default printer
$ lp -d printer <filename>
To print to a specific printer (useful if multiple printers are available)
$ program | lp
or
$ echo string | lp
To print the output of a program
$ lp -n number <filename>
To print multiple copies
$ lpoptions -d printer
To set the default printer
$ lpq -a
To show the queue status
$ lpadmin
To configure printer queues
Print management commands
$ lpstat -p -d
To get a list of available printers, along with their status
$ lpstat -a
To check the status of all connected printers, including job numbers
$ cancel job-id
or
$ lprm job-id
To cancel a print job
$ lpmove job-id newprinter
To move a print job to new printer
Utilities
PS/PDF conversion:
- pdf2ps / ps2pdf
- enscript
- pstopdf / pdftops
- convert
- gm convert
PDF visualisation:
- evince
- okular
PDF manipulation:
- qpdf
- pdftk
- ghostscript
Extra:
- pdfinfo
Extracts information - flpsed
Adds data such as comments - pdfmod
GUI for the operations
Comments
Post a Comment