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