1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- SECTION: Programming -->
4<head>
5	<title>Raster API	</title>
6	<meta name="keywords" content="Programming">
7	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
8	<meta name="creator" content="Mini-XML v2.7">
9<style type="text/css"><!--
10BODY {
11  font-family: lucida grande, geneva, helvetica, arial, sans-serif;
12}
13
14H1, H2, H3, H4, H5, H6, P, TD, TH {
15  font-family: lucida grande, geneva, helvetica, arial, sans-serif;
16}
17
18KBD {
19  font-family: monaco, courier, monospace;
20  font-weight: bold;
21}
22
23PRE {
24  font-family: monaco, courier, monospace;
25}
26
27PRE.command {
28  border: dotted thin #7f7f7f;
29  margin-left: 36pt;
30  padding: 10px;
31}
32
33P.compact {
34  margin: 0;
35}
36
37P.example {
38  font-style: italic;
39  margin-left: 36pt;
40}
41
42DL.man DD {
43  margin-left: 5em;
44}
45
46DL.man DT {
47  margin-left: 0;
48}
49
50PRE.man {
51  margin: 0;
52}
53
54PRE.example {
55  background: #eeeeee;
56  border: dotted thin #999999;
57  margin-left: 36pt;
58  padding: 10pt;
59}
60
61PRE.command EM, PRE.example EM {
62  font-family: lucida grande, geneva, helvetica, arial, sans-serif;
63}
64
65P.command {
66  font-family: monaco, courier, monospace;
67  margin-left: 36pt;
68}
69
70P.formula {
71  font-style: italic;
72  margin-left: 36pt;
73}
74
75BLOCKQUOTE {
76  background: #eeeeee;
77  border: solid thin #999999;
78  padding: 10pt;
79}
80
81A IMG {
82  border: none;
83}
84
85A:link:hover IMG {
86  background: #f0f0f0;
87  border-radius: 10px;
88  -moz-border-radius: 10px;
89}
90
91A:link, A:visited {
92  font-weight: inherit;
93  text-decoration: none;
94}
95
96A:link:hover, A:visited:hover, A:active {
97  text-decoration: underline;
98}
99
100SUB, SUP {
101  font-size: 50%;
102}
103
104TR.data, TD.data, TR.data TD {
105  margin-top: 10pt;
106  padding: 5pt;
107  border-bottom: solid 1pt #999999;
108}
109
110TR.data TH {
111  border-bottom: solid 1pt #999999;
112  padding-top: 10pt;
113  padding-left: 5pt;
114  text-align: left;
115}
116
117DIV.table TABLE {
118  border: solid thin #999999;
119  border-collapse: collapse;
120  border-spacing: 0;
121  margin-left: auto;
122  margin-right: auto;
123}
124
125DIV.table CAPTION {
126  caption-side: top;
127  font-size: 120%;
128  font-style: italic;
129  font-weight: bold;
130  margin-left: auto;
131  margin-right: auto;
132}
133
134DIV.table TABLE TD {
135  border: solid thin #cccccc;
136  padding-top: 5pt;
137}
138
139DIV.table TABLE TH {
140  background: #cccccc;
141  border: none;
142  border-bottom: solid thin #999999;
143}
144
145DIV.figure TABLE {
146  margin-left: auto;
147  margin-right: auto;
148}
149
150DIV.figure CAPTION {
151  caption-side: bottom;
152  font-size: 120%;
153  font-style: italic;
154  font-weight: bold;
155  margin-left: auto;
156  margin-right: auto;
157}
158
159TH.label {
160  text-align: right;
161  vertical-align: top;
162}
163
164TH.sublabel {
165  text-align: right;
166  font-weight: normal;
167}
168
169HR {
170  border: solid thin;
171}
172
173SPAN.info {
174  background: black;
175  border: thin solid black;
176  color: white;
177  font-size: 80%;
178  font-style: italic;
179  font-weight: bold;
180  white-space: nowrap;
181}
182
183H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
184  float: right;
185  font-size: 100%;
186}
187
188H1.title {
189}
190
191H2.title, H3.title {
192  border-bottom: solid 2pt #000000;
193}
194
195DIV.indent, TABLE.indent {
196  margin-top: 2em;
197  margin-left: auto;
198  margin-right: auto;
199  width: 90%;
200}
201
202TABLE.indent {
203  border-collapse: collapse;
204}
205
206TABLE.indent TD, TABLE.indent TH {
207  padding: 0;
208}
209
210TABLE.list {
211  border-collapse: collapse;
212  margin-left: auto;
213  margin-right: auto;
214  width: 90%;
215}
216
217TABLE.list TH {
218  background: white;
219  border-bottom: solid thin #cccccc;
220  color: #444444;
221  padding-top: 10pt;
222  padding-left: 5pt;
223  text-align: left;
224  vertical-align: bottom;
225  white-space: nowrap;
226}
227
228TABLE.list TH A {
229  color: #4444cc;
230}
231
232TABLE.list TD {
233  border-bottom: solid thin #eeeeee;
234  padding-top: 5pt;
235  padding-left: 5pt;
236}
237
238TABLE.list TR:nth-child(even) {
239  background: #f8f8f8;
240}
241
242TABLE.list TR:nth-child(odd) {
243  background: #f4f4f4;
244}
245
246DT {
247  margin-left: 36pt;
248  margin-top: 12pt;
249}
250
251DD {
252  margin-left: 54pt;
253}
254
255DL.category DT {
256  font-weight: bold;
257}
258
259P.summary {
260  margin-left: 36pt;
261  font-family: monaco, courier, monospace;
262}
263
264DIV.summary TABLE {
265  border: solid thin #999999;
266  border-collapse: collapse;
267  border-spacing: 0;
268  margin: 10px;
269}
270
271DIV.summary TABLE TD, DIV.summary TABLE TH {
272  border: solid thin #999999;
273  padding: 5px;
274  text-align: left;
275  vertical-align: top;
276}
277
278DIV.summary TABLE THEAD TH {
279  background: #eeeeee;
280}
281
282/* API documentation styles... */
283div.body h1 {
284  margin: 0;
285}
286div.body h2 {
287  margin-top: 1.5em;
288}
289div.body h3, div.body h4, div.body h5 {
290  margin-bottom: 0.5em;
291  margin-top: 1.5em;
292}
293.class, .enumeration, .function, .struct, .typedef, .union {
294  border-bottom: solid thin #999999;
295  margin-bottom: 0;
296  margin-top: 2em;
297}
298.description {
299  margin-top: 0.5em;
300}
301code, p.code, pre, ul.code li {
302  font-family: monaco, courier, monospace;
303  font-size: 90%;
304}
305ul.code, ul.contents, ul.subcontents {
306  list-style-type: none;
307  margin: 0;
308  padding-left: 0;
309}
310ul.code li {
311  margin: 0;
312}
313ul.contents > li {
314  margin-top: 1em;
315}
316ul.contents li ul.code, ul.contents li ul.subcontents {
317  padding-left: 2em;
318}
319div.body dl {
320  margin-left: 0;
321  margin-top: 0;
322}
323div.body dt {
324  font-style: italic;
325  margin-left: 0;
326  margin-top: 0;
327}
328div.body dd {
329  margin-bottom: 0.5em;
330}
331
332/* This is just for the HTML files generated with the framedhelp target */
333div.contents {
334  background: #e8e8e8;
335  border: solid thin black;
336  padding: 10px;
337}
338div.contents h1 {
339  font-size: 110%;
340}
341div.contents h2 {
342  font-size: 100%;
343}
344div.contents ul.contents {
345  font-size: 80%;
346}
347div.contents ul.subcontents li {
348  margin-left: 1em;
349  text-indent: -1em;
350}
351--></style>
352</head>
353<body>
354<div class='body'>
355<!--
356  "$Id$"
357
358  Raster API documentation for CUPS.
359
360  Copyright 2008-2010 by Apple Inc.
361
362  These coded instructions, statements, and computer programs are the
363  property of Apple Inc. and are protected by Federal copyright
364  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
365  which should have been included with this file.  If this file is
366  file is missing or damaged, see the license at "http://www.cups.org/".
367-->
368
369<h1 class='title'>Raster API</h1>
370
371<div class='summary'><table summary='General Information'>
372<thead>
373<tr>
374	<th>Header</th>
375	<th>cups/raster.h</th>
376</tr>
377</thead>
378<tbody>
379<tr>
380	<th>Library</th>
381	<td>-lcupsimage</td>
382</tr>
383<tr>
384	<th>See Also</th>
385	<td>Programming: <a href='api-overview.html'>Introduction to CUPS Programming</a><br>
386	Programming: <a href='api-cups.html'>CUPS API</a><br>
387	Programming: <a href='api-cups.html'>PPD API</a><br>
388	References: <a href='spec-ppd.html'>CUPS PPD Specification</a></td>
389</tr>
390</tbody>
391</table></div>
392<h2 class="title">Contents</h2>
393<ul class="contents">
394<li><a href="#OVERVIEW">Overview</a></li>
395<li><a href="#TASKS">Functions by Task</a><ul class="subcontents">
396	<li><a href="#OPENCLOSE">Opening and Closing Raster Streams</a></li>
397	<li><a href="#READING">Reading Raster Streams</a></li>
398	<li><a href="#WRITING">Writing Raster Streams</a></li>
399</ul></li>
400<li><a href="#FUNCTIONS">Functions</a><ul class="code">
401	<li><a href="#cupsRasterClose" title="Close a raster stream.">cupsRasterClose</a></li>
402	<li><a href="#cupsRasterInterpretPPD" title="Interpret PPD commands to create a page header.">cupsRasterInterpretPPD</a></li>
403	<li><a href="#cupsRasterOpen" title="Open a raster stream using a file descriptor.">cupsRasterOpen</a></li>
404	<li><a href="#cupsRasterOpenIO" title="Open a raster stream using a callback function.">cupsRasterOpenIO</a></li>
405	<li><a href="#cupsRasterReadHeader" title="Read a raster page header and store it in a
406version 1 page header structure.">cupsRasterReadHeader</a></li>
407	<li><a href="#cupsRasterReadHeader2" title="Read a raster page header and store it in a
408version 2 page header structure.">cupsRasterReadHeader2</a></li>
409	<li><a href="#cupsRasterReadPixels" title="Read raster pixels.">cupsRasterReadPixels</a></li>
410	<li><a href="#cupsRasterWriteHeader" title="Write a raster page header from a version 1 page
411header structure.">cupsRasterWriteHeader</a></li>
412	<li><a href="#cupsRasterWriteHeader2" title="Write a raster page header from a version 2
413page header structure.">cupsRasterWriteHeader2</a></li>
414	<li><a href="#cupsRasterWritePixels" title="Write raster pixels.">cupsRasterWritePixels</a></li>
415</ul></li>
416<li><a href="#TYPES">Data Types</a><ul class="code">
417	<li><a href="#cups_adv_t" title="AdvanceMedia attribute values">cups_adv_t</a></li>
418	<li><a href="#cups_bool_t" title="Boolean type">cups_bool_t</a></li>
419	<li><a href="#cups_cspace_t" title="cupsColorSpace attribute values">cups_cspace_t</a></li>
420	<li><a href="#cups_cut_t" title="CutMedia attribute values">cups_cut_t</a></li>
421	<li><a href="#cups_edge_t" title="LeadingEdge attribute values">cups_edge_t</a></li>
422	<li><a href="#cups_interpret_cb_t" title="cupsRasterInterpretPPD callback function">cups_interpret_cb_t</a></li>
423	<li><a href="#cups_jog_t" title="Jog attribute values">cups_jog_t</a></li>
424	<li><a href="#cups_mode_t" title="cupsRasterOpen modes">cups_mode_t</a></li>
425	<li><a href="#cups_order_t" title="cupsColorOrder attribute values">cups_order_t</a></li>
426	<li><a href="#cups_orient_t" title="Orientation attribute values">cups_orient_t</a></li>
427	<li><a href="#cups_page_header2_t" title="Version 2 page header ">cups_page_header2_t</a></li>
428	<li><a href="#cups_page_header_t" title="Version 1 page header ">cups_page_header_t</a></li>
429	<li><a href="#cups_raster_iocb_t" title="cupsRasterOpenIO callback function">cups_raster_iocb_t</a></li>
430	<li><a href="#cups_raster_t" title="Raster stream data">cups_raster_t</a></li>
431</ul></li>
432<li><a href="#STRUCTURES">Structures</a><ul class="code">
433	<li><a href="#cups_page_header2_s" title="Version 2 page header ">cups_page_header2_s</a></li>
434	<li><a href="#cups_page_header_s" title="Version 1 page header ">cups_page_header_s</a></li>
435</ul></li>
436<li><a href="#ENUMERATIONS">Constants</a><ul class="code">
437	<li><a href="#cups_adv_e" title="AdvanceMedia attribute values">cups_adv_e</a></li>
438	<li><a href="#cups_bool_e" title="Boolean type">cups_bool_e</a></li>
439	<li><a href="#cups_cspace_e" title="cupsColorSpace attribute values">cups_cspace_e</a></li>
440	<li><a href="#cups_cut_e" title="CutMedia attribute values">cups_cut_e</a></li>
441	<li><a href="#cups_edge_e" title="LeadingEdge attribute values">cups_edge_e</a></li>
442	<li><a href="#cups_jog_e" title="Jog attribute values">cups_jog_e</a></li>
443	<li><a href="#cups_mode_e" title="cupsRasterOpen modes">cups_mode_e</a></li>
444	<li><a href="#cups_order_e" title="cupsColorOrder attribute values">cups_order_e</a></li>
445	<li><a href="#cups_orient_e" title="Orientation attribute values">cups_orient_e</a></li>
446</ul></li>
447</ul>
448<!--
449  "$Id$"
450
451  Raster API introduction for CUPS.
452
453  Copyright 2007-2013 by Apple Inc.
454  Copyright 1997-2006 by Easy Software Products, all rights reserved.
455
456  These coded instructions, statements, and computer programs are the
457  property of Apple Inc. and are protected by Federal copyright
458  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
459  which should have been included with this file.  If this file is
460  file is missing or damaged, see the license at "http://www.cups.org/".
461-->
462
463<h2 class='title'><a name="OVERVIEW">Overview</a></h2>
464
465<p>The CUPS raster API provides a standard interface for reading and writing
466CUPS raster streams which are used for printing to raster printers. Because the
467raster format is updated from time to time, it is important to use this API to
468avoid incompatibilities with newer versions of CUPS.</p>
469
470<p>Two kinds of CUPS filters use the CUPS raster API - raster image processor
471(RIP) filters such as <code>pstoraster</code> and <code>cgpdftoraster</code>
472(OS X) that produce CUPS raster files and printer driver filters that
473convert CUPS raster files into a format usable by the printer. Printer
474driver filters are by far the most common.</p>
475
476<p>CUPS raster files (<code>application/vnd.cups-raster</code>) consists of
477a stream of raster page descriptions produced by one of the RIP filters such as
478<var>pstoraster</var>, <var>imagetoraster</var>, or
479<var>cgpdftoraster</var>. CUPS raster files are referred to using the
480<a href='#cups_raster_t'><code>cups_raster_t</code></a> type and are
481opened using the <a href='#cupsRasterOpen'><code>cupsRasterOpen</code></a>
482function. For example, to read raster data from the standard input, open
483file descriptor 0:</p>
484
485<pre class="example">
486#include &lt;cups/raster.h&gt;>
487
488<a href="#cups_raster_t">cups_raster_t</a> *ras = <a href="#cupsRasterOpen">cupsRasterOpen</a>(0, CUPS_RASTER_READ);
489</pre>
490
491<p>Each page of data begins with a page dictionary structure called
492<a href="#cups_page_header2_t"><code>cups_page_header2_t</code></a>. This
493structure contains the colorspace, bits per color, media size, media type,
494hardware resolution, and so forth used for the page.</p>
495
496<blockquote><b>Note:</b>
497
498  <p>Do not confuse the colorspace in the page header with the PPD
499  <tt>ColorModel</tt> keyword. <tt>ColorModel</tt> refers to the general type of
500  color used for a device (Gray, RGB, CMYK, DeviceN) and is often used to
501  select a particular colorspace for the page header along with the associate
502  color profile. The page header colorspace (<tt>cupsColorSpace</tt>) describes
503  both the type and organization of the color data, for example KCMY (black
504  first) instead of CMYK and RGBA (RGB + alpha) instead of RGB.</p>
505
506</blockquote>
507
508<p>You read the page header using the
509<a href="#cupsRasterReadHeader2"><code>cupsRasterReadHeader2</code></a>
510function:</p>
511
512<pre class="example">
513#include &lt;cups/raster.h&gt;>
514
515<a href="#cups_raster_t">cups_raster_t</a> *ras = <a href="#cupsRasterOpen">cupsRasterOpen</a>(0, CUPS_RASTER_READ);
516<a href="#cups_page_header2_t">cups_page_header2_t</a> header;
517
518while (<a href="#cupsRasterReadHeader2">cupsRasterReadHeader2</a>(ras, &amp;header))
519{
520  /* setup this page */
521
522  /* read raster data */
523
524  /* finish this page */
525}
526</pre>
527
528<p>After the page dictionary comes the page data which is a full-resolution,
529possibly compressed bitmap representing the page in the printer's output
530colorspace. You read uncompressed raster data using the
531<a href="#cupsRasterReadPixels"><code>cupsRasterReadPixels</code></a>
532function. A <code>for</code> loop is normally used to read the page one line
533at a time:</p>
534
535<pre class="example">
536#include &lt;cups/raster.h&gt;>
537
538<a href="#cups_raster_t">cups_raster_t</a> *ras = <a href="#cupsRasterOpen">cupsRasterOpen</a>(0, CUPS_RASTER_READ);
539<a href="#cups_page_header2_t">cups_page_header2_t</a> header;
540int page = 0;
541int y;
542char *buffer;
543
544while (<a href="#cupsRasterReadHeader2">cupsRasterReadHeader2</a>(ras, &amp;header))
545{
546  /* setup this page */
547  page ++;
548  fprintf(stderr, "PAGE: %d %d\n", page, header.NumCopies);
549
550  /* allocate memory for 1 line */
551  buffer = malloc(header.cupsBytesPerLine);
552
553  /* read raster data */
554  for (y = 0; y &lt; header.cupsHeight; y ++)
555  {
556    if (<a href="#cupsRasterReadPixels">cupsRasterReadPixels</a>(ras, buffer, header.cupsBytesPerLine) == 0)
557      break;
558
559    /* write raster data to printer on stdout */
560  }
561
562  /* finish this page */
563}
564</pre>
565
566<p>When you are done reading the raster data, call the
567<a href="#cupsRasterClose"><code>cupsRasterClose</code></a> function to free
568the memory used to read the raster file:</p>
569
570<pre class="example">
571<a href="#cups_raster_t">cups_raster_t</a> *ras;
572
573<a href="#cupsRasterClose">cupsRasterClose</a>(ras);
574</pre>
575
576
577<h2 class='title'><a name="TASKS">Functions by Task</a></h2>
578
579<h3><a name="OPENCLOSE">Opening and Closing Raster Streams</a></h3>
580
581<ul class="code">
582
583	<li><a href="#cupsRasterClose" title="Close a raster stream.">cupsRasterClose</a></li>
584	<li><a href="#cupsRasterOpen" title="Open a raster stream.">cupsRasterOpen</a></li>
585
586</ul>
587
588<h3><a name="READING">Reading Raster Streams</a></h3>
589
590<ul class="code">
591
592	<li><a href="#cupsRasterReadHeader" title="Read a raster page header and store it in a version 1 page header structure.">cupsRasterReadHeader</a> <span class="info">Deprecated in CUPS 1.2/OS X 10.5</span></li>
593	<li><a href="#cupsRasterReadHeader2" title="Read a raster page header and store it in a version 2 page header structure.">cupsRasterReadHeader2</a></li>
594	<li><a href="#cupsRasterReadPixels" title="Read raster pixels.">cupsRasterReadPixels</a></li>
595
596</ul>
597
598<h3><a name="WRITING">Writing Raster Streams</a></h3>
599
600<ul class="code">
601
602	<li><a href="#cupsRasterInterpretPPD" title="Interpret PPD commands to create a page header.">cupsRasterInterpretPPD</a></li>
603	<li><a href="#cupsRasterWriteHeader" title="Write a raster page header from a version 1 page header structure.">cupsRasterWriteHeader</a> <span class="info">Deprecated in CUPS 1.2/OS X 10.5</span></li>
604	<li><a href="#cupsRasterWriteHeader2" title="Write a raster page header from a version 2 page header structure.">cupsRasterWriteHeader2</a></li>
605	<li><a href="#cupsRasterWritePixels" title="Write raster pixels.">cupsRasterWritePixels</a></li>
606
607</ul>
608<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
609<h3 class="function"><a name="cupsRasterClose">cupsRasterClose</a></h3>
610<p class="description">Close a raster stream.</p>
611<p class="code">
612void cupsRasterClose (<br>
613&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_raster_t">cups_raster_t</a> *r<br>
614);</p>
615<h4 class="parameters">Parameters</h4>
616<dl>
617<dt>r</dt>
618<dd class="description">Stream to close</dd>
619</dl>
620<h4 class="discussion">Discussion</h4>
621<p class="discussion">The file descriptor associated with the raster stream must be closed
622separately as needed.</p>
623<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="cupsRasterInterpretPPD">cupsRasterInterpretPPD</a></h3>
624<p class="description">Interpret PPD commands to create a page header.</p>
625<p class="code">
626int cupsRasterInterpretPPD (<br>
627&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_page_header2_t">cups_page_header2_t</a> *h,<br>
628&nbsp;&nbsp;&nbsp;&nbsp;ppd_file_t *ppd,<br>
629&nbsp;&nbsp;&nbsp;&nbsp;int num_options,<br>
630&nbsp;&nbsp;&nbsp;&nbsp;cups_option_t *options,<br>
631&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_interpret_cb_t">cups_interpret_cb_t</a> func<br>
632);</p>
633<h4 class="parameters">Parameters</h4>
634<dl>
635<dt>h</dt>
636<dd class="description">Page header to create</dd>
637<dt>ppd</dt>
638<dd class="description">PPD file</dd>
639<dt>num_options</dt>
640<dd class="description">Number of options</dd>
641<dt>options</dt>
642<dd class="description">Options</dd>
643<dt>func</dt>
644<dd class="description">Optional page header callback (<code>NULL</code> for none)</dd>
645</dl>
646<h4 class="returnvalue">Return Value</h4>
647<p class="description">0 on success, -1 on failure</p>
648<h4 class="discussion">Discussion</h4>
649<p class="discussion">This function is used by raster image processing (RIP) filters like
650cgpdftoraster and imagetoraster when writing CUPS raster data for a page.
651It is not used by raster printer driver filters which only read CUPS
652raster data.<br>
653<br>
654
655<code>cupsRasterInterpretPPD</code> does not mark the options in the PPD using
656the &quot;num_options&quot; and &quot;options&quot; arguments.  Instead, mark the options with
657<code>cupsMarkOptions</code> and <code>ppdMarkOption</code> prior to calling it -
658this allows for per-page options without manipulating the options array.<br>
659<br>
660The &quot;func&quot; argument specifies an optional callback function that is
661called prior to the computation of the final raster data.  The function
662can make changes to the <a href="#cups_page_header2_t"><code>cups_page_header2_t</code></a> data as needed to use a
663supported raster format and then returns 0 on success and -1 if the
664requested attributes cannot be supported.<br>
665<br>
666
667<code>cupsRasterInterpretPPD</code> supports a subset of the PostScript language.
668Currently only the <code>[</code>, <code>]</code>, <code>&lt;&lt;</code>, <code>&gt;&gt;</code>, <code>{</code>,
669<code>}</code>, <code>cleartomark</code>, <code>copy</code>, <code>dup</code>, <code>index</code>,
670<code>pop</code>, <code>roll</code>, <code>setpagedevice</code>, and <code>stopped</code> operators
671are supported.
672
673</p>
674<h3 class="function"><a name="cupsRasterOpen">cupsRasterOpen</a></h3>
675<p class="description">Open a raster stream using a file descriptor.</p>
676<p class="code">
677<a href="#cups_raster_t">cups_raster_t</a> *cupsRasterOpen (<br>
678&nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
679&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_mode_t">cups_mode_t</a> mode<br>
680);</p>
681<h4 class="parameters">Parameters</h4>
682<dl>
683<dt>fd</dt>
684<dd class="description">File descriptor</dd>
685<dt>mode</dt>
686<dd class="description">Mode - <code>CUPS_RASTER_READ</code>,
687<code>CUPS_RASTER_WRITE</code>,
688<code>CUPS_RASTER_WRITE_COMPRESSED</code>,
689or <code>CUPS_RASTER_WRITE_PWG</code></dd>
690</dl>
691<h4 class="returnvalue">Return Value</h4>
692<p class="description">New stream</p>
693<h4 class="discussion">Discussion</h4>
694<p class="discussion">This function associates a raster stream with the given file descriptor.
695For most printer driver filters, &quot;fd&quot; will be 0 (stdin).  For most raster
696image processor (RIP) filters that generate raster data, &quot;fd&quot; will be 1
697(stdout).<br>
698<br>
699When writing raster data, the <code>CUPS_RASTER_WRITE</code>,
700<code>CUPS_RASTER_WRITE_COMPRESS</code>, or <code>CUPS_RASTER_WRITE_PWG</code> mode can
701be used - compressed and PWG output is generally 25-50% smaller but adds a
702100-300% execution time overhead.</p>
703<h3 class="function"><a name="cupsRasterOpenIO">cupsRasterOpenIO</a></h3>
704<p class="description">Open a raster stream using a callback function.</p>
705<p class="code">
706<a href="#cups_raster_t">cups_raster_t</a> *cupsRasterOpenIO (<br>
707&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_raster_iocb_t">cups_raster_iocb_t</a> iocb,<br>
708&nbsp;&nbsp;&nbsp;&nbsp;void *ctx,<br>
709&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_mode_t">cups_mode_t</a> mode<br>
710);</p>
711<h4 class="parameters">Parameters</h4>
712<dl>
713<dt>iocb</dt>
714<dd class="description">Read/write callback</dd>
715<dt>ctx</dt>
716<dd class="description">Context pointer for callback</dd>
717<dt>mode</dt>
718<dd class="description">Mode - <code>CUPS_RASTER_READ</code>,
719<code>CUPS_RASTER_WRITE</code>,
720<code>CUPS_RASTER_WRITE_COMPRESSED</code>,
721or <code>CUPS_RASTER_WRITE_PWG</code></dd>
722</dl>
723<h4 class="returnvalue">Return Value</h4>
724<p class="description">New stream</p>
725<h4 class="discussion">Discussion</h4>
726<p class="discussion">This function associates a raster stream with the given callback function and
727context pointer.<br>
728<br>
729When writing raster data, the <code>CUPS_RASTER_WRITE</code>,
730<code>CUPS_RASTER_WRITE_COMPRESS</code>, or <code>CUPS_RASTER_WRITE_PWG</code> mode can
731be used - compressed and PWG output is generally 25-50% smaller but adds a
732100-300% execution time overhead.</p>
733<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="cupsRasterReadHeader">cupsRasterReadHeader</a></h3>
734<p class="description">Read a raster page header and store it in a
735version 1 page header structure.</p>
736<p class="code">
737unsigned cupsRasterReadHeader (<br>
738&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_raster_t">cups_raster_t</a> *r,<br>
739&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_page_header_t">cups_page_header_t</a> *h<br>
740);</p>
741<h4 class="parameters">Parameters</h4>
742<dl>
743<dt>r</dt>
744<dd class="description">Raster stream</dd>
745<dt>h</dt>
746<dd class="description">Pointer to header data</dd>
747</dl>
748<h4 class="returnvalue">Return Value</h4>
749<p class="description">1 on success, 0 on failure/end-of-file</p>
750<h4 class="discussion">Discussion</h4>
751<p class="discussion">This function is deprecated. Use <a href="#cupsRasterReadHeader2"><code>cupsRasterReadHeader2</code></a> instead.<br>
752<br>
753Version 1 page headers were used in CUPS 1.0 and 1.1 and contain a subset
754of the version 2 page header data. This function handles reading version 2
755page headers and copying only the version 1 data into the provided buffer.
756
757</p>
758<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="cupsRasterReadHeader2">cupsRasterReadHeader2</a></h3>
759<p class="description">Read a raster page header and store it in a
760version 2 page header structure.</p>
761<p class="code">
762unsigned cupsRasterReadHeader2 (<br>
763&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_raster_t">cups_raster_t</a> *r,<br>
764&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_page_header2_t">cups_page_header2_t</a> *h<br>
765);</p>
766<h4 class="parameters">Parameters</h4>
767<dl>
768<dt>r</dt>
769<dd class="description">Raster stream</dd>
770<dt>h</dt>
771<dd class="description">Pointer to header data</dd>
772</dl>
773<h4 class="returnvalue">Return Value</h4>
774<p class="description">1 on success, 0 on failure/end-of-file</p>
775<h3 class="function"><a name="cupsRasterReadPixels">cupsRasterReadPixels</a></h3>
776<p class="description">Read raster pixels.</p>
777<p class="code">
778unsigned cupsRasterReadPixels (<br>
779&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_raster_t">cups_raster_t</a> *r,<br>
780&nbsp;&nbsp;&nbsp;&nbsp;unsigned char *p,<br>
781&nbsp;&nbsp;&nbsp;&nbsp;unsigned len<br>
782);</p>
783<h4 class="parameters">Parameters</h4>
784<dl>
785<dt>r</dt>
786<dd class="description">Raster stream</dd>
787<dt>p</dt>
788<dd class="description">Pointer to pixel buffer</dd>
789<dt>len</dt>
790<dd class="description">Number of bytes to read</dd>
791</dl>
792<h4 class="returnvalue">Return Value</h4>
793<p class="description">Number of bytes read</p>
794<h4 class="discussion">Discussion</h4>
795<p class="discussion">For best performance, filters should read one or more whole lines.
796The &quot;cupsBytesPerLine&quot; value from the page header can be used to allocate
797the line buffer and as the number of bytes to read.</p>
798<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="cupsRasterWriteHeader">cupsRasterWriteHeader</a></h3>
799<p class="description">Write a raster page header from a version 1 page
800header structure.</p>
801<p class="code">
802unsigned cupsRasterWriteHeader (<br>
803&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_raster_t">cups_raster_t</a> *r,<br>
804&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_page_header_t">cups_page_header_t</a> *h<br>
805);</p>
806<h4 class="parameters">Parameters</h4>
807<dl>
808<dt>r</dt>
809<dd class="description">Raster stream</dd>
810<dt>h</dt>
811<dd class="description">Raster page header</dd>
812</dl>
813<h4 class="returnvalue">Return Value</h4>
814<p class="description">1 on success, 0 on failure</p>
815<h4 class="discussion">Discussion</h4>
816<p class="discussion">This function is deprecated. Use <a href="#cupsRasterWriteHeader2"><code>cupsRasterWriteHeader2</code></a> instead.
817
818</p>
819<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="cupsRasterWriteHeader2">cupsRasterWriteHeader2</a></h3>
820<p class="description">Write a raster page header from a version 2
821page header structure.</p>
822<p class="code">
823unsigned cupsRasterWriteHeader2 (<br>
824&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_raster_t">cups_raster_t</a> *r,<br>
825&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_page_header2_t">cups_page_header2_t</a> *h<br>
826);</p>
827<h4 class="parameters">Parameters</h4>
828<dl>
829<dt>r</dt>
830<dd class="description">Raster stream</dd>
831<dt>h</dt>
832<dd class="description">Raster page header</dd>
833</dl>
834<h4 class="returnvalue">Return Value</h4>
835<p class="description">1 on success, 0 on failure</p>
836<h4 class="discussion">Discussion</h4>
837<p class="discussion">The page header can be initialized using <a href="#cupsRasterInterpretPPD"><code>cupsRasterInterpretPPD</code></a>.
838
839</p>
840<h3 class="function"><a name="cupsRasterWritePixels">cupsRasterWritePixels</a></h3>
841<p class="description">Write raster pixels.</p>
842<p class="code">
843unsigned cupsRasterWritePixels (<br>
844&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_raster_t">cups_raster_t</a> *r,<br>
845&nbsp;&nbsp;&nbsp;&nbsp;unsigned char *p,<br>
846&nbsp;&nbsp;&nbsp;&nbsp;unsigned len<br>
847);</p>
848<h4 class="parameters">Parameters</h4>
849<dl>
850<dt>r</dt>
851<dd class="description">Raster stream</dd>
852<dt>p</dt>
853<dd class="description">Bytes to write</dd>
854<dt>len</dt>
855<dd class="description">Number of bytes to write</dd>
856</dl>
857<h4 class="returnvalue">Return Value</h4>
858<p class="description">Number of bytes written</p>
859<h4 class="discussion">Discussion</h4>
860<p class="discussion">For best performance, filters should write one or more whole lines.
861The &quot;cupsBytesPerLine&quot; value from the page header can be used to allocate
862the line buffer and as the number of bytes to write.</p>
863<h2 class="title"><a name="TYPES">Data Types</a></h2>
864<h3 class="typedef"><a name="cups_adv_t">cups_adv_t</a></h3>
865<p class="description">AdvanceMedia attribute values</p>
866<p class="code">
867typedef enum <a href="#cups_adv_e">cups_adv_e</a> cups_adv_t;
868</p>
869<h3 class="typedef"><a name="cups_bool_t">cups_bool_t</a></h3>
870<p class="description">Boolean type</p>
871<p class="code">
872typedef enum <a href="#cups_bool_e">cups_bool_e</a> cups_bool_t;
873</p>
874<h3 class="typedef"><a name="cups_cspace_t">cups_cspace_t</a></h3>
875<p class="description">cupsColorSpace attribute values</p>
876<p class="code">
877typedef enum <a href="#cups_cspace_e">cups_cspace_e</a> cups_cspace_t;
878</p>
879<h3 class="typedef"><a name="cups_cut_t">cups_cut_t</a></h3>
880<p class="description">CutMedia attribute values</p>
881<p class="code">
882typedef enum <a href="#cups_cut_e">cups_cut_e</a> cups_cut_t;
883</p>
884<h3 class="typedef"><a name="cups_edge_t">cups_edge_t</a></h3>
885<p class="description">LeadingEdge attribute values</p>
886<p class="code">
887typedef enum <a href="#cups_edge_e">cups_edge_e</a> cups_edge_t;
888</p>
889<h3 class="typedef"><a name="cups_interpret_cb_t">cups_interpret_cb_t</a></h3>
890<p class="description">cupsRasterInterpretPPD callback function</p>
891<p class="code">
892typedef int (*cups_interpret_cb_t)(<a href="#cups_page_header2_t">cups_page_header2_t</a> *header, int preferred_bits);
893</p>
894<h3 class="typedef"><a name="cups_jog_t">cups_jog_t</a></h3>
895<p class="description">Jog attribute values</p>
896<p class="code">
897typedef enum <a href="#cups_jog_e">cups_jog_e</a> cups_jog_t;
898</p>
899<h3 class="typedef"><a name="cups_mode_t">cups_mode_t</a></h3>
900<p class="description">cupsRasterOpen modes</p>
901<p class="code">
902typedef enum <a href="#cups_mode_e">cups_mode_e</a> cups_mode_t;
903</p>
904<h3 class="typedef"><a name="cups_order_t">cups_order_t</a></h3>
905<p class="description">cupsColorOrder attribute values</p>
906<p class="code">
907typedef enum <a href="#cups_order_e">cups_order_e</a> cups_order_t;
908</p>
909<h3 class="typedef"><a name="cups_orient_t">cups_orient_t</a></h3>
910<p class="description">Orientation attribute values</p>
911<p class="code">
912typedef enum <a href="#cups_orient_e">cups_orient_e</a> cups_orient_t;
913</p>
914<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="cups_page_header2_t">cups_page_header2_t</a></h3>
915<p class="description">Version 2 page header </p>
916<p class="code">
917typedef struct <a href="#cups_page_header2_s">cups_page_header2_s</a> cups_page_header2_t;
918</p>
919<h3 class="typedef"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="cups_page_header_t">cups_page_header_t</a></h3>
920<p class="description">Version 1 page header </p>
921<p class="code">
922typedef struct <a href="#cups_page_header_s">cups_page_header_s</a> cups_page_header_t;
923</p>
924<h3 class="typedef"><a name="cups_raster_iocb_t">cups_raster_iocb_t</a></h3>
925<p class="description">cupsRasterOpenIO callback function</p>
926<p class="code">
927typedef ssize_t (*cups_raster_iocb_t)(void *ctx, unsigned char *buffer, size_t length);
928</p>
929<h3 class="typedef"><a name="cups_raster_t">cups_raster_t</a></h3>
930<p class="description">Raster stream data</p>
931<p class="code">
932typedef struct _cups_raster_s cups_raster_t;
933</p>
934<h2 class="title"><a name="STRUCTURES">Structures</a></h2>
935<h3 class="struct"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="cups_page_header2_s">cups_page_header2_s</a></h3>
936<p class="description">Version 2 page header </p>
937<p class="code">struct cups_page_header2_s {<br>
938&nbsp;&nbsp;&nbsp;&nbsp;unsigned AdvanceDistance;<br>
939&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_adv_t">cups_adv_t</a> AdvanceMedia;<br>
940&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Collate;<br>
941&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cut_t">cups_cut_t</a> CutMedia;<br>
942&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Duplex;<br>
943&nbsp;&nbsp;&nbsp;&nbsp;unsigned HWResolution[2];<br>
944&nbsp;&nbsp;&nbsp;&nbsp;unsigned ImagingBoundingBox[4];<br>
945&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> InsertSheet;<br>
946&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_jog_t">cups_jog_t</a> Jog;<br>
947&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_edge_t">cups_edge_t</a> LeadingEdge;<br>
948&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> ManualFeed;<br>
949&nbsp;&nbsp;&nbsp;&nbsp;unsigned Margins[2];<br>
950&nbsp;&nbsp;&nbsp;&nbsp;char MediaClass[64];<br>
951&nbsp;&nbsp;&nbsp;&nbsp;char MediaColor[64];<br>
952&nbsp;&nbsp;&nbsp;&nbsp;unsigned MediaPosition;<br>
953&nbsp;&nbsp;&nbsp;&nbsp;char MediaType[64];<br>
954&nbsp;&nbsp;&nbsp;&nbsp;unsigned MediaWeight;<br>
955&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> MirrorPrint;<br>
956&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> NegativePrint;<br>
957&nbsp;&nbsp;&nbsp;&nbsp;unsigned NumCopies;<br>
958&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_orient_t">cups_orient_t</a> Orientation;<br>
959&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> OutputFaceUp;<br>
960&nbsp;&nbsp;&nbsp;&nbsp;char OutputType[64];<br>
961&nbsp;&nbsp;&nbsp;&nbsp;unsigned PageSize[2];<br>
962&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Separations;<br>
963&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> TraySwitch;<br>
964&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Tumble;<br>
965&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBitsPerColor;<br>
966&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBitsPerPixel;<br>
967&nbsp;&nbsp;&nbsp;&nbsp;float cupsBorderlessScalingFactor;<br>
968&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBytesPerLine;<br>
969&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_order_t">cups_order_t</a> cupsColorOrder;<br>
970&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cspace_t">cups_cspace_t</a> cupsColorSpace;<br>
971&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsCompression;<br>
972&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsHeight;<br>
973&nbsp;&nbsp;&nbsp;&nbsp;float cupsImagingBBox[4];<br>
974&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsInteger[16];<br>
975&nbsp;&nbsp;&nbsp;&nbsp;char cupsMarkerType[64];<br>
976&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsMediaType;<br>
977&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsNumColors;<br>
978&nbsp;&nbsp;&nbsp;&nbsp;char cupsPageSizeName[64];<br>
979&nbsp;&nbsp;&nbsp;&nbsp;float cupsPageSize[2];<br>
980&nbsp;&nbsp;&nbsp;&nbsp;float cupsReal[16];<br>
981&nbsp;&nbsp;&nbsp;&nbsp;char cupsRenderingIntent[64];<br>
982&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsRowCount;<br>
983&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsRowFeed;<br>
984&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsRowStep;<br>
985&nbsp;&nbsp;&nbsp;&nbsp;char cupsString[16][64];<br>
986&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsWidth;<br>
987};</p>
988<h4 class="members">Members</h4>
989<dl>
990<dt>AdvanceDistance </dt>
991<dd class="description">AdvanceDistance value in points</dd>
992<dt>AdvanceMedia </dt>
993<dd class="description">AdvanceMedia value (<a href="#cups_adv_t"><code>cups_adv_t</code></a>)</dd>
994<dt>Collate </dt>
995<dd class="description">Collated copies value</dd>
996<dt>CutMedia </dt>
997<dd class="description">CutMedia value (<a href="#cups_cut_t"><code>cups_cut_t</code></a>)</dd>
998<dt>Duplex </dt>
999<dd class="description">Duplexed (double-sided) value</dd>
1000<dt>HWResolution[2] </dt>
1001<dd class="description">Resolution in dots-per-inch</dd>
1002<dt>ImagingBoundingBox[4] </dt>
1003<dd class="description">Pixel region that is painted (points, left, bottom, right, top)</dd>
1004<dt>InsertSheet </dt>
1005<dd class="description">InsertSheet value</dd>
1006<dt>Jog </dt>
1007<dd class="description">Jog value (<a href="#cups_jog_t"><code>cups_jog_t</code></a>)</dd>
1008<dt>LeadingEdge </dt>
1009<dd class="description">LeadingEdge value (<a href="#cups_edge_t"><code>cups_edge_t</code></a>)</dd>
1010<dt>ManualFeed </dt>
1011<dd class="description">ManualFeed value</dd>
1012<dt>Margins[2] </dt>
1013<dd class="description">Lower-lefthand margins in points</dd>
1014<dt>MediaClass[64] </dt>
1015<dd class="description">MediaClass string</dd>
1016<dt>MediaColor[64] </dt>
1017<dd class="description">MediaColor string</dd>
1018<dt>MediaPosition </dt>
1019<dd class="description">MediaPosition value</dd>
1020<dt>MediaType[64] </dt>
1021<dd class="description">MediaType string</dd>
1022<dt>MediaWeight </dt>
1023<dd class="description">MediaWeight value in grams/m^2</dd>
1024<dt>MirrorPrint </dt>
1025<dd class="description">MirrorPrint value</dd>
1026<dt>NegativePrint </dt>
1027<dd class="description">NegativePrint value</dd>
1028<dt>NumCopies </dt>
1029<dd class="description">Number of copies to produce</dd>
1030<dt>Orientation </dt>
1031<dd class="description">Orientation value (<a href="#cups_orient_t"><code>cups_orient_t</code></a>)</dd>
1032<dt>OutputFaceUp </dt>
1033<dd class="description">OutputFaceUp value</dd>
1034<dt>OutputType[64] </dt>
1035<dd class="description">OutputType string</dd>
1036<dt>PageSize[2] </dt>
1037<dd class="description">Width and length of page in points</dd>
1038<dt>Separations </dt>
1039<dd class="description">Separations value</dd>
1040<dt>TraySwitch </dt>
1041<dd class="description">TraySwitch value</dd>
1042<dt>Tumble </dt>
1043<dd class="description">Tumble value</dd>
1044<dt>cupsBitsPerColor </dt>
1045<dd class="description">Number of bits for each color</dd>
1046<dt>cupsBitsPerPixel </dt>
1047<dd class="description">Number of bits for each pixel</dd>
1048<dt>cupsBorderlessScalingFactor <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
1049<dd class="description">Scaling that was applied to page data </dd>
1050<dt>cupsBytesPerLine </dt>
1051<dd class="description">Number of bytes per line</dd>
1052<dt>cupsColorOrder </dt>
1053<dd class="description">Order of colors</dd>
1054<dt>cupsColorSpace </dt>
1055<dd class="description">True colorspace</dd>
1056<dt>cupsCompression </dt>
1057<dd class="description">Device compression to use</dd>
1058<dt>cupsHeight </dt>
1059<dd class="description">Height of page image in pixels</dd>
1060<dt>cupsImagingBBox[4] <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
1061<dd class="description">Floating point ImagingBoundingBox
1062(scaling factor not applied, left,
1063bottom, right, top) </dd>
1064<dt>cupsInteger[16] <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
1065<dd class="description">User-defined integer values </dd>
1066<dt>cupsMarkerType[64] <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
1067<dd class="description">Ink/toner type </dd>
1068<dt>cupsMediaType </dt>
1069<dd class="description">Media type code</dd>
1070<dt>cupsNumColors <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
1071<dd class="description">Number of color compoents </dd>
1072<dt>cupsPageSizeName[64] <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
1073<dd class="description">PageSize name </dd>
1074<dt>cupsPageSize[2] <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
1075<dd class="description">Floating point PageSize (scaling *
1076factor not applied) </dd>
1077<dt>cupsReal[16] <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
1078<dd class="description">User-defined floating-point values </dd>
1079<dt>cupsRenderingIntent[64] <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
1080<dd class="description">Color rendering intent </dd>
1081<dt>cupsRowCount </dt>
1082<dd class="description">Rows per band</dd>
1083<dt>cupsRowFeed </dt>
1084<dd class="description">Feed between bands</dd>
1085<dt>cupsRowStep </dt>
1086<dd class="description">Spacing between lines</dd>
1087<dt>cupsString[16][64] <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
1088<dd class="description">User-defined string values </dd>
1089<dt>cupsWidth </dt>
1090<dd class="description">Width of page image in pixels</dd>
1091</dl>
1092<h3 class="struct"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="cups_page_header_s">cups_page_header_s</a></h3>
1093<p class="description">Version 1 page header </p>
1094<p class="code">struct cups_page_header_s {<br>
1095&nbsp;&nbsp;&nbsp;&nbsp;unsigned AdvanceDistance;<br>
1096&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_adv_t">cups_adv_t</a> AdvanceMedia;<br>
1097&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Collate;<br>
1098&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cut_t">cups_cut_t</a> CutMedia;<br>
1099&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Duplex;<br>
1100&nbsp;&nbsp;&nbsp;&nbsp;unsigned HWResolution[2];<br>
1101&nbsp;&nbsp;&nbsp;&nbsp;unsigned ImagingBoundingBox[4];<br>
1102&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> InsertSheet;<br>
1103&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_jog_t">cups_jog_t</a> Jog;<br>
1104&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_edge_t">cups_edge_t</a> LeadingEdge;<br>
1105&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> ManualFeed;<br>
1106&nbsp;&nbsp;&nbsp;&nbsp;unsigned Margins[2];<br>
1107&nbsp;&nbsp;&nbsp;&nbsp;char MediaClass[64];<br>
1108&nbsp;&nbsp;&nbsp;&nbsp;char MediaColor[64];<br>
1109&nbsp;&nbsp;&nbsp;&nbsp;unsigned MediaPosition;<br>
1110&nbsp;&nbsp;&nbsp;&nbsp;char MediaType[64];<br>
1111&nbsp;&nbsp;&nbsp;&nbsp;unsigned MediaWeight;<br>
1112&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> MirrorPrint;<br>
1113&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> NegativePrint;<br>
1114&nbsp;&nbsp;&nbsp;&nbsp;unsigned NumCopies;<br>
1115&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_orient_t">cups_orient_t</a> Orientation;<br>
1116&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> OutputFaceUp;<br>
1117&nbsp;&nbsp;&nbsp;&nbsp;char OutputType[64];<br>
1118&nbsp;&nbsp;&nbsp;&nbsp;unsigned PageSize[2];<br>
1119&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Separations;<br>
1120&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> TraySwitch;<br>
1121&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Tumble;<br>
1122&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBitsPerColor;<br>
1123&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBitsPerPixel;<br>
1124&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBytesPerLine;<br>
1125&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_order_t">cups_order_t</a> cupsColorOrder;<br>
1126&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cspace_t">cups_cspace_t</a> cupsColorSpace;<br>
1127&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsCompression;<br>
1128&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsHeight;<br>
1129&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsMediaType;<br>
1130&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsRowCount;<br>
1131&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsRowFeed;<br>
1132&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsRowStep;<br>
1133&nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsWidth;<br>
1134};</p>
1135<h4 class="members">Members</h4>
1136<dl>
1137<dt>AdvanceDistance </dt>
1138<dd class="description">AdvanceDistance value in points</dd>
1139<dt>AdvanceMedia </dt>
1140<dd class="description">AdvanceMedia value (<a href="#cups_adv_t"><code>cups_adv_t</code></a>)</dd>
1141<dt>Collate </dt>
1142<dd class="description">Collated copies value</dd>
1143<dt>CutMedia </dt>
1144<dd class="description">CutMedia value (<a href="#cups_cut_t"><code>cups_cut_t</code></a>)</dd>
1145<dt>Duplex </dt>
1146<dd class="description">Duplexed (double-sided) value</dd>
1147<dt>HWResolution[2] </dt>
1148<dd class="description">Resolution in dots-per-inch</dd>
1149<dt>ImagingBoundingBox[4] </dt>
1150<dd class="description">Pixel region that is painted (points, left, bottom, right, top)</dd>
1151<dt>InsertSheet </dt>
1152<dd class="description">InsertSheet value</dd>
1153<dt>Jog </dt>
1154<dd class="description">Jog value (<a href="#cups_jog_t"><code>cups_jog_t</code></a>)</dd>
1155<dt>LeadingEdge </dt>
1156<dd class="description">LeadingEdge value (<a href="#cups_edge_t"><code>cups_edge_t</code></a>)</dd>
1157<dt>ManualFeed </dt>
1158<dd class="description">ManualFeed value</dd>
1159<dt>Margins[2] </dt>
1160<dd class="description">Lower-lefthand margins in points</dd>
1161<dt>MediaClass[64] </dt>
1162<dd class="description">MediaClass string</dd>
1163<dt>MediaColor[64] </dt>
1164<dd class="description">MediaColor string</dd>
1165<dt>MediaPosition </dt>
1166<dd class="description">MediaPosition value</dd>
1167<dt>MediaType[64] </dt>
1168<dd class="description">MediaType string</dd>
1169<dt>MediaWeight </dt>
1170<dd class="description">MediaWeight value in grams/m^2</dd>
1171<dt>MirrorPrint </dt>
1172<dd class="description">MirrorPrint value</dd>
1173<dt>NegativePrint </dt>
1174<dd class="description">NegativePrint value</dd>
1175<dt>NumCopies </dt>
1176<dd class="description">Number of copies to produce</dd>
1177<dt>Orientation </dt>
1178<dd class="description">Orientation value (<a href="#cups_orient_t"><code>cups_orient_t</code></a>)</dd>
1179<dt>OutputFaceUp </dt>
1180<dd class="description">OutputFaceUp value</dd>
1181<dt>OutputType[64] </dt>
1182<dd class="description">OutputType string</dd>
1183<dt>PageSize[2] </dt>
1184<dd class="description">Width and length of page in points</dd>
1185<dt>Separations </dt>
1186<dd class="description">Separations value</dd>
1187<dt>TraySwitch </dt>
1188<dd class="description">TraySwitch value</dd>
1189<dt>Tumble </dt>
1190<dd class="description">Tumble value</dd>
1191<dt>cupsBitsPerColor </dt>
1192<dd class="description">Number of bits for each color</dd>
1193<dt>cupsBitsPerPixel </dt>
1194<dd class="description">Number of bits for each pixel</dd>
1195<dt>cupsBytesPerLine </dt>
1196<dd class="description">Number of bytes per line</dd>
1197<dt>cupsColorOrder </dt>
1198<dd class="description">Order of colors</dd>
1199<dt>cupsColorSpace </dt>
1200<dd class="description">True colorspace</dd>
1201<dt>cupsCompression </dt>
1202<dd class="description">Device compression to use</dd>
1203<dt>cupsHeight </dt>
1204<dd class="description">Height of page image in pixels</dd>
1205<dt>cupsMediaType </dt>
1206<dd class="description">Media type code</dd>
1207<dt>cupsRowCount </dt>
1208<dd class="description">Rows per band</dd>
1209<dt>cupsRowFeed </dt>
1210<dd class="description">Feed between bands</dd>
1211<dt>cupsRowStep </dt>
1212<dd class="description">Spacing between lines</dd>
1213<dt>cupsWidth </dt>
1214<dd class="description">Width of page image in pixels</dd>
1215</dl>
1216<h2 class="title"><a name="ENUMERATIONS">Constants</a></h2>
1217<h3 class="enumeration"><a name="cups_adv_e">cups_adv_e</a></h3>
1218<p class="description">AdvanceMedia attribute values</p>
1219<h4 class="constants">Constants</h4>
1220<dl>
1221<dt>CUPS_ADVANCE_FILE </dt>
1222<dd class="description">Advance the roll after this file</dd>
1223<dt>CUPS_ADVANCE_JOB </dt>
1224<dd class="description">Advance the roll after this job</dd>
1225<dt>CUPS_ADVANCE_NONE </dt>
1226<dd class="description">Never advance the roll</dd>
1227<dt>CUPS_ADVANCE_PAGE </dt>
1228<dd class="description">Advance the roll after this page</dd>
1229<dt>CUPS_ADVANCE_SET </dt>
1230<dd class="description">Advance the roll after this set</dd>
1231</dl>
1232<h3 class="enumeration"><a name="cups_bool_e">cups_bool_e</a></h3>
1233<p class="description">Boolean type</p>
1234<h4 class="constants">Constants</h4>
1235<dl>
1236<dt>CUPS_FALSE </dt>
1237<dd class="description">Logical false</dd>
1238<dt>CUPS_TRUE </dt>
1239<dd class="description">Logical true</dd>
1240</dl>
1241<h3 class="enumeration"><a name="cups_cspace_e">cups_cspace_e</a></h3>
1242<p class="description">cupsColorSpace attribute values</p>
1243<h4 class="constants">Constants</h4>
1244<dl>
1245<dt>CUPS_CSPACE_ADOBERGB <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1246<dd class="description">Red, green, blue (Adobe RGB) </dd>
1247<dt>CUPS_CSPACE_CIELab <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1248<dd class="description">CIE Lab </dd>
1249<dt>CUPS_CSPACE_CIEXYZ <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1250<dd class="description">CIE XYZ </dd>
1251<dt>CUPS_CSPACE_CMY </dt>
1252<dd class="description">Cyan, magenta, yellow (DeviceCMY)</dd>
1253<dt>CUPS_CSPACE_CMYK </dt>
1254<dd class="description">Cyan, magenta, yellow, black (DeviceCMYK)</dd>
1255<dt>CUPS_CSPACE_DEVICE1 <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1256<dd class="description">DeviceN, 1 color </dd>
1257<dt>CUPS_CSPACE_DEVICE2 <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1258<dd class="description">DeviceN, 2 colors </dd>
1259<dt>CUPS_CSPACE_DEVICE3 <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1260<dd class="description">DeviceN, 3 colors </dd>
1261<dt>CUPS_CSPACE_DEVICE4 <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1262<dd class="description">DeviceN, 4 colors </dd>
1263<dt>CUPS_CSPACE_DEVICE5 <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1264<dd class="description">DeviceN, 5 colors </dd>
1265<dt>CUPS_CSPACE_DEVICE6 <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1266<dd class="description">DeviceN, 6 colors </dd>
1267<dt>CUPS_CSPACE_DEVICE7 <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1268<dd class="description">DeviceN, 7 colors </dd>
1269<dt>CUPS_CSPACE_DEVICE8 <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1270<dd class="description">DeviceN, 8 colors </dd>
1271<dt>CUPS_CSPACE_DEVICE9 <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1272<dd class="description">DeviceN, 9 colors </dd>
1273<dt>CUPS_CSPACE_DEVICEA <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1274<dd class="description">DeviceN, 10 colors </dd>
1275<dt>CUPS_CSPACE_DEVICEB <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1276<dd class="description">DeviceN, 11 colors </dd>
1277<dt>CUPS_CSPACE_DEVICEC <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1278<dd class="description">DeviceN, 12 colors </dd>
1279<dt>CUPS_CSPACE_DEVICED <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1280<dd class="description">DeviceN, 13 colors </dd>
1281<dt>CUPS_CSPACE_DEVICEE <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1282<dd class="description">DeviceN, 14 colors </dd>
1283<dt>CUPS_CSPACE_DEVICEF <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1284<dd class="description">DeviceN, 15 colors </dd>
1285<dt>CUPS_CSPACE_GMCK <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
1286<dd class="description">Gold, magenta, yellow, black </dd>
1287<dt>CUPS_CSPACE_GMCS <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
1288<dd class="description">Gold, magenta, yellow, silver </dd>
1289<dt>CUPS_CSPACE_GOLD <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
1290<dd class="description">Gold foil </dd>
1291<dt>CUPS_CSPACE_ICC1 <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1292<dd class="description">ICC-based, 1 color </dd>
1293<dt>CUPS_CSPACE_ICC2 <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1294<dd class="description">ICC-based, 2 colors </dd>
1295<dt>CUPS_CSPACE_ICC3 <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1296<dd class="description">ICC-based, 3 colors </dd>
1297<dt>CUPS_CSPACE_ICC4 <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1298<dd class="description">ICC-based, 4 colors </dd>
1299<dt>CUPS_CSPACE_ICC5 <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1300<dd class="description">ICC-based, 5 colors </dd>
1301<dt>CUPS_CSPACE_ICC6 <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1302<dd class="description">ICC-based, 6 colors </dd>
1303<dt>CUPS_CSPACE_ICC7 <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1304<dd class="description">ICC-based, 7 colors </dd>
1305<dt>CUPS_CSPACE_ICC8 <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1306<dd class="description">ICC-based, 8 colors </dd>
1307<dt>CUPS_CSPACE_ICC9 <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1308<dd class="description">ICC-based, 9 colors </dd>
1309<dt>CUPS_CSPACE_ICCA <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1310<dd class="description">ICC-based, 10 colors </dd>
1311<dt>CUPS_CSPACE_ICCB <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1312<dd class="description">ICC-based, 11 colors </dd>
1313<dt>CUPS_CSPACE_ICCC <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1314<dd class="description">ICC-based, 12 colors </dd>
1315<dt>CUPS_CSPACE_ICCD <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1316<dd class="description">ICC-based, 13 colors </dd>
1317<dt>CUPS_CSPACE_ICCE <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1318<dd class="description">ICC-based, 14 colors </dd>
1319<dt>CUPS_CSPACE_ICCF <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
1320<dd class="description">ICC-based, 15 colors </dd>
1321<dt>CUPS_CSPACE_K </dt>
1322<dd class="description">Black (DeviceK)</dd>
1323<dt>CUPS_CSPACE_KCMY <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
1324<dd class="description">Black, cyan, magenta, yellow </dd>
1325<dt>CUPS_CSPACE_KCMYcm <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
1326<dd class="description">Black, cyan, magenta, yellow, light-cyan, light-magenta </dd>
1327<dt>CUPS_CSPACE_RGB </dt>
1328<dd class="description">Red, green, blue (DeviceRGB, sRGB by default)</dd>
1329<dt>CUPS_CSPACE_RGBA </dt>
1330<dd class="description">Red, green, blue, alpha (DeviceRGB, sRGB by default)</dd>
1331<dt>CUPS_CSPACE_RGBW <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
1332<dd class="description">Red, green, blue, white (DeviceRGB, sRGB by default) </dd>
1333<dt>CUPS_CSPACE_SILVER <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
1334<dd class="description">Silver foil </dd>
1335<dt>CUPS_CSPACE_SRGB <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1336<dd class="description">Red, green, blue (sRGB) </dd>
1337<dt>CUPS_CSPACE_SW <span class="info">&nbsp;CUPS 1.4.5&nbsp;</span></dt>
1338<dd class="description">Luminance (gamma 2.2) </dd>
1339<dt>CUPS_CSPACE_W </dt>
1340<dd class="description">Luminance (DeviceGray, gamma 2.2 by default)</dd>
1341<dt>CUPS_CSPACE_WHITE <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
1342<dd class="description">White ink (as black) </dd>
1343<dt>CUPS_CSPACE_YMC <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
1344<dd class="description">Yellow, magenta, cyan </dd>
1345<dt>CUPS_CSPACE_YMCK <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
1346<dd class="description">Yellow, magenta, cyan, black </dd>
1347</dl>
1348<h3 class="enumeration"><a name="cups_cut_e">cups_cut_e</a></h3>
1349<p class="description">CutMedia attribute values</p>
1350<h4 class="constants">Constants</h4>
1351<dl>
1352<dt>CUPS_CUT_FILE </dt>
1353<dd class="description">Cut the roll after this file</dd>
1354<dt>CUPS_CUT_JOB </dt>
1355<dd class="description">Cut the roll after this job</dd>
1356<dt>CUPS_CUT_NONE </dt>
1357<dd class="description">Never cut the roll</dd>
1358<dt>CUPS_CUT_PAGE </dt>
1359<dd class="description">Cut the roll after this page</dd>
1360<dt>CUPS_CUT_SET </dt>
1361<dd class="description">Cut the roll after this set</dd>
1362</dl>
1363<h3 class="enumeration"><a name="cups_edge_e">cups_edge_e</a></h3>
1364<p class="description">LeadingEdge attribute values</p>
1365<h4 class="constants">Constants</h4>
1366<dl>
1367<dt>CUPS_EDGE_BOTTOM </dt>
1368<dd class="description">Leading edge is the bottom of the page</dd>
1369<dt>CUPS_EDGE_LEFT </dt>
1370<dd class="description">Leading edge is the left of the page</dd>
1371<dt>CUPS_EDGE_RIGHT </dt>
1372<dd class="description">Leading edge is the right of the page</dd>
1373<dt>CUPS_EDGE_TOP </dt>
1374<dd class="description">Leading edge is the top of the page</dd>
1375</dl>
1376<h3 class="enumeration"><a name="cups_jog_e">cups_jog_e</a></h3>
1377<p class="description">Jog attribute values</p>
1378<h4 class="constants">Constants</h4>
1379<dl>
1380<dt>CUPS_JOG_FILE </dt>
1381<dd class="description">Move pages after this file</dd>
1382<dt>CUPS_JOG_JOB </dt>
1383<dd class="description">Move pages after this job</dd>
1384<dt>CUPS_JOG_NONE </dt>
1385<dd class="description">Never move pages</dd>
1386<dt>CUPS_JOG_SET </dt>
1387<dd class="description">Move pages after this set</dd>
1388</dl>
1389<h3 class="enumeration"><a name="cups_mode_e">cups_mode_e</a></h3>
1390<p class="description">cupsRasterOpen modes</p>
1391<h4 class="constants">Constants</h4>
1392<dl>
1393<dt>CUPS_RASTER_READ </dt>
1394<dd class="description">Open stream for reading</dd>
1395<dt>CUPS_RASTER_WRITE </dt>
1396<dd class="description">Open stream for writing</dd>
1397<dt>CUPS_RASTER_WRITE_COMPRESSED <span class="info">&nbsp;CUPS 1.3/OS X 10.5&nbsp;</span></dt>
1398<dd class="description">Open stream for compressed writing </dd>
1399<dt>CUPS_RASTER_WRITE_PWG <span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span></dt>
1400<dd class="description">Open stream for compressed writing in PWG mode </dd>
1401</dl>
1402<h3 class="enumeration"><a name="cups_order_e">cups_order_e</a></h3>
1403<p class="description">cupsColorOrder attribute values</p>
1404<h4 class="constants">Constants</h4>
1405<dl>
1406<dt>CUPS_ORDER_BANDED </dt>
1407<dd class="description">CCC MMM YYY KKK ...</dd>
1408<dt>CUPS_ORDER_CHUNKED </dt>
1409<dd class="description">CMYK CMYK CMYK ...</dd>
1410<dt>CUPS_ORDER_PLANAR </dt>
1411<dd class="description">CCC ... MMM ... YYY ... KKK ...</dd>
1412</dl>
1413<h3 class="enumeration"><a name="cups_orient_e">cups_orient_e</a></h3>
1414<p class="description">Orientation attribute values</p>
1415<h4 class="constants">Constants</h4>
1416<dl>
1417<dt>CUPS_ORIENT_0 </dt>
1418<dd class="description">Don't rotate the page</dd>
1419<dt>CUPS_ORIENT_180 </dt>
1420<dd class="description">Turn the page upside down</dd>
1421<dt>CUPS_ORIENT_270 </dt>
1422<dd class="description">Rotate the page clockwise</dd>
1423<dt>CUPS_ORIENT_90 </dt>
1424<dd class="description">Rotate the page counter-clockwise</dd>
1425</dl>
1426</div>
1427</body>
1428</html>
1429