]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - doc/help/ref-ppdcfile.html
Update all references to OS X to macOS.
[thirdparty/cups.git] / doc / help / ref-ppdcfile.html
index 86619e3efd26170d95579807ad0b014048ed672f..6c84abd9adea18ad96d9d362be7175e8a91aebe0 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>PPD Compiler Driver Information File Reference</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">PPD Compiler Driver Information File Reference</H1>
+
 <p>The CUPS PPD compiler reads meta files that contain descriptions
 of one or more PPD files to be generated by
 <a href="man-ppdc.html">ppdc(1)</a> or the corresponding driver interface
@@ -28,7 +31,7 @@ mechanisms.</p>
 
        <dd>Evaluates to the specified integer; the number can be preceded by
        a leading sign (+/-) followed by a decimal number (1234), octal number
-       (01234), or hexidecimal number (0x1234) using the same rules as C and
+       (01234), or hexadecimal number (0x1234) using the same rules as C and
        C++.</dd>
 
        <dt>(NAME NAME ... number number ...)</dt>
@@ -68,7 +71,7 @@ mechanisms.</p>
 </dl>
 
 <p>Printer driver information can be grouped and shared using
-curley braces ({ ... }); PPD files are written when a close
+curly braces ({ ... }); PPD files are written when a close
 brace or end-of-file is seen and a <a href="#PCFileName">PCFileName</a>
 directive has been defined.</p>
 
@@ -95,6 +98,34 @@ which can be later referenced using <code>$name</code>. The name is
 case-insensitive and can be any sequence of letters, numbers,
 and the underscore. The value can be any valid expression.</p>
 
+<h3>Predefined Names</h3>
+
+<p>The following <code>#define</code> names are set by the PPD compiler:</p>
+
+<ul>
+
+       <li><code>CUPS_VERSION</code> - The full CUPS version string, e.g.
+       "1.4.0"</li>
+
+       <li><code>CUPS_VERSION_MAJOR</code> - The major version number, e.g.
+       "1"</li>
+
+       <li><code>CUPS_VERSION_MINOR</code> - The minor version number, e.g.
+       "4"</li>
+
+       <li><code>CUPS_VERSION_PATCH</code> - The patch version number, e.g.
+       "0"</li>
+
+       <li><code>PLATFORM_NAME</code> - The operating system name used by the
+       current system as reported by "uname" ("Windows" on Microsoft
+       Windows)</li>
+
+       <li><code>PLATFORM_ARCH</code> - The processor architecture used by the
+       current system as reported by "uname -m" ("X86" or "X64" on Microsoft
+       Windows)</li>
+
+</ul>
+
 <h3>See Also</h3>
 
 <p><a href='#_include'><code>#include</code></a></p>
@@ -117,7 +148,7 @@ and the underscore. The value can be any valid expression.</p>
 ...
 #else
 ...
-#endif 
+#endif
 </pre>
 
 <h3>Description</h3>
@@ -150,7 +181,7 @@ corresponding <a href="#_if"><code>#if</code></a> directive.</p>
 ...
 #else
 ...
-#endif 
+#endif
 </pre>
 
 <h3>Description</h3>
@@ -184,7 +215,7 @@ expressions are non-zero.</p>
 ...
 #else
 ...
-#endif 
+#endif
 </pre>
 
 <h3>Description</h3>
@@ -271,7 +302,7 @@ defining the standard raster fonts in the
 ...
 #else
 ...
-#endif 
+#endif
 </pre>
 
 <h3>Description</h3>
@@ -349,10 +380,10 @@ least 100 files.</p>
 inclusion in a driver. The name with optional user text defines
 the name for the media size and is used with the <a
 href='#MediaSize'><code>MediaSize</code></a> directive to associate
-the media size with the driver. The name may only contain
-letters, numbers, and the underscore and may not exceed 40
-characters in length. The user text, if supplied, may not exceed
-80 characters in length.</p>
+the media size with the driver. The name may contain up to 40 ASCII
+characters within the range of decimal 33 to decimal 126 inclusive,
+except for the characters comma (44), slash (47) and colon (58).
+The user text, if supplied, may not exceed 80 bytes in length.</p>
 
 <p>The width and length define the dimensions of the media. Each
 number is optionally followed by one of the following unit
