]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - doc/help/spec-ppd.html
Merge changes from CUPS 1.4svn-r8628.
[thirdparty/cups.git] / doc / help / spec-ppd.html
index 11ff4a4cf9f78e2bda42b84294e5934266776cf8..6753cd48edea717a8f8f215be84dbd1cff942783 100644 (file)
@@ -22,6 +22,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<H1 CLASS="title">CUPS PPD Extensions</H1>
+
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
 
 <p>This specification describes the attributes and extensions
@@ -297,9 +299,9 @@ equivalent.</p>
 <p class='summary'>*APCustomColorMatchingProfile: name</p>
 
 <p>This attribute defines a supported RGB color profile that can be used
-when doing custom color matching. Currently only <tt>sRGB</tt> and
-<tt>AdobeRGB</tt> are supported. If not specified, RGB data will use the
-Generic RGB colorspace.</p>
+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>
 
@@ -326,8 +328,8 @@ Add the named profile to the print settings using the key
 <p class='summary'>*APDefaultCustomColorMatchingProfile: name</p>
 
 <p>This attribute defines the default RGB color profile that will be used
-when doing custom color matching. Currently only <tt>sRGB</tt> and
-<tt>AdobeRGB</tt> are supported.</p>
+when doing custom color matching. Currently only <tt>sRGB</tt>,
+<tt>AdobeRGB</tt>, and <tt>GenericRGB</tt> are supported.</p>
 
 <p>Examples:</p>
 
@@ -343,7 +345,7 @@ when doing custom color matching. Currently only <tt>sRGB</tt> and
 
 <p>This attribute specifies that the driver provides its own custom color
 matching. When <tt>true</tt>, the default hand-off colorspace will be
-Generic Gray, Generic RGB, or Generic CMYK depending on the number of
+GenericGray, GenericRGB, or GenericCMYK depending on the number of
 components the driver requests. The <a
 href='#APDefaultCustomColorMatchingProfile'><tt>APDefaultCustomColorMatchingProfile</tt></a>
 attribute can be used to override the default 3-component (RGB) colorspace.</p>
@@ -380,8 +382,18 @@ have to guess how a particular constraint is best resolved.</p>
 <p>CUPS 1.4 and higher define two new attributes for constraints,
 <tt>cupsUIConstraints</tt> and <tt>cupsUIResolver</tt>. Each
 <tt>cupsUIConstraints</tt> attribute points to a <tt>cupsUIResolver</tt>
-attribute which corrects the conflict condition. The same
-<tt>cupsUIResolver</tt> can be used by multiple <tt>cupsUIConstraints</tt>.</p>
+attribute 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><span class='info'>CUPS 1.4</span><a name='cupsUIConstraints'>cupsUIConstraints</a></h3>
 
@@ -393,9 +405,8 @@ attribute which corrects the conflict condition. The same
 
 <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, a "revert to defaults"
-change is assumed - this type of constraint is typically only used for
-installable options.</p>
+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>
 
@@ -403,6 +414,15 @@ installable options.</p>
 <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"
@@ -410,18 +430,29 @@ installable options.</p>
 
 <h3><span class='info'>CUPS 1.4</span><a name='cupsUIResolver'>cupsUIResolver</a></h3>
 
-<p class='summary'>*cupsUIResolution resolver: "*Keyword OptionKeyword ..."</p>
+<p class='summary'>*cupsUIResolution resolver: "*Keyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."</p>
 
-<p>Specifies one or more options to mark/select to resolve a constraint. The
+<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.</p>
+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 option to change for the 2-sided transparency constraint</em> 
-*cupsUIResolver transparency: "*Duplex None"
+<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"