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