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