1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
3 <!-- SECTION: Programming -->
5 <title>Raster API
</title>
6 <meta name=
"keywords" content=
"Programming">
7 <meta name=
"creator" content=
"Mini-XML v2.5">
8 <style type=
"text/css"><!--
10 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
13 H1, H2, H3, H4, H5, H6, P, TD, TH {
14 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
18 font-family: monaco, courier, monospace;
23 font-family: monaco, courier, monospace;
32 border: dotted thin #999999;
37 PRE.command EM, PRE.example EM {
38 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
42 font-family: monaco, courier, monospace;
53 border: solid thin #999999;
58 text-decoration: none;
62 A:link:hover, A:visited:hover, A:active {
63 text-decoration: underline;
72 border: solid thin #999999;
73 border-collapse: collapse;
89 border: solid thin #cccccc;
96 border-bottom: solid thin #999999;
105 caption-side: bottom;
125 border: thin solid #000000;
133 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
139 border-bottom: solid 2pt #000000;
157 font-family: monaco, courier, monospace;
166 border: solid thin #999999;
167 border-collapse: collapse;
172 DIV.summary TABLE TD, DIV.summary TABLE TH {
173 border: solid thin #999999;
179 DIV.summary TABLE THEAD TH {
183 /* API documentation styles... */
190 div.body h3, div.body h4, div.body h5 {
191 margin-bottom: 0.5em;
194 .class, .enumeration, .function, .struct, .typedef, .union {
195 border-bottom: solid thin #999999;
202 code, p.code, pre, ul.code li {
203 font-family: monaco, courier, monospace;
206 ul.code, ul.contents, ul.subcontents {
207 list-style-type: none;
217 ul.contents li ul.code, ul.contents li ul.subcontents {
230 margin-bottom: 0.5em;
233 /* This is just for the HTML files generated with the framedhelp target */
236 border: solid thin black;
245 div.contents ul.contents {
248 div.contents ul.subcontents li {
259 Raster API header for the Common UNIX Printing System (CUPS).
261 Copyright 2008 by Apple Inc.
263 These coded instructions, statements, and computer programs are the
264 property of Apple Inc. and are protected by Federal copyright
265 law. Distribution and use rights are outlined in the file "LICENSE.txt"
266 which should have been included with this file. If this file is
267 file is missing or damaged, see the license at "http://www.cups.org/".
270 <h1 class=
"title">Raster API
</h1>
272 <div class='summary'
><table summary='General Information'
>
276 <th>cups/raster.h
</th>
286 <td>Programming:
<a href='api-overview.html'
>Introduction to CUPS Programming
</a><br>
287 Programming:
<a href='api-cups.html'
>CUPS API
</a><br>
288 Programming:
<a href='api-cups.html'
>PPD API
</a><br>
289 References:
<a href='spec-ppd.html'
>CUPS PPD Specification
</a></td>
293 <h2 class=
"title">Contents
</h2>
294 <ul class=
"contents">
296 <li><a href=
"#OVERVIEW">Overview
</a></li>
297 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"code">
298 <li><a href=
"#cupsRasterClose" title=
"Close a raster stream.">cupsRasterClose
</a></li>
299 <li><a href=
"#cupsRasterInterpretPPD" title=
"Interpret PPD commands to create a page header.">cupsRasterInterpretPPD
</a></li>
300 <li><a href=
"#cupsRasterOpen" title=
"Open a raster stream.">cupsRasterOpen
</a></li>
301 <li><a href=
"#cupsRasterReadHeader" title=
"Read a raster page header and store it in a
302 V1 page header structure.">cupsRasterReadHeader
</a></li>
303 <li><a href=
"#cupsRasterReadHeader2" title=
"Read a raster page header and store it in a
304 V2 page header structure.">cupsRasterReadHeader2
</a></li>
305 <li><a href=
"#cupsRasterReadPixels" title=
"Read raster pixels.">cupsRasterReadPixels
</a></li>
306 <li><a href=
"#cupsRasterWriteHeader" title=
"Write a raster page header from a V1 page
307 header structure.">cupsRasterWriteHeader
</a></li>
308 <li><a href=
"#cupsRasterWriteHeader2" title=
"Write a raster page header from a V2 page
309 header structure.">cupsRasterWriteHeader2
</a></li>
310 <li><a href=
"#cupsRasterWritePixels" title=
"Write raster pixels.">cupsRasterWritePixels
</a></li>
312 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
313 <li><a href=
"#cups_interpret_cb_t" title=
"cupsRasterInterpretPPD callback function">cups_interpret_cb_t
</a></li>
314 <li><a href=
"#cups_mode_t" title=
"cupsRasterOpen modes">cups_mode_t
</a></li>
315 <li><a href=
"#cups_page_header2_t" title=
"Version 2 page header ">cups_page_header2_t
</a></li>
316 <li><a href=
"#cups_page_header_t" title=
"Version 1 page header">cups_page_header_t
</a></li>
317 <li><a href=
"#cups_raster_t" title=
"Raster stream data">cups_raster_t
</a></li>
319 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
320 <li><a href=
"#cups_page_header2_s" title=
"Version 2 page header ">cups_page_header2_s
</a></li>
321 <li><a href=
"#cups_page_header_s" title=
"Version 1 page header">cups_page_header_s
</a></li>
323 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
324 <li><a href=
"#cups_adv_e" title=
"AdvanceMedia attribute values">cups_adv_e
</a></li>
325 <li><a href=
"#cups_bool_e" title=
"Types...">cups_bool_e
</a></li>
326 <li><a href=
"#cups_cspace_e" title=
"">cups_cspace_e
</a></li>
327 <li><a href=
"#cups_cut_e" title=
"">cups_cut_e
</a></li>
328 <li><a href=
"#cups_edge_e" title=
"">cups_edge_e
</a></li>
329 <li><a href=
"#cups_jog_e" title=
"">cups_jog_e
</a></li>
330 <li><a href=
"#cups_mode_e" title=
"">cups_mode_e
</a></li>
331 <li><a href=
"#cups_order_e" title=
"cupsColorOrder attribute values">cups_order_e
</a></li>
332 <li><a href=
"#cups_orient_e" title=
"">cups_orient_e
</a></li>
338 Raster API introduction for the Common UNIX Printing System (CUPS).
340 Copyright 2007-2008 by Apple Inc.
341 Copyright 1997-2006 by Easy Software Products, all rights reserved.
343 These coded instructions, statements, and computer programs are the
344 property of Apple Inc. and are protected by Federal copyright
345 law. Distribution and use rights are outlined in the file "LICENSE.txt"
346 which should have been included with this file. If this file is
347 file is missing or damaged, see the license at "http://www.cups.org/".
350 <h2 class='title'
><a name=
"OVERVIEW">Overview
</a></h2>
352 <p>The CUPS raster API provides a standard interface for reading and writing
353 CUPS raster streams which are used for printing to raster printers. Because the
354 raster format is updated from time to time, it is important to use this API to
355 avoid incompatibilities with newer versions of CUPS.
</p>
357 <p>CUPS raster files (
<code>application/vnd.cups-raster
</code>) consists of
358 a stream of raster page descriptions produced by one of the RIP filters such as
359 <var>pstoraster
</var>,
<var>imagetoraster
</var>, or
360 <var>cgpdftoraster
</var>. CUPS raster files are referred to using the
361 <a href='#cups_raster_t'
><code>cups_raster_t
</code></a> type and are
362 opened using the
<a href='#cupsRasterOpen'
><code>cupsRasterOpen
</code></a>
363 function. For example, to read raster data from the standard input, open
364 file descriptor
0:
</p>
366 <pre class=
"example">
367 #include
<cups/raster.h
>>
369 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras =
<a href=
"#cupsRasterOpen">cupsRasterOpen
</a>(
0, CUPS_RASTER_READ);
372 <p>Each page of data begins with a page dictionary structure called
373 <a href=
"#cups_page_header2_t"><code>cups_page_header2_t
</code></a>. This
374 structure contains the colorspace, bits per color, media size, media type,
375 hardware resolution, and so forth used for the page. You read the page header
377 <a href=
"#cupsRasterReadHeader2"><code>cupsRasterReadHeader2
</code></a>
380 <pre class=
"example">
381 #include
<cups/raster.h
>>
383 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras =
<a href=
"#cupsRasterOpen">cupsRasterOpen
</a>(
0, CUPS_RASTER_READ);
384 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> header;
386 while (
<a href=
"#cupsRasterReadHeader2">cupsRasterReadHeader2
</a>(ras,
&header))
388 /* setup this page */
390 /* read raster data */
392 /* finish this page */
396 <p>After the page dictionary comes the page data which is a full-resolution,
397 possibly compressed bitmap representing the page in the printer's output
398 colorspace. You read uncompressed raster data using the
399 <a href=
"#cupsRasterReadPixels"><code>cupsRasterReadPixels
</code></a>
400 function. A
<code>for
</code> loop is normally used to read the page one line
403 <pre class=
"example">
404 #include
<cups/raster.h
>>
406 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras =
<a href=
"#cupsRasterOpen">cupsRasterOpen
</a>(
0, CUPS_RASTER_READ);
407 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> header;
412 while (
<a href=
"#cupsRasterReadHeader2">cupsRasterReadHeader2
</a>(ras,
&header))
414 /* setup this page */
416 fprintf(stderr,
"PAGE: %d %d\n", page, header.NumCopies);
418 /* allocate memory for
1 line */
419 buffer = malloc(header.cupsBytesPerLine);
421 /* read raster data */
422 for (y =
0; y
< header.cupsHeight; y ++)
424 if (
<a href=
"#cupsRasterReadPixels">cupsRasterReadPixels
</a>(ras, buffer, header.cupsBytesPerLine) ==
0)
427 /* write raster data to printer */
430 /* finish this page */
434 <p>When you are done reading the raster data, call the
435 <a href=
"#cupsRasterClose"><code>cupsRasterClose
</code></a> function to free
436 the memory used to read the raster file:
</p>
438 <pre class=
"example">
439 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras;
441 <a href=
"#cupsRasterClose">cupsRasterClose
</a>(ras);
443 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
444 <h3 class=
"function"><a name=
"cupsRasterClose">cupsRasterClose
</a></h3>
445 <p class=
"description">Close a raster stream.
</p>
447 void cupsRasterClose (
<br>
448 <a href=
"#cups_raster_t">cups_raster_t
</a> *r
<br>
450 <h4 class=
"parameters">Parameters
</h4>
453 <dd class=
"description">Stream to close
</dd>
455 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"cupsRasterInterpretPPD">cupsRasterInterpretPPD
</a></h3>
456 <p class=
"description">Interpret PPD commands to create a page header.
</p>
458 int cupsRasterInterpretPPD (
<br>
459 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> *h,
<br>
460 ppd_file_t *ppd,
<br>
461 int num_options,
<br>
462 cups_option_t *options,
<br>
463 <a href=
"#cups_interpret_cb_t">cups_interpret_cb_t
</a> func
<br>
465 <h4 class=
"parameters">Parameters
</h4>
468 <dd class=
"description">Page header
</dd>
470 <dd class=
"description">PPD file
</dd>
472 <dd class=
"description">Number of options
</dd>
474 <dd class=
"description">Options
</dd>
476 <dd class=
"description">Optional page header callback
</dd>
478 <h4 class=
"returnvalue">Return Value
</h4>
479 <p class=
"description">0 on success, -
1 on failure
</p>
480 <h4 class=
"discussion">Discussion
</h4>
481 <p class=
"discussion">This function does not mark the options in the PPD using the
"num_options
"
482 and
"options
" arguments. Instead, mark the options with
483 <code>cupsMarkOptions
</code> and
<code>ppdMarkOption
</code> prior to calling
484 <code>cupsRasterInterpretPPD
</code> - this allows you to do per-page options
485 without manipulating the options array.
<br>
487 The
"func
" argument specifies an optional callback function that is
488 called prior to the computation of the final raster data. The function
489 can make changes to the
<a href=
"#cups_page_header2_t"><code>cups_page_header2_t
</code></a> data as needed to use a
490 supported raster format and then returns
0 on success and -
1 if the
491 requested attributes cannot be supported.
493 <code>cupsRasterInterpretPPD
</code> supports a subset of the PostScript language.
494 Currently only the
<code>[
</code>,
<code>]
</code>,
<code><<
</code>,
<code>>></code>,
<code>{
</code>,
495 <code>}
</code>,
<code>cleartomark
</code>,
<code>copy
</code>,
<code>dup
</code>,
<code>index
</code>,
496 <code>pop
</code>,
<code>roll
</code>,
<code>setpagedevice
</code>, and
<code>stopped
</code> operators
500 <h3 class=
"function"><a name=
"cupsRasterOpen">cupsRasterOpen
</a></h3>
501 <p class=
"description">Open a raster stream.
</p>
503 <a href=
"#cups_raster_t">cups_raster_t
</a> *cupsRasterOpen (
<br>
504 int fd,
<br>
505 <a href=
"#cups_mode_t">cups_mode_t
</a> mode
<br>
507 <h4 class=
"parameters">Parameters
</h4>
510 <dd class=
"description">File descriptor
</dd>
512 <dd class=
"description">Mode
</dd>
514 <h4 class=
"returnvalue">Return Value
</h4>
515 <p class=
"description">New stream
</p>
516 <h3 class=
"function"><a name=
"cupsRasterReadHeader">cupsRasterReadHeader
</a></h3>
517 <p class=
"description">Read a raster page header and store it in a
518 V1 page header structure.
</p>
520 unsigned cupsRasterReadHeader (
<br>
521 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
522 <a href=
"#cups_page_header_t">cups_page_header_t
</a> *h
<br>
524 <h4 class=
"parameters">Parameters
</h4>
527 <dd class=
"description">Raster stream
</dd>
529 <dd class=
"description">Pointer to header data
</dd>
531 <h4 class=
"returnvalue">Return Value
</h4>
532 <p class=
"description">1 on success,
0 on fail
</p>
533 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"cupsRasterReadHeader2">cupsRasterReadHeader2
</a></h3>
534 <p class=
"description">Read a raster page header and store it in a
535 V2 page header structure.
</p>
537 unsigned cupsRasterReadHeader2 (
<br>
538 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
539 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> *h
<br>
541 <h4 class=
"parameters">Parameters
</h4>
544 <dd class=
"description">Raster stream
</dd>
546 <dd class=
"description">Pointer to header data
</dd>
548 <h4 class=
"returnvalue">Return Value
</h4>
549 <p class=
"description">1 on success,
0 on fail
</p>
550 <h3 class=
"function"><a name=
"cupsRasterReadPixels">cupsRasterReadPixels
</a></h3>
551 <p class=
"description">Read raster pixels.
</p>
553 unsigned cupsRasterReadPixels (
<br>
554 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
555 unsigned char *p,
<br>
556 unsigned len
<br>
558 <h4 class=
"parameters">Parameters
</h4>
561 <dd class=
"description">Raster stream
</dd>
563 <dd class=
"description">Pointer to pixel buffer
</dd>
565 <dd class=
"description">Number of bytes to read
</dd>
567 <h4 class=
"returnvalue">Return Value
</h4>
568 <p class=
"description">Number of bytes read
</p>
569 <h3 class=
"function"><a name=
"cupsRasterWriteHeader">cupsRasterWriteHeader
</a></h3>
570 <p class=
"description">Write a raster page header from a V1 page
571 header structure.
</p>
573 unsigned cupsRasterWriteHeader (
<br>
574 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
575 <a href=
"#cups_page_header_t">cups_page_header_t
</a> *h
<br>
577 <h4 class=
"parameters">Parameters
</h4>
580 <dd class=
"description">Raster stream
</dd>
582 <dd class=
"description">Raster page header
</dd>
584 <h4 class=
"returnvalue">Return Value
</h4>
585 <p class=
"description">1 on success,
0 on failure
</p>
586 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"cupsRasterWriteHeader2">cupsRasterWriteHeader2
</a></h3>
587 <p class=
"description">Write a raster page header from a V2 page
588 header structure.
</p>
590 unsigned cupsRasterWriteHeader2 (
<br>
591 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
592 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> *h
<br>
594 <h4 class=
"parameters">Parameters
</h4>
597 <dd class=
"description">Raster stream
</dd>
599 <dd class=
"description">Raster page header
</dd>
601 <h4 class=
"returnvalue">Return Value
</h4>
602 <p class=
"description">1 on success,
0 on failure
</p>
603 <h3 class=
"function"><a name=
"cupsRasterWritePixels">cupsRasterWritePixels
</a></h3>
604 <p class=
"description">Write raster pixels.
</p>
606 unsigned cupsRasterWritePixels (
<br>
607 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
608 unsigned char *p,
<br>
609 unsigned len
<br>
611 <h4 class=
"parameters">Parameters
</h4>
614 <dd class=
"description">Raster stream
</dd>
616 <dd class=
"description">Bytes to write
</dd>
618 <dd class=
"description">Number of bytes to write
</dd>
620 <h4 class=
"returnvalue">Return Value
</h4>
621 <p class=
"description">Number of bytes written
</p>
622 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
623 <h3 class=
"typedef"><a name=
"cups_interpret_cb_t">cups_interpret_cb_t
</a></h3>
624 <p class=
"description">cupsRasterInterpretPPD callback function
</p>
626 typedef int (*cups_interpret_cb_t)(
<a href=
"#cups_page_header2_t">cups_page_header2_t
</a> *header, int preferred_bits);
628 <h3 class=
"typedef"><a name=
"cups_mode_t">cups_mode_t
</a></h3>
629 <p class=
"description">cupsRasterOpen modes
</p>
631 typedef enum
<a href=
"#cups_mode_e">cups_mode_e
</a> cups_mode_t;
633 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"cups_page_header2_t">cups_page_header2_t
</a></h3>
634 <p class=
"description">Version
2 page header
</p>
636 typedef struct
<a href=
"#cups_page_header2_s">cups_page_header2_s
</a> cups_page_header2_t;
638 <h3 class=
"typedef"><a name=
"cups_page_header_t">cups_page_header_t
</a></h3>
639 <p class=
"description">Version
1 page header
</p>
641 typedef struct
<a href=
"#cups_page_header_s">cups_page_header_s
</a> cups_page_header_t;
643 <h3 class=
"typedef"><a name=
"cups_raster_t">cups_raster_t
</a></h3>
644 <p class=
"description">Raster stream data
</p>
646 typedef struct _cups_raster_s cups_raster_t;
648 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
649 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"cups_page_header2_s">cups_page_header2_s
</a></h3>
650 <p class=
"description">Version
2 page header
</p>
651 <p class=
"code">struct cups_page_header2_s {
<br>
652 unsigned AdvanceDistance;
<br>
653 cups_adv_t AdvanceMedia;
<br>
654 cups_bool_t Collate;
<br>
655 cups_cut_t CutMedia;
<br>
656 cups_bool_t Duplex;
<br>
657 unsigned HWResolution[
2];
<br>
658 unsigned ImagingBoundingBox[
4];
<br>
659 cups_bool_t InsertSheet;
<br>
660 cups_jog_t Jog;
<br>
661 cups_edge_t LeadingEdge;
<br>
662 cups_bool_t ManualFeed;
<br>
663 unsigned Margins[
2];
<br>
664 char MediaClass[
64];
<br>
665 char MediaColor[
64];
<br>
666 unsigned MediaPosition;
<br>
667 char MediaType[
64];
<br>
668 unsigned MediaWeight;
<br>
669 cups_bool_t MirrorPrint;
<br>
670 cups_bool_t NegativePrint;
<br>
671 unsigned NumCopies;
<br>
672 cups_orient_t Orientation;
<br>
673 cups_bool_t OutputFaceUp;
<br>
674 char OutputType[
64];
<br>
675 unsigned PageSize[
2];
<br>
676 cups_bool_t Separations;
<br>
677 cups_bool_t TraySwitch;
<br>
678 cups_bool_t Tumble;
<br>
679 unsigned cupsBitsPerColor;
<br>
680 unsigned cupsBitsPerPixel;
<br>
681 float cupsBorderlessScalingFactor;
<br>
682 unsigned cupsBytesPerLine;
<br>
683 cups_order_t cupsColorOrder;
<br>
684 cups_cspace_t cupsColorSpace;
<br>
685 unsigned cupsCompression;
<br>
686 unsigned cupsHeight;
<br>
687 float cupsImagingBBox[
4];
<br>
688 unsigned cupsInteger[
16];
<br>
689 char cupsMarkerType[
64];
<br>
690 unsigned cupsMediaType;
<br>
691 unsigned cupsNumColors;
<br>
692 char cupsPageSizeName[
64];
<br>
693 float cupsPageSize[
2];
<br>
694 float cupsReal[
16];
<br>
695 char cupsRenderingIntent[
64];
<br>
696 unsigned cupsRowCount;
<br>
697 unsigned cupsRowFeed;
<br>
698 unsigned cupsRowStep;
<br>
699 char cupsString[
16][
64];
<br>
700 unsigned cupsWidth;
<br>
702 <h4 class=
"members">Members
</h4>
704 <dt>AdvanceDistance
</dt>
705 <dd class=
"description">AdvanceDistance value in points
</dd>
706 <dt>AdvanceMedia
</dt>
707 <dd class=
"description">AdvanceMedia value (see above)
</dd>
709 <dd class=
"description">Collated copies value
</dd>
711 <dd class=
"description">CutMedia value (see above)
</dd>
713 <dd class=
"description">Duplexed (double-sided) value
</dd>
714 <dt>HWResolution[
2]
</dt>
715 <dd class=
"description">Resolution in dots-per-inch
</dd>
716 <dt>ImagingBoundingBox[
4]
</dt>
717 <dd class=
"description">Pixel region that is painted (points)
</dd>
718 <dt>InsertSheet
</dt>
719 <dd class=
"description">InsertSheet value
</dd>
721 <dd class=
"description">Jog value (see above)
</dd>
722 <dt>LeadingEdge
</dt>
723 <dd class=
"description">LeadingEdge value (see above)
</dd>
725 <dd class=
"description">ManualFeed value
</dd>
727 <dd class=
"description">Lower-lefthand margins in points
</dd>
728 <dt>MediaClass[
64]
</dt>
729 <dd class=
"description">MediaClass string
</dd>
730 <dt>MediaColor[
64]
</dt>
731 <dd class=
"description">MediaColor string
</dd>
732 <dt>MediaPosition
</dt>
733 <dd class=
"description">MediaPosition value
</dd>
734 <dt>MediaType[
64]
</dt>
735 <dd class=
"description">MediaType string
</dd>
736 <dt>MediaWeight
</dt>
737 <dd class=
"description">MediaWeight value in grams/m^
2</dd>
738 <dt>MirrorPrint
</dt>
739 <dd class=
"description">MirrorPrint value
</dd>
740 <dt>NegativePrint
</dt>
741 <dd class=
"description">NegativePrint value
</dd>
743 <dd class=
"description">Number of copies to produce
</dd>
744 <dt>Orientation
</dt>
745 <dd class=
"description">Orientation value (see above)
</dd>
746 <dt>OutputFaceUp
</dt>
747 <dd class=
"description">OutputFaceUp value
</dd>
748 <dt>OutputType[
64]
</dt>
749 <dd class=
"description">OutputType string
</dd>
750 <dt>PageSize[
2]
</dt>
751 <dd class=
"description">Width and length of page in points
</dd>
752 <dt>Separations
</dt>
753 <dd class=
"description">Separations value
</dd>
755 <dd class=
"description">TraySwitch value
</dd>
757 <dd class=
"description">Tumble value
</dd>
758 <dt>cupsBitsPerColor
</dt>
759 <dd class=
"description">Number of bits for each color
</dd>
760 <dt>cupsBitsPerPixel
</dt>
761 <dd class=
"description">Number of bits for each pixel
</dd>
762 <dt>cupsBorderlessScalingFactor
<span class=
"info"> CUPS
1.2 </span></dt>
763 <dd class=
"description">Scaling that was applied to page data
</dd>
764 <dt>cupsBytesPerLine
</dt>
765 <dd class=
"description">Number of bytes per line
</dd>
766 <dt>cupsColorOrder
</dt>
767 <dd class=
"description">Order of colors
</dd>
768 <dt>cupsColorSpace
</dt>
769 <dd class=
"description">True colorspace
</dd>
770 <dt>cupsCompression
</dt>
771 <dd class=
"description">Device compression to use
</dd>
773 <dd class=
"description">Height of page image in pixels
</dd>
774 <dt>cupsImagingBBox[
4]
<span class=
"info"> CUPS
1.2 </span></dt>
775 <dd class=
"description">Floating point ImagingBoundingBox *
776 (scaling factor not applied)
</dd>
777 <dt>cupsInteger[
16]
<span class=
"info"> CUPS
1.2 </span></dt>
778 <dd class=
"description">User-defined integer values
</dd>
779 <dt>cupsMarkerType[
64]
<span class=
"info"> CUPS
1.2 </span></dt>
780 <dd class=
"description">Ink/toner type
</dd>
781 <dt>cupsMediaType
</dt>
782 <dd class=
"description">Media type code
</dd>
783 <dt>cupsNumColors
<span class=
"info"> CUPS
1.2 </span></dt>
784 <dd class=
"description">Number of colors
</dd>
785 <dt>cupsPageSizeName[
64]
<span class=
"info"> CUPS
1.2 </span></dt>
786 <dd class=
"description">PageSize name
</dd>
787 <dt>cupsPageSize[
2]
<span class=
"info"> CUPS
1.2 </span></dt>
788 <dd class=
"description">Floating point PageSize (scaling *
789 factor not applied)
</dd>
790 <dt>cupsReal[
16]
<span class=
"info"> CUPS
1.2 </span></dt>
791 <dd class=
"description">User-defined floating-point values
</dd>
792 <dt>cupsRenderingIntent[
64]
<span class=
"info"> CUPS
1.2 </span></dt>
793 <dd class=
"description">Color rendering intent
</dd>
794 <dt>cupsRowCount
</dt>
795 <dd class=
"description">Rows per band
</dd>
796 <dt>cupsRowFeed
</dt>
797 <dd class=
"description">Feed between bands
</dd>
798 <dt>cupsRowStep
</dt>
799 <dd class=
"description">Spacing between lines
</dd>
800 <dt>cupsString[
16][
64]
<span class=
"info"> CUPS
1.2 </span></dt>
801 <dd class=
"description">User-defined string values
</dd>
803 <dd class=
"description">Width of page image in pixels
</dd>
805 <h3 class=
"struct"><a name=
"cups_page_header_s">cups_page_header_s
</a></h3>
806 <p class=
"description">Version
1 page header
</p>
807 <p class=
"code">struct cups_page_header_s {
<br>
808 unsigned AdvanceDistance;
<br>
809 cups_adv_t AdvanceMedia;
<br>
810 cups_bool_t Collate;
<br>
811 cups_cut_t CutMedia;
<br>
812 cups_bool_t Duplex;
<br>
813 unsigned HWResolution[
2];
<br>
814 unsigned ImagingBoundingBox[
4];
<br>
815 cups_bool_t InsertSheet;
<br>
816 cups_jog_t Jog;
<br>
817 cups_edge_t LeadingEdge;
<br>
818 cups_bool_t ManualFeed;
<br>
819 unsigned Margins[
2];
<br>
820 char MediaClass[
64];
<br>
821 char MediaColor[
64];
<br>
822 unsigned MediaPosition;
<br>
823 char MediaType[
64];
<br>
824 unsigned MediaWeight;
<br>
825 cups_bool_t MirrorPrint;
<br>
826 cups_bool_t NegativePrint;
<br>
827 unsigned NumCopies;
<br>
828 cups_orient_t Orientation;
<br>
829 cups_bool_t OutputFaceUp;
<br>
830 char OutputType[
64];
<br>
831 unsigned PageSize[
2];
<br>
832 cups_bool_t Separations;
<br>
833 cups_bool_t TraySwitch;
<br>
834 cups_bool_t Tumble;
<br>
835 unsigned cupsBitsPerColor;
<br>
836 unsigned cupsBitsPerPixel;
<br>
837 unsigned cupsBytesPerLine;
<br>
838 cups_order_t cupsColorOrder;
<br>
839 cups_cspace_t cupsColorSpace;
<br>
840 unsigned cupsCompression;
<br>
841 unsigned cupsHeight;
<br>
842 unsigned cupsMediaType;
<br>
843 unsigned cupsRowCount;
<br>
844 unsigned cupsRowFeed;
<br>
845 unsigned cupsRowStep;
<br>
846 unsigned cupsWidth;
<br>
848 <h4 class=
"members">Members
</h4>
850 <dt>AdvanceDistance
</dt>
851 <dd class=
"description">AdvanceDistance value in points
</dd>
852 <dt>AdvanceMedia
</dt>
853 <dd class=
"description">AdvanceMedia value (see above)
</dd>
855 <dd class=
"description">Collated copies value
</dd>
857 <dd class=
"description">CutMedia value (see above)
</dd>
859 <dd class=
"description">Duplexed (double-sided) value
</dd>
860 <dt>HWResolution[
2]
</dt>
861 <dd class=
"description">Resolution in dots-per-inch
</dd>
862 <dt>ImagingBoundingBox[
4]
</dt>
863 <dd class=
"description">Pixel region that is painted (points)
</dd>
864 <dt>InsertSheet
</dt>
865 <dd class=
"description">InsertSheet value
</dd>
867 <dd class=
"description">Jog value (see above)
</dd>
868 <dt>LeadingEdge
</dt>
869 <dd class=
"description">LeadingEdge value (see above)
</dd>
871 <dd class=
"description">ManualFeed value
</dd>
873 <dd class=
"description">Lower-lefthand margins in points
</dd>
874 <dt>MediaClass[
64]
</dt>
875 <dd class=
"description">MediaClass string
</dd>
876 <dt>MediaColor[
64]
</dt>
877 <dd class=
"description">MediaColor string
</dd>
878 <dt>MediaPosition
</dt>
879 <dd class=
"description">MediaPosition value
</dd>
880 <dt>MediaType[
64]
</dt>
881 <dd class=
"description">MediaType string
</dd>
882 <dt>MediaWeight
</dt>
883 <dd class=
"description">MediaWeight value in grams/m^
2</dd>
884 <dt>MirrorPrint
</dt>
885 <dd class=
"description">MirrorPrint value
</dd>
886 <dt>NegativePrint
</dt>
887 <dd class=
"description">NegativePrint value
</dd>
889 <dd class=
"description">Number of copies to produce
</dd>
890 <dt>Orientation
</dt>
891 <dd class=
"description">Orientation value (see above)
</dd>
892 <dt>OutputFaceUp
</dt>
893 <dd class=
"description">OutputFaceUp value
</dd>
894 <dt>OutputType[
64]
</dt>
895 <dd class=
"description">OutputType string
</dd>
896 <dt>PageSize[
2]
</dt>
897 <dd class=
"description">Width and length of page in points
</dd>
898 <dt>Separations
</dt>
899 <dd class=
"description">Separations value
</dd>
901 <dd class=
"description">TraySwitch value
</dd>
903 <dd class=
"description">Tumble value
</dd>
904 <dt>cupsBitsPerColor
</dt>
905 <dd class=
"description">Number of bits for each color
</dd>
906 <dt>cupsBitsPerPixel
</dt>
907 <dd class=
"description">Number of bits for each pixel
</dd>
908 <dt>cupsBytesPerLine
</dt>
909 <dd class=
"description">Number of bytes per line
</dd>
910 <dt>cupsColorOrder
</dt>
911 <dd class=
"description">Order of colors
</dd>
912 <dt>cupsColorSpace
</dt>
913 <dd class=
"description">True colorspace
</dd>
914 <dt>cupsCompression
</dt>
915 <dd class=
"description">Device compression to use
</dd>
917 <dd class=
"description">Height of page image in pixels
</dd>
918 <dt>cupsMediaType
</dt>
919 <dd class=
"description">Media type code
</dd>
920 <dt>cupsRowCount
</dt>
921 <dd class=
"description">Rows per band
</dd>
922 <dt>cupsRowFeed
</dt>
923 <dd class=
"description">Feed between bands
</dd>
924 <dt>cupsRowStep
</dt>
925 <dd class=
"description">Spacing between lines
</dd>
927 <dd class=
"description">Width of page image in pixels
</dd>
929 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
930 <h3 class=
"enumeration"><a name=
"cups_adv_e">cups_adv_e
</a></h3>
931 <p class=
"description">AdvanceMedia attribute values
</p>
932 <h4 class=
"constants">Constants
</h4>
934 <dt>CUPS_ADVANCE_FILE
</dt>
935 <dd class=
"description">Advance the roll after this file
</dd>
936 <dt>CUPS_ADVANCE_JOB
</dt>
937 <dd class=
"description">Advance the roll after this job
</dd>
938 <dt>CUPS_ADVANCE_NONE
</dt>
939 <dd class=
"description">Never advance the roll
</dd>
940 <dt>CUPS_ADVANCE_PAGE
</dt>
941 <dd class=
"description">Advance the roll after this page
</dd>
942 <dt>CUPS_ADVANCE_SET
</dt>
943 <dd class=
"description">Advance the roll after this set
</dd>
945 <h3 class=
"enumeration"><a name=
"cups_bool_e">cups_bool_e
</a></h3>
946 <p class=
"description">Types...
</p>
947 <h4 class=
"constants">Constants
</h4>
950 <dd class=
"description">Logical false
</dd>
952 <dd class=
"description">Logical true
</dd>
954 <h3 class=
"enumeration"><a name=
"cups_cspace_e">cups_cspace_e
</a></h3>
955 <p class=
"description"></p>
956 <h4 class=
"constants">Constants
</h4>
958 <dt>CUPS_CSPACE_CIELab
<span class=
"info"> CUPS
1.1.19 </span></dt>
959 <dd class=
"description">CIE Lab
</dd>
960 <dt>CUPS_CSPACE_CIEXYZ
<span class=
"info"> CUPS
1.1.19 </span></dt>
961 <dd class=
"description">CIE XYZ
</dd>
962 <dt>CUPS_CSPACE_CMY
</dt>
963 <dd class=
"description">Cyan, magenta, yellow
</dd>
964 <dt>CUPS_CSPACE_CMYK
</dt>
965 <dd class=
"description">Cyan, magenta, yellow, black
</dd>
966 <dt>CUPS_CSPACE_GMCK
</dt>
967 <dd class=
"description">Gold, magenta, yellow, black
</dd>
968 <dt>CUPS_CSPACE_GMCS
</dt>
969 <dd class=
"description">Gold, magenta, yellow, silver
</dd>
970 <dt>CUPS_CSPACE_GOLD
</dt>
971 <dd class=
"description">Gold foil
</dd>
972 <dt>CUPS_CSPACE_ICC1
<span class=
"info"> CUPS
1.1.19 </span></dt>
973 <dd class=
"description">ICC-based,
1 color
</dd>
974 <dt>CUPS_CSPACE_ICC2
<span class=
"info"> CUPS
1.1.19 </span></dt>
975 <dd class=
"description">ICC-based,
2 colors
</dd>
976 <dt>CUPS_CSPACE_ICC3
<span class=
"info"> CUPS
1.1.19 </span></dt>
977 <dd class=
"description">ICC-based,
3 colors
</dd>
978 <dt>CUPS_CSPACE_ICC4
<span class=
"info"> CUPS
1.1.19 </span></dt>
979 <dd class=
"description">ICC-based,
4 colors
</dd>
980 <dt>CUPS_CSPACE_ICC5
<span class=
"info"> CUPS
1.1.19 </span></dt>
981 <dd class=
"description">ICC-based,
5 colors
</dd>
982 <dt>CUPS_CSPACE_ICC6
<span class=
"info"> CUPS
1.1.19 </span></dt>
983 <dd class=
"description">ICC-based,
6 colors
</dd>
984 <dt>CUPS_CSPACE_ICC7
<span class=
"info"> CUPS
1.1.19 </span></dt>
985 <dd class=
"description">ICC-based,
7 colors
</dd>
986 <dt>CUPS_CSPACE_ICC8
<span class=
"info"> CUPS
1.1.19 </span></dt>
987 <dd class=
"description">ICC-based,
8 colors
</dd>
988 <dt>CUPS_CSPACE_ICC9
<span class=
"info"> CUPS
1.1.19 </span></dt>
989 <dd class=
"description">ICC-based,
9 colors
</dd>
990 <dt>CUPS_CSPACE_ICCA
<span class=
"info"> CUPS
1.1.19 </span></dt>
991 <dd class=
"description">ICC-based,
10 colors
</dd>
992 <dt>CUPS_CSPACE_ICCB
<span class=
"info"> CUPS
1.1.19 </span></dt>
993 <dd class=
"description">ICC-based,
11 colors
</dd>
994 <dt>CUPS_CSPACE_ICCC
<span class=
"info"> CUPS
1.1.19 </span></dt>
995 <dd class=
"description">ICC-based,
12 colors
</dd>
996 <dt>CUPS_CSPACE_ICCD
<span class=
"info"> CUPS
1.1.19 </span></dt>
997 <dd class=
"description">ICC-based,
13 colors
</dd>
998 <dt>CUPS_CSPACE_ICCE
<span class=
"info"> CUPS
1.1.19 </span></dt>
999 <dd class=
"description">ICC-based,
14 colors
</dd>
1000 <dt>CUPS_CSPACE_ICCF
<span class=
"info"> CUPS
1.1.19 </span></dt>
1001 <dd class=
"description">ICC-based,
15 colors
</dd>
1002 <dt>CUPS_CSPACE_K
</dt>
1003 <dd class=
"description">Black
</dd>
1004 <dt>CUPS_CSPACE_KCMY
</dt>
1005 <dd class=
"description">Black, cyan, magenta, yellow
</dd>
1006 <dt>CUPS_CSPACE_KCMYcm
</dt>
1007 <dd class=
"description">Black, cyan, magenta, yellow, *
1008 light-cyan, light-magenta
</dd>
1009 <dt>CUPS_CSPACE_RGB
</dt>
1010 <dd class=
"description">Red, green, blue
</dd>
1011 <dt>CUPS_CSPACE_RGBA
</dt>
1012 <dd class=
"description">Red, green, blue, alpha
</dd>
1013 <dt>CUPS_CSPACE_RGBW
<span class=
"info"> CUPS
1.2 </span></dt>
1014 <dd class=
"description">Red, green, blue, white
</dd>
1015 <dt>CUPS_CSPACE_SILVER
</dt>
1016 <dd class=
"description">Silver foil
</dd>
1017 <dt>CUPS_CSPACE_W
</dt>
1018 <dd class=
"description">Luminance
</dd>
1019 <dt>CUPS_CSPACE_WHITE
</dt>
1020 <dd class=
"description">White ink (as black)
</dd>
1021 <dt>CUPS_CSPACE_YMC
</dt>
1022 <dd class=
"description">Yellow, magenta, cyan
</dd>
1023 <dt>CUPS_CSPACE_YMCK
</dt>
1024 <dd class=
"description">Yellow, magenta, cyan, black
</dd>
1026 <h3 class=
"enumeration"><a name=
"cups_cut_e">cups_cut_e
</a></h3>
1027 <p class=
"description"></p>
1028 <h4 class=
"constants">Constants
</h4>
1030 <dt>CUPS_CUT_FILE
</dt>
1031 <dd class=
"description">Cut the roll after this file
</dd>
1032 <dt>CUPS_CUT_JOB
</dt>
1033 <dd class=
"description">Cut the roll after this job
</dd>
1034 <dt>CUPS_CUT_NONE
</dt>
1035 <dd class=
"description">Never cut the roll
</dd>
1036 <dt>CUPS_CUT_PAGE
</dt>
1037 <dd class=
"description">Cut the roll after this page
</dd>
1038 <dt>CUPS_CUT_SET
</dt>
1039 <dd class=
"description">Cut the roll after this set
</dd>
1041 <h3 class=
"enumeration"><a name=
"cups_edge_e">cups_edge_e
</a></h3>
1042 <p class=
"description"></p>
1043 <h4 class=
"constants">Constants
</h4>
1045 <dt>CUPS_EDGE_BOTTOM
</dt>
1046 <dd class=
"description">Leading edge is the bottom of the page
</dd>
1047 <dt>CUPS_EDGE_LEFT
</dt>
1048 <dd class=
"description">Leading edge is the left of the page
</dd>
1049 <dt>CUPS_EDGE_RIGHT
</dt>
1050 <dd class=
"description">Leading edge is the right of the page
</dd>
1051 <dt>CUPS_EDGE_TOP
</dt>
1052 <dd class=
"description">Leading edge is the top of the page
</dd>
1054 <h3 class=
"enumeration"><a name=
"cups_jog_e">cups_jog_e
</a></h3>
1055 <p class=
"description"></p>
1056 <h4 class=
"constants">Constants
</h4>
1058 <dt>CUPS_JOG_FILE
</dt>
1059 <dd class=
"description">Move pages after this file
</dd>
1060 <dt>CUPS_JOG_JOB
</dt>
1061 <dd class=
"description">Move pages after this job
</dd>
1062 <dt>CUPS_JOG_NONE
</dt>
1063 <dd class=
"description">Never move pages
</dd>
1064 <dt>CUPS_JOG_SET
</dt>
1065 <dd class=
"description">Move pages after this set
</dd>
1067 <h3 class=
"enumeration"><a name=
"cups_mode_e">cups_mode_e
</a></h3>
1068 <p class=
"description"></p>
1069 <h4 class=
"constants">Constants
</h4>
1071 <dt>CUPS_RASTER_READ
</dt>
1072 <dd class=
"description">Open stream for reading
</dd>
1073 <dt>CUPS_RASTER_WRITE
</dt>
1074 <dd class=
"description">Open stream for writing
</dd>
1075 <dt>CUPS_RASTER_WRITE_COMPRESSED
<span class=
"info"> CUPS
1.3 </span></dt>
1076 <dd class=
"description">Open stream for compressed writing
</dd>
1078 <h3 class=
"enumeration"><a name=
"cups_order_e">cups_order_e
</a></h3>
1079 <p class=
"description">cupsColorOrder attribute values
</p>
1080 <h4 class=
"constants">Constants
</h4>
1082 <dt>CUPS_ORDER_BANDED
</dt>
1083 <dd class=
"description">CCC MMM YYY KKK ...
</dd>
1084 <dt>CUPS_ORDER_CHUNKED
</dt>
1085 <dd class=
"description">CMYK CMYK CMYK ...
</dd>
1086 <dt>CUPS_ORDER_PLANAR
</dt>
1087 <dd class=
"description">CCC ... MMM ... YYY ... KKK ...
</dd>
1089 <h3 class=
"enumeration"><a name=
"cups_orient_e">cups_orient_e
</a></h3>
1090 <p class=
"description"></p>
1091 <h4 class=
"constants">Constants
</h4>
1093 <dt>CUPS_ORIENT_0
</dt>
1094 <dd class=
"description">Don't rotate the page
</dd>
1095 <dt>CUPS_ORIENT_180
</dt>
1096 <dd class=
"description">Turn the page upside down
</dd>
1097 <dt>CUPS_ORIENT_270
</dt>
1098 <dd class=
"description">Rotate the page clockwise
</dd>
1099 <dt>CUPS_ORIENT_90
</dt>
1100 <dd class=
"description">Rotate the page counter-clockwise
</dd>