]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/options.html
Merge changes from CUPS 1.4svn-r8628.
[thirdparty/cups.git] / doc / help / options.html
1 <HTML>
2 <!-- SECTION: Getting Started -->
3 <HEAD>
4 <TITLE>Command-Line Printing and Options</TITLE>
5 <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
6 </HEAD>
7 <BODY>
8
9 <H1 CLASS="title">Command-Line Printing and Options</H1>
10
11 <P>CUPS provides both the System V (<A
12 HREF="man-lp.html">lp(1)</A>) and Berkeley (<A
13 HREF="man-lpr.html">lpr(1)</A>) printing commands for printing
14 files. In addition, it supported a large number of standard and
15 printer-specific options that allow you to control how and where
16 files are printed.</P>
17
18
19 <H2 CLASS="title"><A NAME="BASICS">Printing Files</A></H2>
20
21 <P>CUPS understands many different types of files directly,
22 including text, PostScript, PDF, and image files. This allows you
23 to print from inside your applications or at the command-line,
24 whichever is most convenient! Type either of the following
25 commands to print a file to the default (or only) printer on the
26 system:</P>
27
28 <PRE CLASS="command">
29 lp filename
30 lpr filename
31 </PRE>
32
33 <H3><A NAME="PRINTER">Choosing a Printer</A></H3>
34
35 <P>Many systems will have more than one printer available to the
36 user. These printers can be attached to the local system via a
37 parallel, serial, or USB port, or available over the network. Use
38 the <A HREF="man-lpstat.html">lpstat(1)</A> command to see a list
39 of available printers:</P>
40
41 <PRE CLASS="command">
42 lpstat -p -d
43 </PRE>
44
45 <P>The <CODE>-p</CODE> option specifies that you want to see a
46 list of printers, and the <CODE>-d</CODE> option reports the
47 current default printer or class.</P>
48
49 <P>Use the <CODE>-d</CODE> option with the <B>lp</B> command to
50 print to a specific printer:</P>
51
52 <PRE CLASS="command">
53 lp -d printer filename
54 </PRE>
55
56 <P>or the <CODE>-P</CODE> option with the <B>lpr</B> command:</P>
57
58 <PRE CLASS="command">
59 lpr -P printer filename
60 </PRE>
61
62 <H3><A NAME="DEFAULT">Setting the Default Printer</A></H3>
63
64 <P>If you normally use a particular printer, you can tell CUPS to
65 use it by default using the <A
66 HREF="man-lpoptions.html">lpoptions(1)</A> command:</P>
67
68 <PRE CLASS="command">
69 lpoptions -d printer
70 </PRE>
71
72 <H3><A NAME="PIPE">Printing the Output of a Program</A></H3>
73
74 <P>Both the <B>lp</B> and <B>lpr</B> commands support printing
75 from the standard input:</P>
76
77 <PRE CLASS="command">
78 program | lp
79 program | lp -d printer
80 program | lpr
81 program | lpr -P printer
82 </PRE>
83
84 <P>If the program does not provide any output, then nothing will
85 be queued for printing.</P>
86
87 <H3><A NAME="WITHOPTIONS">Specifying Printer Options</A></H3>
88
89 <P>For many types of files, the default printer options may be
90 sufficient for your needs. However, there may be times when you
91 need to change the options for a particular file you are
92 printing.</P>
93
94 <P>The <B>lp</B> and <B>lpr</B> commands allow you to pass
95 printer options using the <CODE>-o</CODE> option:</P>
96
97 <PRE CLASS="command">
98 lp -o landscape -o scaling=75 -o media=A4 filename.jpg
99 lpr -o landscape -o scaling=75 -o media=A4 filename.jpg
100 </PRE>
101
102 <P>The available printer options vary depending on the printer.
103 The standard options are described in the "<A
104 HREF="#OPTIONS">Standard Printing Options</A>" section
105 below. Printer-specific options are also available and can be
106 listed using the <B>lpoptions</B> command:</P>
107
108 <PRE CLASS="command">
109 lpoptions -p printer -l
110 </PRE>
111
112 <H3><A NAME="INSTANCES">Creating Saved Options</A></H3>
113
114 <P>Saved options are supported in CUPS through <em>printer
115 instances</em>. Printer instances are, as their name implies, copies
116 of a printer that have certain options associated with them. Use the
117 <B>lpoptions</B> command to create a printer instance:</P>
118
119 <PRE CLASS="command">
120 lpoptions -p printer/instance -o name=value ...
121 </PRE>
122
123 <P>The <CODE>-p printer/instance</CODE> option provides the name of
124 the instance, which is always the printer name, a slash, and the
125 instance name which can contain any printable characters except
126 space and slash. The remaining options are then associated with the
127 instance instead of the main queue. For example, the following
128 command creates a duplex instance of the LaserJet queue:</P>
129
130 <PRE CLASS="command">
131 lpoptions -p LaserJet/duplex -o sides=two-sided-long-edge
132 </PRE>
133
134 <P>Instances <em>do not</em> inherit lpoptions from the main
135 queue.</P>
136
137 <H3><A NAME="COPIES">Printing Multiple Copies</A></H3>
138
139 <P>Both the <B>lp</B> and <B>lpr</B> commands have options for
140 printing more than one copy of a file:</P>
141
142 <PRE CLASS="command">
143 lp -n <EM>num-copies</EM> filename
144 lpr -#<EM>num-copies</EM> filename
145 </PRE>
146
147 <P>Copies are normally <EM>not</EM> collated for you. Use the
148 <CODE>-o Collate=True</CODE> option to get collated copies:</P>
149
150 <PRE CLASS="command">
151 lp -n <EM>num-copies</EM> -o Collate=True filename
152 lpr -#<EM>num-copies</EM> -o Collate=True filename
153 </PRE>
154
155
156 <H2 CLASS="title"><A NAME="CANCEL">Canceling a Print Job</A></H2>
157
158 <P>The <A HREF="man-cancel.html">cancel(1)</A> and <A
159 HREF="man-lprm.html">lprm(1)</A> commands cancel a print job:</P>
160
161 <PRE CLASS="command">
162 cancel <EM>job-id</EM>
163 lprm <EM>job-id</EM>
164 </PRE>
165
166 <P>The <EM>job-id</EM> is the number that was reported to you by
167 the <B>lp</B> command. You can also get the job ID using the <A
168 HREF="man-lpq.html">lpq(1)</A> or <A
169 HREF="man-lpstat.html">lpstat</A> commands:</P>
170
171 <PRE CLASS="command">
172 lpq
173 lpstat
174 </PRE>
175
176
177 <H2 CLASS="title"><A NAME="LPMOVE">Moving a Print Job</A></H2>
178
179 <P>The <A HREF="man-lpmove.html">lpmove(8)</A> command moves a print
180 job to a new printer or class:</P>
181
182 <PRE CLASS="command">
183 lpmove <EM>job-id</EM> <i>destination</i>
184 </PRE>
185
186 <P>The <EM>job-id</EM> is the number that was reported to you by
187 the <B>lp</B> or <B>lpstat</B> commands. <i>Destination</i> is the
188 name of a printer or class that you want to actually print the job.
189
190 <BLOCKQUOTE><B>Note:</B>
191
192 <P>The <B>lpmove</B> command is located in the system command
193 directory (typically <VAR>/usr/sbin</VAR> or <VAR>/usr/local/sbin</VAR>),
194 and so may not be in your command path. Specify the full path to the
195 command if you get a "command not found" error, for example:
196
197 <PRE CLASS="command">
198 /usr/sbin/lpmove foo-123 bar
199 </PRE>
200
201 </BLOCKQUOTE>
202
203
204 <H2 CLASS="title"><A NAME="OPTIONS">Standard Printing Options</A></H2>
205
206 <P>The following options apply when printing all types of
207 files.</P>
208
209 <H3><A NAME="MEDIA">Selecting the Media Size, Type, and Source</A></H3>
210
211 <P>The <CODE>-o media=xyz</CODE> option sets the media size,
212 type, and/or source:</P>
213
214 <PRE CLASS="command">
215 lp -o media=Letter filename
216 lp -o media=Letter,MultiPurpose filename
217 lpr -o media=Letter,Transparency filename
218 lpr -o media=Letter,MultiPurpose,Transparency filename
219 </PRE>
220
221 <P>The available media sizes, types, and sources depend on the
222 printer, but most support the following options (case is not
223 significant):</P>
224
225 <UL>
226
227 <LI><CODE>Letter</CODE> - US Letter (8.5x11 inches, or 216x279mm)
228
229 <LI><CODE>Legal</CODE> - US Legal (8.5x14 inches, or 216x356mm)
230
231 <LI><CODE>A4</CODE> - ISO A4 (8.27x11.69 inches, or 210x297mm)
232
233 <LI><CODE>COM10</CODE> - US #10 Envelope (9.5x4.125 inches, or
234 241x105mm)
235
236 <LI><CODE>DL</CODE> - ISO DL Envelope (8.66x4.33 inches, or 220x110mm)
237
238 <LI><CODE>Transparency</CODE> - Transparency media type or source
239
240 <LI><CODE>Upper</CODE> - Upper paper tray
241
242 <LI><CODE>Lower</CODE> - Lower paper tray
243
244 <LI><CODE>MultiPurpose</CODE> - Multi-purpose paper tray
245
246 <LI><CODE>LargeCapacity</CODE> - Large capacity paper tray
247
248 </UL>
249
250 <P>The actual options supported are defined in the printer's PPD
251 file in the <CODE>PageSize</CODE>, <CODE>InputSlot</CODE>, and
252 <CODE>MediaType</CODE> options. You can list them using the
253 <B>lpoptions(1)</B> command:</P>
254
255 <PRE CLASS="command">
256 lpoptions -p printer -l
257 </PRE>
258
259 <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>
260
261 <PRE CLASS="command">
262 lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM> filename
263 lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM>in filename
264 lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM>cm filename
265 lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM>mm filename
266 </PRE>
267
268 <P>where "WIDTH" and "LENGTH" are the width and length of the media in points, inches, centimeters, or millimeters, respectively.</P>
269
270
271 <H3><A NAME="ORIENTATION">Setting the Orientation</A></H3>
272
273 <P>The <CODE>-o landscape</CODE> option will rotate the page 90
274 degrees to print in landscape orientation:</P>
275
276 <PRE CLASS="command">
277 lp -o landscape filename
278 lpr -o landscape filename
279 </PRE>
280
281 <P>The <CODE>-o orientation-requested=N</CODE> option rotates the
282 page depending on the value of N:</P>
283
284 <UL>
285
286 <LI><CODE>-o orientation-requested=3</CODE> - portrait
287 orientation (no rotation)</LI>
288
289 <LI><CODE>-o orientation-requested=4</CODE> - landscape
290 orientation (90 degrees)</LI>
291
292 <LI><CODE>-o orientation-requested=5</CODE> - reverse
293 landscape or seascape orientation (270 degrees)</LI>
294
295 <LI><CODE>-o orientation-requested=6</CODE> - reverse
296 portrait or upside-down orientation (180 degrees)</LI>
297
298 </UL>
299
300
301 <H3><A NAME="SIDES">Printing On Both Sides of the Paper</A></H3>
302
303 <P>The <CODE>-o sides=two-sided-short-edge</CODE> and <CODE>-o
304 sides=two-sided-long-edge</CODE> options will enable two-sided
305 printing on the printer if the printer supports it. The <CODE>-o
306 sides=two-sided-short-edge</CODE> option is suitable for
307 landscape pages, while the <CODE>-o
308 sides=two-sided-long-edge</CODE> option is suitable for portrait
309 pages:</P>
310
311 <PRE CLASS="command">
312 lp -o sides=two-sided-short-edge filename
313 lp -o sides=two-sided-long-edge filename
314 lpr -o sides=two-sided-long-edge filename
315 </PRE>
316
317 <P>The default is to print single-sided:</P>
318
319 <PRE CLASS="command">
320 lp -o sides=one-sided filename
321 lpr -o sides=one-sided filename
322 </PRE>
323
324
325 <H3><A NAME="JOBSHEETS">Selecting the Banner Page(s)</A></H3>
326
327 <P>The <CODE>-o jobsheets=start,end</CODE> option sets the banner
328 page(s) to use for a job:</P>
329
330 <PRE CLASS="command">
331 lp -o job-sheets=none filename
332 lp -o job-sheets=standard filename
333 lpr -o job-sheets=classified,classified filename
334 </PRE>
335
336 <P>If only one banner file is specified, it will be printed
337 before the files in the job. If a second banner file is
338 specified, it is printed after the files in the job.</P>
339
340 <P>The available banner pages depend on the local system
341 configuration; CUPS includes the following banner files:</P>
342
343 <UL>
344
345 <LI><CODE>none</CODE> - Do not produce a banner page.
346
347 <LI><CODE>classified</CODE> - A banner page with a "classified"
348 label at the top and bottom.
349
350 <LI><CODE>confidential</CODE> - A banner page with a
351 "confidential" label at the top and bottom.
352
353 <LI><CODE>secret</CODE> - A banner page with a "secret" label
354 at the top and bottom.
355
356 <LI><CODE>standard</CODE> - A banner page with no label at the
357 top and bottom.
358
359 <LI><CODE>topsecret</CODE> - A banner page with a "top secret"
360 label at the top and bottom.
361
362 <LI><CODE>unclassified</CODE> - A banner page with an
363 "unclassified" label at the top and bottom.
364
365 </UL>
366
367
368 <H3><A NAME="JOBHOLDUNTIL">Holding Jobs for Later Printing</A></H3>
369
370 <P>The <CODE>-o job-hold-until=when</CODE> option tells CUPS to
371 delay printing until the "when" time, which can be one of the
372 following:</P>
373
374 <UL>
375
376 <LI><CODE>-o job-hold-until=indefinite</CODE>; print only
377 after released by the user or an administrator</LI>
378
379 <LI><CODE>-o job-hold-until=day-time</CODE>; print from
380 6am to 6pm local time</LI>
381
382 <LI><CODE>-o job-hold-until=night</CODE>; print from
383 6pm to 6am local time</LI>
384
385 <LI><CODE>-o job-hold-until=second-shift</CODE>; print from
386 4pm to 12am local time</LI>
387
388 <LI><CODE>-o job-hold-until=third-shift</CODE>; print from
389 12am to 8am local time</LI>
390
391 <LI><CODE>-o job-hold-until=weekend</CODE>; print on Saturday
392 or Sunday</LI>
393
394 <LI><CODE>-o job-hold-until=HH:MM</CODE>; print at the specified
395 UTC time</LI>
396
397 </UL>
398
399 <H3><A NAME="RELEASEJOB">Releasing Held Jobs</A></H3>
400
401 <P>Aside from the web interface, you can use the <B>lp</B> command
402 to release a held job:</P>
403
404 <PRE CLASS="command">
405 lp -i <em>job-id</em> -H resume
406 </PRE>
407
408 <P>where "job-id" is the job ID reported by the <B>lpstat</B>
409 command.</P>
410
411
412 <H3><A NAME="JOBPRIORITY">Setting the Job Priority</A></H3>
413
414 <P>The <CODE>-o job-priority=NNN</CODE> option tells CUPS to
415 assign a priority to your job from 1 (lowest) to 100 (highest),
416 which influences where the job appears in the print queue. Higher
417 priority jobs are printed before lower priority jobs, however
418 submitting a new job with a high priority will not interrupt an
419 </P>
420
421
422 <H3><A NAME="OUTPUTORDER">Specifying the Output Order</A></H3>
423
424 <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>
425
426
427 <H3><A NAME="PAGERANGES">Selecting a Range of Pages</A></H3>
428
429 <P>The <CODE>-o page-ranges=pages</CODE> option selects a range
430 of pages for printing:</P>
431
432 <PRE CLASS="command">
433 lp -o page-ranges=1 filename
434 lp -o page-ranges=1-4 filename
435 lp -o page-ranges=1-4,7,9-12 filename
436 lpr -o page-ranges=1-4,7,9-12 filename
437 </PRE>
438
439 <P>As shown above, the <CODE>pages</CODE> value can be a single page, a
440 range of pages, or a collection of page numbers and ranges separated by
441 commas. The pages will always be printed in ascending order, regardless
442 of the order of the pages in the <CODE>page-ranges</CODE> option.
443
444 <P>The default is to print all pages.
445
446 <blockquote><b>Note:</b>
447
448 <p>The page numbers used by <code>page-ranges</code> refer to the output
449 pages and not the document's page numbers. Options like <code>number-up</code>
450 can make the output page numbering not match the document page numbers.</p>
451
452 </blockquote>
453
454
455 <H3><A NAME="PAGESET">Selecting Even or Odd Pages</A></H3>
456
457 <P>Use the <CODE>-o page-set=set</CODE> option to select the even or odd pages:</P>
458
459 <PRE CLASS="command">
460 lp -o page-set=odd filename
461 lp -o page-set=even filename
462 lpr -o page-set=even filename
463 </PRE>
464
465 <P>The default is to print all pages.
466
467 <H3><A NAME="NUMBERUP">N-Up Printing</A></H3>
468
469 <P>The <CODE>-o number-up=value</CODE> option selects N-Up
470 printing. N-Up printing places multiple document pages on a
471 single printed page. CUPS supports 1, 2, 4, 6, 9, and 16-Up
472 formats; the default format is 1-Up:</P>
473
474 <PRE CLASS="command">
475 lp -o number-up=1 filename
476 lp -o number-up=2 filename
477 lp -o number-up=4 filename
478 lpr -o number-up=16 filename
479 </PRE>
480
481 <P>The <CODE>-o page-border=value</CODE> option chooses the
482 border to draw around each page:</P>
483
484 <UL>
485 <LI><CODE>-o page-border=double</CODE>; draw two hairline borders around each page</LI>
486 <LI><CODE>-o page-border=double-thick</CODE>; draw two 1pt borders around each page</LI>
487 <LI><CODE>-o page-border=none</CODE>; do not draw a border (default)</LI>
488 <LI><CODE>-o page-border=single</CODE>; draw one hairline border around each page</LI>
489 <LI><CODE>-o page-border=single-thick</CODE>; draw one 1pt border around each page</LI>
490 </UL>
491
492 <P>The <CODE>-o number-up-layout=value</CODE> option chooses the
493 layout of the pages on each output page:</P>
494
495 <UL>
496 <LI><CODE>-o number-up-layout=btlr</CODE>; Bottom to top, left to right</LI>
497 <LI><CODE>-o number-up-layout=btrl</CODE>; Bottom to top, right to left</LI>
498 <LI><CODE>-o number-up-layout=lrbt</CODE>; Left to right, bottom to top</LI>
499 <LI><CODE>-o number-up-layout=lrtb</CODE>; Left to right, top to bottom (default)</LI>
500 <LI><CODE>-o number-up-layout=rlbt</CODE>; Right to left, bottom to top</LI>
501 <LI><CODE>-o number-up-layout=rltb</CODE>; Right to left, top to bottom</LI>
502 <LI><CODE>-o number-up-layout=tblr</CODE>; Top to bottom, left to right</LI>
503 <LI><CODE>-o number-up-layout=tbrl</CODE>; Top to bottom, right to left</LI>
504 </UL>
505
506 <H3><A NAME="FIT_TO_PAGE">Scaling to Fit</A></H3>
507
508 <P>The <CODE>-o fit-to-page</CODE> option specifies that the document
509 should be scaled to fit on the page:</P>
510
511 <PRE CLASS="command">
512 lp -o fit-to-page filename
513 lpr -o fit-to-page filename
514 </PRE>
515
516 <P>The default is to use the size specified in the file.</P>
517
518 <BLOCKQUOTE><B>Note:</B>
519
520 <P>This feature depends upon an accurate size in
521 the print file. If no size is given in the file, the page may be
522 scaled incorrectly!
523
524 </BLOCKQUOTE>
525
526 <H3><A NAME="OUTPUTORDER">Printing in Reverse Order</A></H3>
527
528 <P>The <CODE>-o outputorder=reverse</CODE> option will print the
529 pages in reverse order:</P>
530
531 <PRE CLASS="command">
532 lp -o outputorder=reverse filename
533 lpr -o outputorder=reverse filename
534 </PRE>
535
536 <P>Similarly, the <CODE>-o outputorder=normal</CODE> option will
537 print starting with page 1:</P>
538
539 <PRE CLASS="command">
540 lp -o outputorder=normal filename
541 lpr -o outputorder=normal filename
542 </PRE>
543
544 <P>The default is <CODE>-o outputorder=normal</CODE> for
545 printers that print face down and <CODE>-o outputorder=reverse</CODE>
546 for printers that print face up.
547
548 <H3><A NAME="MIRROR">Printing Mirrored Pages</A></H3>
549
550 <P>The <CODE>-o mirror</CODE> option flips each page along the
551 vertical access to produce a mirrored image:</P>
552
553 <PRE CLASS="command">
554 lp -o mirror filename
555 lpr -o mirror filename
556 </PRE>
557
558 <P>This is typically used when printing on T-shirt transfer
559 media or sometimes on transparencies.</P>
560
561 <H3><A NAME="RAW">Raw or Unfiltered Output</A></H3>
562
563 <P>The <CODE>-o raw</CODE> option allows you to send files
564 directly to a printer without filtering. This is sometimes
565 required when printing from applications that provide their own
566 "printer drivers" for your printer:</P>
567
568 <PRE CLASS="command">
569 lp -o raw filename
570 lpr -o raw filename
571 </PRE>
572
573 <P>The <CODE>-l</CODE> option can also be used with the
574 <B>lpr</B> command to send files directly to a printer:</P>
575
576 <PRE CLASS="command">
577 lpr -l filename
578 </PRE>
579
580
581 <H2 CLASS="title"><A NAME="TEXTOPTIONS">Text Options</A></H2>
582
583 <P>CUPS supports several options that are only used when printing
584 plain text files. These options have absolutely no effect on
585 PostScript, PDF, HP-GL/2, or image files.</P>
586
587 <H3><A NAME="CPI">Setting the Number of Characters Per Inch</A></H3>
588
589 <P>The <CODE>-o cpi=value</CODE> option sets the number of
590 characters per inch:</P>
591
592 <PRE CLASS="command">
593 lp -o cpi=10 filename
594 lp -o cpi=12 filename
595 lpr -o cpi=17 filename
596 </PRE>
597
598 <P>The default characters per inch is 10.</P>
599
600 <H3><A NAME="LPI">Setting the Number of Lines Per Inch</A></H3>
601
602 <P>The <CODE>-o lpi=value</CODE> option sets the number of lines
603 per inch:</P>
604
605 <PRE CLASS="command">
606 lp -o lpi=6 filename
607 lpr -o lpi=8 filename
608 </PRE>
609
610 <P>The default lines per inch is 6.</P>
611
612 <H3><A NAME="COLUMNS">Setting the Number of Columns</A></H3>
613
614 <P>The <CODE>-o columns=value</CODE> option sets the number of
615 text columns:</P>
616
617 <PRE CLASS="command">
618 lp -o columns=2 filename
619 lpr -o columns=3 filename
620 </PRE>
621
622 <P>The default number of columns is 1.</P>
623
624 <H3><A NAME="MARGINS">Setting the Page Margins</A></H3>
625
626 <P>Normally the page margins are set to the hard limits of the
627 printer. Use the <CODE>-o page-left=value</CODE>, <CODE>-o
628 page-right=value</CODE>, <CODE>-o page-top=value</CODE>, and
629 <CODE>-o page-bottom=value</CODE> options to adjust the page
630 margins:</P>
631
632 <PRE CLASS="command">
633 lp -o page-left=<EM>value</EM> filename
634 lp -o page-right=<EM>value</EM> filename
635 lp -o page-top=<EM>value</EM> filename
636 lp -o page-bottom=<EM>value</EM> filename
637 lpr -o page-left=<EM>value</EM> -o page-right=<EM>value</EM> -o page-top=<EM>value</EM> -o page-bottom=<EM>value</EM> filename
638 </PRE>
639
640 <P>The <CODE>value</CODE> argument is the margin in points; each
641 point is 1/72 inch or 0.35mm.</P>
642
643 <H3><A NAME="PRETTYPRINT">Pretty Printing</A></H3>
644
645 <P>The <CODE>-o prettyprint</CODE> option puts a header at the
646 top of each page with the page number, job title (usually the
647 filename), and the date. Also, C and C++ keywords are
648 highlighted, and comment lines are italicized:</P>
649
650 <PRE CLASS="command">
651 lp -o prettyprint filename
652 lpr -o prettyprint filename
653 </PRE>
654
655 <H3><A NAME="WRAP">Turning Off Text Wrapping</A></H3>
656
657 <P>The <CODE>-o nowrap</CODE> option disables wrapping of long lines:</P>
658
659 <PRE CLASS="command">
660 lp -o nowrap filename
661 lpr -o nowrap filename
662 </PRE>
663
664
665 <H2 CLASS="title"><SPAN CLASS="info">Not Supported on Mac OS X</SPAN><A NAME="IMAGEOPTIONS">Image Options</A></H2>
666
667 <P>CUPS supports several options that are only used when printing
668 image files. These options have absolutely no effect on PostScript, PDF,
669 HP-GL/2, or text files.</P>
670
671 <H3><A NAME="position">Positioning Images</A></H3>
672
673 <P>The <CODE>-o position=name</CODE> option specifies the position of the
674 image on the page:
675
676 <UL>
677
678 <LI><CODE>center</CODE> - Center the image on the page (default)
679
680 <LI><CODE>top</CODE> - Print the image centered at the top of the page
681
682 <LI><CODE>left</CODE> - Print the image centered on the left of page
683
684 <LI><CODE>right</CODE> - Print the image centered on the right of the page
685
686 <LI><CODE>top-left</CODE> - Print the image at the top left corner of
687 the page
688
689 <LI><CODE>top-right</CODE> - Print the image at the top right corner of
690 the page
691
692 <LI><CODE>bottom</CODE> - Print the image centered at the bottom of
693 the page
694
695 <LI><CODE>bottom-left</CODE> - Print the image at the bottom left
696 corner of the page
697
698 <LI><CODE>bottom-right</CODE> - Print the image at the bottom right
699 corner of the page
700
701 </UL>
702
703 <H3><A NAME="scaling">Scaling Images</A></H3>
704
705 <P>The <CODE>-o scaling=percent</CODE>, <CODE>-o
706 ppi=value</CODE>, and <CODE>-o natural-scaling=percent</CODE>
707 options change the size of a printed image:
708
709 <PRE CLASS="command">
710 lp -o scaling=<EM>percent</EM> filename
711 lp -o ppi=<EM>value</EM> filename
712 lpr -o natural-scaling=<EM>percent</EM> filename
713 </PRE>
714
715 <P>The <CODE>scaling=percent</CODE> value is a number from 1 to 800
716 specifying the size in relation to the page (<EM>not</EM> the image.) A
717 scaling of 100 percent will fill the page as completely as the image
718 aspect ratio allows. A scaling of 200 percent will print on up to 4
719 pages.
720
721 <P>The <CODE>ppi=value</CODE> value is a number from 1 to 1200 specifying the
722 resolution of the image in pixels per inch. An image that is 3000x2400
723 pixels will print 10x8 inches at 300 pixels per inch, for example. If
724 the specified resolution makes the image larger than the page, multiple
725 pages will be printed to satisfy the request.
726
727 <P>The <CODE>natural-scaling=percent</CODE> value is a number
728 from 1 to 800 specifying the size in relation to the natural
729 image size. A scaling of 100 percent will print the image at its
730 natural size, while a scaling of 50 percent will print the image
731 at half its natural size. If the specified scaling makes the
732 image larger than the page, multiple pages will be printed to
733 satisfy the request.
734
735
736 <H2 CLASS="title"><A NAME="HPGL2OPTIONS">HP-GL/2 Options</A></H2>
737
738 <P>CUPS supports several options that are only used when printing
739 HP-GL/2 files. These options have absolutely no effect on PostScript, PDF,
740 image, or text files.</P>
741
742 <H3><A NAME="blackplot">Printing in Black</A></H3>
743
744 <P>The <CODE>-o blackplot</CODE> option specifies that all pens should
745 plot in black:</P>
746
747 <PRE CLASS="command">
748 lp -o blackplot filename
749 lpr -o blackplot filename
750 </PRE>
751
752 <P>The default is to use the colors defined in the plot file or the
753 standard pen colors defined in the HP-GL/2 reference manual from
754 Hewlett Packard.
755
756 <H3><A NAME="penwidth">Setting the Default Pen Width</A></H3>
757
758 <P>The <CODE>-o penwidth=value</CODE> option specifies the default pen
759 width for HP-GL/2 files:</P>
760
761 <PRE CLASS="command">
762 lp -o penwidth=<EM>value</EM> filename
763 lpr -o penwidth=<EM>value</EM> filename
764 </PRE>
765
766 <P>The pen width <CODE>value</CODE> specifies the pen width in micrometers.
767 The default value of 1000 produces lines that are 1 millimeter in width.
768 Specifying a pen width of 0 produces lines that are exactly 1 pixel wide.</P>
769
770 <BLOCKQUOTE><B>Note:</B>
771
772 <P>This option is ignored when the pen widths are set in the plot
773 file.
774
775 </BLOCKQUOTE>
776
777 </BODY>
778 </HTML>