Print with shell commands courtesy of CUPS

Lead Image © Andrii Adamskyi , 123RF.com

Hand Crafted

Send documents to a printer and automate many tasks from the command line.

CUPS command-line commands let you quickly print documents remotely to a printer of your choice, print shell script results without user intervention, move print jobs to another printer, cancel jobs, and more.

In the first part of this series, "CUPS Administration," published in Raspberry Pi Geek last issue [1], I showed you how to create and manage printers and queues. In this article, although I distinguish between printers and queues, from the perspective of the command line, these are usually the same thing because multiple queues can be set up for a physical printer. This ability proves especially useful if your printers have various add-ons (e.g., additional paper trays filled with different kinds of paper).

Printing

CUPS provides two print commands, lp (System V) and lpr (BSD), both of which you can use on the Raspberry Pi. The CUPS developers have expanded these commands with their own options. Table 1 shows the most important commands for everyday work.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content