@@ -374,7 +405,7 @@ suffixes:</p>
 
 </ul>
 
-<p>Points are assumed if no units are specified. 
+<p>Points are assumed if no units are specified.
 
 <h3>See Also</h3>
 
@@ -403,7 +434,7 @@ suffixes:</p>
 <p>The <code>#po</code> directive defines a message catalog to use for the
 given POSIX language abbreviation. Multiple <code>#po</code> directives can be
 specified to list multiple catalogs. The filename can be an absolute path or
-relative to the driver information file. GNU gettext and Mac OS X .strings
+relative to the driver information file. GNU gettext and macOS .strings
 files are supported.</p>
 
 
@@ -428,17 +459,15 @@ Attribute fooProfile "Photo/Photographic Profile" "photopro.icc"
 <h3>Description</h3>
 
 <p>The <code>Attribute</code> directive creates a PPD attribute. The
-name is any combination of letters, numbers, and the underscore
-and can be up to 40 characters in length.</p>
+name may contain up to 40 ASCII characters within the range of decimal
+33 to decimal 126 inclusive, except for the characters comma (44),
+slash (47) and colon (58).</p>
 
-<p>The selector can be the empty string (<code>""</code>), a keyword
-consisting of up to 40 letters, numbers, and the underscore, or
-a string composed of a keyword and user text of up to 80
-characters.</p>
+<p>The selector can be the empty string (<code>""</code>) or text of up
+to 80 bytes.</p>
 
-<p>The value is any string or number; the string may contain
-multiple lines, however no one line may exceed 255
-characters.</p>
+<p>The value is any string or number; the string may contain multiple
+lines, however no one line may exceed 255 bytes.</p>
 
 <h3>See Also</h3>
 
@@ -464,14 +493,15 @@ Choice "False/No" "&lt;&lt;/cupsCompression 0&gt;&gt;setpagedevice"
 <h3>Description</h3>
 
 <p>The <code>Choice</code> directive adds a single choice to the
-current option. The name is any combination of letters, numbers,
-and the underscore and can be up to 40 characters in length.</p>
+current option. The name may contain up to 40 ASCII characters within
+the range of decimal 33 to decimal 126 inclusive, except for the
+characters comma (44), slash (47) and colon (58).</p>
 
-<p>If provided, the text can be any string up to 80 characters
+<p>If provided, the text can be any string up to 80 bytes
 in length. If no text is provided, the name is used.</p>
 
 <p>The code is any string and may contain multiple lines,
-however no one line may exceed 255 characters.</p>
+however no one line may exceed 255 bytes.</p>
 
 <h3>See Also</h3>
 
@@ -537,11 +567,12 @@ ColorModel CMYK cmyk chunky 0
 
 <p>The <code>ColorModel</code> directive is a convenience directive
 which creates a ColorModel option and choice for the current
-printer driver. The name is any combination of letters, numbers,
-and the underscore and can be up to 40 characters in length.</p>
+printer driver. The name may contain up to 40 ASCII characters within
+the range of decimal 33 to decimal 126 inclusive, except for the
+characters comma (44), slash (47) and colon (58).</p>
 
-<p>If provided, the text can be any string up to 80 characters
-in length. If no text is provided, the name is used.</p>
+<p>If provided, the text can be any string up to 80 bytes in length.
+If no text is provided, the name is used.</p>
 
 <p>The colorspace argument is one of the standard colorspace
 keywords defined later in this appendix in the section titled,
@@ -667,7 +698,7 @@ MA 02111 USA"
 <p>The <code>Copyright</code> directive adds text comments to the
 top of a PPD file, typically for use in copyright notices. The
 text argument can contain multiple lines of text, but no line
-may exceed 255 characters.</p>
+may exceed 255 bytes.</p>
 
 
 <h2 class="title"><a name='CustomMedia'>CustomMedia</a></h2>
@@ -699,11 +730,12 @@ CustomMedia "A4/A4 - 210x297mm" 210mm 297mm 12 12 12 12
 <h3>Description</h3>
 
 <p>The <code>CustomMedia</code> directive adds a custom media size to
-the driver. The name is any combination of letters, numbers,
-and the underscore and can be up to 40 characters in length.</p>
+the driver. The name may contain up to 40 ASCII characters within the
+range of decimal 33 to decimal 126 inclusive, except for the characters
+comma (44), slash (47) and colon (58).</p>
 
