User Tools

Site Tools


printing:lpr:advanced

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
printing:lpr:advanced [2007/01/25 17:49] damirprinting:lpr:advanced [2007/04/24 07:49] (current) damir
Line 1: Line 1:
-==== LPR Advanced Use ====+====== LPR Advanced Use ======
  
-=== Setting Default Options ===+===== Setting Default Options =====
 The printing options below can be used to set default options for future print jobs. Use the lpoptions command with the same arguments below. The options will be saved in the .lpoptions file in your home directory. The following example will set 1/2" margins and make text smaller: The printing options below can be used to set default options for future print jobs. Use the lpoptions command with the same arguments below. The options will be saved in the .lpoptions file in your home directory. The following example will set 1/2" margins and make text smaller:
  
Line 8: Line 8:
   $ lpoptions -o lpi=7   $ lpoptions -o lpi=7
  
-== The default queue ==+===== The default queue =====
  
 Normally the default printer used by the system is the nearer to the workstation, but sometime you can desire a different behaviour. To change your default printer you use the lpoptions command. If you want change your default printer to //cloud// you can use: Normally the default printer used by the system is the nearer to the workstation, but sometime you can desire a different behaviour. To change your default printer you use the lpoptions command. If you want change your default printer to //cloud// you can use:
Line 14: Line 14:
     $ lpoptions -d cloud     $ lpoptions -d cloud
  
-=== lpr options ===+===== lpr options =====
 By using options in the command line of the command **lpr** you can have output completely different from the onew with standard configuration. Using these options you can print until 32 pages of docs in a single sheet of paper, select the level of resolution, change the orientation of the page, and so on. Nobody is able to remember all the options available, so here are listed some useful option you can use. By using options in the command line of the command **lpr** you can have output completely different from the onew with standard configuration. Using these options you can print until 32 pages of docs in a single sheet of paper, select the level of resolution, change the orientation of the page, and so on. Nobody is able to remember all the options available, so here are listed some useful option you can use.
  
-  * Printing non text/postscript documents from the command line+==== Printing non text/postscript documents from the command line ====
  
   $ lpr acrobatdocument.pdf   $ lpr acrobatdocument.pdf
  
-  * Setting Duplex Printing (two-sided-long-edge is default)+==== Setting Duplex Printing (two-sided-long-edge is default) ====
  
   $ lpr -o sides=one-sided mydocument   $ lpr -o sides=one-sided mydocument
Line 27: Line 27:
   $ lpr -o sides=two-sided-short-edge mydocument   $ lpr -o sides=two-sided-short-edge mydocument
  
-  * Setting the media type (duplex is on by default, so turn it off)+==== Setting the media type (duplex is on by default, so turn it off) ====
  
   $ lpr -o media=Transparency -o sides=one-sided mydocument   $ lpr -o media=Transparency -o sides=one-sided mydocument
   $ lpr -o media=Letterhead -o sides=one-sided mydocument   $ lpr -o media=Letterhead -o sides=one-sided mydocument
  
-  * Print on Letterhead for first page, Plain for remaining pages+==== Print on Letterhead for first page, Plain for remaining pages ====
  
   $ lpr -o sides=one-sided -o 1:media=Letterhead -o media=Plain mydocument   $ lpr -o sides=one-sided -o 1:media=Letterhead -o media=Plain mydocument
  
 +==== Print Multiple Pages per sheet ====
   * The -o number-up=value option selects N-Up printing. N-Up printing places multiple document pages on a single printed page. CUPS supports 1, 2, 4, 6, 9, and 16-Up formats; the default format is 1-Up:   * The -o number-up=value option selects N-Up printing. N-Up printing places multiple document pages on a single printed page. CUPS supports 1, 2, 4, 6, 9, and 16-Up formats; the default format is 1-Up:
  
Line 43: Line 44:
   $ lpr -o number-up=16 filename ENTER   $ lpr -o number-up=16 filename ENTER
  
-  * Print only odd or even pages+==== Print only odd or even pages ====
  
   $ lpr -o page-set=odd mydocument   $ lpr -o page-set=odd mydocument
   $ lpr -o page-set=even mydocument   $ lpr -o page-set=even mydocument
  
-  * Print page ranges+==== Print page ranges ====
  
   $ lpr -o page-ranges=5 mydocument   $ lpr -o page-ranges=5 mydocument
Line 54: Line 55:
   $ lpr -o page-ranges=2-5,7-9 mydocument   $ lpr -o page-ranges=2-5,7-9 mydocument
  
 +==== Print a border ====
   * The -o page-border=value option chooses the border to draw around each page:   * The -o page-border=value option chooses the border to draw around each page:
  
Line 62: Line 64:
   $ lpr -o page-border=single-thick; draw one 1pt border around each page   $ lpr -o page-border=single-thick; draw one 1pt border around each page
  
 +==== Layouts ====
   * The -o number-up-layout=value option chooses the layout of the pages on each output page:   * The -o number-up-layout=value option chooses the layout of the pages on each output page:
  
