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