<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Command-Line Printing and Options</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Command-Line Printing and Options</H1>
+
<P>CUPS provides both the System V (<A
HREF="man-lp.html">lp(1)</A>) and Berkeley (<A
HREF="man-lpr.html">lpr(1)</A>) printing commands for printing
printer options using the <CODE>-o</CODE> option:</P>
<PRE CLASS="command">
-lp -o landscape -o scaling=75 -o media=A4 filename.jpg
-lpr -o landscape -o scaling=75 -o media=A4 filename.jpg
+lp -o landscape -o fit-to-page -o media=A4 filename.jpg
+lpr -o landscape -o fit-to-page -o media=A4 filename.jpg
</PRE>
<P>The available printer options vary depending on the printer.
printing more than one copy of a file:</P>
<PRE CLASS="command">
-lp -n <I>num-copies</I> filename
-lpr -#<I>num-copies</I> filename
+lp -n <EM>num-copies</EM> filename
+lpr -#<EM>num-copies</EM> filename
</PRE>
<P>Copies are normally <EM>not</EM> collated for you. Use the
-<CODE>-o Collate=True</CODE> option to get collated copies:</P>
+<CODE>-o collate=true</CODE> option to get collated copies:</P>
<PRE CLASS="command">
-lp -n <I>num-copies</I> -o Collate=True filename
-lpr -#<I>num-copies</I> -o Collate=True filename
+lp -n <EM>num-copies</EM> -o collate=true filename
+lpr -#<EM>num-copies</EM> -o collate=true filename
</PRE>
HREF="man-lprm.html">lprm(1)</A> commands cancel a print job:</P>
<PRE CLASS="command">
-cancel <I>job-id</I>
-lprm <I>job-id</I>
+cancel <EM>job-id</EM>
+lprm <EM>job-id</EM>
</PRE>
-<P>The <I>job-id</I> is the number that was reported to you by
+<P>The <EM>job-id</EM> is the number that was reported to you by
the <B>lp</B> command. You can also get the job ID using the <A
HREF="man-lpq.html">lpq(1)</A> or <A
HREF="man-lpstat.html">lpstat</A> commands:</P>
job to a new printer or class:</P>
<PRE CLASS="command">
-lpmove <I>job-id</I> <i>destination</i>
+lpmove <EM>job-id</EM> <i>destination</i>
</PRE>
-<P>The <I>job-id</I> is the number that was reported to you by
+<P>The <EM>job-id</EM> is the number that was reported to you by
the <B>lp</B> or <B>lpstat</B> commands. <i>Destination</i> is the
name of a printer or class that you want to actually print the job.
<P>When <CODE>Custom</CODE> is listed for the <CODE>PageSize</CODE> option, you can specify custom media sizes using one of the following forms:</P>
<PRE CLASS="command">
-lp -o media=Custom.<I>WIDTH</I>x<I>LENGTH</I> filename
-lp -o media=Custom.<I>WIDTH</I>x<I>LENGTH</I>in filename
-lp -o media=Custom.<I>WIDTH</I>x<I>LENGTH</I>cm filename
-lp -o media=Custom.<I>WIDTH</I>x<I>LENGTH</I>mm filename
+lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM> filename
+lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM>in filename
+lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM>cm filename
+lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM>mm filename
</PRE>
<P>where "WIDTH" and "LENGTH" are the width and length of the media in points, inches, centimeters, or millimeters, respectively.</P>
</UL>
+
<H3><A NAME="SIDES">Printing On Both Sides of the Paper</A></H3>
<P>The <CODE>-o sides=two-sided-short-edge</CODE> and <CODE>-o
lpr -o sides=one-sided filename
</PRE>
+
<H3><A NAME="JOBSHEETS">Selecting the Banner Page(s)</A></H3>
-<P>The <CODE>-o jobsheets=start,end</CODE> option sets the banner
+<P>The <CODE>-o job-sheets=start,end</CODE> option sets the banner
page(s) to use for a job:</P>
<PRE CLASS="command">
</UL>
+<H3><A NAME="JOBHOLDUNTIL">Holding Jobs for Later Printing</A></H3>
+
+<P>The <CODE>-o job-hold-until=when</CODE> option tells CUPS to
+delay printing until the "when" time, which can be one of the
+following:</P>
+
+<UL>
+
+ <LI><CODE>-o job-hold-until=indefinite</CODE>; print only
+ after released by the user or an administrator</LI>
+
+ <LI><CODE>-o job-hold-until=day-time</CODE>; print from
+ 6am to 6pm local time</LI>
+
+ <LI><CODE>-o job-hold-until=night</CODE>; print from
+ 6pm to 6am local time</LI>
+
+ <LI><CODE>-o job-hold-until=second-shift</CODE>; print from
+ 4pm to 12am local time</LI>
+
+ <LI><CODE>-o job-hold-until=third-shift</CODE>; print from
+ 12am to 8am local time</LI>
+
+ <LI><CODE>-o job-hold-until=weekend</CODE>; print on Saturday
+ or Sunday</LI>
+
+ <LI><CODE>-o job-hold-until=HH:MM</CODE>; print at the specified
+ UTC time</LI>
+
+</UL>
+
+<H3><A NAME="RELEASEJOB">Releasing Held Jobs</A></H3>
+
+<P>Aside from the web interface, you can use the <B>lp</B> command
+to release a held job:</P>
+
+<PRE CLASS="command">
+lp -i <em>job-id</em> -H resume
+</PRE>
+
+<P>where "job-id" is the job ID reported by the <B>lpstat</B>
+command.</P>
+
+
+<H3><A NAME="JOBPRIORITY">Setting the Job Priority</A></H3>
+
+<P>The <CODE>-o job-priority=NNN</CODE> option tells CUPS to
+assign a priority to your job from 1 (lowest) to 100 (highest),
+which influences where the job appears in the print queue. Higher
+priority jobs are printed before lower priority jobs, however
+submitting a new job with a high priority will not interrupt an
+already printing job.</P>
+
+
<H3><A NAME="OUTPUTORDER">Specifying the Output Order</A></H3>
<P>The <CODE>-o outputorder=normal</CODE> and <CODE>-o outputorder=reverse</CODE> options specify the order of the pages. Normal order prints page 1 first, page 2 second, and so forth. Reverse order prints page 1 last.</P>
<P>The default is to print all pages.
-<H3><A NAME="PAGESET">Selecting Even or Odd Pages</A></H3>
+<blockquote><b>Note:</b>
-<P>Use the <CODE>-o page-set=set</CODE> option to select the even or odd pages:</P>
+<p>The page numbers used by <code>page-ranges</code> refer to the output
+pages and not the document's page numbers. Options like <code>number-up</code>
+can make the output page numbering not match the document page numbers.</p>
-<PRE CLASS="command">
-lp -o page-set=odd filename
-lp -o page-set=even filename
-lpr -o page-set=even filename
-</PRE>
+</blockquote>
-<P>The default is to print all pages.
<H3><A NAME="NUMBERUP">N-Up Printing</A></H3>
<LI><CODE>-o number-up-layout=tbrl</CODE>; Top to bottom, right to left</LI>
</UL>
-<H3><A NAME="FITPLOT">Scaling to Fit</A></H3>
+<H3><A NAME="FIT_TO_PAGE">Scaling to Fit</A></H3>
-<P>The <CODE>-o fitplot</CODE> option specifies that the document
+<P>The <CODE>-o fit-to-page</CODE> option specifies that the document
should be scaled to fit on the page:</P>
<PRE CLASS="command">
-lp -o fitplot filename
-lpr -o fitplot filename
+lp -o fit-to-page filename
+lpr -o fit-to-page filename
</PRE>
<P>The default is to use the size specified in the file.</P>
-<BLOCKQUOTE>Note: This feature depends upon an accurate size in
-the print file. If no size is given in the file, the page may be
-scaled incorrectly!</BLOCKQUOTE>
-
-<H3><A NAME="RAW">Raw or Unfiltered Output</A></H3>
-
-<P>The <CODE>-o raw</CODE> 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:</P>
-
-<PRE CLASS="command">
-lp -o raw filename
-lpr -o raw filename
-</PRE>
-
-<P>The <CODE>-l</CODE> option can also be used with the
-<B>lpr</B> command to send files directly to a printer:</P>
-
-<PRE CLASS="command">
-lpr -l filename
-</PRE>
-
-
-<H2 CLASS="title"><A NAME="TEXTOPTIONS">Text Options</A></H2>
-
-<P>CUPS supports several options that are only used when printing
-plain text files. These options have absolutely no effect on
-PostScript, PDF, HP-GL/2, or image files.</P>
-
-<H3><A NAME="CPI">Setting the Number of Characters Per Inch</A></H3>
-
-<P>The <CODE>-o cpi=value</CODE> option sets the number of
-characters per inch:</P>
+<BLOCKQUOTE><B>Note:</B>
-<PRE CLASS="command">
-lp -o cpi=10 filename
-lp -o cpi=12 filename
-lpr -o cpi=17 filename
-</PRE>
+<P>This feature depends upon an accurate size in
+the print file. If no size is given in the file, the page may be
+scaled incorrectly!
-<P>The default characters per inch is 10.</P>
+</BLOCKQUOTE>
-<H3><A NAME="LPI">Setting the Number of Lines Per Inch</A></H3>
+<H3><A NAME="OUTPUTORDER">Printing in Reverse Order</A></H3>
-<P>The <CODE>-o lpi=value</CODE> option sets the number of lines
-per inch:</P>
+<P>The <CODE>-o outputorder=reverse</CODE> option will print the
+pages in reverse order:</P>
<PRE CLASS="command">
-lp -o lpi=6 filename
-lpr -o lpi=8 filename
+lp -o outputorder=reverse filename
+lpr -o outputorder=reverse filename
</PRE>
-<P>The default lines per inch is 6.</P>
-
-<H3><A NAME="COLUMNS">Setting the Number of Columns</A></H3>
-
-<P>The <CODE>-o columns=value</CODE> option sets the number of
-text columns:</P>
+<P>Similarly, the <CODE>-o outputorder=normal</CODE> option will
+print starting with page 1:</P>
<PRE CLASS="command">
-lp -o columns=2 filename
-lpr -o columns=3 filename
+lp -o outputorder=normal filename
+lpr -o outputorder=normal filename
</PRE>
-<P>The default number of columns is 1.</P>
+<P>The default is <CODE>-o outputorder=normal</CODE> for
+printers that print face down and <CODE>-o outputorder=reverse</CODE>
+for printers that print face up.
-<H3><A NAME="MARGINS">Setting the Page Margins</A></H3>
+<H3><A NAME="MIRROR">Printing Mirrored Pages</A></H3>
-<P>Normally the page margins are set to the hard limits of the
-printer. Use the <CODE>-o page-left=value</CODE>, <CODE>-o
-page-right=value</CODE>, <CODE>-o page-top=value</CODE>, and
-<CODE>-o page-bottom=value</CODE> options to adjust the page
-margins:</P>
+<P>The <CODE>-o mirror</CODE> option flips each page along the
+vertical axis to produce a mirrored image:</P>
<PRE CLASS="command">
-lp -o page-left=<I>value</I> filename
-lp -o page-right=<I>value</I> filename
-lp -o page-top=<I>value</I> filename
-lp -o page-bottom=<I>value</I> filename
-lpr -o page-left=<I>value</I> -o page-right=<I>value</I> -o page-top=<I>value</I> -o page-bottom=<I>value</I> filename
+lp -o mirror filename
+lpr -o mirror filename
</PRE>
-<P>The <CODE>value</CODE> argument is the margin in points; each
-point is 1/72 inch or 0.35mm.</P>
-
-<H3><A NAME="PRETTYPRINT">Pretty Printing</A></H3>
-
-<P>The <CODE>-o prettyprint</CODE> 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:</P>
-
-<PRE CLASS="command">
-lp -o prettyprint filename
-lpr -o prettyprint filename
-</PRE>
+<P>This is typically used when printing on T-shirt transfer
+media or sometimes on transparencies.</P>
</BODY>
</HTML>