Saturday, May 4, 2013

No more printing woes

Linux uses the CUPS printing system (provided by Apple). Usually, one can just plug a printer into a Linux machine and it will be instantly recognized.  This is so much easier than downloading and installing drivers on a legacy system.

On the odd occasion that something is amiss, printing a document from the command line can pinpoint the issue. When you execute a command manually, you can see the error messages and then google them, or look for a solution on http://forums.fedoraforum.org.

Use lp or lpr to send a document to the default printer:
$ lp filename

or to print to a specific printer:
$  lp -d printer filename

Sometimes it is easier to send a file directly to a printer than to launch an editor just to open and print a file, for example:
$ lp -o landscape -o fit-to-page -o media=Letter filename.jpg

CUPS understands many file types directly, such as PDF, postscript, text, or pictures!

Sometimes, when you are busy installing a new machine, you may wish to print something, but the printer may not be installed yet.  Try sending the job to a different machine:
$ lp -h 192.168.x.y filename.pdf

La voila!

No comments:

Post a Comment

On topic comments are welcome. Junk will be deleted.