meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

common:printing_guide [2009/04/02 09:47]
laakkone moving files from mediaserver to www2 wiki
common:printing_guide [2011/09/02 12:04]
Line 1: Line 1:
-[[start|Back to the #itlab main page]] 
- 
-=====  Printers and PPD files  ===== 
- 
-**Xerox printer at 6531** --- {{:​common:​files:​xrn4025p.ppd.zip}} 
- 
-**[[http://​157.24.24.16|HP Color Laser]] outside 6505** --- {{:​common:​files:​hpcolor.ppd.zip}} 
- 
-=====  Installing with CUPS  ===== 
- 
-You might already know the http://​localhost:​631 web configuration interface, 
-but there are also command line tools. 
-Let's install the old Xerox printer located in the copy room 6531. 
- 
-Get root. 
-Go get the PPD file and save it somewhere: 
- 
-{{:​common:​files:​xrn4025p.ppd.zip}} 
- 
-Unpack zip file and install the printer with command: 
- 
-<​code>​ lpadmin -p xerox6531 -v socket://​157.24.24.70:​9100/​ -D "the old xerox" -L "mail room 6531" -P Xrn4025p.ppd</​code>​ 
- 
-You can check your available printers as a user with: 
- 
-  lpstat -t 
- 
-If it says your new printer is rejecting jobs and/or disabled, the following commands 
-should be of help (as root): 
- 
-  /​usr/​bin/​enable xerox6531 
-  accept xerox6531 
- 
-The ''​enable''​ command is with full path because ''​enable''​ is also a Bash builtin 
-command. In newer installations of CUPS the command may be named ''​cupsenable''​. 
- 
-To see what kind of options your new printer may offer, try: 
-  lpoptions -p xerox6531 -l 
- 
-=====  Two pages on one  ===== 
- 
-Find and install package ''​psutils''​ to get ''​psnup''​. 
- 
-  psnup -2 docu.ps new_docu.ps 
- 
-=====  Duplex printing ​ ===== 
- 
-At least the Xerox in the mail room can print duplex. 
-For the "​normal"​ way: 
-  lpr -Pxerox6531 -o sides=two-sided-long-edge file.ps 
-For the other way: 
-  lpr -Pxerox6531 -o sides=two-sided-short-edge file.ps 
- 
-NOTE: It has been noticed that some Postscript files refuse to print 
-as duplex and running through ''​ps2ps''​ seems to help. 
-It is recommended to run everything, that is not produced through 
-Ghostscript,​ through ''​ps2ps''​. 
- 
-====  An example ​ ==== 
- 
-You have a [[http://​ti521518.pc.lut.fi/​s/​docs/​ltxprimer-1.0.pdf|PDF]] 
-where you want to nicely print selected pages. 
-Open the PDF in Acrobat reader and print the wanted pages into a Postscript file. 
-The file will likely "​compress"​ if you run it through ''​ps2ps''>​ 
-  ps2ps file.ps file2.ps 
- 
-Then, reorganize the pages to form a book: 
-  psbook -q file2.ps file3.ps 
- 
-Let's put two pages on one sheet, that is, make an A5 book: 
-  psnup -2 file3.ps file4.ps 
- 
-Print the file in duplex: 
-  lpr -Pxerox6531 -o sides=two-sided-short-edge file4.ps 
- 
-=====  Prettyprinting code files  ===== 
- 
-If you put the following Bash script snippet into your e.g. ''​~/​.bashrc'',​ 
-you get the command ''​m2ps'',​ that makes PostScript from your text (code) files. 
-<​code>​ 
-function m2ps { 
-        while [ "​$1"​ ]; do 
-                enscript --ps-level=1 -r --word-wrap -2 -C -G -j "​$1"​ -o "​$1.ps"​ 
-                shift 
-        done 
-} 
-</​code>​ 
-The print is landscape, two-column, with line numbers, long lines word-wrapped,​ 
-fancy header and borders drawn. The command can handle multiple files at one invocation 
-and output file name is input file name appended with ''​.ps''​.