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.2">
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;
455 Raster API documentation for CUPS.
457 Copyright © 2008-2019 by Apple Inc.
459 Licensed under Apache License v2.0. See the file "LICENSE" for more
463 <h1 class='title'
>Raster API
</h1>
465 <div class='summary'
><table summary='General Information'
>
469 <th>cups/raster.h
</th>
479 <td>Programming:
<a href='cupspm.html'
>CUPS Programming Manual
</a><br>
480 Programming:
<a href='api-ppd.html'
>PPD API
</a><br>
481 References:
<a href='spec-ppd.html'
>CUPS PPD Specification
</a></td>
486 <div class=
"contents">
487 <h2 class=
"title">Contents
</h2>
488 <ul class=
"contents">
489 <li><a href=
"#OVERVIEW">Overview
</a></li>
490 <li><a href=
"#TASKS">Functions by Task
</a><ul class=
"subcontents">
491 <li><a href=
"#OPENCLOSE">Opening and Closing Raster Streams
</a></li>
492 <li><a href=
"#READING">Reading Raster Streams
</a></li>
493 <li><a href=
"#WRITING">Writing Raster Streams
</a></li>
495 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"subcontents">
496 <li><a href=
"#cupsRasterClose">cupsRasterClose
</a></li>
497 <li><a href=
"#cupsRasterErrorString">cupsRasterErrorString
</a></li>
498 <li><a href=
"#cupsRasterInitPWGHeader">cupsRasterInitPWGHeader
</a></li>
499 <li><a href=
"#cupsRasterOpen">cupsRasterOpen
</a></li>
500 <li><a href=
"#cupsRasterOpenIO">cupsRasterOpenIO
</a></li>
501 <li><a href=
"#cupsRasterReadHeader">cupsRasterReadHeader
</a></li>
502 <li><a href=
"#cupsRasterReadHeader2">cupsRasterReadHeader2
</a></li>
503 <li><a href=
"#cupsRasterReadPixels">cupsRasterReadPixels
</a></li>
504 <li><a href=
"#cupsRasterWriteHeader">cupsRasterWriteHeader
</a></li>
505 <li><a href=
"#cupsRasterWriteHeader2">cupsRasterWriteHeader2
</a></li>
506 <li><a href=
"#cupsRasterWritePixels">cupsRasterWritePixels
</a></li>
508 <li><a href=
"#TYPES">Data Types
</a><ul class=
"subcontents">
509 <li><a href=
"#cups_adv_t">cups_adv_t
</a></li>
510 <li><a href=
"#cups_bool_t">cups_bool_t
</a></li>
511 <li><a href=
"#cups_cspace_t">cups_cspace_t
</a></li>
512 <li><a href=
"#cups_cut_t">cups_cut_t
</a></li>
513 <li><a href=
"#cups_edge_t">cups_edge_t
</a></li>
514 <li><a href=
"#cups_jog_t">cups_jog_t
</a></li>
515 <li><a href=
"#cups_mode_t">cups_mode_t
</a></li>
516 <li><a href=
"#cups_order_t">cups_order_t
</a></li>
517 <li><a href=
"#cups_orient_t">cups_orient_t
</a></li>
518 <li><a href=
"#cups_page_header2_t">cups_page_header2_t
</a></li>
519 <li><a href=
"#cups_page_header_t">cups_page_header_t
</a></li>
520 <li><a href=
"#cups_raster_iocb_t">cups_raster_iocb_t
</a></li>
521 <li><a href=
"#cups_raster_t">cups_raster_t
</a></li>
523 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"subcontents">
524 <li><a href=
"#cups_page_header2_s">cups_page_header2_s
</a></li>
525 <li><a href=
"#cups_page_header_s">cups_page_header_s
</a></li>
527 <li><a href=
"#ENUMERATIONS">Enumerations
</a><ul class=
"subcontents">
528 <li><a href=
"#cups_adv_e">cups_adv_e
</a></li>
529 <li><a href=
"#cups_bool_e">cups_bool_e
</a></li>
530 <li><a href=
"#cups_cspace_e">cups_cspace_e
</a></li>
531 <li><a href=
"#cups_cut_e">cups_cut_e
</a></li>
532 <li><a href=
"#cups_edge_e">cups_edge_e
</a></li>
533 <li><a href=
"#cups_jog_e">cups_jog_e
</a></li>
534 <li><a href=
"#cups_mode_e">cups_mode_e
</a></li>
535 <li><a href=
"#cups_order_e">cups_order_e
</a></li>
536 <li><a href=
"#cups_orient_e">cups_orient_e
</a></li>
542 Raster API introduction for CUPS.
544 Copyright © 2007-2019 by Apple Inc.
545 Copyright © 1997-2006 by Easy Software Products, all rights reserved.
547 Licensed under Apache License v2.0. See the file "LICENSE" for more
551 <h2 class='title'
><a name=
"OVERVIEW">Overview
</a></h2>
553 <p>The CUPS raster API provides a standard interface for reading and writing
554 CUPS raster streams which are used for printing to raster printers. Because the
555 raster format is updated from time to time, it is important to use this API to
556 avoid incompatibilities with newer versions of CUPS.
</p>
558 <p>Two kinds of CUPS filters use the CUPS raster API - raster image processor
559 (RIP) filters such as
<code>pstoraster
</code> and
<code>cgpdftoraster
</code>
560 (macOS) that produce CUPS raster files and printer driver filters that
561 convert CUPS raster files into a format usable by the printer. Printer
562 driver filters are by far the most common.
</p>
564 <p>CUPS raster files (
<code>application/vnd.cups-raster
</code>) consists of
565 a stream of raster page descriptions produced by one of the RIP filters such as
566 <var>pstoraster
</var>,
<var>imagetoraster
</var>, or
567 <var>cgpdftoraster
</var>. CUPS raster files are referred to using the
568 <a href='#cups_raster_t'
><code>cups_raster_t
</code></a> type and are
569 opened using the
<a href='#cupsRasterOpen'
><code>cupsRasterOpen
</code></a>
570 function. For example, to read raster data from the standard input, open
571 file descriptor
0:
</p>
573 <pre class=
"example">
574 #include
<cups/raster.h
>
576 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras =
<a href=
"#cupsRasterOpen">cupsRasterOpen
</a>(
0, CUPS_RASTER_READ);
579 <p>Each page of data begins with a page dictionary structure called
580 <a href=
"#cups_page_header2_t"><code>cups_page_header2_t
</code></a>. This
581 structure contains the colorspace, bits per color, media size, media type,
582 hardware resolution, and so forth used for the page.
</p>
584 <blockquote><b>Note:
</b>
586 <p>Do not confuse the colorspace in the page header with the PPD
587 <tt>ColorModel
</tt> keyword.
<tt>ColorModel
</tt> refers to the general type of
588 color used for a device (Gray, RGB, CMYK, DeviceN) and is often used to
589 select a particular colorspace for the page header along with the associate
590 color profile. The page header colorspace (
<tt>cupsColorSpace
</tt>) describes
591 both the type and organization of the color data, for example KCMY (black
592 first) instead of CMYK and RGBA (RGB + alpha) instead of RGB.
</p>
596 <p>You read the page header using the
597 <a href=
"#cupsRasterReadHeader2"><code>cupsRasterReadHeader2
</code></a>
600 <pre class=
"example">
601 #include
<cups/raster.h
>
603 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras =
<a href=
"#cupsRasterOpen">cupsRasterOpen
</a>(
0, CUPS_RASTER_READ);
604 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> header;
606 while (
<a href=
"#cupsRasterReadHeader2">cupsRasterReadHeader2
</a>(ras,
&header))
608 /* setup this page */
610 /* read raster data */
612 /* finish this page */
616 <p>After the page dictionary comes the page data which is a full-resolution,
617 possibly compressed bitmap representing the page in the printer's output
618 colorspace. You read uncompressed raster data using the
619 <a href=
"#cupsRasterReadPixels"><code>cupsRasterReadPixels
</code></a>
620 function. A
<code>for
</code> loop is normally used to read the page one line
623 <pre class=
"example">
624 #include
<cups/raster.h
>
626 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras =
<a href=
"#cupsRasterOpen">cupsRasterOpen
</a>(
0, CUPS_RASTER_READ);
627 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> header;
632 while (
<a href=
"#cupsRasterReadHeader2">cupsRasterReadHeader2
</a>(ras,
&header))
634 /* setup this page */
636 fprintf(stderr,
"PAGE: %d %d\n", page, header.NumCopies);
638 /* allocate memory for
1 line */
639 buffer = malloc(header.cupsBytesPerLine);
641 /* read raster data */
642 for (y =
0; y
< header.cupsHeight; y ++)
644 if (
<a href=
"#cupsRasterReadPixels">cupsRasterReadPixels
</a>(ras, buffer, header.cupsBytesPerLine) ==
0)
647 /* write raster data to printer on stdout */
650 /* finish this page */
654 <p>When you are done reading the raster data, call the
655 <a href=
"#cupsRasterClose"><code>cupsRasterClose
</code></a> function to free
656 the memory used to read the raster file:
</p>
658 <pre class=
"example">
659 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras;
661 <a href=
"#cupsRasterClose">cupsRasterClose
</a>(ras);
665 <h2 class='title'
><a name=
"TASKS">Functions by Task
</a></h2>
667 <h3><a name=
"OPENCLOSE">Opening and Closing Raster Streams
</a></h3>
671 <li><a href=
"#cupsRasterClose" title=
"Close a raster stream.">cupsRasterClose
</a></li>
672 <li><a href=
"#cupsRasterOpen" title=
"Open a raster stream.">cupsRasterOpen
</a></li>
676 <h3><a name=
"READING">Reading Raster Streams
</a></h3>
680 <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>
681 <li><a href=
"#cupsRasterReadHeader2" title=
"Read a raster page header and store it in a version 2 page header structure.">cupsRasterReadHeader2
</a></li>
682 <li><a href=
"#cupsRasterReadPixels" title=
"Read raster pixels.">cupsRasterReadPixels
</a></li>
686 <h3><a name=
"WRITING">Writing Raster Streams
</a></h3>
690 <li><a href=
"#cupsRasterInitPWGHeader" title=
"Interpret IPP attributes to create a page header.">cupsRasterInitPWGHeader
</a></li>
691 <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>
692 <li><a href=
"#cupsRasterWriteHeader2" title=
"Write a raster page header from a version 2 page header structure.">cupsRasterWriteHeader2
</a></li>
693 <li><a href=
"#cupsRasterWritePixels" title=
"Write raster pixels.">cupsRasterWritePixels
</a></li>
696 <h2 class=
"title"><a id=
"FUNCTIONS">Functions
</a></h2>
697 <h3 class=
"function"><a id=
"cupsRasterClose">cupsRasterClose
</a></h3>
698 <p class=
"description">Close a raster stream.
</p>
700 void cupsRasterClose(
<a href=
"#cups_raster_t">cups_raster_t
</a> *r);
</p>
701 <h4 class=
"parameters">Parameters
</h4>
702 <table class=
"list"><tbody>
704 <td class=
"description">Stream to close
</td></tr>
706 <h4 class=
"discussion">Discussion
</h4>
707 <p class=
"discussion">The file descriptor associated with the raster stream must be closed
708 separately as needed.
</p>
709 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a id=
"cupsRasterErrorString">cupsRasterErrorString
</a></h3>
710 <p class=
"description">Return the last error from a raster function.
</p>
712 const char *cupsRasterErrorString(void);
</p>
713 <h4 class=
"returnvalue">Return Value
</h4>
714 <p class=
"description">Last error or
<code>NULL
</code></p>
715 <h4 class=
"discussion">Discussion
</h4>
716 <p class=
"discussion">If there are no recent errors,
<code>NULL
</code> is returned.
719 <h3 class=
"function"><span class=
"info"> CUPS
2.2/macOS
10.12 </span><a id=
"cupsRasterInitPWGHeader">cupsRasterInitPWGHeader
</a></h3>
720 <p class=
"description">Initialize a page header for PWG Raster output.
</p>
722 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>
723 <h4 class=
"parameters">Parameters
</h4>
724 <table class=
"list"><tbody>
726 <td class=
"description">Page header
</td></tr>
728 <td class=
"description">PWG media information
</td></tr>
730 <td class=
"description">PWG raster type string
</td></tr>
732 <td class=
"description">Cross-feed direction (horizontal) resolution
</td></tr>
734 <td class=
"description">Feed direction (vertical) resolution
</td></tr>
736 <td class=
"description">IPP
"sides
" option value
</td></tr>
737 <tr><th>sheet_back
</th>
738 <td class=
"description">Transform for back side or
<code>NULL
</code> for none
</td></tr>
740 <h4 class=
"returnvalue">Return Value
</h4>
741 <p class=
"description">1 on success,
0 on failure
</p>
742 <h4 class=
"discussion">Discussion
</h4>
743 <p class=
"discussion">The
"media
" argument specifies the media to use.
<br>
745 The
"type
" argument specifies a
"pwg-raster-document-type-supported
" value
746 that controls the color space and bit depth of the raster data.
<br>
748 The
"xres
" and
"yres
" arguments specify the raster resolution in dots per
751 The
"sheet_back
" argument specifies a
"pwg-raster-document-sheet-back
" value
752 to apply for the back side of a page. Pass
<code>NULL
</code> for the front side.
755 <h3 class=
"function"><a id=
"cupsRasterOpen">cupsRasterOpen
</a></h3>
756 <p class=
"description">Open a raster stream using a file descriptor.
</p>
758 <a href=
"#cups_raster_t">cups_raster_t
</a> *cupsRasterOpen(int fd,
<a href=
"#cups_mode_t">cups_mode_t
</a> mode);
</p>
759 <h4 class=
"parameters">Parameters
</h4>
760 <table class=
"list"><tbody>
762 <td class=
"description">File descriptor
</td></tr>
764 <td class=
"description">Mode -
<code>CUPS_RASTER_READ
</code>,
765 <code>CUPS_RASTER_WRITE
</code>,
766 <code>CUPS_RASTER_WRITE_COMPRESSED
</code>,
767 or
<code>CUPS_RASTER_WRITE_PWG
</code></td></tr>
769 <h4 class=
"returnvalue">Return Value
</h4>
770 <p class=
"description">New stream
</p>
771 <h4 class=
"discussion">Discussion
</h4>
772 <p class=
"discussion">This function associates a raster stream with the given file descriptor.
773 For most printer driver filters,
"fd
" will be
0 (stdin). For most raster
774 image processor (RIP) filters that generate raster data,
"fd
" will be
1
777 When writing raster data, the
<code>CUPS_RASTER_WRITE
</code>,
778 <code>CUPS_RASTER_WRITE_COMPRESS
</code>, or
<code>CUPS_RASTER_WRITE_PWG
</code> mode can
779 be used - compressed and PWG output is generally
25-
50% smaller but adds a
780 100-
300% execution time overhead.
</p>
781 <h3 class=
"function"><a id=
"cupsRasterOpenIO">cupsRasterOpenIO
</a></h3>
782 <p class=
"description">Open a raster stream using a callback function.
</p>
784 <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>
785 <h4 class=
"parameters">Parameters
</h4>
786 <table class=
"list"><tbody>
788 <td class=
"description">Read/write callback
</td></tr>
790 <td class=
"description">Context pointer for callback
</td></tr>
792 <td class=
"description">Mode -
<code>CUPS_RASTER_READ
</code>,
793 <code>CUPS_RASTER_WRITE
</code>,
794 <code>CUPS_RASTER_WRITE_COMPRESSED
</code>,
795 or
<code>CUPS_RASTER_WRITE_PWG
</code></td></tr>
797 <h4 class=
"returnvalue">Return Value
</h4>
798 <p class=
"description">New stream
</p>
799 <h4 class=
"discussion">Discussion
</h4>
800 <p class=
"discussion">This function associates a raster stream with the given callback function and
803 When writing raster data, the
<code>CUPS_RASTER_WRITE
</code>,
804 <code>CUPS_RASTER_WRITE_COMPRESS
</code>, or
<code>CUPS_RASTER_WRITE_PWG
</code> mode can
805 be used - compressed and PWG output is generally
25-
50% smaller but adds a
806 100-
300% execution time overhead.
</p>
807 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"cupsRasterReadHeader">cupsRasterReadHeader
</a></h3>
808 <p class=
"description">Read a raster page header and store it in a
809 version
1 page header structure.
</p>
811 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>
812 <h4 class=
"parameters">Parameters
</h4>
813 <table class=
"list"><tbody>
815 <td class=
"description">Raster stream
</td></tr>
817 <td class=
"description">Pointer to header data
</td></tr>
819 <h4 class=
"returnvalue">Return Value
</h4>
820 <p class=
"description">1 on success,
0 on failure/end-of-file
</p>
821 <h4 class=
"discussion">Discussion
</h4>
822 <p class=
"discussion">This function is deprecated. Use
<a href=
"#cupsRasterReadHeader2"><code>cupsRasterReadHeader2
</code></a> instead.
<br>
824 Version
1 page headers were used in CUPS
1.0 and
1.1 and contain a subset
825 of the version
2 page header data. This function handles reading version
2
826 page headers and copying only the version
1 data into the provided buffer.
829 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"cupsRasterReadHeader2">cupsRasterReadHeader2
</a></h3>
830 <p class=
"description">Read a raster page header and store it in a
831 version
2 page header structure.
</p>
833 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>
834 <h4 class=
"parameters">Parameters
</h4>
835 <table class=
"list"><tbody>
837 <td class=
"description">Raster stream
</td></tr>
839 <td class=
"description">Pointer to header data
</td></tr>
841 <h4 class=
"returnvalue">Return Value
</h4>
842 <p class=
"description">1 on success,
0 on failure/end-of-file
</p>
843 <h3 class=
"function"><a id=
"cupsRasterReadPixels">cupsRasterReadPixels
</a></h3>
844 <p class=
"description">Read raster pixels.
</p>
846 unsigned cupsRasterReadPixels(
<a href=
"#cups_raster_t">cups_raster_t
</a> *r, unsigned char *p, unsigned len);
</p>
847 <h4 class=
"parameters">Parameters
</h4>
848 <table class=
"list"><tbody>
850 <td class=
"description">Raster stream
</td></tr>
852 <td class=
"description">Pointer to pixel buffer
</td></tr>
854 <td class=
"description">Number of bytes to read
</td></tr>
856 <h4 class=
"returnvalue">Return Value
</h4>
857 <p class=
"description">Number of bytes read
</p>
858 <h4 class=
"discussion">Discussion
</h4>
859 <p class=
"discussion">For best performance, filters should read one or more whole lines.
860 The
"cupsBytesPerLine
" value from the page header can be used to allocate
861 the line buffer and as the number of bytes to read.
</p>
862 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"cupsRasterWriteHeader">cupsRasterWriteHeader
</a></h3>
863 <p class=
"description">Write a raster page header from a version
1 page
864 header structure.
</p>
866 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>
867 <h4 class=
"parameters">Parameters
</h4>
868 <table class=
"list"><tbody>
870 <td class=
"description">Raster stream
</td></tr>
872 <td class=
"description">Raster page header
</td></tr>
874 <h4 class=
"returnvalue">Return Value
</h4>
875 <p class=
"description">1 on success,
0 on failure
</p>
876 <h4 class=
"discussion">Discussion
</h4>
877 <p class=
"discussion">This function is deprecated. Use
<a href=
"#cupsRasterWriteHeader2"><code>cupsRasterWriteHeader2
</code></a> instead.
880 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"cupsRasterWriteHeader2">cupsRasterWriteHeader2
</a></h3>
881 <p class=
"description">Write a raster page header from a version
2
882 page header structure.
</p>
884 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>
885 <h4 class=
"parameters">Parameters
</h4>
886 <table class=
"list"><tbody>
888 <td class=
"description">Raster stream
</td></tr>
890 <td class=
"description">Raster page header
</td></tr>
892 <h4 class=
"returnvalue">Return Value
</h4>
893 <p class=
"description">1 on success,
0 on failure
</p>
894 <h4 class=
"discussion">Discussion
</h4>
895 <p class=
"discussion">The page header can be initialized using
<a href=
"#cupsRasterInitPWGHeader"><code>cupsRasterInitPWGHeader
</code></a>.
898 <h3 class=
"function"><a id=
"cupsRasterWritePixels">cupsRasterWritePixels
</a></h3>
899 <p class=
"description">Write raster pixels.
</p>
901 unsigned cupsRasterWritePixels(
<a href=
"#cups_raster_t">cups_raster_t
</a> *r, unsigned char *p, unsigned len);
</p>
902 <h4 class=
"parameters">Parameters
</h4>
903 <table class=
"list"><tbody>
905 <td class=
"description">Raster stream
</td></tr>
907 <td class=
"description">Bytes to write
</td></tr>
909 <td class=
"description">Number of bytes to write
</td></tr>
911 <h4 class=
"returnvalue">Return Value
</h4>
912 <p class=
"description">Number of bytes written
</p>
913 <h4 class=
"discussion">Discussion
</h4>
914 <p class=
"discussion">For best performance, filters should write one or more whole lines.
915 The
"cupsBytesPerLine
" value from the page header can be used to allocate
916 the line buffer and as the number of bytes to write.
</p>
917 <h2 class=
"title"><a id=
"TYPES">Data Types
</a></h2>
918 <h3 class=
"typedef"><a id=
"cups_adv_t">cups_adv_t
</a></h3>
919 <p class=
"description">AdvanceMedia attribute values
</p>
921 typedef enum
<a href=
"#cups_adv_e">cups_adv_e
</a> cups_adv_t;
923 <h3 class=
"typedef"><a id=
"cups_bool_t">cups_bool_t
</a></h3>
924 <p class=
"description">Boolean type
</p>
926 typedef enum
<a href=
"#cups_bool_e">cups_bool_e
</a> cups_bool_t;
928 <h3 class=
"typedef"><a id=
"cups_cspace_t">cups_cspace_t
</a></h3>
929 <p class=
"description">cupsColorSpace attribute values
</p>
931 typedef enum
<a href=
"#cups_cspace_e">cups_cspace_e
</a> cups_cspace_t;
933 <h3 class=
"typedef"><a id=
"cups_cut_t">cups_cut_t
</a></h3>
934 <p class=
"description">CutMedia attribute values
</p>
936 typedef enum
<a href=
"#cups_cut_e">cups_cut_e
</a> cups_cut_t;
938 <h3 class=
"typedef"><a id=
"cups_edge_t">cups_edge_t
</a></h3>
939 <p class=
"description">LeadingEdge attribute values
</p>
941 typedef enum
<a href=
"#cups_edge_e">cups_edge_e
</a> cups_edge_t;
943 <h3 class=
"typedef"><a id=
"cups_jog_t">cups_jog_t
</a></h3>
944 <p class=
"description">Jog attribute values
</p>
946 typedef enum
<a href=
"#cups_jog_e">cups_jog_e
</a> cups_jog_t;
948 <h3 class=
"typedef"><a id=
"cups_mode_t">cups_mode_t
</a></h3>
949 <p class=
"description">cupsRasterOpen modes
</p>
951 typedef enum
<a href=
"#cups_mode_e">cups_mode_e
</a> cups_mode_t;
953 <h3 class=
"typedef"><a id=
"cups_order_t">cups_order_t
</a></h3>
954 <p class=
"description">cupsColorOrder attribute values
</p>
956 typedef enum
<a href=
"#cups_order_e">cups_order_e
</a> cups_order_t;
958 <h3 class=
"typedef"><a id=
"cups_orient_t">cups_orient_t
</a></h3>
959 <p class=
"description">Orientation attribute values
</p>
961 typedef enum
<a href=
"#cups_orient_e">cups_orient_e
</a> cups_orient_t;
963 <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>
964 <p class=
"description">Version
2 page header
</p>
966 typedef struct
<a href=
"#cups_page_header2_s">cups_page_header2_s
</a> cups_page_header2_t;
968 <h3 class=
"typedef"><a id=
"cups_page_header_t"><span class=
"info"> DEPRECATED
 </span>cups_page_header_t
