2 .\" Copyright 1989 AT&T
3 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
4 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
5 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
6 .\" http://www.opengroup.org/bookstore/.
7 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
8 .\" This notice shall appear on any product containing this material.
9 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
10 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
11 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
12 .TH LP 1 "Feb 25, 2017"
14 lp \- submit print request
18 \fBlp\fR [\fB-c\fR] [\fB-m\fR] [\fB-p\fR] [\fB-s\fR] [\fB-w\fR] [\fB-d\fR \fIdestination\fR] [\fB-f\fR \fIform-name\fR]
19 [\fB-H\fR \fIspecial-handling\fR] [\fB-n\fR \fInumber\fR] [\fB-o\fR \fIoption\fR]
20 [\fB-P\fR \fIpage-list\fR] [\fB-q\fR \fIpriority-level\fR]
21 [\fB-S\fR \fIcharacter-set\fR | \fIprint-wheel\fR] [\fB-t\fR \fItitle\fR]
22 [\fB-T\fR \fIcontent-type\fR [\fB-r\fR]] [\fB-y\fR \fImode-list\fR] [\fIfile\fR]...
27 \fBlp\fR \fB-i\fR \fIrequest-ID\fR... [\fB-c\fR] [\fB-m\fR] [\fB-p\fR] [\fB-s\fR] [\fB-w\fR]
28 [\fB-d\fR \fIdestination\fR] [\fB-f\fR \fIform-name\fR] [\fB-H\fR \fIspecial-handling\fR]
29 [\fB-n\fR \fInumber\fR] [\fB-o\fR \fIoption\fR] [\fB-P\fR \fIpage-list\fR]
30 [\fB-q\fR \fIpriority-level\fR] [\fB-S\fR \fIcharacter-set\fR | \fIprint-wheel\fR]
31 [\fB-t\fR \fItitle\fR] [\fB-T\fR \fIcontent-type\fR [\fB-r\fR]] [\fB-y\fR \fImode-list\fR]
36 The \fBlp\fR utility submits print requests to a destination. There are two
37 formats of the \fBlp\fR command.
40 The first form of \fBlp\fR prints files (\fIfile\fR) and associated information
41 (collectively called a \fIprint request\fR). If \fIfile\fR is not specified,
42 \fBlp\fR assumes the standard input. Use a hyphen (\fB\(mi\fR) with \fIfile\fR
43 to specify the standard input. Files are printed in the order in which they
44 appear on the command line.
47 The second form of \fBlp\fR changes print request options. This form of
48 \fBlp\fR can only be used with print services and protocols that support job
49 modification. The LP print service allows print requests to be modified when
50 they are in a queue local to the system that the lp commands was executed on.
51 The Internet Print Protocol (IPP) allows job modification on remote ipp print
55 The print request identified by \fIrequest-ID\fR is changed according to the
56 printing options specified. The printing options available are the same as
57 those with the first form of the \fBlp\fR. If the request has finished printing
58 when the \fBlp\fR command is executed, the change is rejected. If the request
59 is in the process of printing, it is stopped and restarted from the beginning
60 (unless the \fB-P\fR option has been given).
63 The print client commands locate destination information using the "printers"
64 database in the name service switch. See \fBnsswitch.conf\fR(4),
65 \fBprinters\fR(4), and \fBprinters.conf\fR(4) for details.
68 Printers that have a 4.\fIx\fR or \fBBSD-based print server\fR are not
69 configured to handle \fBBSD\fR protocol extensions. \fBlp\fR handles print
70 requests sent to such destinations differently (see NOTES).
73 The following options are supported:
80 Copies \fIfile\fR before printing.
82 Unless \fB-c\fR is specified, users should not remove any \fIfile\fR before the
83 print request has completely printed. Changes made to \fIfile\fR after the
84 print request is made but before it is printed might be reflected in the
85 printed output. \fIfile\fR is linked (as opposed to copied).
91 \fB\fB-d\fR \fIdestination\fR\fR
94 Prints \fIfile\fR on a specific destination. The \fB-d\fR option is used to set
95 the destination only when the job is first created. (\fBNote:\fR To move
96 existing jobs to a different destination, see \fBlpmove\fR(1M).)
97 \fIdestination\fR can be either a printer or a class of printers (see
98 \fBlpadmin\fR(1M)). Specify \fIdestination\fR using atomic, URI-style
99 (\fIscheme\fR://\fIendpoint\fR), or POSIX-style
100 (\fIserver\fR\fB:\fR\fIdestination\fR) names. See \fBprinters.conf\fR(4) for
107 \fB\fB-f\fR \fIform-name\fR\fR
110 Prints \fIfile\fR on \fIform-name\fR. The \fBLP\fR print service ensures that
111 the form is mounted on the printer. The print request is rejected if the
112 printer does not support \fIform-name\fR, if \fIform-name\fR is not defined for
113 the system, or if the user is not allowed to use \fIform-name\fR (see
120 \fB\fB-H\fR \fIspecial-handling\fR\fR
123 Prints the print request according to the value of \fIspecial-handling\fR. The
124 following \fIspecial-handling\fR values are acceptable:
131 Do not print the print request until notified. If printing has already begun,
132 stop it. Other print requests are placed ahead of a request that has been put
133 on hold (\fIheld print request\fR) until the print request is resumed.
142 Resume a held print request. If the print request had begun to print when held,
143 it is the next print request printed, unless it is superseded by an
144 \fIimmediate\fR print request.
150 \fB\fBimmediate\fR\fR
153 Print the print request next. If more than one print request is assigned, the
154 most recent print request is printed next. If a print request is currently
155 printing on the desired printer, a \fBhold\fR request must be issued to allow
156 the immediate request to print. The \fBimmediate\fR request is only available
157 to \fBLP\fR administrators.
165 \fB\fB-i\fR \fIrequest-ID\fR\fR
168 Changes options for the print request identified by \fIrequest-ID\fR. There
169 must be a space between \fB-i\fR and \fIrequest-ID\fR.
171 This option applies to jobs that are in a local queue on a print server. This
172 also applies to remote queues on when the remote print server supports IPP with
182 Sends mail after \fIfile\fR has printed (see \fBmail\fR(1)). By default, no
183 mail is sent upon normal completion of a print request.
189 \fB\fB-n\fR \fInumber\fR\fR
192 Prints a specific number of copies of \fIfile\fR. Specify \fInumber\fR as a
193 digit. The default for \fInumber\fR is \fB1\fR.
199 \fB\fB-o\fR \fIoption\fR\fR
202 Specifies printer-dependent \fIoptions\fR. Specify several options by
203 specifying \fB-o\fR \fIoption\fR multiple times (\fB-o\fR \fIoption\fR \fB-o\fR
204 \fIoption\fR \fB-o\fR \fIoption\fR ). Printer-dependent options can also be
205 specified using the \fB-o\fR keyletter once, followed by a list of options
206 enclosed in double quotes (\fB-o\fR"\fIoption\fR \fIoption option\fR").
208 \fIoption\fRs take the following forms:
212 \fB\fIkey\fR\fB=\fR\fIvalue\fR\fR
215 Associates information with the request for use by the backend print service.
216 The keys and values that can be used are specific to the backend print service
217 and queue configuration.
226 Associates boolean information with the request for use by the backend print
227 service. The keys that can be used are specific to the backend print service
228 and queue configuration.
231 The following options are commonly used with the LP print service:
239 Does not print a banner page with the request. This option can be disallowed by
240 the \fBLP\fR administrator.
242 On a system that is configured with Trusted Extensions, use of this option
243 requires the \fBsolaris.print.nobanner\fR authorization.
249 \fB\fBnofilebreak\fR\fR
253 Prints multiple files without inserting a form feed between them.
263 On a system that is configured with Trusted Extensions, specifies suppression
264 of page header and footer labels. Use of this option requires the
265 \fBsolaris.print.unlabeled\fR authorization.
271 \fB\fBlength=\fR\fInumber\fR\fBi\fR | \fInumber\fR\fBc\fR | \fInumber\fR\fR
275 Prints the print request with pages of a specific length in inches,
276 centimeters, or number of lines. Append the letter \fBi\fR for inches or
277 \fBc\fR for centimenters to \fInumber\fR. Indicate the number of lines by
278 specifying \fInumber\fR alone. \fBlength=66\fR indicates a page length of
279 \fB66\fR lines. \fBlength=11i\fR indicates a page length of \fB11\fR inches.
280 \fBlength=27.94c\fR indicates a page length of \fB27.94\fR centimeters.
282 This option can not be used with the \fB-f\fR option.
288 \fB\fBwidth=\fR\fInumber\fR\fBi\fR | \fInumber\fR\fBc\fR | \fInumber\fR\fR
292 Prints the print request with pages of a specific width in inches, centimeters,
293 or number of columns. Append the letter \fBi\fR for inches or \fBc\fR for
294 centimeters to \fInumber\fR. Indicate the number of columns by specifying
295 \fInumber\fR alone. \fBwidth=65\fR indicates a page width of \fB65\fR columns.
296 \fBwidth=6.5i\fR indicates a page width of \fB6.5\fR inches. \fBwidth=10c\fR
297 indicates a page width of \fB10\fR centimeters.
299 This option can not be used with the \fB-f\fR option.
305 \fB\fBlpi=\fR\fInumber\fR\fR
309 Prints the print request with the line pitch set to \fInumber\fR lines in an
310 inch. Use \fInumber\fR to specify the number of lines in an inch.
312 This option can not be used with the \fB-f\fR option.
318 \fB\fBcpi=\fR\fIn\fR|\fBpica\fR|\fBelite\fR|\fBcompressed\fR\fR
322 Prints the print request with the character pitch set to \fInumber\fR
323 characters in an inch. Use \fInumber\fR to specify the number of characters in
324 an inch. Use \fBpica\fR to set character pitch to pica (\fB10\fR characters per
325 inch), or \fBelite\fR to set character pitch to elite (\fB12\fR characters per
326 inch) Use \fBcompressed\fR to set character pitch to as many characters as the
327 printer can handle. There is no standard number of characters per inch for all
328 printers; see the \fBterminfo\fR database (see \fBterminfo\fR(4)) for the
329 default character pitch for your printer. This option can not be used with the
336 \fB\fBstty=\fR\fIstty-option-list\fR\fR
340 Prints the request using a list of options valid for the \fBstty\fR command
341 (see \fBstty\fR(1). Enclose the list in single quotes (\fB`'\fR) if it contains
350 \fB\fB-P\fR \fIpage-list\fR\fR
353 Prints the pages specified in \fIpage-list\fR in ascending order. Specify
354 \fIpage-list\fR as a of range of numbers, single page number, or a combination
357 The \fB-P\fR option can only be used if there is a filter available to handle
358 it; otherwise, the print request is rejected.
367 Enables notification on completion of the print request. Delivery of the
368 notification is dependent on additional software.
374 \fB\fB-q\fR \fIpriority-level\fR\fR
377 Assigns the print request a priority in the print queue. Specify
378 \fIpriority-level\fR as an integer between from \fB0\fR and \fB39\fR. Use
379 \fB0\fR to indicate the highest priority; \fB39\fR to indicate the lowest
380 priority. If no priority is specified, the default priority for a print service
381 is assigned by the \fBLP\fR administrator. The \fBLP\fR administrator can also
382 assign a default priority to individual users.
391 Suppresses the display of messages sent from \fBlp\fR.
397 \fB\fB-S\fR \fIcharacter-set\fR \fB|\fR\fR
401 \fB\fB-S\fR \fIprint-wheel\fR\fR
404 Prints the request using the \fIcharacter-set\fR or \fIprint-wheel\fR. If a
405 form was requested and requires a character set or print wheel other than the
406 one specified with the \fB-S\fR option, the request is rejected. Printers using
407 mountable print wheels or font cartridges use the print wheel or font cartridge
408 mounted at the time of the print request, unless the \fB-S\fR option is
411 Printers Using Print Wheels: If \fBprint\fR \fIwheel\fR is not one listed by
412 the \fBLP\fR administrator as acceptable for the printer the request is
413 rejected unless the print wheel is already mounted on the printer.
415 Printers Using Selectable or Programmable Character Sets: If the \fB-S\fR
416 option is not specified, \fBlp\fR uses the standard character set. If
417 \fIcharacter-set\fR is not defined in the \fBterminfo\fR database for the
418 printer (see \fBterminfo\fR(4)), or is not an alias defined by the \fBLP\fR
419 administrator, the request is rejected.
425 \fB\fB-t\fR \fItitle\fR\fR
428 Prints a title on the banner page of the output. Enclose \fItitle\fR in quotes
429 if it contains blanks. If \fItitle\fR is not not specified, the name of the
430 file is printed on the banner page.
436 \fB\fB\fR\fB-T\fR\fIcontent-type\fR [\fB-r\fR]\fR
439 Prints the request on a printer that can support the specified
440 \fIcontent-type\fR. If no printer accepts this type directly, a filter is used
441 to convert the content into an acceptable type. If the \fB-r\fR option is
442 specified, a filter is not used. If \fB-r\fR is specified, and no printer
443 accepts the \fIcontent-type\fR directly, the request is rejected. If the
444 \fIcontent-type\fR is not acceptable to any printer, either directly or with a
445 filter, the request is rejected.
454 Writes a message on the user's terminal after the \fIfile\fRs have been
455 printed. If the user is not logged in, then mail is sent instead.
461 \fB\fB-y\fR \fImode-list\fR\fR
464 Prints the request according to the printing modes listed in \fImode-list\fR.
465 The allowed values for \fImode-list\fR are locally defined.
467 This option can be used only if there is a filter available to handle it;
468 otherwise, the print request is rejected.
473 The following operand is supported:
480 The name of the file to be printed. Specify \fIfile\fR as a pathname or as a
481 hyphen (\fB\(mi\fR) to indicate the standard input. If \fIfile\fR is not
482 specified, \fBlp\fR uses the standard input.
487 See \fBlargefile\fR(5) for the description of the behavior of \fBlp\fR when
488 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
489 .SH ENVIRONMENT VARIABLES
491 See \fBenviron\fR(5) for descriptions of the following environment variables
492 that affect the execution of \fBlp\fR: \fBLANG\fR, \fBLC_ALL\fR,
493 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBNLSPATH\fR, and \fBPATH\fR.
500 Determine the format and contents of date and time strings displayed in the
501 \fBlp\fR banner page, if any.
510 Determine the destination. If the \fBLPDEST\fR environment variable is not set,
511 the \fBPRINTER\fR environment variable shall be used. The \fB-d\fR \fIdest\fR
512 option takes precedence over \fBLPDEST\fR. Results are undefined when \fB-d\fR
513 is not specified and \fBLPDEST\fR contains a value that is not a valid
523 Determine the output device or destination. If the \fBLPDEST\fR and
524 \fBPRINTER\fR environment variables are not set, an unspecified output device
525 is used. The \fB-d\fR \fIdest\fR option and the \fBLPDEST\fR environment
526 variable shall take precedence over \fBPRINTER\fR. Results are undefined when
527 \fB-d\fR is not specified, \fBLPDEST\fR is unset, and \fBPRINTER\fR contains a
528 value that is not a valid device or destination name.
537 Determine the timezone used to calculate date and time strings displayed in the
538 \fBlp\fR banner page, if any. If \fBTZ\fR is unset or null, an unspecified
539 default timezone shall be used.
544 The following exit values are returned:
551 Successful completion.
566 \fB\fB/etc/printers.conf\fR\fR
569 System printer configuration database
575 \fB\fB$HOME/.printers\fR\fR
578 User-configurable printer database
584 \fB\fBou=printers\fR\fR
587 LDAP version of \fB/etc/printers.conf\fR
593 \fB\fBprinters.conf.byname\fR\fR
596 \fBNIS\fR version of \fB/etc/printers.conf\fR
601 See \fBattributes\fR(5) for descriptions of the following attributes:
609 ATTRIBUTE TYPE ATTRIBUTE VALUE
611 CSI Enabled. See \fBNOTES\fR.
613 Interface Stability Standard
618 \fBcancel\fR(1), \fBenable\fR(1), \fBlpq\fR(1B), \fBlpr\fR(1B), \fBlprm\fR(1B),
619 \fBlpstat\fR(1), \fBmail\fR(1), \fBpostprint\fR(1), \fBpr\fR(1), \fBstty\fR(1),
620 \fBaccept\fR(1M), \fBlpadmin\fR(1M), \fBlpfilter\fR(1M), \fBlpforms\fR(1M),
621 \fBlpmove\fR(1M), \fBlpsched\fR(1M), \fBlpshut\fR(1M), \fBlpsystem\fR(1M),
622 \fBlpusers\fR(1M), \fBnsswitch.conf\fR(4), \fBprinters\fR(4),
623 \fBprinters.conf\fR(4), \fBterminfo\fR(4), \fBattributes\fR(5),
624 \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
627 \fBCSI\fR-capability assumes that printer names are composed of \fBASCII\fR
631 Print jobs are assumed to contain one type of data. That type of data is either
632 specified on the command line or autodetected (simple, PostScript) based on the
633 contents of the first file in the job.
636 When using the BSD printing protocol to send print requests to a remote print
637 service, functionality is limited.
640 Printers that have a 4.\fIx\fR or BSD-based print server are not configured to
641 handle BSD protocol extensions. \fBlp\fR handles print requests sent to such
642 printers in the following ways:
646 Print requests with more than 52 filenames are truncated to 52 files.
651 The \fB-f\fR, \fB-H\fR, \fB-o\fR, \fB-P\fR, \fB-p\fR, \fB-q\fR, \fB-S\fR,
652 \fB-T\fR, and \fB-y\fR options might require a protocol extension to pass to a
653 print server. If \fBlp\fR cannot handle the print request, it displays a
656 \fBLP\fR administrators enable protocol extensions by setting a printer's
657 \fBprinter-uri-supported\fR (or \fBbsdaddr\fR) entry in
658 \fB/etc/printers.conf\fR. Changing the \fBprinter-uri-supported\fR entry in
659 \fB/etc/printers.conf\fR to:
663 \fBprinter-uri-supported=lpd\e://\fR\fIserver\fR\fB/\fR\fIprinters\fR\fB/\fR\fIdestination\fR\fB#Solaris\fR
671 \fBbsdaddr=\fR\fIserver\fR\fB,\fR\fIdestination\fR\fB,Solaris\fR
676 Adding \fBSolaris\fR to either of these values causes the \fBlp\fR command to
677 generate a set of BSD print protocol extensions that can be processed by a
678 Solaris print server.
682 As a result of several limitations in the BSD print protocol, it is recommended
683 that the IPP protocol be used for communication with print servers.
686 When IPP is in use, the user is prompted for a passphrase if the remote print
687 service is configured to require authentication.