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