</a></h3>
969 <p class=
"description">Version
1 page header
</p>
971 typedef struct
<a href=
"#cups_page_header_s">cups_page_header_s
</a> cups_page_header_t;
973 <h3 class=
"typedef"><a id=
"cups_raster_iocb_t">cups_raster_iocb_t
</a></h3>
974 <p class=
"description">cupsRasterOpenIO callback function
</p>
976 typedef ssize_t (*cups_raster_iocb_t)(void *ctx, unsigned char *buffer, size_t length);
978 <h3 class=
"typedef"><a id=
"cups_raster_t">cups_raster_t
</a></h3>
979 <p class=
"description">Raster stream data
</p>
981 typedef struct _cups_raster_s cups_raster_t;
983 <h2 class=
"title"><a id=
"STRUCTURES">Structures
</a></h2>
984 <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>
985 <p class=
"description">Version
2 page header
</p>
986 <p class=
"code">struct cups_page_header2_s {
<br>
987     unsigned AdvanceDistance;
<br>
988     <a href=
"#cups_adv_t">cups_adv_t
</a> AdvanceMedia;
<br>
989     <a href=
"#cups_bool_t">cups_bool_t
</a> Collate;
<br>
990     <a href=
"#cups_cut_t">cups_cut_t
</a> CutMedia;
<br>
991     <a href=
"#cups_bool_t">cups_bool_t
</a> Duplex;
<br>
992     unsigned HWResolution[
2];
<br>
993     unsigned ImagingBoundingBox[
4];
<br>
994     <a href=
"#cups_bool_t">cups_bool_t
</a> InsertSheet;
<br>
995     <a href=
"#cups_jog_t">cups_jog_t
</a> Jog;
<br>
996     <a href=
"#cups_edge_t">cups_edge_t
</a> LeadingEdge;
<br>
997     <a href=
"#cups_bool_t">cups_bool_t
</a> ManualFeed;
<br>
998     unsigned Margins[
2];
<br>
999     char MediaClass[
64];
<br>
1000     char MediaColor[
64];
<br>
1001     unsigned MediaPosition;
<br>
1002     char MediaType[
64];
<br>
1003     unsigned MediaWeight;
<br>
1004     <a href=
"#cups_bool_t">cups_bool_t
</a> MirrorPrint;
<br>
1005     <a href=
"#cups_bool_t">cups_bool_t
</a> NegativePrint;
<br>
1006     unsigned NumCopies;
<br>
1007     <a href=
"#cups_orient_t">cups_orient_t
</a> Orientation;
<br>
1008     <a href=
"#cups_bool_t">cups_bool_t
</a> OutputFaceUp;
<br>
1009     char OutputType[
64];
<br>
1010     unsigned PageSize[
2];
<br>
1011     <a href=
"#cups_bool_t">cups_bool_t
</a> Separations;
<br>
1012     <a href=
"#cups_bool_t">cups_bool_t
</a> TraySwitch;
<br>
1013     <a href=
"#cups_bool_t">cups_bool_t
</a> Tumble;
<br>
1014     unsigned cupsBitsPerColor;
<br>
1015     unsigned cupsBitsPerPixel;
<br>
1016     float cupsBorderlessScalingFactor;
<br>
1017     unsigned cupsBytesPerLine;
<br>
1018     <a href=
"#cups_order_t">cups_order_t
</a> cupsColorOrder;
<br>
1019     <a href=
"#cups_cspace_t">cups_cspace_t
</a> cupsColorSpace;
<br>
1020     unsigned cupsCompression;
<br>
1021     unsigned cupsHeight;
<br>
1022     float cupsImagingBBox[
4];
<br>
1023     unsigned cupsInteger[
16];
<br>
1024     char cupsMarkerType[
64];
<br>
1025     unsigned cupsMediaType;
<br>
1026     unsigned cupsNumColors;
<br>
1027     char cupsPageSizeName[
64];
<br>
1028     float cupsPageSize[
2];
<br>
1029     float cupsReal[
16];
<br>
1030     char cupsRenderingIntent[
64];
<br>
1031     unsigned cupsRowCount;
<br>
1032     unsigned cupsRowFeed;
<br>
1033     unsigned cupsRowStep;
<br>
1034     char cupsString[
16][
64];
<br>
1035     unsigned cupsWidth;
<br>
1037 <h4 class=
"members">Members
</h4>
1038 <table class=
"list"><tbody>
1039 <tr><th>AdvanceDistance
</th>
1040 <td class=
"description">AdvanceDistance value in points
</td></tr>
1041 <tr><th>AdvanceMedia
</th>
1042 <td class=
"description">AdvanceMedia value (
<a href=
"#cups_adv_t"><code>cups_adv_t
</code></a>)
</td></tr>
1043 <tr><th>Collate
</th>
1044 <td class=
"description">Collated copies value
</td></tr>
1045 <tr><th>CutMedia
</th>
1046 <td class=
"description">CutMedia value (
<a href=
"#cups_cut_t"><code>cups_cut_t
</code></a>)
</td></tr>
1047 <tr><th>Duplex
</th>
1048 <td class=
"description">Duplexed (double-sided) value
</td></tr>
1049 <tr><th>HWResolution[
2]
</th>
1050 <td class=
"description">Resolution in dots-per-inch
</td></tr>
1051 <tr><th>ImagingBoundingBox[
4]
</th>
1052 <td class=
"description">Pixel region that is painted (points, left, bottom, right, top)
</td></tr>
1053 <tr><th>InsertSheet
</th>
1054 <td class=
"description">InsertSheet value
</td></tr>
1056 <td class=
"description">Jog value (
<a href=
"#cups_jog_t"><code>cups_jog_t
</code></a>)
</td></tr>
1057 <tr><th>LeadingEdge
</th>
1058 <td class=
"description">LeadingEdge value (
<a href=
"#cups_edge_t"><code>cups_edge_t
</code></a>)
</td></tr>
1059 <tr><th>ManualFeed
</th>
1060 <td class=
"description">ManualFeed value
</td></tr>
1061 <tr><th>Margins[
2]
</th>
1062 <td class=
"description">Lower-lefthand margins in points
</td></tr>
1063 <tr><th>MediaClass[
64]
</th>
1064 <td class=
"description">MediaClass string
</td></tr>
1065 <tr><th>MediaColor[
64]
</th>
1066 <td class=
"description">MediaColor string
</td></tr>
1067 <tr><th>MediaPosition
</th>
1068 <td class=
"description">MediaPosition value
</td></tr>
1069 <tr><th>MediaType[
64]
</th>
1070 <td class=
"description">MediaType string
</td></tr>
1071 <tr><th>MediaWeight
</th>
1072 <td class=
"description">MediaWeight value in grams/m^
2</td></tr>
1073 <tr><th>MirrorPrint
</th>
1074 <td class=
"description">MirrorPrint value
</td></tr>
1075 <tr><th>NegativePrint
</th>
1076 <td class=
"description">NegativePrint value
</td></tr>
1077 <tr><th>NumCopies
</th>
1078 <td class=
"description">Number of copies to produce
</td></tr>
1079 <tr><th>Orientation
</th>
1080 <td class=
"description">Orientation value (
<a href=
"#cups_orient_t"><code>cups_orient_t
</code></a>)
</td></tr>
1081 <tr><th>OutputFaceUp
</th>
1082 <td class=
"description">OutputFaceUp value
</td></tr>
1083 <tr><th>OutputType[
64]
</th>
1084 <td class=
"description">OutputType string
</td></tr>
1085 <tr><th>PageSize[
2]
</th>
1086 <td class=
"description">Width and length of page in points
</td></tr>
1087 <tr><th>Separations
</th>
1088 <td class=
"description">Separations value
</td></tr>
1089 <tr><th>TraySwitch
</th>
1090 <td class=
"description">TraySwitch value
</td></tr>
1091 <tr><th>Tumble
</th>
1092 <td class=
"description">Tumble value
</td></tr>
1093 <tr><th>cupsBitsPerColor
</th>
1094 <td class=
"description">Number of bits for each color
</td></tr>
1095 <tr><th>cupsBitsPerPixel
</th>
1096 <td class=
"description">Number of bits for each pixel
</td></tr>
1097 <tr><th>cupsBorderlessScalingFactor
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></th>
1098 <td class=
"description">Scaling that was applied to page data
</td></tr>
1099 <tr><th>cupsBytesPerLine
</th>
1100 <td class=
"description">Number of bytes per line
</td></tr>
1101 <tr><th>cupsColorOrder
</th>
1102 <td class=
"description">Order of colors
</td></tr>
1103 <tr><th>cupsColorSpace
</th>
1104 <td class=
"description">True colorspace
</td></tr>
1105 <tr><th>cupsCompression
</th>
1106 <td class=
"description">Device compression to use
</td></tr>
1107 <tr><th>cupsHeight
</th>
1108 <td class=
"description">Height of page image in pixels
</td></tr>
1109 <tr><th>cupsImagingBBox[
4]
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></th>
1110 <td class=
"description">Floating point ImagingBoundingBox
1111 (scaling factor not applied, left,
1112 bottom, right, top)
</td></tr>
1113 <tr><th>cupsInteger[
16]
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></th>
1114 <td class=
"description">User-defined integer values
</td></tr>
1115 <tr><th>cupsMarkerType[
64]
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></th>
1116 <td class=
"description">Ink/toner type
</td></tr>
1117 <tr><th>cupsMediaType
</th>
1118 <td class=
"description">Media type code
</td></tr>
1119 <tr><th>cupsNumColors
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></th>
1120 <td class=
"description">Number of color compoents
</td></tr>
1121 <tr><th>cupsPageSizeName[
64]
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></th>
1122 <td class=
"description">PageSize name
</td></tr>
1123 <tr><th>cupsPageSize[
2]
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></th>
1124 <td class=
"description">Floating point PageSize (scaling *
1125 factor not applied)
</td></tr>
1126 <tr><th>cupsReal[
16]
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></th>
1127 <td class=
"description">User-defined floating-point values
</td></tr>
1128 <tr><th>cupsRenderingIntent[
64]
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></th>
1129 <td class=
"description">Color rendering intent
</td></tr>
1130 <tr><th>cupsRowCount
</th>
1131 <td class=
"description">Rows per band
</td></tr>
1132 <tr><th>cupsRowFeed
</th>
1133 <td class=
"description">Feed between bands
</td></tr>
1134 <tr><th>cupsRowStep
</th>
1135 <td class=
"description">Spacing between lines
</td></tr>
1136 <tr><th>cupsString[
16][
64]
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></th>
1137 <td class=
"description">User-defined string values
</td></tr>
1138 <tr><th>cupsWidth
</th>
1139 <td class=
"description">Width of page image in pixels
</td></tr>
1141 <h3 class=
"struct"><span class=
"info"> DEPRECATED
 </span><a id=
"cups_page_header_s">cups_page_header_s
</a></h3>
1142 <p class=
"description">Version
1 page header
</p>
1143 <p class=
"code">struct cups_page_header_s {
<br>
1144     unsigned AdvanceDistance;
<br>
1145     <a href=
"#cups_adv_t">cups_adv_t
</a> AdvanceMedia;
<br>
1146     <a href=
"#cups_bool_t">cups_bool_t
</a> Collate;
<br>
1147     <a href=
"#cups_cut_t">cups_cut_t
</a> CutMedia;
<br>
1148     <a href=
"#cups_bool_t">cups_bool_t
</a> Duplex;
<br>
1149     unsigned HWResolution[
2];
<br>
1150     unsigned ImagingBoundingBox[
4];
<br>
1151     <a href=
"#cups_bool_t">cups_bool_t
</a> InsertSheet;
<br>
1152     <a href=
"#cups_jog_t">cups_jog_t
</a> Jog;
<br>
1153     <a href=
"#cups_edge_t">cups_edge_t
</a> LeadingEdge;
<br>
1154     <a href=
"#cups_bool_t">cups_bool_t
</a> ManualFeed;
<br>
1155     unsigned Margins[
2];
<br>
1156     char MediaClass[
64];
<br>
1157     char MediaColor[
64];
<br>
1158     unsigned MediaPosition;
<br>
1159     char MediaType[
64];
<br>
1160     unsigned MediaWeight;
<br>
1161     <a href=
"#cups_bool_t">cups_bool_t
</a> MirrorPrint;
<br>
1162     <a href=
"#cups_bool_t">cups_bool_t
</a> NegativePrint;
<br>
1163     unsigned NumCopies;
<br>
1164     <a href=
"#cups_orient_t">cups_orient_t
</a> Orientation;
<br>
1165     <a href=
"#cups_bool_t">cups_bool_t
</a> OutputFaceUp;
<br>
1166     char OutputType[
64];
<br>
1167     unsigned PageSize[
2];
<br>
1168     <a href=
"#cups_bool_t">cups_bool_t
</a> Separations;
<br>
1169     <a href=
"#cups_bool_t">cups_bool_t
</a> TraySwitch;
<br>
1170     <a href=
"#cups_bool_t">cups_bool_t
</a> Tumble;
<br>
1171     unsigned cupsBitsPerColor;
<br>
1172     unsigned cupsBitsPerPixel;
<br>
1173     unsigned cupsBytesPerLine;
<br>
1174     <a href=
"#cups_order_t">cups_order_t
</a> cupsColorOrder;
<br>
1175     <a href=
"#cups_cspace_t">cups_cspace_t
</a> cupsColorSpace;
<br>
1176     unsigned cupsCompression;
<br>
1177     unsigned cupsHeight;
<br>
1178     unsigned cupsMediaType;
<br>
1179     unsigned cupsRowCount;
<br>
1180     unsigned cupsRowFeed;
<br>
1181     unsigned cupsRowStep;
<br>
1182     unsigned cupsWidth;
<br>
1184 <h4 class=
"members">Members
</h4>
1185 <table class=
"list"><tbody>
1186 <tr><th>AdvanceDistance
</th>
1187 <td class=
"description">AdvanceDistance value in points
</td></tr>
1188 <tr><th>AdvanceMedia
</th>
1189 <td class=
"description">AdvanceMedia value (
<a href=
"#cups_adv_t"><code>cups_adv_t
</code></a>)
</td></tr>
1190 <tr><th>Collate
</th>
1191 <td class=
"description">Collated copies value
</td></tr>
1192 <tr><th>CutMedia
</th>
1193 <td class=
"description">CutMedia value (
<a href=
"#cups_cut_t"><code>cups_cut_t
</code></a>)
</td></tr>
1194 <tr><th>Duplex
</th>
1195 <td class=
"description">Duplexed (double-sided) value
</td></tr>
1196 <tr><th>HWResolution[
2]
</th>
1197 <td class=
"description">Resolution in dots-per-inch
</td></tr>
1198 <tr><th>ImagingBoundingBox[
4]
</th>
1199 <td class=
"description">Pixel region that is painted (points, left, bottom, right, top)
</td></tr>
1200 <tr><th>InsertSheet
</th>
1201 <td class=
"description">InsertSheet value
</td></tr>
1203 <td class=
"description">Jog value (
<a href=
"#cups_jog_t"><code>cups_jog_t
</code></a>)
</td></tr>
1204 <tr><th>LeadingEdge
</th>
1205 <td class=
"description">LeadingEdge value (
<a href=
"#cups_edge_t"><code>cups_edge_t
</code></a>)
</td></tr>
1206 <tr><th>ManualFeed
</th>
1207 <td class=
"description">ManualFeed value
</td></tr>
1208 <tr><th>Margins[
2]
</th>
1209 <td class=
"description">Lower-lefthand margins in points
</td></tr>
1210 <tr><th>MediaClass[
64]
</th>
1211 <td class=
"description">MediaClass string
</td></tr>
1212 <tr><th>MediaColor[
64]
</th>
1213 <td class=
"description">MediaColor string
</td></tr>
1214 <tr><th>MediaPosition
</th>
1215 <td class=
"description">MediaPosition value
</td></tr>
1216 <tr><th>MediaType[
64]
</th>
1217 <td class=
"description">MediaType string
</td></tr>
1218 <tr><th>MediaWeight
</th>
1219 <td class=
"description">MediaWeight value in grams/m^
2</td></tr>
1220 <tr><th>MirrorPrint
</th>
1221 <td class=
"description">MirrorPrint value
</td></tr>
1222 <tr><th>NegativePrint
</th>
1223 <td class=
"description">NegativePrint value
</td></tr>
1224 <tr><th>NumCopies
</th>
1225 <td class=
"description">Number of copies to produce
</td></tr>
1226 <tr><th>Orientation
</th>
1227 <td class=
"description">Orientation value (
<a href=
"#cups_orient_t"><code>cups_orient_t
</code></a>)
</td></tr>
1228 <tr><th>OutputFaceUp
</th>
1229 <td class=
"description">OutputFaceUp value
</td></tr>
1230 <tr><th>OutputType[
64]
</th>
1231 <td class=
"description">OutputType string
</td></tr>
1232 <tr><th>PageSize[
2]
</th>
1233 <td class=
"description">Width and length of page in points
</td></tr>
1234 <tr><th>Separations
</th>
1235 <td class=
"description">Separations value
</td></tr>
1236 <tr><th>TraySwitch
</th>
1237 <td class=
"description">TraySwitch value
</td></tr>
1238 <tr><th>Tumble
</th>
1239 <td class=
"description">Tumble value
</td></tr>
1240 <tr><th>cupsBitsPerColor
</th>
1241 <td class=
"description">Number of bits for each color
</td></tr>
1242 <tr><th>cupsBitsPerPixel
</th>
1243 <td class=
"description">Number of bits for each pixel
</td></tr>
1244 <tr><th>cupsBytesPerLine
</th>
1245 <td class=
"description">Number of bytes per line
</td></tr>
1246 <tr><th>cupsColorOrder
</th>
1247 <td class=
"description">Order of colors
</td></tr>
1248 <tr><th>cupsColorSpace
</th>
1249 <td class=
"description">True colorspace
</td></tr>
1250 <tr><th>cupsCompression
</th>
1251 <td class=
"description">Device compression to use
</td></tr>
1252 <tr><th>cupsHeight
</th>
1253 <td class=
"description">Height of page image in pixels
</td></tr>
1254 <tr><th>cupsMediaType
</th>
1255 <td class=
"description">Media type code
</td></tr>
1256 <tr><th>cupsRowCount
</th>
1257 <td class=
"description">Rows per band
</td></tr>
1258 <tr><th>cupsRowFeed
</th>
1259 <td class=
"description">Feed between bands
</td></tr>
1260 <tr><th>cupsRowStep
</th>
1261 <td class=
"description">Spacing between lines
</td></tr>
1262 <tr><th>cupsWidth
</th>
1263 <td class=
"description">Width of page image in pixels
</td></tr>
1265 <h2 class=
"title"><a id=
"ENUMERATIONS">Constants
</a></h2>
1266 <h3 class=
"enumeration"><a id=
"cups_adv_e">cups_adv_e
</a></h3>
1267 <p class=
"description">AdvanceMedia attribute values
</p>
1268 <h4 class=
"constants">Constants
</h4>
1269 <table class=
"list"><tbody>
1270 <tr><th>CUPS_ADVANCE_FILE
</th> <td class=
"description">Advance the roll after this file
</td></tr>
1271 <tr><th>CUPS_ADVANCE_JOB
</th> <td class=
"description">Advance the roll after this job
</td></tr>
1272 <tr><th>CUPS_ADVANCE_NONE
</th> <td class=
"description">Never advance the roll
</td></tr>
1273 <tr><th>CUPS_ADVANCE_PAGE
</th> <td class=
"description">Advance the roll after this page
</td></tr>
1274 <tr><th>CUPS_ADVANCE_SET
</th> <td class=
"description">Advance the roll after this set
</td></tr>
1276 <h3 class=
"enumeration"><a id=
"cups_bool_e">cups_bool_e
</a></h3>
1277 <p class=
"description">Boolean type
</p>
1278 <h4 class=
"constants">Constants
</h4>
1279 <table class=
"list"><tbody>
1280 <tr><th>CUPS_FALSE
</th> <td class=
"description">Logical false
</td></tr>
1281 <tr><th>CUPS_TRUE
</th> <td class=
"description">Logical true
</td></tr>
1283 <h3 class=
"enumeration"><a id=
"cups_cspace_e">cups_cspace_e
</a></h3>
1284 <p class=
"description">cupsColorSpace attribute values
</p>
1285 <h4 class=
"constants">Constants
</h4>
1286 <table class=
"list"><tbody>
1287 <tr><th>CUPS_CSPACE_ADOBERGB
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">Red, green, blue (Adobe RGB)
</td></tr>
1288 <tr><th>CUPS_CSPACE_CIELab
<span class=
"info"> CUPS
1.1.19/macOS
10.3 </span></th> <td class=
"description">CIE Lab
</td></tr>
1289 <tr><th>CUPS_CSPACE_CIEXYZ
<span class=
"info"> CUPS
1.1.19/macOS
10.3 </span></th> <td class=
"description">CIE XYZ
</td></tr>
1290 <tr><th>CUPS_CSPACE_CMY
</th> <td class=
"description">Cyan, magenta, yellow (DeviceCMY)
</td></tr>
1291 <tr><th>CUPS_CSPACE_CMYK
</th> <td class=
"description">Cyan, magenta, yellow, black (DeviceCMYK)
</td></tr>
1292 <tr><th>CUPS_CSPACE_DEVICE1
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
1 color
</td></tr>
1293 <tr><th>CUPS_CSPACE_DEVICE2
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
2 colors
</td></tr>
1294 <tr><th>CUPS_CSPACE_DEVICE3
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
3 colors
</td></tr>
1295 <tr><th>CUPS_CSPACE_DEVICE4
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
4 colors
</td></tr>
1296 <tr><th>CUPS_CSPACE_DEVICE5
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
5 colors
</td></tr>
1297 <tr><th>CUPS_CSPACE_DEVICE6
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
6 colors
</td></tr>
1298 <tr><th>CUPS_CSPACE_DEVICE7
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
7 colors
</td></tr>
1299 <tr><th>CUPS_CSPACE_DEVICE8
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
8 colors
</td></tr>
1300 <tr><th>CUPS_CSPACE_DEVICE9
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
9 colors
</td></tr>
1301 <tr><th>CUPS_CSPACE_DEVICEA
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
10 colors
</td></tr>
1302 <tr><th>CUPS_CSPACE_DEVICEB
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
11 colors
</td></tr>
1303 <tr><th>CUPS_CSPACE_DEVICEC
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
12 colors
</td></tr>
1304 <tr><th>CUPS_CSPACE_DEVICED
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
13 colors
</td></tr>
1305 <tr><th>CUPS_CSPACE_DEVICEE
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
14 colors
</td></tr>
1306 <tr><th>CUPS_CSPACE_DEVICEF
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">DeviceN,
15 colors
</td></tr>
1307 <tr><th>CUPS_CSPACE_GMCK
<span class=
"info"> DEPRECATED
 </span></th> <td class=
"description">Gold, magenta, yellow, black
</td></tr>
1308 <tr><th>CUPS_CSPACE_GMCS
<span class=
"info"> DEPRECATED
 </span></th> <td class=
"description">Gold, magenta, yellow, silver
</td></tr>
1309 <tr><th>CUPS_CSPACE_GOLD
<span class=
"info"> DEPRECATED
 </span></th> <td class=
"description">Gold foil
</td></tr>
1310 <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>
1311 <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>
1312 <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>
1313 <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>
1314 <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>
1315 <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>
1316 <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>
1317 <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>
1318 <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>
1319 <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>
1320 <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>
1321 <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>
1322 <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>
1323 <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>
1324 <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>
1325 <tr><th>CUPS_CSPACE_K
</th> <td class=
"description">Black (DeviceK)
</td></tr>
1326 <tr><th>CUPS_CSPACE_KCMY
<span class=
"info"> DEPRECATED
 </span></th> <td class=
"description">Black, cyan, magenta, yellow
</td></tr>
1327 <tr><th>CUPS_CSPACE_KCMYcm
<span class=
"info"> DEPRECATED
 </span></th> <td class=
"description">Black, cyan, magenta, yellow, light-cyan, light-magenta
</td></tr>
1328 <tr><th>CUPS_CSPACE_RGB
</th> <td class=
"description">Red, green, blue (DeviceRGB, sRGB by default)
</td></tr>
1329 <tr><th>CUPS_CSPACE_RGBA
</th> <td class=
"description">Red, green, blue, alpha (DeviceRGB, sRGB by default)
</td></tr>
1330 <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>
1331 <tr><th>CUPS_CSPACE_SILVER
<span class=
"info"> DEPRECATED
 </span></th> <td class=
"description">Silver foil
</td></tr>
1332 <tr><th>CUPS_CSPACE_SRGB
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">Red, green, blue (sRGB)
</td></tr>
1333 <tr><th>CUPS_CSPACE_SW
<span class=
"info"> CUPS
1.4.5 </span></th> <td class=
"description">Luminance (gamma
2.2)
</td></tr>
1334 <tr><th>CUPS_CSPACE_W
</th> <td class=
"description">Luminance (DeviceGray, gamma
2.2 by default)
</td></tr>
1335 <tr><th>CUPS_CSPACE_WHITE
<span class=
"info"> DEPRECATED
 </span></th> <td class=
"description">White ink (as black)
</td></tr>
1336 <tr><th>CUPS_CSPACE_YMC
<span class=
"info"> DEPRECATED
 </span></th> <td class=
"description">Yellow, magenta, cyan
</td></tr>
1337 <tr><th>CUPS_CSPACE_YMCK
<span class=
"info"> DEPRECATED
 </span></th> <td class=
"description">Yellow, magenta, cyan, black
</td></tr>
1339 <h3 class=
"enumeration"><a id=
"cups_cut_e">cups_cut_e
</a></h3>
1340 <p class=
"description">CutMedia attribute values
</p>
1341 <h4 class=
"constants">Constants
</h4>
1342 <table class=
"list"><tbody>
1343 <tr><th>CUPS_CUT_FILE
</th> <td class=
"description">Cut the roll after this file
</td></tr>
1344 <tr><th>CUPS_CUT_JOB
</th> <td class=
"description">Cut the roll after this job
</td></tr>
1345 <tr><th>CUPS_CUT_NONE
</th> <td class=
"description">Never cut the roll
</td></tr>
1346 <tr><th>CUPS_CUT_PAGE
</th> <td class=
"description">Cut the roll after this page
</td></tr>
1347 <tr><th>CUPS_CUT_SET
</th> <td class=
"description">Cut the roll after this set
</td></tr>
1349 <h3 class=
"enumeration"><a id=
"cups_edge_e">cups_edge_e
</a></h3>
1350 <p class=
"description">LeadingEdge attribute values
</p>
1351 <h4 class=
"constants">Constants
</h4>
1352 <table class=
"list"><tbody>
1353 <tr><th>CUPS_EDGE_BOTTOM
</th> <td class=
"description">Leading edge is the bottom of the page
</td></tr>
1354 <tr><th>CUPS_EDGE_LEFT
</th> <td class=
"description">Leading edge is the left of the page
</td></tr>
1355 <tr><th>CUPS_EDGE_RIGHT
</th> <td class=
"description">Leading edge is the right of the page
</td></tr>
1356 <tr><th>CUPS_EDGE_TOP
</th> <td class=
"description">Leading edge is the top of the page
</td></tr>
1358 <h3 class=
"enumeration"><a id=
"cups_jog_e">cups_jog_e
</a></h3>
1359 <p class=
"description">Jog attribute values
</p>
1360 <h4 class=
"constants">Constants
</h4>
1361 <table class=
"list"><tbody>
1362 <tr><th>CUPS_JOG_FILE
</th> <td class=
"description">Move pages after this file
</td></tr>
1363 <tr><th>CUPS_JOG_JOB
</th> <td class=
"description">Move pages after this job
</td></tr>
1364 <tr><th>CUPS_JOG_NONE
</th> <td class=
"description">Never move pages
</td></tr>
1365 <tr><th>CUPS_JOG_SET
</th> <td class=
"description">Move pages after this set
</td></tr>
1367 <h3 class=
"enumeration"><a id=
"cups_mode_e">cups_mode_e
</a></h3>
1368 <p class=
"description">cupsRasterOpen modes
</p>
1369 <h4 class=
"constants">Constants
</h4>
1370 <table class=
"list"><tbody>
1371 <tr><th>CUPS_RASTER_READ
</th> <td class=
"description">Open stream for reading
</td></tr>
1372 <tr><th>CUPS_RASTER_WRITE
</th> <td class=
"description">Open stream for writing
</td></tr>
1373 <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>
1374 <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>
1376 <h3 class=
"enumeration"><a id=
"cups_order_e">cups_order_e
</a></h3>
1377 <p class=
"description">cupsColorOrder attribute values
</p>
1378 <h4 class=
"constants">Constants
</h4>
1379 <table class=
"list"><tbody>
1380 <tr><th>CUPS_ORDER_BANDED
</th> <td class=
"description">CCC MMM YYY KKK ...
</td></tr>
1381 <tr><th>CUPS_ORDER_CHUNKED
</th> <td class=
"description">CMYK CMYK CMYK ...
</td></tr>
1382 <tr><th>CUPS_ORDER_PLANAR
</th> <td class=
"description">CCC ... MMM ... YYY ... KKK ...
</td></tr>
1384 <h3 class=
"enumeration"><a id=
"cups_orient_e">cups_orient_e
</a></h3>
1385 <p class=
"description">Orientation attribute values
</p>
1386 <h4 class=
"constants">Constants
</h4>
1387 <table class=
"list"><tbody>
1388 <tr><th>CUPS_ORIENT_0
</th> <td class=
"description">Don't rotate the page
</td></tr>
1389 <tr><th>CUPS_ORIENT_180
</th> <td class=
"description">Turn the page upside down
</td></tr>
1390 <tr><th>CUPS_ORIENT_270
</th> <td class=
"description">Rotate the page clockwise
</td></tr>
1391 <tr><th>CUPS_ORIENT_90
</th> <td class=
"description">Rotate the page counter-clockwise
</td></tr>