Aerospace



Home

Company Information

Information Request

Linux How-to Guides

ADSP 21xx
Digital Signal Processing
Tutorials

SW Utilities

On-line Order Form

Linux Support

Windows Support


Bonk

Have you found this site useful? Did we save you time? Did we cure your head-ache? Is your hair growing back now?

Please make a donation to help with maintenance.


Custom Search

Print How-to Guide

For Mandriva Linux 2009


Scope

How to have fun with printing and test your CUPS print system.

You are working on a new machine and want to print something, but the printer isn't installed yet. No problem, provided that there is a printer somewhere else on the network!


CUPS

The Common Unix Print System uses the well known utilities lpr and lpstat, same as always. Between those and enscript, you can send a text file to a network printer.

Of course, you can run the wizard system-config-printer to set up a network printer, but doing things manually is way more fun.

If you are adventurous, you can send a postscript file directly to the default printer using the lpr program:

# lpr -H hostname -P printername filename.ps

As an example, send a postscript or PDF file to the default printer on another machine:

$ lpr -H 192.168.1.10 test.ps
or
$ lpr -H 192.168.1.10 test.pdf

That works, because the Linux print system converts any printer to a postscript printer and can handle PDF files directly.

You can convert files to postscript using enscript:

$ echo test > test.txt
$ enscript -p test.ps test.txt

and in the good old Unix way, you can pipe things together:

$ enscript -p - test.txt | lpr -H 192.168.1.10 

Read the enscript, lpr and lpstat man pages!


La Voila!



Copyright © 2005-2008, Aerospace Software Ltd., GPL.