Apple operating systems and the OpenSSL toolkit. A copy of the
exceptions and licenses follow this introduction.
-The GNU LGPL applies to the CUPS API library, located in the
-"cups" subdirectory of the CUPS source distribution and in the
-"cups" include directory and library files in the binary
-distributions. The GNU GPL applies to the remainder of the CUPS
-distribution, including the "pdftops" filter which is based upon
-Xpdf and the CUPS imaging library.
+The GNU LGPL applies to the CUPS and CUPS Imaging libraries
+located in the "cups" and "filter" subdirectories of the CUPS
+source distribution and in the "cups" include directory and
+library files in the binary distributions. The GNU GPL applies to
+the remainder of the CUPS distribution, including the "pdftops"
+filter which is based upon Xpdf.
For those not familiar with the GNU GPL, the license basically
allows you to:
binary form.
- Sell verbatim copies of the software for a media fee, or
sell support for the software.
- - Distribute or sell printer drivers and filters that use
- CUPS so long as source code is made available under the
- GPL.
What this license *does not* allow you to do is make changes or
add features to CUPS and then sell a binary distribution without
-source code. You must provide source for any new drivers,
-changes, or additions to the software, and all code must be
-provided under the GPL or LGPL as appropriate. The only
-exceptions to this are the portions of the CUPS software covered
-by the Apple operating system license exceptions outlined later
-in this license agreement.
+source code. You must provide source for any changes or additions
+to the software, and all code must be provided under the GPL or
+LGPL as appropriate. The only exceptions to this are the portions
+of the CUPS software covered by the Apple operating system
+license exceptions outlined later in this license agreement.
The GNU LGPL relaxes the "link-to" restriction, allowing you to
-develop applications that use the CUPS API library under other
-licenses and/or conditions as appropriate for your application.
+develop applications that use the CUPS and CUPS Imaging libraries
+under other licenses and/or conditions as appropriate for your
+application, driver, or filter.
LICENSE EXCEPTIONS
Easy Software Products also sells rights to the CUPS source code
under a binary distribution license for vendors that are unable
-to release source code for their drivers, additions, and
-modifications to CUPS under the GNU GPL and LGPL. For
-information please contact us at the address shown above.
+to release source code for their additions and modifications to
+CUPS under the GNU GPL and LGPL. For information please contact
+us at the address shown above.
The Common UNIX Printing System provides a "pdftops" filter that
is based on the Xpdf software. For binary distribution licensing
<h2 class='title'>Licensing</h2>
<p>The CUPS raster API is provided under the terms of the GNU
-General Public License, with exceptions for MacOS X-based
+Library General Public License, with exceptions for MacOS X-based
programs. Please see the CUPS license agreement for more
information.</p>
<h2 class='title'>Contents</h2>
<!-- NEW PAGE -->
<h2 class='title'><a name='ENUMERATIONS'>Enumerations</a></h2>
<ul>
+ <li><a href='#cups_adv_e'><tt>cups_adv_e</tt></a> </li>
<li><a href='#cups_bool_e'><tt>cups_bool_e</tt></a> </li>
+ <li><a href='#cups_cspace_e'><tt>cups_cspace_e</tt></a> </li>
+ <li><a href='#cups_cut_e'><tt>cups_cut_e</tt></a> </li>
+ <li><a href='#cups_edge_e'><tt>cups_edge_e</tt></a> </li>
+ <li><a href='#cups_jog_e'><tt>cups_jog_e</tt></a> </li>
<li><a href='#cups_mode_e'><tt>cups_mode_e</tt></a> </li>
+ <li><a href='#cups_order_e'><tt>cups_order_e</tt></a> </li>
+ <li><a href='#cups_orient_e'><tt>cups_orient_e</tt></a> </li>
</ul>
<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_adv_e'>cups_adv_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_ADVANCE_FILE</tt> </td><td>Advance the roll after this file</td></tr>
+<tr><td><tt>CUPS_ADVANCE_JOB</tt> </td><td>Advance the roll after this job</td></tr>
+<tr><td><tt>CUPS_ADVANCE_NONE</tt> </td><td>Never advance the roll</td></tr>
+<tr><td><tt>CUPS_ADVANCE_PAGE</tt> </td><td>Advance the roll after this page</td></tr>
+<tr><td><tt>CUPS_ADVANCE_SET</tt> </td><td>Advance the roll after this set</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
<h3 class='title'><a name='cups_bool_e'>cups_bool_e</a></h3>
<h4>Description</h4>
<p>Types...</p>
<tr><td><tt>CUPS_TRUE</tt> </td><td>Logical true</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_cspace_e'>cups_cspace_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_CSPACE_CIELab</tt> <span class='info'> CUPS 1.1.19 </span></td><td>CIE Lab </td></tr>
+<tr><td><tt>CUPS_CSPACE_CIEXYZ</tt> <span class='info'> CUPS 1.1.19 </span></td><td>CIE XYZ </td></tr>
+<tr><td><tt>CUPS_CSPACE_CMY</tt> </td><td>Cyan, magenta, yellow</td></tr>
+<tr><td><tt>CUPS_CSPACE_CMYK</tt> </td><td>Cyan, magenta, yellow, black</td></tr>
+<tr><td><tt>CUPS_CSPACE_GMCK</tt> </td><td>Gold, magenta, yellow, black</td></tr>
+<tr><td><tt>CUPS_CSPACE_GMCS</tt> </td><td>Gold, magenta, yellow, silver</td></tr>
+<tr><td><tt>CUPS_CSPACE_GOLD</tt> </td><td>Gold foil</td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC1</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 1 color </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC2</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 2 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC3</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 3 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC4</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 4 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC5</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 5 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC6</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 6 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC7</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 7 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC8</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 8 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC9</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 9 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCA</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 10 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCB</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 11 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCC</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 12 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCD</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 13 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCE</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 14 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCF</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 15 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_K</tt> </td><td>Black</td></tr>
+<tr><td><tt>CUPS_CSPACE_KCMY</tt> </td><td>Black, cyan, magenta, yellow</td></tr>
+<tr><td><tt>CUPS_CSPACE_KCMYcm</tt> </td><td>Black, cyan, magenta, yellow, *
+light-cyan, light-magenta</td></tr>
+<tr><td><tt>CUPS_CSPACE_RGB</tt> </td><td>Red, green, blue</td></tr>
+<tr><td><tt>CUPS_CSPACE_RGBA</tt> </td><td>Red, green, blue, alpha</td></tr>
+<tr><td><tt>CUPS_CSPACE_RGBW</tt> <span class='info'> CUPS 1.2 </span></td><td>Red, green, blue, white </td></tr>
+<tr><td><tt>CUPS_CSPACE_SILVER</tt> </td><td>Silver foil</td></tr>
+<tr><td><tt>CUPS_CSPACE_W</tt> </td><td>Luminance</td></tr>
+<tr><td><tt>CUPS_CSPACE_WHITE</tt> </td><td>White ink (as black)</td></tr>
+<tr><td><tt>CUPS_CSPACE_YMC</tt> </td><td>Yellow, magenta, cyan</td></tr>
+<tr><td><tt>CUPS_CSPACE_YMCK</tt> </td><td>Yellow, magenta, cyan, black</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_cut_e'>cups_cut_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_CUT_FILE</tt> </td><td>Cut the roll after this file</td></tr>
+<tr><td><tt>CUPS_CUT_JOB</tt> </td><td>Cut the roll after this job</td></tr>
+<tr><td><tt>CUPS_CUT_NONE</tt> </td><td>Never cut the roll</td></tr>
+<tr><td><tt>CUPS_CUT_PAGE</tt> </td><td>Cut the roll after this page</td></tr>
+<tr><td><tt>CUPS_CUT_SET</tt> </td><td>Cut the roll after this set</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_edge_e'>cups_edge_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_EDGE_BOTTOM</tt> </td><td>Leading edge is the bottom of the page</td></tr>
+<tr><td><tt>CUPS_EDGE_LEFT</tt> </td><td>Leading edge is the left of the page</td></tr>
+<tr><td><tt>CUPS_EDGE_RIGHT</tt> </td><td>Leading edge is the right of the page</td></tr>
+<tr><td><tt>CUPS_EDGE_TOP</tt> </td><td>Leading edge is the top of the page</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_jog_e'>cups_jog_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_JOG_FILE</tt> </td><td>Move pages after this file</td></tr>
+<tr><td><tt>CUPS_JOG_JOB</tt> </td><td>Move pages after this job</td></tr>
+<tr><td><tt>CUPS_JOG_NONE</tt> </td><td>Never move pages</td></tr>
+<tr><td><tt>CUPS_JOG_SET</tt> </td><td>Move pages after this set</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
<h3 class='title'><a name='cups_mode_e'>cups_mode_e</a></h3>
<h4>Description</h4>
<p>Raster modes</p>
<tbody>
<tr><td><tt>CUPS_RASTER_READ</tt> </td><td>Open stream for reading</td></tr>
<tr><td><tt>CUPS_RASTER_WRITE</tt> </td><td>Open stream for writing</td></tr>
+<tr><td><tt>CUPS_RASTER_WRITE_COMPRESSED</tt> <span class='info'> CUPS 1.3 </span></td><td>Open stream for compressed writing </td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_order_e'>cups_order_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_ORDER_BANDED</tt> </td><td>CCC MMM YYY KKK ...</td></tr>
+<tr><td><tt>CUPS_ORDER_CHUNKED</tt> </td><td>CMYK CMYK CMYK ...</td></tr>
+<tr><td><tt>CUPS_ORDER_PLANAR</tt> </td><td>CCC ... MMM ... YYY ... KKK ...</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_orient_e'>cups_orient_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_ORIENT_0</tt> </td><td>Don't rotate the page</td></tr>
+<tr><td><tt>CUPS_ORIENT_180</tt> </td><td>Turn the page upside down</td></tr>
+<tr><td><tt>CUPS_ORIENT_270</tt> </td><td>Rotate the page clockwise</td></tr>
+<tr><td><tt>CUPS_ORIENT_90</tt> </td><td>Rotate the page counter-clockwise</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h2 class='title'><a name='FUNCTIONS'>Functions</a></h2>
cupsRasterInterpretPPD() - this allows you to do per-page options
without manipulating the options array.
+The "func" argument specifies an optional callback function that is
+called prior to the computation of the final raster data. The function
+can make changes to the cups_page_header2_t data as needed to use a
+supported raster format and then returns 0 on success and -1 if the
+requested attributes cannot be supported.
+
</p>
<h4>Syntax</h4>
<pre>
<a href='#cups_page_header2_t'>cups_page_header2_t</a> * h,
ppd_file_t * ppd,
int num_options,
- cups_option_t * options);
+ cups_option_t * options,
+ <a href='#cups_interpret_cb_t'>cups_interpret_cb_t</a> func);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
<tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
<tr><td><tt>options</tt></td><td>Options</td></tr>
+<tr><td><tt>func</tt></td><td>Optional page header callback</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>0 on success, -1 on failure</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='cups_page_header_s'>cups_page_header_s</a></h3>
<h4>Description</h4>
-<p>Version 1 Page Header</p>
+<p></p>
<h4>Definition</h4>
<pre>
struct cups_page_header_s
<!-- NEW PAGE -->
<h2 class='title'><a name='TYPES'>Types</a></h2>
<ul>
+ <li><a href='#cups_interpret_cb_t'><tt>cups_interpret_cb_t</tt></a> </li>
<li><a href='#cups_page_header2_t'><tt>cups_page_header2_t</tt></a> <span class='info'> CUPS 1.2 </span></li>
- <li><a href='#cups_page_header_t'><tt>cups_page_header_t</tt></a> </li>
<li><a href='#cups_raster_t'><tt>cups_raster_t</tt></a> </li>
</ul>
<!-- NEW PAGE -->
-<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='cups_page_header2_t'>cups_page_header2_t</a></h3>
+<h3 class='title'><a name='cups_interpret_cb_t'>cups_interpret_cb_t</a></h3>
<h4>Description</h4>
-<p>Version 2 Page Header </p>
+<p>Prototypes...</p>
<h4>Definition</h4>
<pre>
-typedef struct <a href='#cups_page_header2_s'>cups_page_header2_s</a> cups_page_header2_t;
+typedef int (*cups_interpret_cb_t)(<a href='#cups_page_header2_t'>cups_page_header2_t</a> *header, int preferred_bits);
</pre>
<!-- NEW PAGE -->
-<h3 class='title'><a name='cups_page_header_t'>cups_page_header_t</a></h3>
+<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='cups_page_header2_t'>cups_page_header2_t</a></h3>
<h4>Description</h4>
-<p>Version 1 Page Header</p>
+<p>Version 2 Page Header </p>
<h4>Definition</h4>
<pre>
-typedef struct <a href='#cups_page_header_s'>cups_page_header_s</a> cups_page_header_t;
+typedef struct <a href='#cups_page_header2_s'>cups_page_header2_s</a> cups_page_header2_t;
</pre>
<!-- NEW PAGE -->
<h3 class='title'><a name='cups_raster_t'>cups_raster_t</a></h3>
OpenSSL toolkit. A copy of the exceptions and licenses follow
this introduction.</P>
-<P>The GNU LGPL applies to the CUPS API library, located in the
-"cups" subdirectory of the CUPS source distribution and in the
-"cups" include directory and library files in the binary
-distributions. The GNU GPL applies to the remainder of the CUPS
-distribution, including the "pdftops" filter which is based upon
-Xpdf and the CUPS imaging library.</P>
+<P>The GNU LGPL applies to the CUPS and CUPS Imaging libraries
+located in the "cups" and "filter" subdirectories of the CUPS
+source distribution and in the "cups" include directory and
+library files in the binary distributions. The GNU GPL applies to
+the remainder of the CUPS distribution, including the "pdftops"
+filter which is based upon Xpdf.</P>
<P>For those not familiar with the GNU GPL, the license basically
allows you to:</P>
<LI>Sell verbatim copies of the software for a media
fee, or sell support for the software.</LI>
- <LI>Distribute or sell printer drivers and filters that
- use CUPS so long as source code is made available under
- the GPL.</LI>
-
</UL>
<P>What this license <EM>does not</EM> allow you to do is make
changes or add features to CUPS and then sell a binary
distribution without source code. You must provide source for any
-new drivers, changes, or additions to the software, and all code
-must be provided under the GPL or LGPL as appropriate. The only
+changes or additions to the software, and all code must be
+provided under the GPL or LGPL as appropriate. The only
exceptions to this are the portions of the CUPS software covered
by the Apple operating system license exceptions outlined later
in this license agreement.</P>
<P>The GNU LGPL relaxes the "link-to" restriction, allowing you
-to develop applications that use the CUPS API library under other
-licenses and/or conditions as appropriate for your
-application.</P>
+to develop applications that use the CUPS and CUPS Imaging
+libraries under other licenses and/or conditions as appropriate
+for your application, driver, or filter.</P>
<H2 CLASS="title"><A NAME="EXCEPTIONS">License Exceptions</A></H2>
<P>Easy Software Products also sells rights to the CUPS source
code under a binary distribution license for vendors that are
-unable to release source code for their drivers, additions, and
+unable to release source code for their additions and
modifications to CUPS under the GNU GPL and LGPL. For information
please contact us at the address shown above.</P>