<!-- 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
<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>
</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>
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>
...
#else
...
-#endif
+#endif
</pre>
<h3>Description</h3>
...
#else
...
-#endif
+#endif
</pre>
<h3>Description</h3>
...
#else
...
-#endif
+#endif
</pre>
<h3>Description</h3>
...
#else
...
-#endif
+#endif
</pre>
<h3>Description</h3>
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
</ul>
-<p>Points are assumed if no units are specified.
+<p>Points are assumed if no units are specified.
<h3>See Also</h3>
<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>
<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>
<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>
<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,
<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>
<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>
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>
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>
<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>
<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
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>
<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>
<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>
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>
<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>
<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>
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>
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>
<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>
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>
<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
<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
<BR>
- <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>
<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>