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