Line 73: Line 76:
   $ lpr -o number-up-layout=tbrl; Top to bottom, right to left  * Setting the Output Order   $ lpr -o number-up-layout=tbrl; Top to bottom, right to left  * Setting the Output Order
  
 +==== Print in mirror mode ====
   * You can mirror a print using the -o mirror option:   * You can mirror a print using the -o mirror option:
  
   $ lpr -o mirror filename ENTER   $ lpr -o mirror filename ENTER
  
 +==== Select Order of pages ====
   * The -o outputorder=order option to set the output order of all pages:   * The -o outputorder=order option to set the output order of all pages:
  
Line 82: Line 87:
   $ lpr -o outputorder=reverse filename ENTER   $ lpr -o outputorder=reverse filename ENTER
  
-  * Rotate page+==== Rotate page ====
  
   $ lpr -o landscape mydocument   $ lpr -o landscape mydocument
  
-  * Set the percentage brightness+==== Set the percentage brightness ====
  
   $ lpr -o brightness=120 mydocument   $ lpr -o brightness=120 mydocument
  
 +==== Gamma ====
   * Set the Gamma correction, 1000 is normal.   * Set the Gamma correction, 1000 is normal.
  
   $ lpr -o gamma=1700 mydocument   $ lpr -o gamma=1700 mydocument
  
-  * Print multiple copies+==== Print multiple copies ====
  
   $ lpr -n num_copies -o collate=True mydocument   $ lpr -n num_copies -o collate=True mydocument
Line 101: Line 107:
 If you set the collate option to Off, the pages of your documents wil be printers in this order: 1, 1, 2, 2, 3, 3, 4, 4 ... If you set the collate option to Off, the pages of your documents wil be printers in this order: 1, 1, 2, 2, 3, 3, 4, 4 ...
  
 +==== ====
   * The -o raw option allows you to send files directly to a printer without filtering. This is sometimes required when printing from applications that provide their own "printer drivers" for your printer:   * The -o raw option allows you to send files directly to a printer without filtering. This is sometimes required when printing from applications that provide their own "printer drivers" for your printer:
  
Line 110: Line 116:
   $ lpr -l filename ENTER   $ lpr -l filename ENTER
  
-  * Selecting the Media Size, Type, and Source+==== Selecting the Media Size, Type, and Source ====
  
 The -o media=xyz option sets the media size, type, and/or source: The -o media=xyz option sets the media size, type, and/or source:
Line 136: Line 142:
 to see all the options available to see all the options available
  
-== Text Printing Options ==+===== Text Printing Options =====
  
 The following options apply when printing text files. The following options apply when printing text files.
    
 +==== CPI ====
   * The -o cpi=value option sets the number of characters per inch:   * The -o cpi=value option sets the number of characters per inch:
  
Line 147: Line 154:
  
   The default characters per inch is 10.   The default characters per inch is 10.
- + 
 +==== LPI ====
   * The -o lpi=value option sets the number of lines per inch:   * The -o lpi=value option sets the number of lines per inch:
  
Line 155: Line 163:
   The default lines per inch is 6.   The default lines per inch is 6.
    
 +==== Columns ====
   * The -o columns=value option sets the number of text columns:   * The -o columns=value option sets the number of text columns:
  
Line 162: Line 171:
   The default number of columns is 1.   The default number of columns is 1.
  
 +==== Margins ====
   * Setting the Page Margins   * Setting the Page Margins
  
Line 173: Line 183:
   The value argument is the margin in points; each point is 1/72 inch or 0.35mm.   The value argument is the margin in points; each point is 1/72 inch or 0.35mm.
  
-  * Pretty Printing+===== Pretty Printing =====
  
 The -o prettyprint option puts a header at the top of each page with the page number, job title (usually the filename), and the date. Also, C and C++ keywords are highlighted, and comment lines are italicized: The -o prettyprint option puts a header at the top of each page with the page number, job title (usually the filename), and the date. Also, C and C++ keywords are highlighted, and comment lines are italicized:
Line 185: Line 195:
  
   $ lpr -o page-left=72 -o page-right=72 -o page-top=72 -o page-bottom=72 mydocument.txt   $ lpr -o page-left=72 -o page-right=72 -o page-top=72 -o page-bottom=72 mydocument.txt
 +
 +===== Image Options =====
 +
  
   * Image Printing Options   * Image Printing Options
Line 193: Line 206:
   $ lpr -o hue=-10 myimage (-360 to 360)   $ lpr -o hue=-10 myimage (-360 to 360)
   $ lpr -o saturation=110 myimage (0-200%)    $ lpr -o saturation=110 myimage (0-200%) 
- 
-== Image Options == 
  
   * The -o position=name option specifies the position of the image on the page:   * The -o position=name option specifies the position of the image on the page:
printing/lpr/advanced.1169747381.txt.gz · Last modified: 2007/01/25 17:49 by damir