-<p>If provided, the text can be any string up to 80 characters
-in length. If no text is provided, the name is used.</p>
+<p>If provided, the text can be any string up to 80 bytes in length.
+If no text is provided, the name is used.</p>
 
 <p>The width and length arguments specify the dimensions of the
 media as defined for the <a href="#_media"><code>#media</code></a>
@@ -716,7 +748,7 @@ printable margins of the media.</p>
 PostScript commands to run for the <code>PageSize</code> and
 <code>PageRegion</code> options, respectively. The commands can
 contain multiple lines, however no line may be more than 255
-characters in length.</p>
+bytes in length.</p>
 
 <h3>See Also</h3>
 
@@ -792,11 +824,12 @@ therefore the darkness of the print.</p>
 the Dymo driver from 0 (lowest) to 3 (highest), with 2
 representing the normal setting.</p>
 
-<p>The name is any combination of letters, numbers, and the
-underscore and can be up to 40 characters in length.</p>
+<p>The name may contain up to 40 ASCII characters within the range of
+decimal 33 to decimal 126 inclusive, except for the characters comma
+(44), slash (47) and colon (58).</p>
 
-<p>If provided, the text can be any string up to 80 characters
-in length. If no text is provided, the name is used.</p>
+<p>If provided, the text can be any string up to 80 bytes in length.
+If no text is provided, the name is used.</p>
 
 <h3>See Also</h3>
 
@@ -1013,14 +1046,15 @@ Finishing "Glossy/Photo Overcoat"
 <h3>Description</h3>
 
 <p>The <code>Finishing</code> directive adds a choice to the
-<code>cupsFinishing</code> option. The name is any combination of
-letters, numbers, and the underscore and can be up to 40
-characters in length. The name is stored in the
-<code>OutputType</code> attribute in the PostScript page device
-dictionary.</p>
+<code>cupsFinishing</code> option. The name may contain up to 40 ASCII
+characters within the range of decimal 33 to decimal 126 inclusive,
+except for the characters comma (44), slash (47) and colon (58).</p>
 
-<p>If provided, the text can be any string up to 80 characters
-in length. If no text is provided, the name is used.</p>
+<p>If provided, the text can be any string up to 80 bytes in length.
+If no text is provided, the name is used.</p>
+
+<p>The name is stored in the <code>OutputType</code> attribute in the
+PostScript page device dictionary.</p>
 
 <h3>See Also</h3>
 
@@ -1060,8 +1094,7 @@ Font Unicode-Foo Expert "(2.0)" Adobe-Identity ROM
 <h3>Description</h3>
 
 <p>The <code>Font</code> directive defines a "device font" for the
-current printer driver. The name is the PostScript font
-name.</p>
+current printer driver. The name is the PostScript font name.</p>
 
 <p>The encoding is the default encoding of the font, usually
 <code>Standard</code>, <code>Expert</code>, or <code>Special</code>, as
@@ -1078,7 +1111,7 @@ Adobe PPD file specification.</p>
 either the word <code>ROM</code> or <code>Disk</code>.</p>
 
 <p>Device fonts differ from fonts defined using the <a
-href='#_font'><code>#font</code></a> directive in that they are 
+href='#_font'><code>#font</code></a> directive in that they are
 automatically associated with the current driver. Fonts defined
 using <code>#font</code> may be imported into the current driver
 using the <code>Font *</code> form of this directive.</p>
@@ -1108,14 +1141,16 @@ Group "Special/Vendor Options"
 <h3>Description</h3>
 
 <p>The <code>Group</code> directive specifies the group for new
-<code>Option</code> directives. The name is any combination of
-letters, numbers, and the underscore and can be up to 40
-characters in length. The names <code>General</code> and
-<code>InstallableOptions</code> are predefined for the standard
-Adobe UI keywords and for installable options, respectively.</p>
+<code>Option</code> directives. The name may contain up to 40 ASCII
+characters within the range of decimal 33 to decimal 126 inclusive,
+except for the characters comma (44), slash (47) and colon (58).</p>
 
