forked from OpenPrinting/cups
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec-ppd.shtml
2115 lines (1478 loc) · 77.4 KB
/
spec-ppd.shtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<h2 class='title'><a name='SYNTAX'>PPD File Syntax</a></h2>
<p>The PPD format is text-based and uses lines of up to 255 characters terminated by a carriage return, linefeed, or combination of carriage return and line feed. The following ABNF definition [<a href="http://tools.ietf.org/html/rfc5234" target="_blank">RFC5234</a>] defines the general format of lines in a PPD file:</p>
<pre class='command'>
PPD-FILE = HEADER +(DATA / COMMENT / LINE-END)
HEADER = "*PPD-Adobe:" *WSP DQUOTE VERSION DQUOTE LINE-END
VERSION = "4.0" / "4.1" / "4.2" / "4.3"
COMMENT = "*%" *TCHAR LINE-END
DATA = "*" 1*KCHAR [ WSP 1*KCHAR [ "/" 1*TCHAR ] ] ":"
1*(*WSP VALUE) LINE-END
VALUE = 1*TCHAR / DQUOTE 1*SCHAR DQUOTE
KCHAR = ALPHA / DIGIT / "_" / "." / "-"
SCHAR = LINE-END / WSP / %x21.23-7E.A0-FF
TCHAR = %x20-7E.A0-FF
LINE-END = CR / LF / CR LF
</pre>
<h2 class='title'><a name='AUTOCONFIG'>Auto-Configuration</a></h2>
<p>CUPS supports several methods of auto-configuration via PPD keywords.</p>
<h3 class="title"><span class='info'>macOS 10.5</span><a name='APAutoSetupTool'>APAutoSetupTool</a></h3>
<p class='summary'>*APAutoSetupTool: "/LibraryPrinters/vendor/filename"</p>
<p>This macOS keyword defines a program that sets the default option choices. It is run when a printer is added from the <var>Add Printer</var> window or the <var>Nearby Printers</var> list in the <var>Print</var> dialog.</p>
<p>The program is provided with two arguments: the printer's device URI and the PPD file to be used for the printer. The program must write an updated PPD file to stdout.</p>
<p>Examples:</p>
<pre class='command'>
*% Use our setup tool when adding a printer
*APAutoSetupTool: "/Library/Printers/vendor/Tools/autosetuptool"
</pre>
<h3 class="title"><span class='info'>macOS 10.2/CUPS 1.4</span><a name='QUERYKEYWORD'>?MainKeyword</a></h3>
<p class='summary'>*?<i>MainKeyword</i>: "<br>
PostScript query code that writes a message using the = operator...<br>
"<br>
*End</p>
<p>The <tt>?<i>MainKeyword</i></tt> keyword defines PostScript code that determines the currently selected/enabled option keyword (choice) for the main keyword (option). It is typically used when communicating with USB, serial, Appletalk, and AppSocket (port 9100) printers.</p>
<p>The PostScript code typically sends its response back using the <tt>=</tt> operator.</p>
<p>Example:</p>
<pre class='command'>
*OpenUI OptionDuplex/Duplexer Installed: Boolean
*DuplexOptionDuplex: False
*OptionDuplex False/Not Installed: ""
*OptionDuplex True/Installed: ""
<em>*% Query the printer for the presence of the duplexer option...</em>
*?OptionDuplex: "
currentpagedevice /Duplex known
{(True)} {(False)} ifelse
= flush
"
*End
*CloseUI: OptionDuplex
</pre>
<h3 class="title"><span class='info'>macOS 10.4/CUPS 1.5</span><a name='OID'>OIDMainKeyword</a></h3>
<p class='summary'>*?OID<i>MainKeyword</i>: ".n.n.n..."<br>
*OID<i>MainKeyword</i> <i>OptionKeyword1</i>: "value"<br>
...<br>
*OID<i>MainKeyword</i> <i>OptionKeywordN</i>: "value"</p>
<p>The <tt>OID<i>MainKeyword</i></tt> keyword is used to define SNMP OIDs that map to installable options. The first (query) line defines the OID to lookup on the network device. The second and subsequent keywords define a mapping from OID value to option keyword. Since SNMP is an IP-based network protocol, this method is typically only used to configure AppSocket, IPP, and LPD network printers.</p>
<p>Examples:</p>
<pre class='command'>
*% Get the installed memory on the printer...
*?OIDInstalledMemory: ".1.3.6.1.2.1.25.2.2.0"
*OIDInstalledMemory 16MB: "16384 KBytes"
*OIDInstalledMemory 32MB: "32768 KBytes"
*OIDInstalledMemory 48MB: "49152 KBytes"
*OIDInstalledMemory 72MB: "73728 KBytes"
</pre>
<h2 class='title'><a name='PROFILES'>Color Profiles</a></h2>
<p>CUPS supports three types of color profiles. The first type is based on sRGB and is used by the standard CUPS raster filters and GPL Ghostscript. The second type is based on ICC profiles and is used by the Quartz-based filters on macOS. The final type is based on well-known colorspaces such as sRGB and Adobe RGB.</p>
<blockquote><b>Note:</b>
<p>At this time, none of the CUPS raster filters support ICC profiles. This will be addressed as time and resources permit.</p>
</blockquote>
<h3 class="title"><span class='info'>Deprecated</span><a name='cupsColorProfile'>cupsColorProfile</a></h3>
<p class='summary'>*cupsColorProfile Resolution/MediaType: "density gamma m00 m01 m02 m10 m11 m12 m20 m21 m22"</p>
<p>This string keyword specifies an sRGB-based color profile consisting of gamma and density controls and a 3x3 CMY color transform matrix. <em>This keyword is not supported on macOS.</em></p>
<p>The <i>Resolution</i> and <i>MediaType</i> values may be "-" to act as a wildcard. Otherwise they must match one of the <tt>Resolution</tt> or <tt>MediaType</tt> option keywords defined in the PPD file.</p>
<p>The <i>density</i> and <i>gamma</i> values define gamma and
density adjustment function such that:</p>
<pre class='command'>
f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
</pre>
<p>The <i>m00</i> through <i>m22</i> values define a 3x3 transformation matrix for the CMY color values. The density function is applied <i>after</i> the CMY transformation:</p>
<pre class='command'>
| m00 m01 m02 |
| m10 m11 m12 |
| m20 m21 m22 |
</pre>
<p>Examples:</p>
<pre class='command'>
<em>*% Specify a profile for printing at 360dpi on all media types</em>
*cupsColorProfile 360dpi/-: "1.0 1.5 1.0 0.0 -0.2 -0.4 1.0 0.0 -0.2 0.0 1.0"
<em>*% Specify a profile for printing at 720dpi on Glossy media</em>
*cupsColorProfile 720dpi/Glossy: "1.0 2.5 1.0 0.0 -0.2 -0.4 1.0 0.0 -0.2 0.0 1.0"
<em>*% Specify a default profile for printing at all other resolutions and media types</em>
*cupsColorProfile -/-: "0.9 2.0 1.0 0.0 -0.2 -0.4 1.0 0.0 -0.2 0.0 1.0"
</pre>
<h3 class="title"><span class='info'>macOS 10.3/CUPS 1.2</span><a name='cupsICCProfile'>cupsICCProfile</a></h3>
<p class='summary'>*cupsICCProfile ColorModel.MediaType.Resolution/Description: "filename"</p>
<p>This keyword specifies an ICC color profile that is used to convert the document colors to the device colorspace. The <tt>ColorModel</tt>, <tt>MediaType</tt>, and <tt>Resolution</tt> option keywords specify a selector for color profiles. If omitted, the color profile will match any option keyword for the corresponding main keyword.</p>
<p>The <tt>Description</tt> specifies human-readable text that is associated with the color profile. The <tt>filename</tt> portion specifies the ICC color profile to use; if the filename is not absolute, it is loaded relative to the <var>/usr/share/cups/profiles</var> directory.</p>
<p>Examples:</p>
<pre class='command'>
<em>*% Specify a profile for CMYK printing at 360dpi on all media types</em>
*cupsICCProfile CMYK..360dpi/360dpi CMYK: "/Library/Printers/vendor/Profiles/foo-360-cmyk.icc"
<em>*% Specify a profile for RGB printing at 720dpi on Glossy media</em>
*cupsColorProfile RGB.Glossy.720dpi/720dpi Glossy: "/Library/Printers/vendor/Profiles/foo-720-glossy-rgb.icc"
<em>*% Specify a default profile for printing at all other resolutions and media types</em>
*cupsICCProfile ../Default: "/Library/Printers/vendor/Profiles/foo-default.icc"
</pre>
<h4 class="title">Customizing the Profile Selection Keywords</h4>
<p>The <tt>ColorModel</tt>, <tt>MediaType</tt>, and <tt>Resolution</tt> main keywords can be reassigned to different main keywords, allowing drivers to do color profile selection based on different parameters. The <tt>cupsICCQualifier1</tt>, <tt>cupsICCQualifier2</tt>, and <tt>cupsICCQualifier3</tt> keywords define the mapping from selector to main keyword:</p>
<pre class='command'>
*cupsICCQualifier1: MainKeyword1
*cupsICCQualifier2: MainKeyword2
*cupsICCQualifier3: MainKeyword3
</pre>
<p>The default mapping is as follows:</p>
<pre class='command'>
*cupsICCQualifier1: ColorModel
*cupsICCQualifier2: MediaType
*cupsICCQualifier3: Resolution
</pre>
<h3 class="title"><span class='info'>macOS 10.4</span><a name='APCustom'>Custom Color Matching Support</a></h3>
<p class='summary'>*<a href='#APSupportsCustomColorMatching'>APSupportsCustomColorMatching</a>: true<br>
*<a href='#APCustomColorMatchingName'>APCustomColorMatchingName</a> name/text: ""<br>
*<a href='#APCustomColorMatchingProfile'>APCustomColorMatchingProfile</a>: profile<br>
*<a href='#APDefaultCustomColorMatchingProfile'>APDefaultCustomColorMatchingProfile</a>: profile</p>
<p>These keywords tell the macOS raster filters that the printer driver provides its own custom color matching and that generic color profiles should be used when generating 1-, 3-, and 4-component raster data as requested by the driver. The <tt>APCustomColorMatchingProfile</tt> and <tt>APDefaultColorMatchingProfile</tt> keywords specify alternate color profiles (sRGB or AdobeRGB) to use for 3-color (RGB) raster data.</p>
<blockquote><b>Note:</b>
<p>Prior to macOS 10.6, the default RGB color space was Apple's "GenericRGB". The new default in macOS 10.6 and later is "sRGB". For more information, see <a href="http://support.apple.com/kb/HT3712">"macOS v10.6: About gamma 2.2"</a> on Apple's support site.</p>
</blockquote>
<h4 class="title"><span class='info'>macOS 10.5</span><a name='APCustomColorMatchingName'>APCustomColorMatchingName</a></h4>
<p class='summary'>*APCustomColorMatchingName name/text: ""</p>
<p>This keyword defines an alternate name for the color matching provided by a driver in the <var>Color Matching</var> print panel. The default is to use the name "Vendor Matching" or its localized equivalent.</p>
<p>Examples:</p>
<pre class='command'>
*% Define the names for our color matching...
*APCustomColorMatchingName name/AcmeColor(tm): ""
*fr.APCustomColorMatchingName name/La AcmeColor(tm): ""
</pre>
<h4 class="title"><span class='info'>macOS 10.5</span><a name='APCustomColorMatchingProfile'>APCustomColorMatchingProfile</a></h4>
<p class='summary'>*APCustomColorMatchingProfile: name</p>
<p>This keyword defines a supported RGB color profile that can be used when doing custom color matching. Currently only <tt>sRGB</tt>, <tt>AdobeRGB</tt>, and <tt>GenericRGB</tt> are supported. If not specified, RGB data will use the GenericRGB colorspace.</p>
<blockquote><b>Note:</b>
<p>If you provide multiple <tt>APCustomColorMatchingProfile</tt> keywords, you are responsible for providing the necessary user interface controls to select the profile in a <a href='#APDialogExtension'>print dialog pane</a>. Add the named profile to the print settings using the key <tt>kPMCustomColorMatchingProfileKey</tt>.</p>
</blockquote>
<p>Examples:</p>
<pre class='command'>
*% Use sRGB for RGB color by default, but support both sRGB and AdobeRGB
*APSupportsCustomColorMatching: true
*APDefaultCustomColorMatchingProfile: sRGB
*APCustomColorMatchingProfile: sRGB
*APCustomColorMatchingProfile: AdobeRGB
</pre>
<h4 class="title"><span class='info'>macOS 10.5</span><a name='APDefaultCustomColorMatchingProfile'>APDefaultCustomColorMatchingProfile</a></h4>
<p class='summary'>*APDefaultCustomColorMatchingProfile: name</p>
<p>This keyword defines the default RGB color profile that will be used when doing custom color matching. Currently only <tt>sRGB</tt>, <tt>AdobeRGB</tt>, and <tt>GenericRGB</tt> are supported.</p>
<p>Examples:</p>
<pre class='command'>
*% Use sRGB for RGB color by default
*APSupportsCustomColorMatching: true
*APDefaultCustomColorMatchingProfile: sRGB
</pre>
<h4 class="title"><span class='info'>macOS 10.4</span><a name='APSupportsCustomColorMatching'>APSupportsCustomColorMatching</a></h4>
<p class='summary'>*APSupportsCustomColorMatching: boolean</p>
<p>This keyword specifies that the driver provides its own custom color matching. When <tt>true</tt>, the default hand-off colorspace will be GenericGray, GenericRGB, or GenericCMYK depending on the number of components the driver requests. The <a href='#APDefaultCustomColorMatchingProfile'><tt>APDefaultCustomColorMatchingProfile</tt></a> keyword can be used to override the default 3-component (RGB) colorspace.</p>
<p>The default for <tt>APSupportsCustomColorMatching</tt> is <tt>false</tt>.</p>
<p>Examples:</p>
<pre class='command'>
*APSupportsCustomColorMatching: true
*APDefaultCustomColorMatchingProfile: sRGB
</pre>
<h2 class='title'><a name='CONSTRAINTS'>Constraints</a></h2>
<p>Constraints are option choices that are not allowed by the driver or device, for example printing 2-sided transparencies. All versions of CUPS support constraints defined by the legacy Adobe <tt>UIConstraints</tt> and <tt>NonUIConstraints</tt> keywords which support conflicts between any two option choices, for example:</p>
<pre class='command'>
*% Do not allow 2-sided printing on transparency media
*UIConstraints: "*Duplex *MediaType Transparency"
*UIConstraints: "*MediaType Transparency *Duplex"
</pre>
<p>While nearly all constraints can be expressed using these keywords, there are valid scenarios requiring constraints between more than two option choices. In addition, resolution of constraints is problematic since users and software have to guess how a particular constraint is best resolved.</p>
<p>CUPS 1.4 and higher define two new keywords for constraints, <tt>cupsUIConstraints</tt> and <tt>cupsUIResolver</tt>. Each <tt>cupsUIConstraints</tt> keyword points to a <tt>cupsUIResolver</tt> keyword which specifies alternate options that resolve the conflict condition. The same <tt>cupsUIResolver</tt> can be used by multiple <tt>cupsUIConstraints</tt>.</p>
<blockquote><b>Note:</b>
<p>When developing PPD files that contain constraints, it is very important to use the <a href="man-cupstestppd.html">cupstestppd(1)</a> program to verify that your constraints are accurate and cannot result in unresolvable option selections.</p>
</blockquote>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIConstraints'>cupsUIConstraints</a></h3>
<p class='summary'>*cupsUIConstraints resolver: "*Keyword1 *Keyword2 ..."<br>
*cupsUIConstraints resolver: "*Keyword1 OptionKeyword1 *Keyword2 ..."<br>
*cupsUIConstraints resolver: "*Keyword1 *Keyword2 OptionKeyword2 ..."<br>
*cupsUIConstraints resolver: "*Keyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."<br>
*cupsUIConstraints: "*InstallableKeyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."</p>
<p>Lists two or more options which conflict. The "resolver" string is a (possibly unique) keyword which specifies which options to change when the constraint exists. When no resolver is provided, CUPS first tries the default choice followed by testing each option choice to resolve the conflict.</p>
<p>Examples:</p>
<pre class='command'>
<em>*% Specify that 2-sided printing cannot happen on transparencies</em>
*cupsUIConstraints transparency: "*Duplex *MediaType Transparency"
<em>*% Specify that envelope printing cannot happen from the paper trays</em>
*cupsUIConstraints envelope: "*PageSize Env10 *InputSlot Tray1"
*cupsUIConstraints envelope: "*PageSize Env10 *InputSlot Tray1"
*cupsUIConstraints envelope: "*PageSize EnvDL *InputSlot Tray2"
*cupsUIConstraints envelope: "*PageSize EnvDL *InputSlot Tray2"
<em>*% Specify an installable option constraint for the envelope feeder</em>
*cupsUIConstraints: "*InputSlot EnvFeeder *InstalledEnvFeeder"
<em>*% Specify that photo printing cannot happen on plain paper or transparencies at 1200dpi</em>
*cupsUIConstraints photo: "*OutputMode Photo *MediaType Plain *Resolution 1200dpi"
*cupsUIConstraints photo: "*OutputMode Photo *MediaType Transparency *Resolution 1200dpi"
</pre>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIResolver'>cupsUIResolver</a></h3>
<p class='summary'>*cupsUIResolver resolver: "*Keyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."</p>
<p>Specifies two or more options to mark/select to resolve a constraint. The "resolver" string identifies a particular action to take for one or more <a href='#cupsUIConstraints'><tt>cupsUIConstraints</tt></a>. The same action can be used for multiple constraints. The option keyword pairs are treated as an ordered list of option selections to try - only the first N selections will be used, where N is the minimum number of selections required. Because <a href="api-ppd.html#cupsResolveConflicts"><code>cupsResolveConflicts()</code></a> will not change the most recent option selection passed to it, at least two options from the constraints must be listed to avoid situations where conflicts cannot be resolved.</p>
<p>Examples:</p>
<pre class='command'>
<em>*% Specify the options to change for the 2-sided transparency constraint</em>
*cupsUIResolver transparency: "*Duplex None *MediaType Plain"
<em>*% Specify the options to change for the envelope printing constraints. Notice
*% that we try to change the InputSlot to either the envelope feeder or the
*% manual feed first, then we change the page size...</em>
*cupsUIResolver envelope: "*InputSlot EnvFeeder *InputSlot ManualFeed *PageSize Letter"
<em>*% Specify the options to change for the photo printing constraints</em>
*cupsUIResolver photo: "*OutputMode Best *Resolution 600dpi"
</pre>
<h2 class='title'><a name='I18N'>Globalized PPD Support</a></h2>
<p>CUPS 1.2 and higher adds support for PPD files containing multiple languages by following the following additional rules:</p>
<ol>
<li>The <tt>LanguageVersion</tt> MUST be <tt>English</tt></li>
<li>The <tt>LanguageEncoding</tt> MUST be <tt>ISOLatin1</tt></li>
<li>The <tt>cupsLanguages</tt> keyword MUST be provided and list each of the supported locales in the PPD file</li>
<li>Main and option keywords MUST NOT exceed 34 (instead of 40) characters to allow room for the locale prefixes in translation keywords</li>
<li>The main keyword "Translation" MUST NOT be used</li>
<li>Translation strings included with the main and option keywords MUST NOT contain characters outside the ASCII subset of ISOLatin1 and UTF-8; developers wishing to use characters outside ASCII MUST provide a separate set of English localization keywords for the affected keywords.</li>
<li>Localizations are specified using a locale prefix of the form "ll" or "ll_CC." where "ll" is the 2-letter ISO language code and "CC" is the 2-letter ISO country code<ul>
<li>A generic language translation ("ll") SHOULD be provided with country-specific differences ("ll_CC") provided only as needed</li>
<li>For historical reasons, the "zh" and "zh_CN" locales map to Simplified Chinese while the "zh_TW" locale maps to Traditional Chinese</li>
</ul></li>
<li>Locale-specific translation strings MUST be encoded using UTF-8.</li>
<li>Main keywords MUST be localized using one of the following forms:
<p><tt>*ll.Translation MainKeyword/translation text: ""</tt><br />
<tt>*ll_CC.Translation MainKeyword/translation text: ""</tt></p></li>
<li>Option keywords MUST be localized using one of the following forms:
<p><tt>*ll.MainKeyword OptionKeyword/translation text: ""</tt><br>
<tt>*ll_CC.MainKeyword OptionKeyword/translation text: ""</tt></p></li>
<li>Localization keywords MAY appear anywhere after the first line of the PPD file</li>
</ol>
<blockquote><b>Note:</b>
<p>We use a <tt>LanguageEncoding</tt> value of <tt>ISOLatin1</tt> and limit the allowed base translation strings to ASCII to avoid character coding issues that would otherwise occur. In addition, requiring the base translation strings to be in English allows for easier fallback translation when no localization is provided in the PPD file for a given locale.</p>
</blockquote>
<p>Examples:</p>
<pre class='command'>
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*cupsLanguages: "de fr_CA"
*ModelName: "Foobar Laser 9999"
<em>*% Localize ModelName for French and German</em>
*fr_CA.Translation ModelName/La Foobar Laser 9999: ""
*de.Translation ModelName/Foobar LaserDrucken 9999: ""
*cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html"
<em>*% Localize printer-state-reason for French and German</em>
*fr_CA.cupsIPPReason com.vendor-error/Une erreur sèrieuse s'est produite: "/help/com.vendor/error.html"
*de.cupsIPPReason com.vendor-error/Eine ernste Störung trat: "/help/com.vendor/error.html"
...
*OpenUI *InputSlot/Paper Source: PickOne
*OrderDependency: 10 AnySetup *InputSlot
*DefaultInputSlot: Auto
<em>*% Localize InputSlot for French and German</em>
*fr_CA.Translation InputSlot/Papier source: ""
*de.Translation InputSlot/Papiereinzug: ""
*InputSlot Auto/Default: "<</ManualFeed false>>setpagedevice"
<em>*% Localize InputSlot=Auto for French and German</em>
*fr_CA.InputSlot Auto/Par Defaut: ""
*de.InputSlot Auto/Standard: ""
*InputSlot Manual/Manual Feed: "<</ManualFeed true>>setpagedevice"
<em>*% Localize InputSlot=Manual for French and German</em>
*fr_CA.InputSlot Manual/Manuel mecanisme de alimentation: ""
*de.InputSlot Manual/Manueller Einzug: ""
*CloseUI: *InputSlot
</pre>
<h2 class='title'><a name='OPTIONS'><span class="info">CUPS 1.3/macOS 10.6</span>Custom Options</a></h2>
<p>CUPS supports custom options using an extension of the <tt>CustomPageSize</tt> and <tt>ParamCustomPageSize</tt> syntax:</p>
<pre class='command'>
*CustomFoo True: "command"
*ParamCustomFoo Name1/Text 1: order type minimum maximum
*ParamCustomFoo Name2/Text 2: order type minimum maximum
...
*ParamCustomFoo NameN/Text N: order type minimum maximum
</pre>
<p>When the base option is part of the <tt>JCLSetup</tt> section, the "command" string contains JCL commands with "\order" placeholders for each numbered parameter. The CUPS API handles any necessary value quoting for HP-PJL commands. For example, if the JCL command string is "@PJL SET PASSCODE=\1" and the first
option value is "1234" then CUPS will output the string "@PJL SET PASSCODE=1234".</p>
<p>For non-<tt>JCLSetup</tt> options, the "order" value is a number from 1 to N and specifies the order of values as they are placed on the stack before the command. For example, if the PostScript command string is "<</cupsReal1 2 1 roll>>setpagedevice" and the option value is "2.0" then CUPS will output the string "2.0 <</cupsReal1 2 1 roll>>setpagedevice".</p>
<p>The "type" is one of the following keywords:</p>
<ul>
<li><tt>curve</tt> - a real value from "minimum" to "maximum" representing a gamma correction curve using the function: f(x) = x <sup>value</sup></li>
<li><tt>int</tt> - an integer value from "minimum" to "maximum"</li>
<li><tt>invcurve</tt> - a real value from "minimum" to "maximum" representing a gamma correction curve using the function: f(x) = x <sup>1 / value</sup></li>
<li><tt>passcode</tt> - a string of numbers value with a minimum of "minimum" numbers and a maximum of "maximum" numbers ("minimum" and "maximum" are numbers and passcode strings are not displayed in the user interface)</li>
<li><tt>password</tt> - a string value with a minimum of "minimum" characters and a maximum of "maximum" characters ("minimum" and "maximum" are numbers and password strings are not displayed in the user interface)</li>
<li><tt>points</tt> - a measurement value in points from "minimum" to "maximum"</li>
<li><tt>real</tt> - a real value from "minimum" to "maximum"</li>
<li><tt>string</tt> - a string value with a minimum of "minimum" characters and a maximum of "maximum" characters ("minimum" and "maximum" are numbers)</li>
</ul>
<p>Examples:</p>
<pre class='command'>
<em>*% Base JCL key code option</em>
*JCLOpenUI JCLPasscode/Key Code: PickOne
*OrderDependency: 10 JCLSetup *JCLPasscode
*DefaultJCLPasscode: None
*JCLPasscode None/No Code: ""
*JCLPasscode 1111: "@PJL SET PASSCODE = 1111<0A>"
*JCLPasscode 2222: "@PJL SET PASSCODE = 2222<0A>"
*JCLPasscode 3333: "@PJL SET PASSCODE = 3333<0A>"
*JCLCloseUI: *JCLPasscode
<em>*% Custom JCL key code option</em>
*CustomJCLPasscode True: "@PJL SET PASSCODE = \1<0A>"
*ParamCustomJCLPasscode Code/Key Code: 1 passcode 4 4
<em>*% Base PostScript watermark option</em>
*OpenUI WatermarkText/Watermark Text: PickOne
*OrderDependency: 10 AnySetup *WatermarkText
*DefaultWatermarkText: None
*WatermarkText None: ""
*WatermarkText Draft: "<</cupsString1(Draft)>>setpagedevice"
*CloseUI: *WatermarkText
<em>*% Custom PostScript watermark option</em>
*CustomWatermarkText True: "<</cupsString1 3 -1 roll>>setpagedevice"
*ParamCustomWatermarkText Text: 1 string 0 32
<em>*% Base PostScript gamma/density option</em>
*OpenUI GammaDensity/Gamma and Density: PickOne
*OrderDependency: 10 AnySetup *GammaDensity
*DefaultGammaDensity: Normal
*GammaDensity Normal/Normal: "<</cupsReal1 1.0/cupsReal2 1.0>>setpagedevice"
*GammaDensity Light/Lighter: "<</cupsReal1 0.9/cupsReal2 0.67>>setpagedevice"
*GammaDensity Dark/Darker: "<</cupsReal1 1.1/cupsReal2 1.5>>setpagedevice"
*CloseUI: *GammaDensity
<em>*% Custom PostScript gamma/density option</em>
*CustomGammaDensity True: "<</cupsReal1 3 -1 roll/cupsReal2 5 -1>>setpagedevice"
*ParamCustomGammaDensity Gamma: 1 curve 0.1 10
*ParamCustomGammaDensity Density: 2 real 0 2
</pre>
<h2 class='title'><a name='RASTERPS'>Writing PostScript Option Commands for Raster Drivers</a></h2>
<p>PPD files are used for both PostScript and non-PostScript printers. For CUPS raster drivers, you use a subset of the PostScript language to set page device keywords such as page size, resolution, and so forth. For example, the following code sets the page size to A4 size:</p>
<pre class='command'>
*PageSize A4: "<</PageSize[595 842]>>setpagedevice"
</pre>
<p>Custom options typically use other operators to organize the values into a key/value dictionary for <tt>setpagedevice</tt>. For example, our previous <tt>CustomWatermarkText</tt> option code uses the <tt>roll</tt> operator to move the custom string value into the dictionary for <tt>setpagedevice</tt>:</p>
<pre class='command'>
*CustomWatermarkText True: "<</cupsString1 3 -1 roll>>setpagedevice"
</pre>
<p>For a custom string value of "My Watermark", CUPS will produce the following PostScript code for the option:</p>
<pre class='command'>
(My Watermark)
<</cupsString1 3 -1 roll>>setpagedevice
</pre>
<p>The code moves the string value ("My Watermark") from the bottom of the stack to the top, creating a dictionary that looks like:</p>
<pre class='command'>
<</cupsString1(My Watermark)>>setpagedevice
</pre>
<p>The resulting dictionary sets the page device attributes that are sent to your raster driver in the page header.</p>
<h3 class="title">Custom Page Size Code</h3>
<p>There are many possible implementations of the <tt>CustomPageSize</tt> code. For CUPS raster drivers, the following code is recommended:</p>
<pre class='command'>
*ParamCustomPageSize Width: 1 points <i>min-width max-width</i>
*ParamCustomPageSize Height: 2 points <i>min-height max-height</i>
*ParamCustomPageSize WidthOffset: 3 points 0 0
*ParamCustomPageSize HeightOffset: 4 points 0 0
*ParamCustomPageSize Orientation: 5 int 0 0
*CustomPageSize True: "pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice"
</pre>
<h3 class="title">Supported PostScript Operators</h3>
<p>CUPS supports the following PostScript operators in addition to the usual PostScript number, string (literal and hex-encoded), boolean, null, and name values:</p>
<ul>
<li><tt><<</tt> - Start a dictionary.</li>
<li><tt>>></tt> - End a dictionary.</li>
<li><tt>[</tt> - Start an array.</li>
<li><tt>]</tt> - End an array.</li>
<li><tt>copy</tt> - Copy the top N objects on the stack.</li>
<li><tt>dup</tt> - Copy the top object on the stack.</li>
<li><tt>index</tt> - Copy the Nth from the top object on the stack.</li>
<li><tt>pop</tt> - Pop the top object on the stack.</li>
<li><tt>roll</tt> - Shift the top N objects on the stack.</li>
<li><tt>setpagedevice</tt> - Set the page header values according to the key/value dictionary on the stack.</li>
</ul>
<blockquote><b>Note:</b>
<p><em>Never</em> use the unsupported <tt>dict</tt> or <tt>put</tt>
operators in your option code. These operators are typically used in
option code dating back to Level 1 PostScript printers, which did not
support the simpler <tt><<</tt> or <tt>>></tt> operators.
If you have old option code using <tt>dict</tt> or <tt>put</tt>, you can
rewrite it very easily to use the newer <tt><<</tt> and
<tt>>></tt> operators instead. For example, the following code
to set the page size:</p>
<style type='text/css'><!--
PRE B {
background: #000000;
color: #ffffff;
padding: 2px 5px;
}
--></style>
<pre class='command'>
<b>1 dict dup</b> /PageSize [612 792] <b>put</b> setpagedevice
</pre>
<p>can be rewritten as:</p>
<pre class='command'>
<b><<</b> /PageSize [612 792] <b>>></b> setpagedevice
</pre>
</blockquote>
<h3 class="title">Supported Page Device Attributes</h3>
<p>Table 2 shows the supported page device attributes along with PostScript code examples.</p>
<div class='table'>
<table summary='Supported Page Device Attributes'>
<caption>Table 2: <a name='TABLE_2'>Supported Page Device Attributes</a></caption>
<thead>
<tr>
<th>Name(s)</th>
<th>Type</th>
<th>Description</th>
<th>Example(s)</th>
</tr>
</thead>
<tbody>
<tr valign='top'>
<td><tt>AdvanceDistance</tt></td>
<td>Integer</td>
<td>Specifies the number of points to advance roll media after printing.</td>
<td><tt><</AdvanceDistance 18>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>AdvanceMedia</tt></td>
<td>Integer</td>
<td>Specifies when to advance the media: 0 = never, 1 = after the file, 2 = after the job, 3 = after the set, and 4 = after the page.</td>
<td><tt><</AdvanceMedia 4>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>Collate</tt></td>
<td>Boolean</td>
<td>Specifies whether collated copies are required.</td>
<td><tt><</Collate true>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>CutMedia</tt></td>
<td>Integer</td>
<td>Specifies when to cut the media: 0 = never, 1 = after the file, 2 = after the job, 3 = after the set, and 4 = after the page.</td>
<td><tt><</CutMedia 1>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>Duplex</tt></td>
<td>Boolean</td>
<td>Specifies whether 2-sided printing is required.</td>
<td><tt><</Duplex true>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>HWResolution</tt></td>
<td>Integer Array</td>
<td>Specifies the resolution of the page image in pixels per inch.</td>
<td><tt><</HWResolution[1200 1200]>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>InsertSheet</tt></td>
<td>Boolean</td>
<td>Specifies whether to insert a blank sheet before the job.</td>
<td><tt><</InsertSheet true>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>Jog</tt></td>
<td>Integer</td>
<td>Specifies when to shift the media in the output bin: 0 = never, 1 = after the file, 2 = after the job, 3 = after the set, and 4 = after the page.</td>
<td><tt><</Jog 2>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>LeadingEdge</tt></td>
<td>Integer</td>
<td>Specifies the leading edge of the media: 0 = top, 1 = right, 2 = bottom, 3 = left.</td>
<td><tt><</LeadingEdge 0>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>ManualFeed</tt></td>
<td>Boolean</td>
<td>Specifies whether media should be drawn from the manual feed tray. Note: The <tt>MediaPosition</tt> attribute is preferred over the <tt>ManualFeed</tt> attribute.</td>
<td><tt><</ManualFeed true>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>MediaClass</tt></td>
<td>String</td>
<td>Specifies a named media.</td>
<td><tt><</MediaClass (Invoices)>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>MediaColor</tt></td>
<td>String</td>
<td>Specifies the color of the media.</td>
<td><tt><</MediaColor >>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>MediaPosition</tt></td>
<td>Integer</td>
<td>Specifies the tray or source of the media.</td>
<td><tt><</MediaPosition 12>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>MediaType</tt></td>
<td>String</td>
<td>Specifies the general media type.</td>
<td><tt><</MediaType (Glossy)>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>MediaWeight</tt></td>
<td>Integer</td>
<td>Specifies the media weight in grams per meter<sup>2</sup>.</td>
<td><tt><</MediaWeight 100>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>MirrorPrint</tt></td>
<td>Boolean</td>
<td>Specifies whether to flip the output image horizontally.</td>
<td><tt><</MirrorPrint true>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>NegativePrint</tt></td>
<td>Boolean</td>
<td>Specifies whether to invert the output image.</td>
<td><tt><</NegativePrint true>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>NumCopies</tt></td>
<td>Integer</td>
<td>Specifies the number of copies to produce of each page.</td>
<td><tt><</NumCopies 100>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>Orientation</tt></td>
<td>Integer</td>
<td>Specifies the orientation of the output: 0 = portrait, 1 = landscape rotated counter-clockwise, 2 = upside-down, 3 = landscape rotated clockwise.</td>
<td><tt><</Orientation 3>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>OutputFaceUp</tt></td>
<td>Boolean</td>
<td>Specifies whether to place the media face-up in the output bin/tray.</td>
<td><tt><</OutputFaceUp true>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>OutputType</tt></td>
<td>String</td>
<td>Specifies the output type name.</td>
<td><tt><</OutputType (Photo)>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>PageSize</tt></td>
<td>Integer/Real Array</td>
<td>Specifies the width and length/height of the page in points.</td>
<td><tt><</PageSize[595 842]>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>Separations</tt></td>
<td>Boolean</td>
<td>Specifies whether to produce color separations.</td>
<td><tt><</Separations true>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>TraySwitch</tt></td>
<td>Boolean</td>
<td>Specifies whether to switch trays automatically.</td>
<td><tt><</TraySwitch true>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>Tumble</tt></td>
<td>Boolean</td>
<td>Specifies whether the back sides of pages are rotated 180 degrees.</td>
<td><tt><</Tumble true>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsBorderlessScalingFactor</tt></td>
<td>Real</td>
<td>Specifies the amount to scale the page image dimensions.</td>
<td><tt><</cupsBorderlessScalingFactor 1.01>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsColorOrder</tt></td>
<td>Integer</td>
<td>Specifies the order of colors: 0 = chunked, 1 = banded, 2 = planar.</td>
<td><tt><</cupsColorOrder 0>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsColorSpace</tt></td>
<td>Integer</td>
<td>Specifies the page image colorspace: 0 = W, 1 = RGB, 2 = RGBA, 3 = K, 4 = CMY, 5 = YMC, 6 = CMYK, 7 = YMCK, 8 = KCMY, 9 = KCMYcm, 10 = GMCK, 11 = GMCS, 12 = White, 13 = Gold, 14 = Silver, 15 = CIE XYZ, 16 = CIE Lab, 17 = RGBW, 32 to 46 = CIE Lab (1 to 15 inks)</td>
<td><tt><</cupsColorSpace 1 >>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsCompression</tt></td>
<td>Integer</td>
<td>Specifies a driver compression type/mode.</td>
<td><tt><</cupsCompression 2>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsInteger0<br>
...<br>
cupsInteger15</tt></td>
<td>Integer</td>
<td>Specifies driver integer values.</td>
<td><tt><</cupsInteger11 1234>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsMarkerType</tt></td>
<td>String</td>
<td>Specifies the type of ink/toner to use.</td>
<td><tt><</cupsMarkerType (Black+Color)>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsMediaType</tt></td>
<td>Integer</td>
<td>Specifies a numeric media type.</td>
<td><tt><</cupsMediaType 999>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsPageSizeName</tt></td>
<td>String</td>
<td>Specifies the name of the page size.</td>
<td><tt><</cupsPageSizeName (A4.Full)>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsPreferredBitsPerColor</tt></td>
<td>Integer</td>
<td>Specifies the preferred number of bits per color, typically 8 or 16.</td>
<td><tt><</cupsPreferredBitsPerColor 16>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsReal0<br>
...<br>
cupsReal15</tt></td>
<td>Real</td>
<td>Specifies driver real number values.</td>
<td><tt><</cupsReal15 1.234>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsRenderingIntent</tt></td>
<td>String</td>
<td>Specifies the color rendering intent.</td>
<td><tt><</cupsRenderingIntent (AbsoluteColorimetric)>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsRowCount</tt></td>
<td>Integer</td>
<td>Specifies the number of rows of raster data to print on each line for some drivers.</td>
<td><tt><</cupsRowCount 24>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsRowFeed</tt></td>
<td>Integer</td>
<td>Specifies the number of rows to feed between passes for some drivers.</td>
<td><tt><</cupsRowFeed 17>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsRowStep</tt></td>
<td>Integer</td>
<td>Specifies the number of lines between columns/rows on the print head for some drivers.</td>
<td><tt><</cupsRowStep 2>>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsString0<br>
...<br>
cupsString15</tt></td>
<td>String</td>
<td>Specifies driver string values.</td>
<td><tt><</cupsString0(String Value)>>setpagedevice</tt></td>
</tr>
</tbody>
</table></div>
<h2 class='title'><a name='MEDIA'>Media Keywords</a></h2>
<p>The CUPS media keywords allow drivers to specify alternate custom page
size limits based on up to two options.</p>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier2'>cupsMediaQualifier2</a></h3>
<p class='summary'>*cupsMediaQualifier2: MainKeyword</p>
<p>This keyword specifies the second option to use for overriding the
custom page size limits.</p>
<p>Example:</p>
<pre class='command'>
<em>*% Specify alternate custom page size limits based on InputSlot and Quality</em>
*cupsMediaQualifier2: InputSlot
*cupsMediaQualifier3: Quality
*cupsMaxSize .Manual.: "1000 1000"
*cupsMinSize .Manual.: "100 100"
*cupsMinSize .Manual.Photo: "200 200"
*cupsMinSize ..Photo: "300 300"
</pre>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier3'>cupsMediaQualifier3</a></h3>
<p class='summary'>*cupsMediaQualifier3: MainKeyword</p>
<p>This keyword specifies the third option to use for overriding the
custom page size limits.</p>
<p>Example:</p>
<pre class='command'>
<em>*% Specify alternate custom page size limits based on InputSlot and Quality</em>
*cupsMediaQualifier2: InputSlot
*cupsMediaQualifier3: Quality
*cupsMaxSize .Manual.: "1000 1000"
*cupsMinSize .Manual.: "100 100"
*cupsMinSize .Manual.Photo: "200 200"
*cupsMinSize ..Photo: "300 300"
</pre>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMinSize'>cupsMinSize</a></h3>
<p class='summary'>*cupsMinSize .Qualifier2.Qualifier3: "width length"<br>
*cupsMinSize .Qualifier2.: "width length"<br>
*cupsMinSize ..Qualifier3: "width length"</p>
<p>This keyword specifies alternate minimum custom page sizes in points.
The <a href='#cupsMediaQualifier2'><tt>cupsMediaQualifier2</tt></a> and
<a href='#cupsMediaQualifier3'><tt>cupsMediaQualifier3</tt></a> keywords
are used to identify options to use for matching.</p>
<p>Example:</p>
<pre class='command'>
<em>*% Specify alternate custom page size limits based on InputSlot and Quality</em>
*cupsMediaQualifier2: InputSlot
*cupsMediaQualifier3: Quality
*cupsMaxSize .Manual.: "1000 1000"
*cupsMinSize .Manual.: "100 100"
*cupsMinSize .Manual.Photo: "200 200"
*cupsMinSize ..Photo: "300 300"
</pre>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMaxSize'>cupsMaxSize</a></h3>
<p class='summary'>*cupsMaxSize .Qualifier2.Qualifier3: "width length"<br>
*cupsMaxSize .Qualifier2.: "width length"<br>
*cupsMaxSize ..Qualifier3: "width length"</p>
<p>This keyword specifies alternate maximum custom page sizes in points.
The <a href='#cupsMediaQualifier2'><tt>cupsMediaQualifier2</tt></a> and
<a href='#cupsMediaQualifier3'><tt>cupsMediaQualifier3</tt></a> keywords
are used to identify options to use for matching.</p>
<p>Example:</p>
<pre class='command'>
<em>*% Specify alternate custom page size limits based on InputSlot and Quality</em>
*cupsMediaQualifier2: InputSlot
*cupsMediaQualifier3: Quality
*cupsMaxSize .Manual.: "1000 1000"
*cupsMinSize .Manual.: "100 100"
*cupsMinSize .Manual.Photo: "200 200"
*cupsMinSize ..Photo: "300 300"
</pre>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsPageSizeCategory'>cupsPageSizeCategory</a></h3>
<p class="summary">*cupsPageSizeCategory name/text: "name name2 ... nameN"</p>
<p>This keyword lists related paper size names that should be grouped together in the Print or Page Setup dialogs. The "name" portion of the keyword specifies the root/default size for the grouping. On macOS the grouped paper sizes are shown in a submenu of the main paper size. When omitted, sizes with the same dimensions are automatically grouped together, for example "Letter" and "Letter.Borderless".</p>
<p>Example:</p>
<pre class="command">
<em>*% Specify grouping of borderless/non-borderless sizes</em>
*cupsPageSizeCategory Letter/US Letter: "Letter Letter.Borderless"
*cupsPageSizeCategory A4/A4: "A4 A4.Borderless"
</pre>
<h2 class='title'><a name='ATTRIBUTES'>General Attributes</a></h2>
<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsBackSide'>cupsBackSide</a></h3>
<p class='summary'>*cupsBackSide: keyword</p>
<p>This keyword requests special handling of the back side of pages
when doing duplexed (2-sided) output. <a href='#TABLE_1'>Table 1</a>
shows the supported keyword values for this keyword and their effect
on the raster data sent to your driver. For example, when <tt>cupsBackSide</tt>
is <code>Rotated</code> and <tt>Tumble</tt> is <tt>false</tt>, your driver
will receive print data starting at the bottom right corner of the page, with