1*5e7646d2SAndroid Build Coastguard Worker<!DOCTYPE HTML> 2*5e7646d2SAndroid Build Coastguard Worker<html> 3*5e7646d2SAndroid Build Coastguard Worker<!-- SECTION: Man Pages --> 4*5e7646d2SAndroid Build Coastguard Worker<head> 5*5e7646d2SAndroid Build Coastguard Worker <link rel="stylesheet" type="text/css" href="../cups-printable.css"> 6*5e7646d2SAndroid Build Coastguard Worker <title>lp(1)</title> 7*5e7646d2SAndroid Build Coastguard Worker</head> 8*5e7646d2SAndroid Build Coastguard Worker<body> 9*5e7646d2SAndroid Build Coastguard Worker<h1 class="title">lp(1)</h1> 10*5e7646d2SAndroid Build Coastguard Worker<h2 class="title"><a name="NAME">Name</a></h2> 11*5e7646d2SAndroid Build Coastguard Workerlp - print files 12*5e7646d2SAndroid Build Coastguard Worker<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2> 13*5e7646d2SAndroid Build Coastguard Worker<b>lp</b> 14*5e7646d2SAndroid Build Coastguard Worker[ 15*5e7646d2SAndroid Build Coastguard Worker<b>-E</b> 16*5e7646d2SAndroid Build Coastguard Worker] [ 17*5e7646d2SAndroid Build Coastguard Worker<b>-U</b> 18*5e7646d2SAndroid Build Coastguard Worker<i>username</i> 19*5e7646d2SAndroid Build Coastguard Worker] [ 20*5e7646d2SAndroid Build Coastguard Worker<b>-c</b> 21*5e7646d2SAndroid Build Coastguard Worker] [ 22*5e7646d2SAndroid Build Coastguard Worker<b>-d </b><i>destination</i>[<b>/</b><i>instance</i>] 23*5e7646d2SAndroid Build Coastguard Worker] [ 24*5e7646d2SAndroid Build Coastguard Worker<b>-h </b><i>hostname</i>[<b>:</b><i>port</i>] 25*5e7646d2SAndroid Build Coastguard Worker] [ 26*5e7646d2SAndroid Build Coastguard Worker<b>-m</b> 27*5e7646d2SAndroid Build Coastguard Worker] [ 28*5e7646d2SAndroid Build Coastguard Worker<b>-n</b> 29*5e7646d2SAndroid Build Coastguard Worker<i>num-copies</i> 30*5e7646d2SAndroid Build Coastguard Worker] [ 31*5e7646d2SAndroid Build Coastguard Worker<b>-o </b><i>option</i>[<b>=</b><i>value</i>] 32*5e7646d2SAndroid Build Coastguard Worker] [ 33*5e7646d2SAndroid Build Coastguard Worker<b>-q</b> 34*5e7646d2SAndroid Build Coastguard Worker<i>priority</i> 35*5e7646d2SAndroid Build Coastguard Worker] [ 36*5e7646d2SAndroid Build Coastguard Worker<b>-s</b> 37*5e7646d2SAndroid Build Coastguard Worker] [ 38*5e7646d2SAndroid Build Coastguard Worker<b>-t</b> 39*5e7646d2SAndroid Build Coastguard Worker<i>title</i> 40*5e7646d2SAndroid Build Coastguard Worker] [ 41*5e7646d2SAndroid Build Coastguard Worker<b>-H</b> 42*5e7646d2SAndroid Build Coastguard Worker<i>handling</i> 43*5e7646d2SAndroid Build Coastguard Worker] [ 44*5e7646d2SAndroid Build Coastguard Worker<b>-P</b> 45*5e7646d2SAndroid Build Coastguard Worker<i>page-list</i> 46*5e7646d2SAndroid Build Coastguard Worker] [ 47*5e7646d2SAndroid Build Coastguard Worker<b>--</b> 48*5e7646d2SAndroid Build Coastguard Worker] [ 49*5e7646d2SAndroid Build Coastguard Worker<i>file(s)</i> 50*5e7646d2SAndroid Build Coastguard Worker] 51*5e7646d2SAndroid Build Coastguard Worker<br> 52*5e7646d2SAndroid Build Coastguard Worker<b>lp</b> 53*5e7646d2SAndroid Build Coastguard Worker[ 54*5e7646d2SAndroid Build Coastguard Worker<b>-E</b> 55*5e7646d2SAndroid Build Coastguard Worker] [ 56*5e7646d2SAndroid Build Coastguard Worker<b>-U</b> 57*5e7646d2SAndroid Build Coastguard Worker<i>username</i> 58*5e7646d2SAndroid Build Coastguard Worker] [ 59*5e7646d2SAndroid Build Coastguard Worker<b>-c</b> 60*5e7646d2SAndroid Build Coastguard Worker] [ 61*5e7646d2SAndroid Build Coastguard Worker<b>-h </b><i>hostname</i>[<b>:</b><i>port</i>] 62*5e7646d2SAndroid Build Coastguard Worker] [ 63*5e7646d2SAndroid Build Coastguard Worker<b>-i</b> 64*5e7646d2SAndroid Build Coastguard Worker<i>job-id</i> 65*5e7646d2SAndroid Build Coastguard Worker] [ 66*5e7646d2SAndroid Build Coastguard Worker<b>-n</b> 67*5e7646d2SAndroid Build Coastguard Worker<i>num-copies</i> 68*5e7646d2SAndroid Build Coastguard Worker] [ 69*5e7646d2SAndroid Build Coastguard Worker<b>-o </b><i>option</i>[<b>=</b><i>value</i>] 70*5e7646d2SAndroid Build Coastguard Worker] [ 71*5e7646d2SAndroid Build Coastguard Worker<b>-q</b> 72*5e7646d2SAndroid Build Coastguard Worker<i>priority</i> 73*5e7646d2SAndroid Build Coastguard Worker] [ 74*5e7646d2SAndroid Build Coastguard Worker<b>-t</b> 75*5e7646d2SAndroid Build Coastguard Worker<i>title</i> 76*5e7646d2SAndroid Build Coastguard Worker] [ 77*5e7646d2SAndroid Build Coastguard Worker<b>-H</b> 78*5e7646d2SAndroid Build Coastguard Worker<i>handling</i> 79*5e7646d2SAndroid Build Coastguard Worker] [ 80*5e7646d2SAndroid Build Coastguard Worker<b>-P</b> 81*5e7646d2SAndroid Build Coastguard Worker<i>page-list</i> 82*5e7646d2SAndroid Build Coastguard Worker] 83*5e7646d2SAndroid Build Coastguard Worker<h2 class="title"><a name="DESCRIPTION">Description</a></h2> 84*5e7646d2SAndroid Build Coastguard Worker<b>lp</b> submits files for printing or alters a pending job. 85*5e7646d2SAndroid Build Coastguard WorkerUse a filename of "-" to force printing from the standard input. 86*5e7646d2SAndroid Build Coastguard Worker<h3><a name="THE_DEFAULT_DESTINATION">The Default Destination</a></h3> 87*5e7646d2SAndroid Build Coastguard WorkerCUPS provides many ways to set the default destination. The <b>LPDEST</b> and <b>PRINTER</b> environment variables are consulted first. 88*5e7646d2SAndroid Build Coastguard WorkerIf neither are set, the current default set using the 89*5e7646d2SAndroid Build Coastguard Worker<b>lpoptions</b>(1) 90*5e7646d2SAndroid Build Coastguard Workercommand is used, followed by the default set using the 91*5e7646d2SAndroid Build Coastguard Worker<b>lpadmin</b>(8) 92*5e7646d2SAndroid Build Coastguard Workercommand. 93*5e7646d2SAndroid Build Coastguard Worker<h2 class="title"><a name="OPTIONS">Options</a></h2> 94*5e7646d2SAndroid Build Coastguard WorkerThe following options are recognized by <i>lp</i>: 95*5e7646d2SAndroid Build Coastguard Worker<dl class="man"> 96*5e7646d2SAndroid Build Coastguard Worker<dt><b>--</b> 97*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Marks the end of options; use this to print a file whose name begins with a dash (-). 98*5e7646d2SAndroid Build Coastguard Worker<dt><b>-E</b> 99*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Forces encryption when connecting to the server. 100*5e7646d2SAndroid Build Coastguard Worker<dt><b>-U </b><i>username</i> 101*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Specifies the username to use when connecting to the server. 102*5e7646d2SAndroid Build Coastguard Worker<dt><b>-c</b> 103*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">This option is provided for backwards-compatibility only. On systems that support it, this option forces the print file to be copied to the spool directory before printing. 104*5e7646d2SAndroid Build Coastguard WorkerIn CUPS, print files are always sent to the scheduler via IPP which has the same effect. 105*5e7646d2SAndroid Build Coastguard Worker<dt><b>-d </b><i>destination</i> 106*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Prints files to the named printer. 107*5e7646d2SAndroid Build Coastguard Worker<dt><b>-h </b><i>hostname</i>[<b>:</b><i>port</i>] 108*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Chooses an alternate server. 109*5e7646d2SAndroid Build Coastguard Worker<dt><b>-i </b><i>job-id</i> 110*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Specifies an existing job to modify. 111*5e7646d2SAndroid Build Coastguard Worker<dt><b>-m</b> 112*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Sends an email when the job is completed. 113*5e7646d2SAndroid Build Coastguard Worker<dt><b>-n </b><i>copies</i> 114*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Sets the number of copies to print. 115*5e7646d2SAndroid Build Coastguard Worker<dt><b>-o "</b><i>name</i><b>=</b><i>value </i>[ ... <i>name</i><b>=</b><i>value </i>]<b>"</b> 116*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Sets one or more job options. 117*5e7646d2SAndroid Build Coastguard WorkerSee "COMMON JOB OPTIONS" below. 118*5e7646d2SAndroid Build Coastguard Worker<dt><b>-q </b><i>priority</i> 119*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Sets the job priority from 1 (lowest) to 100 (highest). 120*5e7646d2SAndroid Build Coastguard WorkerThe default priority is 50. 121*5e7646d2SAndroid Build Coastguard Worker<dt><b>-s</b> 122*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Do not report the resulting job IDs (silent mode.) 123*5e7646d2SAndroid Build Coastguard Worker<dt><b>-t "</b><i>name</i><b>"</b> 124*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Sets the job name. 125*5e7646d2SAndroid Build Coastguard Worker<dt><b>-H </b><i>hh:mm</i> 126*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em"><dt><b>-H hold</b> 127*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em"><dt><b>-H immediate</b> 128*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em"><dt><b>-H restart</b> 129*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em"><dt><b>-H resume</b> 130*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Specifies when the job should be printed. 131*5e7646d2SAndroid Build Coastguard WorkerA value of <i>immediate</i> will print the file immediately, a value of <i>hold</i> will hold the job indefinitely, and a UTC time value (HH:MM) will hold the job until the specified UTC (not local) time. 132*5e7646d2SAndroid Build Coastguard WorkerUse a value of <i>resume</i> with the <i>-i</i> option to resume a held job. 133*5e7646d2SAndroid Build Coastguard WorkerUse a value of <i>restart</i> with the <i>-i</i> option to restart a completed job. 134*5e7646d2SAndroid Build Coastguard Worker<dt><b>-P </b><i>page-list</i> 135*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Specifies which pages to print in the document. 136*5e7646d2SAndroid Build Coastguard WorkerThe list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16". 137*5e7646d2SAndroid Build Coastguard WorkerThe page numbers refer to the output pages and not the document's original pages - options like "number-up" can affect the numbering of the pages. 138*5e7646d2SAndroid Build Coastguard Worker</dl> 139*5e7646d2SAndroid Build Coastguard Worker<h3><a name="COMMON_JOB_OPTIONS">Common Job Options</a></h3> 140*5e7646d2SAndroid Build Coastguard WorkerAside from the printer-specific options reported by the 141*5e7646d2SAndroid Build Coastguard Worker<b>lpoptions</b>(1) 142*5e7646d2SAndroid Build Coastguard Workercommand, the following generic options are available: 143*5e7646d2SAndroid Build Coastguard Worker<dl class="man"> 144*5e7646d2SAndroid Build Coastguard Worker<dt><b>-o job-sheets=</b><i>name</i> 145*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Prints a cover page (banner) with the document. 146*5e7646d2SAndroid Build Coastguard WorkerThe "name" can be "classified", "confidential", "secret", "standard", "topsecret", or "unclassified". 147*5e7646d2SAndroid Build Coastguard Worker<dt><b>-o media=</b><i>size</i> 148*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Sets the page size to <i>size</i>. Most printers support at least the size names "a4", "letter", and "legal". 149*5e7646d2SAndroid Build Coastguard Worker<dt><b>-o number-up=</b>{<i>2|4|6|9|16</i>} 150*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Prints 2, 4, 6, 9, or 16 document (input) pages on each output page. 151*5e7646d2SAndroid Build Coastguard Worker<dt><b>-o orientation-requested=4</b> 152*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Prints the job in landscape (rotated 90 degrees counter-clockwise). 153*5e7646d2SAndroid Build Coastguard Worker<dt><b>-o orientation-requested=5</b> 154*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Prints the job in landscape (rotated 90 degrees clockwise). 155*5e7646d2SAndroid Build Coastguard Worker<dt><b>-o orientation-requested=6</b> 156*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Prints the job in reverse portrait (rotated 180 degrees). 157*5e7646d2SAndroid Build Coastguard Worker<dt><b>-o print-quality=3</b> 158*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em"><dt><b>-o print-quality=4</b> 159*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em"><dt><b>-o print-quality=5</b> 160*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Specifies the output quality - draft (3), normal (4), or best (5). 161*5e7646d2SAndroid Build Coastguard Worker<dt><b>-o sides=one-sided</b> 162*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Prints on one side of the paper. 163*5e7646d2SAndroid Build Coastguard Worker<dt><b>-o sides=two-sided-long-edge</b> 164*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Prints on both sides of the paper for portrait output. 165*5e7646d2SAndroid Build Coastguard Worker<dt><b>-o sides=two-sided-short-edge</b> 166*5e7646d2SAndroid Build Coastguard Worker<dd style="margin-left: 5.0em">Prints on both sides of the paper for landscape output. 167*5e7646d2SAndroid Build Coastguard Worker</dl> 168*5e7646d2SAndroid Build Coastguard Worker<h2 class="title"><a name="CONFORMING_TO">Conforming To</a></h2> 169*5e7646d2SAndroid Build Coastguard WorkerUnlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#". 170*5e7646d2SAndroid Build Coastguard WorkerAlso, printer and class names are <i>not</i> case-sensitive. 171*5e7646d2SAndroid Build Coastguard Worker<p>The <i>-q</i> option accepts a different range of values than the Solaris lp command, matching the IPP job priority values (1-100, 100 is highest priority) instead of the Solaris values (0-39, 0 is highest priority). 172*5e7646d2SAndroid Build Coastguard Worker<h2 class="title"><a name="EXAMPLES">Examples</a></h2> 173*5e7646d2SAndroid Build Coastguard WorkerPrint two copies of a document to the default printer: 174*5e7646d2SAndroid Build Coastguard Worker<pre class="man"> 175*5e7646d2SAndroid Build Coastguard Worker 176*5e7646d2SAndroid Build Coastguard Worker lp -n 2 filename 177*5e7646d2SAndroid Build Coastguard Worker 178*5e7646d2SAndroid Build Coastguard Worker</pre> 179*5e7646d2SAndroid Build Coastguard WorkerPrint a double-sided legal document to a printer called "foo": 180*5e7646d2SAndroid Build Coastguard Worker<pre class="man"> 181*5e7646d2SAndroid Build Coastguard Worker 182*5e7646d2SAndroid Build Coastguard Worker lp -d foo -o media=legal -o sides=two-sided-long-edge filename 183*5e7646d2SAndroid Build Coastguard Worker 184*5e7646d2SAndroid Build Coastguard Worker</pre> 185*5e7646d2SAndroid Build Coastguard WorkerPrint a presentation document 2-up to a printer called "bar": 186*5e7646d2SAndroid Build Coastguard Worker<pre class="man"> 187*5e7646d2SAndroid Build Coastguard Worker 188*5e7646d2SAndroid Build Coastguard Worker lp -d bar -o number-up=2 filename 189*5e7646d2SAndroid Build Coastguard Worker</pre> 190*5e7646d2SAndroid Build Coastguard Worker<h2 class="title"><a name="SEE_ALSO">See Also</a></h2> 191*5e7646d2SAndroid Build Coastguard Worker<b>cancel</b>(1), 192*5e7646d2SAndroid Build Coastguard Worker<b>lpadmin</b>(8), 193*5e7646d2SAndroid Build Coastguard Worker<b>lpoptions</b>(1), 194*5e7646d2SAndroid Build Coastguard Worker<b>lpq</b>(1), 195*5e7646d2SAndroid Build Coastguard Worker<b>lpr</b>(1), 196*5e7646d2SAndroid Build Coastguard Worker<b>lprm</b>(1), 197*5e7646d2SAndroid Build Coastguard Worker<b>lpstat</b>(1), 198*5e7646d2SAndroid Build Coastguard WorkerCUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>) 199*5e7646d2SAndroid Build Coastguard Worker<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2> 200*5e7646d2SAndroid Build Coastguard WorkerCopyright © 2007-2019 by Apple Inc. 201*5e7646d2SAndroid Build Coastguard Worker 202*5e7646d2SAndroid Build Coastguard Worker</body> 203*5e7646d2SAndroid Build Coastguard Worker</html> 204