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