-<p>If provided, the text can be any string up to 40 characters
-in length. If no text is provided, the name is used.</p>
+<p>If provided, the text can be any string up to 40 bytes in length.
+If no text is provided, the name is used.</p>
+
+<p>The names <code>General</code> and <code>InstallableOptions</code>
+are predefined for the standard Adobe UI keywords and for installable
+options, respectively.</p>
 
 <center><table width='80%' border='1' bgcolor='#cccccc' cellpadding='5' cellspacing='0'>
 <tr>
@@ -1123,8 +1158,8 @@ in length. If no text is provided, the name is used.</p>
 
        <p>Because of certain API binary compatibility issues,
        CUPS limits the length of PPD group translation strings
-       (text) to 40 characters, while the PPD specification
-       allows for up to 80 characters.</p>
+       (text) to 40 bytes, while the PPD specification
+       allows for up to 80 bytes.</p>
 
        </td>
 </tr>
@@ -1198,11 +1233,12 @@ from 0 to 2<sup>32</sup>-1 specifying the value that is placed
 in the <code>MediaPosition</code> attribute in the PostScript page
 device dictionary.</p>
 
-<p>The name is any combination of letters, numbers, and the
-underscore and can be up to 40 characters in length.</p>
+<p>The name may contain up to 40 ASCII characters within the range of
+decimal 33 to decimal 126 inclusive, except for the characters comma
+(44), slash (47) and colon (58).</p>
 
-<p>If provided, the text can be any string up to 80 characters
-in length. If no text is provided, the name is used.</p>
+<p>If provided, the text can be any string up to 80 bytes in length.
+If no text is provided, the name is used.</p>
 
 <h3>See Also</h3>
 
@@ -1240,11 +1276,12 @@ Installable "Option1/Duplexer Installed"
 
 <p>The <code>Installable</code> directive adds a new boolean option
 to the <code>InstallableOptions</code> group with a default value of
-<code>False</code>. The name is any combination of letters, numbers,
-and the underscore and can be up to 40 characters in length.</p>
+<code>False</code>. The name may contain up to 40 ASCII characters
+within the range of decimal 33 to decimal 126 inclusive, except for
+the characters comma (44), slash (47) and colon (58).</p>
 
-<p>If provided, the text can be any string up to 80 characters
-in length. If no text is provided, the name is used.</p>
+<p>If provided, the text can be any string up to 80 bytes in length.
+If no text is provided, the name is used.</p>
 
 
 <h2 class="title"><a name='LocAttribute'>LocAttribute</a></h2>
@@ -1264,17 +1301,15 @@ LocAttribute fooProfile "Photo/Photographic Profile" "photopro.icc"
 <h3>Description</h3>
 
 <p>The <code>LocAttribute</code> directive creates a localized PPD
-attribute. The name is any combination of letters, numbers, and the
-underscore and can be up to 40 characters in length.</p>
+attribute. The name may contain up to 40 ASCII characters within the
+range of decimal 33 to decimal 126 inclusive, except for the characters
+comma (44), slash (47) and colon (58).</p>
 
-<p>The selector can be the empty string (<code>""</code>), a keyword
-consisting of up to 40 letters, numbers, and the underscore, or
-a string composed of a keyword and user text of up to 80
-characters.</p>
+<p>The selector can be the empty string (<code>""</code>) or text of up
+to 80 bytes.</p>
 
-<p>The value is any string or number; the string may contain
-multiple lines, however no one line may exceed 255
-characters.</p>
+<p>The value is any string or number; the string may contain multiple
+lines, however no one line may exceed 255 bytes.</p>
 
 <h3>See Also</h3>
 
@@ -1427,13 +1462,15 @@ from 0 to 2<sup>32</sup>-1 specifying the value that is placed
 in the <code>cupsMediaType</code> attribute in the PostScript page
 device dictionary.</p>
 
-<p>The name is any combination of letters, numbers, and the
-underscore and can be up to 40 characters in length. The name is
-placed in the <code>MediaType</code> attribute in the PostScript
-page device dictionary.</p>
+<p>The name may contain up to 40 ASCII characters within the range of
+decimal 33 to decimal 126 inclusive, except for the characters comma
+(44), slash (47) and colon (58).</p>
 
