3 <!-- SECTION: Programming -->
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=
"codedoc v3.1">
9 <meta name=
"author" content=
"Unknown">
10 <meta name=
"copyright" content=
"Unknown">
11 <meta name=
"version" content=
"0.0">
12 <style type=
"text/css"><!--
14 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
17 H1, H2, H3, H4, H5, H6, P, TD, TH {
18 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
21 H1 { font-size: 2em; }
22 H2 { font-size: 1.75em; }
23 H3 { font-size: 1.5em; }
24 H4 { font-size: 1.25em; }
27 font-family: monaco, courier, monospace;
32 font-family: monaco, courier, monospace;
36 border-left: solid 2px #777;
45 PRE.command, PRE.example {
72 PRE.command EM, PRE.example EM {
73 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
77 font-family: monaco, courier, monospace;
93 -moz-border-radius: 10px;
98 text-decoration: none;
101 A:link:hover, A:visited:hover, A:active {
102 text-decoration: underline;
109 TR.data, TD.data, TR.data TD {
112 border-bottom: solid 1pt #999999;
116 border-bottom: solid 1pt #999999;
123 border: solid thin #999999;
124 border-collapse: collapse;
140 border: solid thin #cccccc;
147 border-bottom: solid thin #999999;
156 caption-side: bottom;
180 border: thin solid black;
188 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
197 border-bottom: solid 2pt #000000;
200 DIV.indent, TABLE.indent {
208 border-collapse: collapse;
211 TABLE.indent TD, TABLE.indent TH {
216 border-collapse: collapse;
224 border-bottom: solid thin #cccccc;
229 vertical-align: bottom;
238 border-bottom: solid thin #eeeeee;
243 TABLE.list TR:nth-child(even) {
247 TABLE.list TR:nth-child(odd) {
266 font-family: monaco, courier, monospace;
270 border: solid thin #999999;
271 border-collapse: collapse;
276 DIV.summary TABLE TD, DIV.summary TABLE TH {
277 border: solid thin #999999;
283 DIV.summary TABLE THEAD TH {
287 /* API documentation styles... */
299 margin-bottom: 0.5em;
304 margin-bottom: 0.5em;
309 margin-bottom: 0.5em;
314 border: solid thin black;
323 div.contents ul.contents {
327 border-bottom: solid 2px gray;
337 border-bottom: solid 2px gray;
340 border-bottom: solid 2px gray;
352 border-bottom: solid 2px gray;
355 border-bottom: solid 2px gray;
358 border-bottom: solid 2px gray;
362 h1, h2, h3, h4, h5, h6 {
363 page-break-inside: avoid;
366 border: solid thin gray;
367 box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
368 padding: 10px 10px 0px;
369 page-break-inside: avoid;
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;
376 -webkit-hyphens: manual;
377 page-break-inside: avoid;
379 p.code, pre, ul.code li {
386 text-decoration: none;
390 border: solid thin black;
397 h2 span.info, h3 span.info, h4 span.info {
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;
410 ul.code, ul.contents, ul.subcontents {
411 list-style-type: none;
421 ul.contents li ul.code, ul.contents li ul.subcontents {
425 border-collapse: collapse;
428 table.list tr:nth-child(even) {
429 background: rgba(127,127,127,0.1);]n}
431 border-right: 2px solid gray;
432 font-family: monospace;
433 padding: 5px 10px 5px 2px;
438 padding: 5px 2px 5px 10px;
445 border-bottom: solid 2px black;
448 border-bottom: solid 2px black;
454 Raster API documentation for CUPS.
456 Copyright © 2008-2019 by Apple Inc.
458 Licensed under Apache License v2.0. See the file "LICENSE" for more
462 <h1 class='title'
>Raster API
</h1>
464 <div class='summary'
><table summary='General Information'
>
468 <th>cups/raster.h
</th>
478 <td>Programming:
<a href='cupspm.html'
>CUPS Programming Manual
</a><br>
479 Programming:
<a href='api-ppd.html'
>PPD API
</a><br>
480 References:
<a href='spec-ppd.html'
>CUPS PPD Specification
</a></td>
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>
493 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"subcontents">
494 <li><a href=
"#cupsRasterClose">cupsRasterClose
</a></li>
495 <li><a href=
"#cupsRasterErrorString">cupsRasterErrorString
</a></li>
496 <li><a href=
"#cupsRasterInitPWGHeader">cupsRasterInitPWGHeader
</a></li>
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>
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>
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>
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>
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>
540 Raster API introduction for CUPS.
542 Copyright © 2007-2019 by Apple Inc.
543 Copyright © 1997-2006 by Easy Software Products, all rights reserved.
545 Licensed under Apache License v2.0. See the file "LICENSE" for more
549 <h2 class='title'
><a name=
"OVERVIEW">Overview
</a></h2>
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>
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>
558 (macOS) that produce CUPS raster files and printer driver filters that
559 convert CUPS raster files into a format usable by the printer. Printer
560 driver filters are by far the most common.
</p>
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>
571 <pre class=
"example">
572 #include
<cups/raster.h
>
574 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras =
<a href=
"#cupsRasterOpen">cupsRasterOpen
</a>(
0, CUPS_RASTER_READ);
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,
580 hardware resolution, and so forth used for the page.
</p>
582 <blockquote><b>Note:
</b>
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>
594 <p>You read the page header using the
595 <a href=
"#cupsRasterReadHeader2"><code>cupsRasterReadHeader2
</code></a>
598 <pre class=
"example">
599 #include
<cups/raster.h
>
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;
604 while (
<a href=
"#cupsRasterReadHeader2">cupsRasterReadHeader2
</a>(ras,
&header))
606 /* setup this page */
608 /* read raster data */
610 /* finish this page */
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
621 <pre class=
"example">
622 #include
<cups/raster.h
>
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;
630 while (
<a href=
"#cupsRasterReadHeader2">cupsRasterReadHeader2
</a>(ras,
&header))
632 /* setup this page */
634 fprintf(stderr,
"PAGE: %d %d\n", page, header.NumCopies);
636 /* allocate memory for
1 line */
637 buffer = malloc(header.cupsBytesPerLine);
639 /* read raster data */
640 for (y =
0; y
< header.cupsHeight; y ++)
642 if (
<a href=
"#cupsRasterReadPixels">cupsRasterReadPixels
</a>(ras, buffer, header.cupsBytesPerLine) ==
0)
645 /* write raster data to printer on stdout */
648 /* finish this page */
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>
656 <pre class=
"example">
657 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras;
659 <a href=
"#cupsRasterClose">cupsRasterClose
</a>(ras);
663 <h2 class='title'
><a name=
"TASKS">Functions by Task
</a></h2>
665 <h3><a name=
"OPENCLOSE">Opening and Closing Raster Streams
</a></h3>
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>
674 <h3><a name=
"READING">Reading Raster Streams
</a></h3>
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>
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>
684 <h3><a name=
"WRITING">Writing Raster Streams
</a></h3>
688 <li><a href=
"#cupsRasterInitPWGHeader" title=
"Interpret IPP attributes to create a page header.">cupsRasterInitPWGHeader
</a></li>
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>
690 <li><a href=
"#cupsRasterWriteHeader2" title=
"Write a raster page header from a version 2 page header structure.">cupsRasterWriteHeader2
</a></li>
691 <li><a href=
"#cupsRasterWritePixels" title=
"Write raster pixels.">cupsRasterWritePixels
</a></li>
694 <h2 class=
"title"><a id=
"FUNCTIONS">Functions
</a></h2>
695 <h3 class=
"function"><a id=
"cupsRasterClose">cupsRasterClose
</a></h3>
696 <p class=
"description">Close a raster stream.
</p>
698 void cupsRasterClose(
<a href=
"#cups_raster_t">cups_raster_t
</a> *r);
</p>
699 <h4 class=
"parameters">Parameters
</h4>
700 <table class=
"list"><tbody>
702 <td class=
"description">Stream to close
</td></tr>
704 <h4 class=
"discussion">Discussion
</h4>
705 <p class=
"discussion">The file descriptor associated with the raster stream must be closed
706 separately as needed.
</p>
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>
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.
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>
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>
721 <h4 class=
"parameters">Parameters
</h4>
722 <table class=
"list"><tbody>
724 <td class=
"description">Page header
</td></tr>
726 <td class=
"description">PWG media information
</td></tr>
728 <td class=
"description">PWG raster type string
</td></tr>
730 <td class=
"description">Cross-feed direction (horizontal) resolution
</td></tr>
732 <td class=
"description">Feed direction (vertical) resolution
</td></tr>
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>
738 <h4 class=
"returnvalue">Return Value
</h4>
739 <p class=
"description">1 on success,
0 on failure
</p>
740 <h4 class=
"discussion">Discussion
</h4>
741 <p class=
"discussion">The
"media
" argument specifies the media to use.
<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>
746 The
"xres
" and
"yres
" arguments specify the raster resolution in dots per
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.
753 <h3 class=
"function"><a id=
"cupsRasterOpen">cupsRasterOpen
</a></h3>
754 <p class=
"description">Open a raster stream using a file descriptor.
</p>
756 <a href=
"#cups_raster_t">cups_raster_t
</a> *cupsRasterOpen(int fd,
<a href=
"#cups_mode_t">cups_mode_t
</a> mode);
</p>
757 <h4 class=
"parameters">Parameters
</h4>
758 <table class=
"list"><tbody>
760 <td class=
"description">File descriptor
</td></tr>
762 <td class=
"description">Mode -
<code>CUPS_RASTER_READ
</code>,
763 <code>CUPS_RASTER_WRITE
</code>,
764 <code>CUPS_RASTER_WRITE_COMPRESSED
</code>,
765 or
<code>CUPS_RASTER_WRITE_PWG
</code></td></tr>
767 <h4 class=
"returnvalue">Return Value
</h4>
768 <p class=
"description">New stream
</p>
769 <h4 class=
"discussion">Discussion
</h4>
770 <p class=
"discussion">This function associates a raster stream with the given file descriptor.
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
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>
779 <h3 class=
"function"><a id=
"cupsRasterOpenIO">cupsRasterOpenIO
</a></h3>
780 <p class=
"description">Open a raster stream using a callback function.
</p>
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>
783 <h4 class=
"parameters">Parameters
</h4>
784 <table class=
"list"><tbody>
786 <td class=
"description">Read/write callback
</td></tr>
788 <td class=
"description">Context pointer for callback
</td></tr>
790 <td class=
"description">Mode -
<code>CUPS_RASTER_READ
</code>,
791 <code>CUPS_RASTER_WRITE
</code>,
792 <code>CUPS_RASTER_WRITE_COMPRESSED
</code>,
793 or
<code>CUPS_RASTER_WRITE_PWG
</code></td></tr>
795 <h4 class=
"returnvalue">Return Value
</h4>
796 <p class=
"description">New stream
</p>
797 <h4 class=
"discussion">Discussion
</h4>
798 <p class=
"discussion">This function associates a raster stream with the given callback function and
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>
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
807 version
1 page header structure.
</p>
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>
810 <h4 class=
"parameters">Parameters
</h4>
811 <table class=
"list"><tbody>
813 <td class=
"description">Raster stream
</td></tr>
815 <td class=
"description">Pointer to header data
</td></tr>
817 <h4 class=
"returnvalue">Return Value
</h4>
818 <p class=
"description">1 on success,
0 on failure/end-of-file
</p>
819 <h4 class=
"discussion">Discussion
</h4>
820 <p class=
"discussion">This function is deprecated. Use
<a href=
"#cupsRasterReadHeader2"><code>cupsRasterReadHeader2
</code></a> instead.
<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.
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
829 version
2 page header structure.
</p>
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>
832 <h4 class=
"parameters">Parameters
</h4>
833 <table class=
"list"><tbody>
835 <td class=
"description">Raster stream
</td></tr>
837 <td class=
"description">Pointer to header data
</td></tr>
839 <h4 class=
"returnvalue">Return Value
</h4>
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>
844 unsigned cupsRasterReadPixels(
<a href=
"#cups_raster_t">cups_raster_t
</a> *r, unsigned char *p, unsigned len);
</p>
845 <h4 class=
"parameters">Parameters
</h4>
846 <table class=
"list"><tbody>
848 <td class=
"description">Raster stream
</td></tr>
850 <td class=
"description">Pointer to pixel buffer
</td></tr>
852 <td class=
"description">Number of bytes to read
</td></tr>
854 <h4 class=
"returnvalue">Return Value
</h4>
855 <p class=
"description">Number of bytes read
</p>
856 <h4 class=
"discussion">Discussion
</h4>
857 <p class=
"discussion">For best performance, filters should read one or more whole lines.
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>
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
862 header structure.
</p>
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>
865 <h4 class=
"parameters">Parameters
</h4>
866 <table class=
"list"><tbody>
868 <td class=
"description">Raster stream
</td></tr>
870 <td class=
"description">Raster page header
</td></tr>
872 <h4 class=
"returnvalue">Return Value
</h4>
873 <p class=
"description">1 on success,
0 on failure
</p>
874 <h4 class=
"discussion">Discussion
</h4>
875 <p class=
"discussion">This function is deprecated. Use
<a href=
"#cupsRasterWriteHeader2"><code>cupsRasterWriteHeader2
</code></a> instead.
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
880 page header structure.
</p>
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>
883 <h4 class=
"parameters">Parameters
</h4>
884 <table class=
"list"><tbody>
886 <td class=
"description">Raster stream
</td></tr>
888 <td class=
"description">Raster page header
</td></tr>
890 <h4 class=
"returnvalue">Return Value
</h4>
891 <p class=
"description">1 on success,
0 on failure
</p>
892 <h4 class=
"discussion">Discussion
</h4>
893 <p class=
"discussion">The page header can be initialized using
<a href=
"#cupsRasterInitPWGHeader"><code>cupsRasterInitPWGHeader
</code></a>.
896 <h3 class=
"function"><a id=
"cupsRasterWritePixels">cupsRasterWritePixels
</a></h3>
897 <p class=
"description">Write raster pixels.
</p>
899 unsigned cupsRasterWritePixels(
<a href=
"#cups_raster_t">cups_raster_t
</a> *r, unsigned char *p, unsigned len);
</p>
900 <h4 class=
"parameters">Parameters
</h4>
901 <table class=
"list"><tbody>
903 <td class=
"description">Raster stream
</td></tr>
905 <td class=
"description">Bytes to write
</td></tr>
907 <td class=
"description">Number of bytes to write
</td></tr>
909 <h4 class=
"returnvalue">Return Value
</h4>
910 <p class=
"description">Number of bytes written
</p>
911 <h4 class=
"discussion">Discussion
</h4>
912 <p class=
"discussion">For best performance, filters should write one or more whole lines.
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>
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>
919 typedef enum
<a href=
"#cups_adv_e">cups_adv_e
</a> cups_adv_t;
921 <h3 class=
"typedef"><a id=
"cups_bool_t">cups_bool_t
</a></h3>
922 <p class=
"description">Boolean type
</p>
924 typedef enum
<a href=
"#cups_bool_e">cups_bool_e
</a> cups_bool_t;
926 <h3 class=
"typedef"><a id=
"cups_cspace_t">cups_cspace_t
</a></h3>
927 <p class=
"description">cupsColorSpace attribute values
</p>
929 typedef enum
<a href=
"#cups_cspace_e">cups_cspace_e
</a> cups_cspace_t;
931 <h3 class=
"typedef"><a id=
"cups_cut_t">cups_cut_t
</a></h3>
932 <p class=
"description">CutMedia attribute values
</p>
934 typedef enum
<a href=
"#cups_cut_e">cups_cut_e
</a> cups_cut_t;
936 <h3 class=
"typedef"><a id=
"cups_edge_t">cups_edge_t
</a></h3>
937 <p class=
"description">LeadingEdge attribute values
</p>
939 typedef enum
<a href=
"#cups_edge_e">cups_edge_e
</a> cups_edge_t;
941 <h3 class=
"typedef"><a id=
"cups_jog_t">cups_jog_t
</a></h3>
942 <p class=
"description">Jog attribute values
</p>
944 typedef enum
<a href=
"#cups_jog_e">cups_jog_e
</a> cups_jog_t;
946 <h3 class=
"typedef"><a id=
"cups_mode_t">cups_mode_t
</a></h3>
947 <p class=
"description">cupsRasterOpen modes
</p>
949 typedef enum
<a href=
"#cups_mode_e">cups_mode_e
</a> cups_mode_t;
951 <h3 class=
"typedef"><a id=
"cups_order_t">cups_order_t
</a></h3>
952 <p class=
"description">cupsColorOrder attribute values
</p>
954 typedef enum
<a href=
"#cups_order_e">cups_order_e
</a> cups_order_t;
956 <h3 class=
"typedef"><a id=
"cups_orient_t">cups_orient_t
</a></h3>
957 <p class=
"description">Orientation attribute values
</p>
959 typedef enum
<a href=
"#cups_orient_e">cups_orient_e
</a> cups_orient_t;
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>
964 typedef struct
<a href=
"#cups_page_header2_s">cups_page_header2_s
</a> cups_page_header2_t;
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>
969 typedef struct
<a href=
"#cups_page_header_s">cups_page_header_s
</a> cups_page_header_t;
971 <h3 class=
"typedef"><a id=
"cups_raster_iocb_t">cups_raster_iocb_t
</a></h3>
972 <p class=
"description">cupsRasterOpenIO callback function
</p>
974 typedef ssize_t (*cups_raster_iocb_t)(void *ctx, unsigned char *buffer, size_t length);
976 <h3 class=
"typedef"><a id=
"cups_raster_t">cups_raster_t
</a></h3>
977 <p class=
"description">Raster stream data
</p>
979 typedef struct _cups_raster_s cups_raster_t;
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>
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>
1035 <h4 class=
"members">Members
</h4>
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>
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
1109 (scaling factor not applied, left,
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>
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>
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>
1182 <h4 class=
"members">Members
</h4>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>