309 lines
8.1 KiB
HTML
309 lines
8.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of lp</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>lp</H1>
|
|
Section: Apple Inc. (1)<BR>Updated: CUPS<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
lp - print files
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>lp</B>
|
|
|
|
[
|
|
<B>-E</B>
|
|
|
|
] [
|
|
<B>-U</B>
|
|
|
|
<I>username</I>
|
|
|
|
] [
|
|
<B>-c</B>
|
|
|
|
] [
|
|
<B>-d </B><I>destination</I>[<B>/</B><I>instance</I>]
|
|
] [
|
|
<B>-h </B><I>hostname</I>[<B>:</B><I>port</I>]
|
|
] [
|
|
<B>-m</B>
|
|
|
|
] [
|
|
<B>-n</B>
|
|
|
|
<I>num-copies</I>
|
|
|
|
] [
|
|
<B>-o </B><I>option</I>[<B>=</B><I>value</I>]
|
|
] [
|
|
<B>-q</B>
|
|
|
|
<I>priority</I>
|
|
|
|
] [
|
|
<B>-s</B>
|
|
|
|
] [
|
|
<B>-t</B>
|
|
|
|
<I>title</I>
|
|
|
|
] [
|
|
<B>-H</B>
|
|
|
|
<I>handling</I>
|
|
|
|
] [
|
|
<B>-P</B>
|
|
|
|
<I>page-list</I>
|
|
|
|
] [
|
|
<B>--</B>
|
|
|
|
] [
|
|
<I>file(s)</I>
|
|
|
|
]
|
|
<BR>
|
|
|
|
<B>lp</B>
|
|
|
|
[
|
|
<B>-E</B>
|
|
|
|
] [
|
|
<B>-U</B>
|
|
|
|
<I>username</I>
|
|
|
|
] [
|
|
<B>-c</B>
|
|
|
|
] [
|
|
<B>-h </B><I>hostname</I>[<B>:</B><I>port</I>]
|
|
] [
|
|
<B>-i</B>
|
|
|
|
<I>job-id</I>
|
|
|
|
] [
|
|
<B>-n</B>
|
|
|
|
<I>num-copies</I>
|
|
|
|
] [
|
|
<B>-o </B><I>option</I>[<B>=</B><I>value</I>]
|
|
] [
|
|
<B>-q</B>
|
|
|
|
<I>priority</I>
|
|
|
|
] [
|
|
<B>-t</B>
|
|
|
|
<I>title</I>
|
|
|
|
] [
|
|
<B>-H</B>
|
|
|
|
<I>handling</I>
|
|
|
|
] [
|
|
<B>-P</B>
|
|
|
|
<I>page-list</I>
|
|
|
|
]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>lp</B> submits files for printing or alters a pending job.
|
|
Use a filename of "-" to force printing from the standard input.
|
|
<A NAME="lbAE"> </A>
|
|
<H3>THE DEFAULT DESTINATION</H3>
|
|
|
|
CUPS provides many ways to set the default destination. The <B>LPDEST</B> and <B>PRINTER</B> environment variables are consulted first.
|
|
If neither are set, the current default set using the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+lpoptions">lpoptions</A></B>(1)
|
|
|
|
command is used, followed by the default set using the
|
|
<B><A HREF="/cgi-bin/man/man2html?8+lpadmin">lpadmin</A></B>(8)
|
|
|
|
command.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
The following options are recognized by <I>lp</I>:
|
|
<DL COMPACT>
|
|
<DT id="1"><B>--</B>
|
|
|
|
<DD>
|
|
Marks the end of options; use this to print a file whose name begins with a dash (-).
|
|
<DT id="2"><B>-E</B>
|
|
|
|
<DD>
|
|
Forces encryption when connecting to the server.
|
|
<DT id="3"><B>-U </B><I>username</I><DD>
|
|
Specifies the username to use when connecting to the server.
|
|
<DT id="4"><B>-c</B>
|
|
|
|
<DD>
|
|
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.
|
|
In CUPS, print files are always sent to the scheduler via IPP which has the same effect.
|
|
<DT id="5"><B>-d </B><I>destination</I><DD>
|
|
Prints files to the named printer.
|
|
<DT id="6"><B>-h </B><I>hostname</I>[<B>:</B><I>port</I>]<DD>
|
|
Chooses an alternate server.
|
|
<DT id="7"><B>-i </B><I>job-id</I><DD>
|
|
Specifies an existing job to modify.
|
|
<DT id="8"><B>-m</B>
|
|
|
|
<DD>
|
|
Sends an email when the job is completed.
|
|
<DT id="9"><B>-n </B><I>copies</I><DD>
|
|
Sets the number of copies to print.
|
|
<DT id="10"><B>-o "</B><I>name</I><B>=</B><I>value </I>[ ... <I>name</I><B>=</B><I>value </I>]<B>"</B><DD>
|
|
Sets one or more job options.
|
|
See "COMMON JOB OPTIONS" below.
|
|
<DT id="11"><B>-q </B><I>priority</I><DD>
|
|
Sets the job priority from 1 (lowest) to 100 (highest).
|
|
The default priority is 50.
|
|
<DT id="12"><B>-s</B>
|
|
|
|
<DD>
|
|
Do not report the resulting job IDs (silent mode.)
|
|
<DT id="13"><B>-t "</B><I>name</I><B>"</B><DD>
|
|
Sets the job name.
|
|
<DT id="14"><B>-H </B><I>hh:mm</I><DD>
|
|
<DT id="15"><B>-H hold</B><DD>
|
|
<DT id="16"><B>-H immediate</B><DD>
|
|
<DT id="17"><B>-H restart</B><DD>
|
|
<DT id="18"><B>-H resume</B><DD>
|
|
Specifies when the job should be printed.
|
|
A 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.
|
|
Use a value of <I>resume</I> with the <I>-i</I> option to resume a held job.
|
|
Use a value of <I>restart</I> with the <I>-i</I> option to restart a completed job.
|
|
<DT id="19"><B>-P </B><I>page-list</I><DD>
|
|
Specifies which pages to print in the document.
|
|
The list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16".
|
|
The 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.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H3>COMMON JOB OPTIONS</H3>
|
|
|
|
Aside from the printer-specific options reported by the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+lpoptions">lpoptions</A></B>(1)
|
|
|
|
command, the following generic options are available:
|
|
<DL COMPACT>
|
|
<DT id="20"><B>-o job-sheets=</B><I>name</I><DD>
|
|
Prints a cover page (banner) with the document.
|
|
The "name" can be "classified", "confidential", "secret", "standard", "topsecret", or "unclassified".
|
|
<DT id="21"><B>-o media=</B><I>size</I><DD>
|
|
Sets the page size to <I>size</I>. Most printers support at least the size names "a4", "letter", and "legal".
|
|
<DT id="22"><B>-o number-up=</B>{<I>2|4|6|9|16</I>}<DD>
|
|
Prints 2, 4, 6, 9, or 16 document (input) pages on each output page.
|
|
<DT id="23"><B>-o orientation-requested=4</B><DD>
|
|
Prints the job in landscape (rotated 90 degrees counter-clockwise).
|
|
<DT id="24"><B>-o orientation-requested=5</B><DD>
|
|
Prints the job in landscape (rotated 90 degrees clockwise).
|
|
<DT id="25"><B>-o orientation-requested=6</B><DD>
|
|
Prints the job in reverse portrait (rotated 180 degrees).
|
|
<DT id="26"><B>-o print-quality=3</B><DD>
|
|
<DT id="27"><B>-o print-quality=4</B><DD>
|
|
<DT id="28"><B>-o print-quality=5</B><DD>
|
|
Specifies the output quality - draft (3), normal (4), or best (5).
|
|
<DT id="29"><B>-o sides=one-sided</B><DD>
|
|
Prints on one side of the paper.
|
|
<DT id="30"><B>-o sides=two-sided-long-edge</B><DD>
|
|
Prints on both sides of the paper for portrait output.
|
|
<DT id="31"><B>-o sides=two-sided-short-edge</B><DD>
|
|
Prints on both sides of the paper for landscape output.
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>CONFORMING TO</H2>
|
|
|
|
Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#".
|
|
Also, printer and class names are <I>not</I> case-sensitive.
|
|
<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).
|
|
<A NAME="lbAI"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
Print two copies of a document to the default printer:
|
|
<PRE>
|
|
|
|
lp -n 2 filename
|
|
|
|
</PRE>
|
|
|
|
Print a double-sided legal document to a printer called "foo":
|
|
<PRE>
|
|
|
|
lp -d foo -o media=legal -o sides=two-sided-long-edge filename
|
|
|
|
</PRE>
|
|
|
|
Print a presentation document 2-up to a printer called "bar":
|
|
<PRE>
|
|
|
|
lp -d bar -o number-up=2 filename
|
|
</PRE>
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+cancel">cancel</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+lpadmin">lpadmin</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+lpoptions">lpoptions</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+lpq">lpq</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+lpr">lpr</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+lprm">lprm</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+lpstat">lpstat</A></B>(1),
|
|
|
|
CUPS Online Help (<A HREF="http://localhost:631/help)">http://localhost:631/help)</A>
|
|
<A NAME="lbAK"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
Copyright © 2007-2019 by Apple Inc.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="32"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="33"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="34"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="35"><A HREF="#lbAE">THE DEFAULT DESTINATION</A><DD>
|
|
</DL>
|
|
<DT id="36"><A HREF="#lbAF">OPTIONS</A><DD>
|
|
<DL>
|
|
<DT id="37"><A HREF="#lbAG">COMMON JOB OPTIONS</A><DD>
|
|
</DL>
|
|
<DT id="38"><A HREF="#lbAH">CONFORMING TO</A><DD>
|
|
<DT id="39"><A HREF="#lbAI">EXAMPLES</A><DD>
|
|
<DT id="40"><A HREF="#lbAJ">SEE ALSO</A><DD>
|
|
<DT id="41"><A HREF="#lbAK">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:18 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|