|
||||||||||||
|
|
8.1. Printing files8.1.1. GeneralRedHat ships with LPRng, an improved version of the well-known UNIX print system. If the printer has been set up, all you need to do is learn how to use lpr to send files to the printer, which basically comes down to lpr file(s) Lpr uses a spooling daemon, lpd to print the named files when facilities become available. If no names appear, standard input is assumed (such as when the output of a command is piped into lpr). The lpr command has a lot of options, which can be displayed using the --help option. Full information is in the Info pages. You will also find the lp command on your Linux system, for compatibility reasons with other (UNIX) programs. You will find that lp is in fact a symbolic link to lpr:
Once the file is accepted in the print queue, an identification number for the print job is assigned:
To view (query) the print queue, use the lpq command. When entered without arguments, it displays the contents of the default print queue.
If you don't like what you see, use lprm to delete jobs. Use lprm - to delete all jobs which you submitted. If you only want to cancel one job, use the number of that job as an argument to lprm. In larger environments, lpc may be used to control multiple printers. See the Info on each command. There are many GUI print tools used as a front-end to lpr, and most graphical applications have a print function that uses lpr. See the built-in Help functions and program specific documentation for more. 8.1.2. Formatting8.1.2.1. ToolsIf we want to get something sensible out of the printer, files should be formatted first. Apart from an abundance of formatting software, Linux comes with the basic UNIX formatting tools and languages. Most markup languages are more suitable for large or repetitive jobs, where the computer controls the layout of the text, like when executing scripts.
Linux comes with a lot of formatting tools, such as pdf2ps, fax2ps and a2ps. Apart from these command line tools there are a lot of graphical word processing programs. Several complete office suites are available, many are free. These do the formatting automatically upon submission of a print job. Just to name a few: AbiWord, KWord, StarOffice, OpenOffice, Applix, WordPerfect, etc.
8.1.2.2. Previewing formatted filesAnything you can send to the printer, can normally be sent to the screen as well. Depending on the file format, you can use one of these commands:
| |||||||||||
|
||||||||||||