summaryrefslogtreecommitdiff
path: root/doc/help/spec-ppd.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/help/spec-ppd.html')
-rw-r--r--doc/help/spec-ppd.html131
1 files changed, 124 insertions, 7 deletions
diff --git a/doc/help/spec-ppd.html b/doc/help/spec-ppd.html
index 46ef77506..fc448e0ab 100644
--- a/doc/help/spec-ppd.html
+++ b/doc/help/spec-ppd.html
@@ -8,7 +8,7 @@
</head>
<body>
<!--
- "$Id: spec-ppd.html 6534 2007-05-16 17:51:03Z mike $"
+ "$Id: spec-ppd.html 6602 2007-06-22 22:13:13Z mike $"
CUPS PPD extensions specification for the Common UNIX Printing System (CUPS).
@@ -109,6 +109,30 @@ default is <tt>true</tt> when <tt>cupsFlipDuplex</tt> is <tt>true</tt> and <tt>
<p>Also see the related <tt>cupsFlipDuplex</tt> attribute.</p>
+<h3>APPrinterPreset</h3>
+
+<p class='summary'>*APPrinterPreset name/text: "*Option Choice ..."</p>
+
+<p>This attribute defines presets for multiple options that show up
+in the print dialog on Mac OS X. Each preset maps to one or more
+pairs of PPD options and choices.</p>
+
+<p>Examples:</p>
+
+<pre class='command'>
+*APPrinterPreset Text/Text Printing on Plain Paper: "
+ *MediaType Plain
+ *ColorModel Gray
+ *Resolution 600dpi"
+*End
+
+*APPrinterPreset Photo/Photo Printing on Glossy Paper: "
+ *MediaType Glossy
+ *ColorModel RGB
+ *Resolution 300dpi"
+*End
+</pre>
+
<h3>APRemoteQueueID</h3>
<p class='summary'>*APRemoteQueueID: "string"</p>
@@ -174,9 +198,49 @@ the special filter program "-" may be specified.</p>
<p class='summary'>*cupsFlipDuplex: boolean</p>
-<p>This boolean attribute notifies the RIP filters that the
-destination printer requires an upside-down image for the back
-page. The default value is <code>false</code>.</p>
+<blockquote><b>Note:</b> The <tt>cupsFlipDuplex</tt> attribute is
+not supported on Mac OS X 10.5.x or earlier.</blockquote>
+
+<p>This boolean attribute specifies the coordinate system of the
+back side of the media when doing 2-sided printing using a CUPS
+raster driver. <a href='#TABLE_1'>Table 1</a> shows how
+<code>cupsFlipDuplex</code> interacts with the <code>Tumble</code>
+page attribute. The default value is <code>false</code>.</p>
+
+<div class='table'>
+<table width='80%' summary='Back Side Raster Coordinate System'>
+<caption>Table 1: <a name='TABLE_1'>Back Side Raster Coordinate System</a></caption>
+<thead>
+<tr>
+ <th>cupsFlipDuplex</th>
+ <th>Tumble</th>
+ <th>Image Presentation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+ <td><code>false</code></td>
+ <td><code>false</code></td>
+ <td>Left-to-right, top-to-bottom</td>
+</tr>
+<tr>
+ <td><code>false</code></td>
+ <td><code>true</code></td>
+ <td>Left-to-right, top-to-bottom</td>
+</tr>
+<tr>
+ <td><code>true</code></td>
+ <td><code>false</code></td>
+ <td>Left-to-right, bottom-to-top</td>
+</tr>
+<tr>
+ <td><code>true</code></td>
+ <td><code>true</code></td>
+ <td>Right-to-left, top-to-bottom</td>
+</tr>
+</tbody>
+</table>
+</div>
<p>Example:</p>
@@ -188,6 +252,22 @@ page. The default value is <code>false</code>.</p>
<p>Also see the related <tt>APDuplexRequiresFlippedMargins</tt>
attribute.</p>
+<h3>cupsIPPFinishings</h3>
+
+<p class='summary'>*cupsIPPFinishings number/text: "*Option Choice ..."</p>
+
+<p>This attribute defines a mapping from IPP <code>finishings</code>
+values to PPD options and choices.</p>
+
+<p>Examples:</p>
+
+<pre class='command'>
+*cupsIPPFinishings 4/staple: "*StapleLocation SinglePortrait"
+*cupsIPPFinishings 5/punch: "*PunchMedia Yes *PunchLocation LeftSide"
+*cupsIPPFinishings 20/staple-top-left: "*StapleLocation SinglePortrait"
+*cupsIPPFinishings 21/staple-bottom-left: "*StapleLocation SingleLandscape"
+</pre>
+
<h3>cupsIPPReason</h3>
<p class='summary'>*cupsIPPReason reason/Reason Text: "optional URIs"</p>
@@ -700,6 +780,19 @@ in the PPD file for a given locale.</blockquote>
<p>The resulting dictionary sets the page device attributes that are sent to your raster driver in the page header.</p>
+<h3>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 &lt;&lt;/PageSize[5 -2 roll]/ImagingBBox null&gt;&gt;setpagedevice"
+</pre>
+
<h3>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>
@@ -728,13 +821,35 @@ in the PPD file for a given locale.</blockquote>
</ul>
+<blockquote><b>Note:</b> <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>&lt;&lt;</tt> or <tt>&gt;&gt;</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>&lt;&lt;</tt> and <tt>&gt;&gt;</tt> operators instead. For example, the following code to set the page size:
+
+<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>&lt;&lt;</b> /PageSize [612 792] <b>&gt;&gt;</b> setpagedevice
+</pre>
+
+</blockquote>
+
<h3>Supported Page Device Attributes</h3>
-<p>Table 1 shows the supported page device attributes along with PostScript code examples.</p>
+<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 1: <a name='TABLE_1'>Supported Page Device Attributes</a></caption>
+<caption>Table 2: <a name='TABLE_2'>Supported Page Device Attributes</a></caption>
<thead>
<tr>
<th>Name(s)</th>
@@ -1000,7 +1115,9 @@ in the PPD file for a given locale.</blockquote>
<ul>
- <li>Added <tt>cupsPreFilter</tt> attribute.</li>
+ <li>Added <tt>APPrinterPreset</tt>, <tt>cupsIPPFinishings</tt>, and <tt>cupsPreFilter</tt> attributes.</li>
+
+ <li>Added discussion of custom option code, sample <tt>CustomPageSize</tt> code, and "do not use dict and put" note.</li>
</ul>