printing:lpr:advanced
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
printing:lpr:advanced [2007/01/25 12:45] – created damir | printing:lpr:advanced [2007/04/24 09:49] (current) – damir | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | === lpr advanced use === | + | ====== |
- | == lpr 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: | ||
+ | |||
+ | $ lpoptions -o page-left=36 -o page-right=36 -o page-top=36 -o page-bottom=36 | ||
+ | $ lpoptions -o cpi=12 | ||
+ | $ lpoptions -o lpi=7 | ||
+ | |||
+ | ===== The default queue ===== | ||
+ | |||
+ | Normally the default printer used by the system is the nearer to the workstation, | ||
+ | |||
+ | $ lpoptions -d cloud | ||
+ | |||
+ | ===== 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/ | + | ==== Printing non text/ |
$ 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 13: | 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: | $ lpr -o sides=one-sided -o 1: | ||
- | * Print multiple document pages on a printed page (N-Up) | + | ==== Print Multiple Pages per sheet ==== |
+ | * The -o number-up=value option selects N-Up printing. N-Up printing places | ||
- | $ lpr -o number-up=2 | + | |
- | $ lpr -o number-up=4 | + | |
+ | $ lpr -o number-up=4 | ||
+ | $ 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 38: | Line 55: | ||
$ lpr -o page-ranges=2-5, | $ lpr -o page-ranges=2-5, | ||
- | | + | ==== Print a border ==== |
+ | | ||
+ | |||
+ | $ lpr -o page-border=double; | ||
+ | $ lpr -o page-border=double-thick; | ||
+ | $ lpr -o page-border=none; | ||
+ | $ lpr -o page-border=single; | ||
+ | $ lpr -o page-border=single-thick; | ||
+ | |||
+ | ==== Layouts ==== | ||
+ | * The -o number-up-layout=value option chooses the layout of the pages on each output page: | ||
+ | |||
+ | $ lpr -o number-up-layout=btlr; | ||
+ | $ lpr -o number-up-layout=btrl; | ||
+ | $ lpr -o number-up-layout=lrbt; | ||
+ | $ lpr -o number-up-layout=lrtb; | ||
+ | $ lpr -o number-up-layout=rlbt; | ||
+ | $ lpr -o number-up-layout=rltb; | ||
+ | $ lpr -o number-up-layout=tblr; | ||
+ | $ lpr -o number-up-layout=tbrl; | ||
+ | |||
+ | ==== Print in mirror mode ==== | ||
+ | * You can mirror a print using the -o mirror option: | ||
+ | |||
+ | $ lpr -o mirror filename ENTER | ||
+ | |||
+ | ==== Select Order of pages ==== | ||
+ | * The -o outputorder=order option to set the output order of all pages: | ||
+ | |||
+ | $ lpr -o outputorder=normal filename ENTER | ||
+ | $ lpr -o outputorder=reverse filename ENTER | ||
+ | |||
+ | ==== 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 | ||
With the collate option set True, the pages of your documents will be printed in this order: 1, 2, 3, 4 ... 1, 2, 3, 4 ... | With the collate option set True, the pages of your documents will be printed in this order: 1, 2, 3, 4 ... 1, 2, 3, 4 ... | ||
- | If you set the collate option to Off, the pages of your documents wil be printers in this order: | + | 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 ... |
- | | + | ==== ==== |
+ | | ||
+ | |||
+ | $ lpr -o raw filename ENTER | ||
+ | |||
+ | * The -l option can also be used with the lpr command to send files directly to a printer: | ||
+ | |||
+ | $ lpr -l filename ENTER | ||
+ | |||
+ | ==== Selecting the Media Size, Type, and Source ==== | ||
+ | |||
+ | The -o media=xyz option sets the media size, type, and/or source: | ||
+ | |||
+ | $ lpr -o media=Letter, | ||
+ | $ lpr -o media=Letter, | ||
+ | |||
+ | The available media sizes, types, and sources depend on the printer, but most support the following options (case is not significant): | ||
+ | |||
+ | * Letter - US Letter (8.5x11 inches, or 216x279mm) | ||
+ | * Legal - US Legal (8.5x14 inches, or 216x356mm) | ||
+ | * A4 - ISO A4 (8.27x11.69 inches, or 210x297mm) | ||
+ | * COM10 - US #10 Envelope (9.5x4.125 inches, or 241x105mm) | ||
+ | * DL - ISO DL Envelope (8.66x4.33 inches, or 220x110mm) | ||
+ | * Transparency - Transparency media type or source | ||
+ | * Upper - Upper paper tray | ||
+ | * Lower - Lower paper tray | ||
+ | * MultiPurpose - Multi-purpose paper tray | ||
+ | * LargeCapacity - Large capacity paper tray | ||
+ | |||
+ | The actual options supported are defined in the printer' | ||
+ | |||
+ | $ lpoptions -p <name of printer> -l | ||
+ | |||
+ | to see all the options available | ||
+ | |||
+ | ===== Text Printing Options | ||
+ | |||
+ | The following options apply when printing text files. | ||
+ | |||
+ | ==== CPI ==== | ||
+ | * The -o cpi=value option sets the number of characters per inch: | ||
+ | |||
+ | $ lpr -o cpi=10 filename ENTER | ||
+ | $ lpr -o cpi=12 filename ENTER | ||
+ | $ lpr -o cpi=17 filename ENTER | ||
+ | |||
+ | The default characters per inch is 10. | ||
+ | |||
+ | ==== LPI ==== | ||
+ | * The -o lpi=value option sets the number of lines per inch: | ||
+ | |||
+ | $ lpr -o lpi=6 filename ENTER | ||
+ | $ lpr -o lpi=8 filename ENTER | ||
+ | |||
+ | The default lines per inch is 6. | ||
+ | |||
+ | ==== Columns ==== | ||
+ | * The -o columns=value option sets the number of text columns: | ||
+ | |||
+ | $ lpr -o columns=2 filename ENTER | ||
+ | $ lpr -o columns=3 filename ENTER | ||
+ | |||
+ | The default number of columns is 1. | ||
+ | |||
+ | ==== Margins ==== | ||
+ | * Setting the Page Margins | ||
+ | |||
+ | Normally the page margins are set to the hard limits of the printer. Use the -o page-left=value, | ||
+ | |||
+ | $ lpr -o page-left=value filename ENTER | ||
+ | $ lpr -o page-right=value filename ENTER | ||
+ | $ lpr -o page-top=value filename ENTER | ||
+ | $ lpr -o page-bottom=value filename ENTER | ||
+ | |||
+ | The value argument is the margin in points; each point is 1/72 inch or 0.35mm. | ||
+ | |||
+ | ===== 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, | ||
$ lpr -o prettyprint mydocument.txt | $ lpr -o prettyprint mydocument.txt | ||
Line 67: | 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 76: | Line 207: | ||
$ lpr -o saturation=110 myimage (0-200%) | $ lpr -o saturation=110 myimage (0-200%) | ||
- | == Setting Default Options == | + | * The -o position=name option specifies |
- | The printing options above can also be used to set default options for future print jobs. Use the lpoptions command with the same arguments above. 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: | + | |
- | $ lpoptions | + | center |
- | $ lpoptions | + | top - Print the image centered at the top of the page |
- | $ lpoptions | + | |
+ | right - Print the image centered on the right of the page | ||
+ | top-left - Print the image at the top left corner of the page | ||
+ | top-right - Print the image at the top right corner of the page | ||
+ | bottom - Print the image centered at the bottom of the page | ||
+ | bottom-left - Print the image at the bottom left corner of the page | ||
+ | bottom-right - Print the image at the bottom right corner of the page | ||
+ | |||
+ | * The -o scaling=percent, | ||
+ | |||
+ | $ lpr -o scaling=percent filename ENTER | ||
+ | $ lpr -o ppi=value filename ENTER | ||
+ | $ lpr -o natural-scaling=percent filename ENTER | ||
+ | |||
+ | The scaling=percent value is a number from 1 to 800 specifying the size in relation to the page (not the image.) A scaling of 100 percent will fill the page as completely as the image aspect ratio allows. A scaling of 200 percent will print on up to 4 pages. | ||
+ | |||
+ | The ppi=value value is a number from 1 to 1200 specifying the resolution of the image in pixels per inch. An image that is 3000x2400 pixels will print 10x8 inches at 300 pixels per inch, for example. If the specified resolution makes the image larger than the page, multiple pages will be printed to satisfy the request. | ||
+ | |||
+ | The natural-scaling=percent value is a number from 1 to 800 specifying the size in relation to the natural image size. A scaling of 100 percent will print the image at its natural size, while a scaling of 50 percent will print the image at half its natural size. If the specified scaling makes the image larger than the page, multiple pages will be printed to satisfy the request. | ||
+ | |||
+ | * The -o hue=value option will adjust the hue of the printed image, much like the tint control on your television: | ||
+ | |||
+ | $ lpr -o hue=value filename ENTER | ||
+ | |||
+ | The value argument is a number from -360 to 360 and represents the color hue rotation. The following table summarizes the change you'll see with different colors: | ||
+ | |||
+ | ^ Original ^ hue=-45 ^ hue=45 ^ | ||
+ | |Red |Purple|Yellow-orange| | ||
+ | |Green|Yellow-green|Blue-green| | ||
+ | |Yellow|Orange|Green-yellow| | ||
+ | |Blue|Sky-blue|Purple| | ||
+ | |Magenta|Indigo|Crimson| | ||
+ | |Cyan|Blue-green|Light-navy-blue| | ||
+ | |||| | ||
+ | |The default hue adjustment is 0.|||| | ||
+ | |||
+ | * The -o saturation=percent option adjusts the saturation of the colors in an image, much like the color knob on your television: | ||
+ | |||
+ | $ lpr -o saturation=percent filename ENTER | ||
+ | |||
+ | The percent argument specifies the color saturation from 0 to 200. A color saturation of 0 produces a black-and-white print, while a value of 200 will make the colors extremely intense. | ||
+ | The default saturation is 100. | ||
+ |
printing/lpr/advanced.1169725522.txt.gz · Last modified: 2007/01/25 12:45 by damir