You are here: Wiki_Virgo_LSC>IT Web>PrinterOptions (10 Oct 2018, Dibiase)Edit Attach

Standard Printer Options

This chapter describes the standard printer options that are available when printing with the lp and lpr commands.

General Options

The following options apply when printing all types of files.

Selecting the Media Size, Type, and Source

The -o media=xyz option sets the media size, type, and/or source:

lp -o media=Letter filename ENTER

lp -o media=Letter,MultiPurpose filename ENTER

lpr -o media=Letter,Transparency filename ENTER

lpr -o media=Letter,MultiPurpose,Transparency filename ENTER

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's PPD file in the PageSize, InputSlot, and MediaType options.

Setting the Orientation

The -o landscape option will rotate the page 90 degrees to print in landscape orientation:

lp -o landscape filename ENTER

lpr -o landscape filename ENTER

Printing On Both Sides of the Paper

The -o sides=two-sided-short-edge and -o sides=two-sided-long-edge options will enable duplexing on the printer, if the printer supports it. The -o sides=two-sided-short-edge option is suitable for landscape pages, while the -o sides=two-sided-long-edge option is suitable for portrait pages:

lp -o sides=two-sided-short-edge filename ENTER

lp -o sides=two-sided-long-edge filename ENTER

lpr -o sides=two-sided-long-edge filename ENTER

The default is to print single-sided:

lp -o sides=one-sided filename ENTER

lpr -o sides=one-sided filename ENTER

The following options apply when printing all types of files.

Selecting the Banner Page(s)

The -o jobsheets=start,end option sets the banner page(s) to use for a job:

lp -o job-sheets=none filename ENTER

lp -o job-sheets=standard filename ENTER

lpr -o job-sheets=classified,classified filename ENTER

If only one banner file is specified, it will be printed before the files in the job. If a second banner file is specified, it is printed after the files in the job.

The available banner pages depend on the local system configuration; CUPS includes the following banner files:

·none - Do not produce a banner page.

·classified - A banner page with a "classified" label at the top and bottom.

·confidential - A banner page with a "confidential" label at the top and bottom.

·secret - A banner page with a "secret" label at the top and bottom.

·standard - A banner page with no label at the top and bottom.

·topsecret - A banner page with a "top secret" label at the top and bottom.

·unclassified - A banner page with an "unclassified" label at the top and bottom.

Document Options

The following options apply when printing all types of files.

Selecting a Range of Pages

The -o page-ranges=pages option selects a range of pages for printing:

lp -o page-ranges=1 filename ENTER

lp -o page-ranges=1-4 filename ENTER

lp -o page-ranges=1-4,7,9-12 filename ENTER

lpr -o page-ranges=1-4,7,9-12 filename ENTER

As shown above, the pages value can be a single page, a range of pages, or a collection of page numbers and ranges separated by commas. The pages will always be printed in ascending order, regardless of the order of the pages in the page-ranges option.

The default is to print all pages.

Selecting Even or Odd Pages

Use the -o page-set=set option to select the even or odd pages:

lp -o page-set=odd filename ENTER

lp -o page-set=even filename ENTER

lpr -o page-set=even filename ENTER

The default is to print all pages.

Setting the Output Order

The the -o outputorder=order option to set the output order of all pages:

lp -o outputorder=normal filename ENTER

lp -o outputorder=reverse filename ENTER

lpr -o outputorder=reverse filename ENTER

N-Up Printing

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:

lp -o number-up=1 filename ENTER

lp -o number-up=2 filename ENTER

lp -o number-up=4 filename ENTER

lpr -o number-up=16 filename ENTER

The -o page-border=value option chooses the border to draw around each page:

·-o page-border=double; draw two hairline borders around each page

·-o page-border=double-thick; draw two 1pt borders around each page

·-o page-border=none; do not draw a border (default)

·-o page-border=single; draw one hairline border around each page

·-o page-border=single-thick; draw one 1pt border around each page

The -o number-up-layout=value option chooses the layout of the pages on each output page:

·-o number-up-layout=btlr; Bottom to top, left to right

·-o number-up-layout=btrl; Bottom to top, right to left

·-o number-up-layout=lrbt; Left to right, bottom to top

·-o number-up-layout=lrtb; Left to right, top to bottom (default)

·-o number-up-layout=rlbt; Right to left, bottom to top

·-o number-up-layout=rltb; Right to left, top to bottom

·-o number-up-layout=tblr; Top to bottom, left to right

·-o number-up-layout=tbrl; Top to bottom, right to left

Mirroring Prints

You can mirror a print using the -o mirror option:

lp -o mirror filename ENTER

lpr -o mirror filename ENTER

This is useful for printing mirrored pages on transfer paper, for T shirts, mugs, etc.

Setting the Brightness

You can control the overall brightness of the printed output using the -o brightness=percent option:

lp -o brightness=120 filename ENTER

lpr -o brightness=120 filename ENTER

Values greater than 100 will lighten the print, while values less than 100 will darken it.

Setting the Gamma Correction

You can control the overall gamma correction of the printed output using the -o gamma=value option:

lp -o gamma=1700 filename ENTER

lpr -o gamma=1700 filename ENTER

Values greater than 1000 will lighten the print, while values less than 1000 will darken it. The default gamma is 1000.

Text Options

The following options apply when printing text files.

Setting the Number of Characters Per Inch

The -o cpi=value option sets the number of characters per inch:

lp -o cpi=10 filename ENTER

lp -o cpi=12 filename ENTER

lpr -o cpi=17 filename ENTER

The default characters per inch is 10.

Setting the Number of Lines Per Inch

The -o lpi=value option sets the number of lines per inch:

lp -o lpi=6 filename ENTER

lpr -o lpi=8 filename ENTER

The default lines per inch is 6.

Setting the Number of Columns

The -o columns=value option sets the number of text columns:

lp -o columns=2 filename ENTER

lpr -o columns=3 filename ENTER

The default number of columns is 1.

Setting the Page Margins

Normally the page margins are set to the hard limits of the printer. Use the -o page-left=value, -o page-right=value , -o page-top=value, and -o page-bottom=value options to adjust the page margins:

lp -o page-left= value filename ENTER

lp -o page-right= value filename ENTER

lp -o page-top= value filename ENTER

lp -o page-bottom= 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, and comment lines are italicized:

lp -o prettyprint filename ENTER

lpr -o prettyprint filename ENTER

Image Options

The following options apply when printing image files.

Positioning the Image

The -o position=name option specifies the position of the image on the page:

·center - Center the image on the page (default)

·top - Print the image centered at the top of the page

·left - Print the image centered on the left of page

·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

Scaling the Image

The -o scaling=percent, -o ppi=value, and -o natural-scaling=percent options change the size of a printed image:

lp -o scaling= percent filename ENTER

lp -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.

Adjusting the Hue (Tint) of an Image

The -o hue=value option will adjust the hue of the printed image, much like the tint control on your television:

lp -o hue= value filename ENTER

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.

Adjusting the Saturation (Color) of an Image

The -o saturation=percent option adjusts the saturation of the colors in an image, much like the color knob on your television:

lp -o saturation= percent filename ENTER

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.

Raw or Unfiltered Output

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:

lp -o raw filename ENTER

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

Topic revision: r1 - 10 Oct 2018, Dibiase
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki_Virgo_LSC? Send feedback