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