next up previous contents index
Next: Some Useful Unix Up: Printing Previous: Printing

Printing with lpr

  Printer output is sent to the device specified in the environment variable PRINTER or by the device given with the -P option in the print command. If neither of these are defined, output will be either printed on the system default printer, disappear down a 'black hole', or generate an error message depending on the system setup. Set up your printer using the command:
 
	       		  PRINTER =  printername; export PRINTER 		 for 
                  Bourne & korn shells

setenv PRINTER printername for csh

Should you wish to change the printer momentarily simply use a command like the following to print your file:

 
	       		  lpr -P printername filename

Text files printed through the 'springer' central print server must be converted to PostScript  for printing on a PostScript printer such as an Apple LaserWriter. For printers connected to the AppleTalk (the vast majority of printers at CERN), this formatting is normally done automatically on 'springer'.

What follows currently applies ONLY to AppleTalk-connected PostScript printers!

For the formatting process, some decisions have been taken as to how the text should appear on the page. These decisions concern the text-formatting program, the text's layout on the physical page and the size of characters used. In the absence of any formatting specification by the user or in the printer description entry on the print server, a paper-saving default has been chosen as described below.

Formats can be controlled --

  1. For DEC/Sun/IBM users: through the '-w' switch on the 'lpr' command, for example: lpr -P513-pub -w80 /.profile or through the ':pw#...:' in your local /etc/printcap (yes, this is not ':pw=...:'! it is a numeric parameter, see 'man printcap') entry file. The use of /etc/printcap is normally confined to DEC and Sun only but can also exist for SGI.
  2. For HP-UX users: the '-oBSDw' switch on the 'lp' command, for example:
    lp-d513_pub-oBSDw80myfile
  3. For VM users: all the parameters to 'a2ps' must be specified by the user, as described in 'HELP A2PS', 'HELP LWPRINT', etc...
  4. In the 'pw' printer description entry on the print server 'springer' on a per printer basis. Send mail to 'printer.support@springer' mentioning the printer and the desired default. (Make sure you agree with other people using the same printer!)
Normally, text is typeset in 'courier' typeface. The formatter 'a2ps' surrounds text by a frame and prints a header specifying the print date, file name (if available) and page number.

Throughout the following 'w' means the argument to the '-w' option on the 'lpr' command, to the '-oBSDw' option on the 'lp' (SysV) command or the 'pw#.." value assigned in your local /etc/printcap file if you are printing from a DEC or Sun Unix workstation.

Standard default (plus all '-w' not falling into the ranges below plus the special value 'w=2': text formatter 'a2ps', two logical 'portrait' pages printed on a physical 'landscape' oriented page including a frame, header and line numbers, font size 6.8 pt (rather small, paper saving mode).

 
39 < w <= 85:   		  formatter a2ps, portrait orientation, font size chosen 
                        so that either w or

w+1 columns fit on a line. Lines longer than w (or w+1) are folded.

85 < w <= 200: formatter a2ps, landscape orientation, font size chosen so that either w or

w+1 columns fit on a line. Lines longer than w (or w+1) are folded.

Some values of 'w' less than 40 are used for special purposes:

w=2: default, see above

w=4: formatter ascii2ps, a4 portrait orientation, 11 pt. font with long lines

folded, no frames, headers, or page numbers, just plain text.

w=5: formatter a2ps, a4 portrait orientation, 6.8 pt. font, supporting lines

up to 122 characters.

Some options that are available using lpr are listed below but remember that most of these are not available when listing postscript files, see the later section on LATEX for more information about this.

 
 -l       		 for control characters and suppressing page breaks.

-f this option interprets the first character of a line as a standard Fortran

control character.

-s for printing large files, (these files are softlinked to the spool and not

written there. Do not modify files sent via this method until printing

is complete).

-x No filtering, file printed verbatim.

-#num Number of copies required.

-wnum Maximum page width

-znum Maximum page length



next up previous contents index
Next: Some Useful Unix Up: Printing Previous: Printing



Alan Silverman
Wed Apr 12 16:54:02 METDST 1995