-<p>If provided, the text can be any string up to 80 characters
-in length. If no text is provided, the name is used.</p>
+<p>If provided, the text can be any string up to 80 bytes in length.
+If no text is provided, the name is used.</p>
+
+<p>The name is placed in the <code>MediaType</code> attribute in the
+PostScript page device dictionary.</p>
 
 <h3>See Also</h3>
 
@@ -1501,7 +1538,7 @@ name is any string of letters, numbers, spaces, and the
 characters ".", "/", "-", and "+" and should not begin with the
 manufacturer name since the PPD compiler will add this
 automatically for you. The maximum length of the name string is
-31 characters to conform to the Adobe limits on the length of
+31 bytes to conform to the Adobe limits on the length of
 <code>ShortNickName</code>.</p>
 
 <h3>See Also</h3>
@@ -1560,18 +1597,19 @@ Option <i>"name/text" type section order</i>
 
 <pre>
 Option Punch Boolean AnySetup 10
-Option "fooFinish/Finishing Option" PickOne DocumentSetup 10 
+Option "fooFinish/Finishing Option" PickOne DocumentSetup 10
 </pre>
 
 <h3>Description</h3>
 
 <p>The <code>Option</code> directive creates a new option in the
 current group, by default the <code>General</code> group. The name
-is any combination of letters, numbers, and the underscore and
-can be up to 40 characters in length.</p>
+may contain up to 40 ASCII characters within the range of decimal 33
+to decimal 126 inclusive, except for the characters comma (44), slash
+(47) and colon (58).</p>
 
-<p>If provided, the text can be any string up to 80 characters
-in length. If no text is provided, the name is used.</p>
+<p>If provided, the text can be any string up to 80 bytes in length.
+If no text is provided, the name is used.</p>
 
 <p>The type argument is one of the following keywords:</p>
 
@@ -1718,8 +1756,8 @@ for asymmetric resolutions. The <code>HHH</code> and <code>VVV</code> in
 the examples represent the horizontal and vertical resolutions
 which must be positive integer values.</p>
 
-<p>If provided, the text can be any string up to 80 characters
-in length. If no text is provided, the name is used.</p>
+<p>If provided, the text can be any string up to 80 bytes in length.
+If no text is provided, the name is used.</p>
 
 <h3>See Also</h3>
 
@@ -1760,8 +1798,7 @@ SimpleColorProfile 720dpi/Glossy 100 90 120 1.5 -5 5 10
 <h3>Description</h3>
 
 <p>The <code>SimpleColorProfile</code> directive creates a
-matrix-based <a href="#ColorProfile"><code>ColorProfile</code></a>
-using values chosen with the <code>cupsprofile(1)</code> utility. 
+matrix-based <a href="#ColorProfile"><code>ColorProfile</code></a>.
 The resolution and mediatype arguments specify the
 <code>Resolution</code> and <code>MediaType</code> choices which use the
 profile; the hyphen (<code>-</code>) is used to specify that any
@@ -1822,7 +1859,7 @@ Throughput 10
 
 <h3>Description</h3>
 
-<p>The <code>Througput</code> directive sets the <code>Troughput</code>
+<p>The <code>Throughput</code> directive sets the <code>Throughput</code>
 attribute for the current printer driver. The pages-per-minute
 argument is a positive integer representing the peak number of
 pages per minute that the printer is capable of producing. Use a
@@ -2377,8 +2414,8 @@ supported keywords for each type.</p>
 
        <BR>&nbsp;
 
-       <BR><A NAME="REF_COLOR_APPLE">*</A> = This colorspace is not supported on Mac OS X prior to 10.4.
-       <BR><A NAME="REF_COLOR_APPLE2">**</A> = This colorspace is not supported on Mac OS X.</LI>
+       <BR><A NAME="REF_COLOR_APPLE">*</A> = This colorspace is not supported on macOS prior to 10.4.
+       <BR><A NAME="REF_COLOR_APPLE2">**</A> = This colorspace is not supported on macOS.</LI>
 
 </UL>
 
@@ -2404,7 +2441,7 @@ supported keywords for each type.</p>
        <BR><A NAME="REF_COLOR_APPLE2">*</A> = This color order
        is not supported by the current Apple RIP filters and
        should not be used when developing printer drivers for
-       MacOS X 10.2 or 10.3.</LI>
+       macOS.</LI>
 
 </UL>