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 {
255 Raster API header for the Common UNIX Printing System (CUPS).
257 Copyright 2008 by Apple Inc.
259 These coded instructions, statements, and computer programs are the
260 property of Apple Inc. and are protected by Federal copyright
261 law. Distribution and use rights are outlined in the file "LICENSE.txt"
262 which should have been included with this file. If this file is
263 file is missing or damaged, see the license at "http://www.cups.org/".
266 <h1 class=
"title">Raster API
</h1>
268 <div class='summary'
><table summary='General Information'
>
272 <th>cups/raster.h
</th>
282 <td>Programming:
<a href='api-overview.html'
>Introduction to CUPS Programming
</a><br>
283 Programming:
<a href='api-cups.html'
>CUPS API
</a><br>
284 Programming:
<a href='api-cups.html'
>PPD API
</a><br>
285 References:
<a href='spec-ppd.html'
>CUPS PPD Specification
</a></td>
289 <h2 class=
"title">Contents
</h2>
290 <ul class=
"contents">
292 <li><a href=
"#OVERVIEW">Overview
</a></li>
293 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"code">
294 <li><a href=
"#cupsRasterClose" title=
"Close a raster stream.">cupsRasterClose
</a></li>
295 <li><a href=
"#cupsRasterInterpretPPD" title=
"Interpret PPD commands to create a page header.">cupsRasterInterpretPPD
</a></li>
296 <li><a href=
"#cupsRasterOpen" title=
"Open a raster stream.">cupsRasterOpen
</a></li>
297 <li><a href=
"#cupsRasterReadHeader" title=
"Read a raster page header and store it in a
298 V1 page header structure.">cupsRasterReadHeader
</a></li>
299 <li><a href=
"#cupsRasterReadHeader2" title=
"Read a raster page header and store it in a
300 V2 page header structure.">cupsRasterReadHeader2
</a></li>
301 <li><a href=
"#cupsRasterReadPixels" title=
"Read raster pixels.">cupsRasterReadPixels
</a></li>
302 <li><a href=
"#cupsRasterWriteHeader" title=
"Write a raster page header from a V1 page
303 header structure.">cupsRasterWriteHeader
</a></li>
304 <li><a href=
"#cupsRasterWriteHeader2" title=
"Write a raster page header from a V2 page
305 header structure.">cupsRasterWriteHeader2
</a></li>
306 <li><a href=
"#cupsRasterWritePixels" title=
"Write raster pixels.">cupsRasterWritePixels
</a></li>
308 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
309 <li><a href=
"#cups_interpret_cb_t" title=
"cupsRasterInterpretPPD callback function">cups_interpret_cb_t
</a></li>
310 <li><a href=
"#cups_mode_t" title=
"cupsRasterOpen modes">cups_mode_t
</a></li>
311 <li><a href=
"#cups_page_header2_t" title=
"Version 2 page header ">cups_page_header2_t
</a></li>
312 <li><a href=
"#cups_page_header_t" title=
"Version 1 page header">cups_page_header_t
</a></li>
313 <li><a href=
"#cups_raster_t" title=
"Raster stream data">cups_raster_t
</a></li>
315 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
316 <li><a href=
"#cups_page_header2_s" title=
"Version 2 page header ">cups_page_header2_s
</a></li>
317 <li><a href=
"#cups_page_header_s" title=
"Version 1 page header">cups_page_header_s
</a></li>
319 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
320 <li><a href=
"#cups_adv_e" title=
"AdvanceMedia attribute values">cups_adv_e
</a></li>
321 <li><a href=
"#cups_bool_e" title=
"Types...">cups_bool_e
</a></li>
322 <li><a href=
"#cups_cspace_e" title=
"">cups_cspace_e
</a></li>
323 <li><a href=
"#cups_cut_e" title=
"">cups_cut_e
</a></li>
324 <li><a href=
"#cups_edge_e" title=
"">cups_edge_e
</a></li>
325 <li><a href=
"#cups_jog_e" title=
"">cups_jog_e
</a></li>
326 <li><a href=
"#cups_mode_e" title=
"">cups_mode_e
</a></li>
327 <li><a href=
"#cups_order_e" title=
"cupsColorOrder attribute values">cups_order_e
</a></li>
328 <li><a href=
"#cups_orient_e" title=
"">cups_orient_e
</a></li>
334 Raster API introduction for the Common UNIX Printing System (CUPS).
336 Copyright 2007-2008 by Apple Inc.
337 Copyright 1997-2006 by Easy Software Products, all rights reserved.
339 These coded instructions, statements, and computer programs are the
340 property of Apple Inc. and are protected by Federal copyright
341 law. Distribution and use rights are outlined in the file "LICENSE.txt"
342 which should have been included with this file. If this file is
343 file is missing or damaged, see the license at "http://www.cups.org/".
346 <h2 class='title'
><a name=
"OVERVIEW">Overview
</a></h2>
348 <p>The CUPS raster API provides a standard interface for reading and writing
349 CUPS raster streams which are used for printing to raster printers. Because the
350 raster format is updated from time to time, it is important to use this API to
351 avoid incompatibilities with newer versions of CUPS.
</p>
353 <p>CUPS raster files (
<code>application/vnd.cups-raster
</code>) consists of
354 a stream of raster page descriptions produced by one of the RIP filters such as
355 <var>pstoraster
</var>,
<var>imagetoraster
</var>, or
356 <var>cgpdftoraster
</var>. CUPS raster files are referred to using the
357 <a href='#cups_raster_t'
><code>cups_raster_t
</code></a> type and are
358 opened using the
<a href='#cupsRasterOpen'
><code>cupsRasterOpen
</code></a>
359 function. For example, to read raster data from the standard input, open
360 file descriptor
0:
</p>
362 <pre class=
"example">
363 #include
<cups/raster.h
>>
365 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras =
<a href=
"#cupsRasterOpen">cupsRasterOpen
</a>(
0, CUPS_RASTER_READ);
368 <p>Each page of data begins with a page dictionary structure called
369 <a href=
"#cups_page_header2_t"><code>cups_page_header2_t
</code></a>. This
370 structure contains the colorspace, bits per color, media size, media type,
371 hardware resolution, and so forth used for the page. You read the page header
373 <a href=
"#cupsRasterReadHeader2"><code>cupsRasterReadHeader2
</code></a>
376 <pre class=
"example">
377 #include
<cups/raster.h
>>
379 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras =
<a href=
"#cupsRasterOpen">cupsRasterOpen
</a>(
0, CUPS_RASTER_READ);
380 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> header;
382 while (
<a href=
"#cupsRasterReadHeader2">cupsRasterReadHeader2
</a>(ras,
&header))
384 /* setup this page */
386 /* read raster data */
388 /* finish this page */
392 <p>After the page dictionary comes the page data which is a full-resolution,
393 possibly compressed bitmap representing the page in the printer's output
394 colorspace. You read uncompressed raster data using the
395 <a href=
"#cupsRasterReadPixels"><code>cupsRasterReadPixels
</code></a>
396 function. A
<code>for
</code> loop is normally used to read the page one line
399 <pre class=
"example">
400 #include
<cups/raster.h
>>
402 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras =
<a href=
"#cupsRasterOpen">cupsRasterOpen
</a>(
0, CUPS_RASTER_READ);
403 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> header;
408 while (
<a href=
"#cupsRasterReadHeader2">cupsRasterReadHeader2
</a>(ras,
&header))
410 /* setup this page */
412 fprintf(stderr,
"PAGE: %d %d\n", page, header.NumCopies);
414 /* allocate memory for
1 line */
415 buffer = malloc(header.cupsBytesPerLine);
417 /* read raster data */
418 for (y =
0; y
< header.cupsHeight; y ++)
420 if (
<a href=
"#cupsRasterReadPixels">cupsRasterReadPixels
</a>(ras, buffer, header.cupsBytesPerLine) ==
0)
423 /* write raster data to printer */
426 /* finish this page */
430 <p>When you are done reading the raster data, call the
431 <a href=
"#cupsRasterClose"><code>cupsRasterClose
</code></a> function to free
432 the memory used to read the raster file:
</p>
434 <pre class=
"example">
435 <a href=
"#cups_raster_t">cups_raster_t
</a> *ras;
437 <a href=
"#cupsRasterClose">cupsRasterClose
</a>(ras);
439 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
440 <h3 class=
"function"><a name=
"cupsRasterClose">cupsRasterClose
</a></h3>
441 <p class=
"description">Close a raster stream.
</p>
443 void cupsRasterClose (
<br>
444 <a href=
"#cups_raster_t">cups_raster_t
</a> *r
<br>
446 <h4 class=
"parameters">Parameters
</h4>
449 <dd class=
"description">Stream to close
</dd>
451 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"cupsRasterInterpretPPD">cupsRasterInterpretPPD
</a></h3>
452 <p class=
"description">Interpret PPD commands to create a page header.
</p>
454 int cupsRasterInterpretPPD (
<br>
455 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> *h,
<br>
456 ppd_file_t *ppd,
<br>
457 int num_options,
<br>
458 cups_option_t *options,
<br>
459 <a href=
"#cups_interpret_cb_t">cups_interpret_cb_t
</a> func
<br>
461 <h4 class=
"parameters">Parameters
</h4>
464 <dd class=
"description">Page header
</dd>
466 <dd class=
"description">PPD file
</dd>
468 <dd class=
"description">Number of options
</dd>
470 <dd class=
"description">Options
</dd>
472 <dd class=
"description">Optional page header callback
</dd>
474 <h4 class=
"returnvalue">Return Value
</h4>
475 <p class=
"description">0 on success, -
1 on failure
</p>
476 <h4 class=
"discussion">Discussion
</h4>
477 <p class=
"discussion">This function does not mark the options in the PPD using the
"num_options
"
478 and
"options
" arguments. Instead, mark the options with
479 <code>cupsMarkOptions
</code> and
<code>ppdMarkOption
</code> prior to calling
480 <code>cupsRasterInterpretPPD
</code> - this allows you to do per-page options
481 without manipulating the options array.
<br>
483 The
"func
" argument specifies an optional callback function that is
484 called prior to the computation of the final raster data. The function
485 can make changes to the
<a href=
"#cups_page_header2_t"><code>cups_page_header2_t
</code></a> data as needed to use a
486 supported raster format and then returns
0 on success and -
1 if the
487 requested attributes cannot be supported.
489 <code>cupsRasterInterpretPPD
</code> supports a subset of the PostScript language.
490 Currently only the
<code>[
</code>,
<code>]
</code>,
<code><<
</code>,
<code>>></code>,
<code>{
</code>,
491 <code>}
</code>,
<code>cleartomark
</code>,
<code>copy
</code>,
<code>dup
</code>,
<code>index
</code>,
492 <code>pop
</code>,
<code>roll
</code>,
<code>setpagedevice
</code>, and
<code>stopped
</code> operators
496 <h3 class=
"function"><a name=
"cupsRasterOpen">cupsRasterOpen
</a></h3>
497 <p class=
"description">Open a raster stream.
</p>
499 <a href=
"#cups_raster_t">cups_raster_t
</a> *cupsRasterOpen (
<br>
500 int fd,
<br>
501 <a href=
"#cups_mode_t">cups_mode_t
</a> mode
<br>
503 <h4 class=
"parameters">Parameters
</h4>
506 <dd class=
"description">File descriptor
</dd>
508 <dd class=
"description">Mode
</dd>
510 <h4 class=
"returnvalue">Return Value
</h4>
511 <p class=
"description">New stream
</p>
512 <h3 class=
"function"><a name=
"cupsRasterReadHeader">cupsRasterReadHeader
</a></h3>
513 <p class=
"description">Read a raster page header and store it in a
514 V1 page header structure.
</p>
516 unsigned cupsRasterReadHeader (
<br>
517 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
518 <a href=
"#cups_page_header_t">cups_page_header_t
</a> *h
<br>
520 <h4 class=
"parameters">Parameters
</h4>
523 <dd class=
"description">Raster stream
</dd>
525 <dd class=
"description">Pointer to header data
</dd>
527 <h4 class=
"returnvalue">Return Value
</h4>
528 <p class=
"description">1 on success,
0 on fail
</p>
529 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"cupsRasterReadHeader2">cupsRasterReadHeader2
</a></h3>
530 <p class=
"description">Read a raster page header and store it in a
531 V2 page header structure.
</p>
533 unsigned cupsRasterReadHeader2 (
<br>
534 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
535 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> *h
<br>
537 <h4 class=
"parameters">Parameters
</h4>
540 <dd class=
"description">Raster stream
</dd>
542 <dd class=
"description">Pointer to header data
</dd>
544 <h4 class=
"returnvalue">Return Value
</h4>
545 <p class=
"description">1 on success,
0 on fail
</p>
546 <h3 class=
"function"><a name=
"cupsRasterReadPixels">cupsRasterReadPixels
</a></h3>
547 <p class=
"description">Read raster pixels.
</p>
549 unsigned cupsRasterReadPixels (
<br>
550 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
551 unsigned char *p,
<br>
552 unsigned len
<br>
554 <h4 class=
"parameters">Parameters
</h4>
557 <dd class=
"description">Raster stream
</dd>
559 <dd class=
"description">Pointer to pixel buffer
</dd>
561 <dd class=
"description">Number of bytes to read
</dd>
563 <h4 class=
"returnvalue">Return Value
</h4>
564 <p class=
"description">Number of bytes read
</p>
565 <h3 class=
"function"><a name=
"cupsRasterWriteHeader">cupsRasterWriteHeader
</a></h3>
566 <p class=
"description">Write a raster page header from a V1 page
567 header structure.
</p>
569 unsigned cupsRasterWriteHeader (
<br>
570 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
571 <a href=
"#cups_page_header_t">cups_page_header_t
</a> *h
<br>
573 <h4 class=
"parameters">Parameters
</h4>
576 <dd class=
"description">Raster stream
</dd>
578 <dd class=
"description">Raster page header
</dd>
580 <h4 class=
"returnvalue">Return Value
</h4>
581 <p class=
"description">1 on success,
0 on failure
</p>
582 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"cupsRasterWriteHeader2">cupsRasterWriteHeader2
</a></h3>
583 <p class=
"description">Write a raster page header from a V2 page
584 header structure.
</p>
586 unsigned cupsRasterWriteHeader2 (
<br>
587 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
588 <a href=
"#cups_page_header2_t">cups_page_header2_t
</a> *h
<br>
590 <h4 class=
"parameters">Parameters
</h4>
593 <dd class=
"description">Raster stream
</dd>
595 <dd class=
"description">Raster page header
</dd>
597 <h4 class=
"returnvalue">Return Value
</h4>
598 <p class=
"description">1 on success,
0 on failure
</p>
599 <h3 class=
"function"><a name=
"cupsRasterWritePixels">cupsRasterWritePixels
</a></h3>
600 <p class=
"description">Write raster pixels.
</p>
602 unsigned cupsRasterWritePixels (
<br>
603 <a href=
"#cups_raster_t">cups_raster_t
</a> *r,
<br>
604 unsigned char *p,
<br>
605 unsigned len
<br>
607 <h4 class=
"parameters">Parameters
</h4>
610 <dd class=
"description">Raster stream
</dd>
612 <dd class=
"description">Bytes to write
</dd>
614 <dd class=
"description">Number of bytes to write
</dd>
616 <h4 class=
"returnvalue">Return Value
</h4>
617 <p class=
"description">Number of bytes written
</p>
618 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
619 <h3 class=
"typedef"><a name=
"cups_interpret_cb_t">cups_interpret_cb_t
</a></h3>
620 <p class=
"description">cupsRasterInterpretPPD callback function
</p>
622 typedef int (*cups_interpret_cb_t)(
<a href=
"#cups_page_header2_t">cups_page_header2_t
</a> *header, int preferred_bits);
624 <h3 class=
"typedef"><a name=
"cups_mode_t">cups_mode_t
</a></h3>
625 <p class=
"description">cupsRasterOpen modes
</p>
627 typedef enum
<a href=
"#cups_mode_e">cups_mode_e
</a> cups_mode_t;
629 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"cups_page_header2_t">cups_page_header2_t
</a></h3>
630 <p class=
"description">Version
2 page header
</p>
632 typedef struct
<a href=
"#cups_page_header2_s">cups_page_header2_s
</a> cups_page_header2_t;
634 <h3 class=
"typedef"><a name=
"cups_page_header_t">cups_page_header_t
</a></h3>
635 <p class=
"description">Version
1 page header
</p>
637 typedef struct
<a href=
"#cups_page_header_s">cups_page_header_s
</a> cups_page_header_t;
639 <h3 class=
"typedef"><a name=
"cups_raster_t">cups_raster_t
</a></h3>
640 <p class=
"description">Raster stream data
</p>
642 typedef struct _cups_raster_s cups_raster_t;
644 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
645 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"cups_page_header2_s">cups_page_header2_s
</a></h3>
646 <p class=
"description">Version
2 page header
</p>
647 <p class=
"code">struct cups_page_header2_s {
<br>
648 unsigned AdvanceDistance;
<br>
649 cups_adv_t AdvanceMedia;
<br>
650 cups_bool_t Collate;
<br>
651 cups_cut_t CutMedia;
<br>
652 cups_bool_t Duplex;
<br>
653 unsigned HWResolution[
2];
<br>
654 unsigned ImagingBoundingBox[
4];
<br>
655 cups_bool_t InsertSheet;
<br>
656 cups_jog_t Jog;
<br>
657 cups_edge_t LeadingEdge;
<br>
658 cups_bool_t ManualFeed;
<br>
659 unsigned Margins[
2];
<br>
660 char MediaClass[
64];
<br>
661 char MediaColor[
64];
<br>
662 unsigned MediaPosition;
<br>
663 char MediaType[
64];
<br>
664 unsigned MediaWeight;
<br>
665 cups_bool_t MirrorPrint;
<br>
666 cups_bool_t NegativePrint;
<br>
667 unsigned NumCopies;
<br>
668 cups_orient_t Orientation;
<br>
669 cups_bool_t OutputFaceUp;
<br>
670 char OutputType[
64];
<br>
671 unsigned PageSize[
2];
<br>
672 cups_bool_t Separations;
<br>
673 cups_bool_t TraySwitch;
<br>
674 cups_bool_t Tumble;
<br>
675 unsigned cupsBitsPerColor;
<br>
676 unsigned cupsBitsPerPixel;
<br>
677 float cupsBorderlessScalingFactor;
<br>
678 unsigned cupsBytesPerLine;
<br>
679 cups_order_t cupsColorOrder;
<br>
680 cups_cspace_t cupsColorSpace;
<br>
681 unsigned cupsCompression;
<br>
682 unsigned cupsHeight;
<br>
683 float cupsImagingBBox[
4];
<br>
684 unsigned cupsInteger[
16];
<br>
685 char cupsMarkerType[
64];
<br>
686 unsigned cupsMediaType;
<br>
687 unsigned cupsNumColors;
<br>
688 char cupsPageSizeName[
64];
<br>
689 float cupsPageSize[
2];
<br>
690 float cupsReal[
16];
<br>
691 char cupsRenderingIntent[
64];
<br>
692 unsigned cupsRowCount;
<br>
693 unsigned cupsRowFeed;
<br>
694 unsigned cupsRowStep;
<br>
695 char cupsString[
16][
64];
<br>
696 unsigned cupsWidth;
<br>
698 <h4 class=
"members">Members
</h4>
700 <dt>AdvanceDistance
</dt>
701 <dd class=
"description">AdvanceDistance value in points
</dd>
702 <dt>AdvanceMedia
</dt>
703 <dd class=
"description">AdvanceMedia value (see above)
</dd>
705 <dd class=
"description">Collated copies value
</dd>
707 <dd class=
"description">CutMedia value (see above)
</dd>
709 <dd class=
"description">Duplexed (double-sided) value
</dd>
710 <dt>HWResolution[
2]
</dt>
711 <dd class=
"description">Resolution in dots-per-inch
</dd>
712 <dt>ImagingBoundingBox[
4]
</dt>
713 <dd class=
"description">Pixel region that is painted (points)
</dd>
714 <dt>InsertSheet
</dt>
715 <dd class=
"description">InsertSheet value
</dd>
717 <dd class=
"description">Jog value (see above)
</dd>
718 <dt>LeadingEdge
</dt>
719 <dd class=
"description">LeadingEdge value (see above)
</dd>
721 <dd class=
"description">ManualFeed value
</dd>
723 <dd class=
"description">Lower-lefthand margins in points
</dd>
724 <dt>MediaClass[
64]
</dt>
725 <dd class=
"description">MediaClass string
</dd>
726 <dt>MediaColor[
64]
</dt>
727 <dd class=
"description">MediaColor string
</dd>
728 <dt>MediaPosition
</dt>
729 <dd class=
"description">MediaPosition value
</dd>
730 <dt>MediaType[
64]
</dt>
731 <dd class=
"description">MediaType string
</dd>
732 <dt>MediaWeight
</dt>
733 <dd class=
"description">MediaWeight value in grams/m^
2</dd>
734 <dt>MirrorPrint
</dt>
735 <dd class=
"description">MirrorPrint value
</dd>
736 <dt>NegativePrint
</dt>
737 <dd class=
"description">NegativePrint value
</dd>
739 <dd class=
"description">Number of copies to produce
</dd>
740 <dt>Orientation
</dt>
741 <dd class=
"description">Orientation value (see above)
</dd>
742 <dt>OutputFaceUp
</dt>
743 <dd class=
"description">OutputFaceUp value
</dd>
744 <dt>OutputType[
64]
</dt>
745 <dd class=
"description">OutputType string
</dd>
746 <dt>PageSize[
2]
</dt>
747 <dd class=
"description">Width and length of page in points
</dd>
748 <dt>Separations
</dt>
749 <dd class=
"description">Separations value
</dd>
751 <dd class=
"description">TraySwitch value
</dd>
753 <dd class=
"description">Tumble value
</dd>
754 <dt>cupsBitsPerColor
</dt>
755 <dd class=
"description">Number of bits for each color
</dd>
756 <dt>cupsBitsPerPixel
</dt>
757 <dd class=
"description">Number of bits for each pixel
</dd>
758 <dt>cupsBorderlessScalingFactor
<span class=
"info"> CUPS
1.2 </span></dt>
759 <dd class=
"description">Scaling that was applied to page data
</dd>
760 <dt>cupsBytesPerLine
</dt>
761 <dd class=
"description">Number of bytes per line
</dd>
762 <dt>cupsColorOrder
</dt>
763 <dd class=
"description">Order of colors
</dd>
764 <dt>cupsColorSpace
</dt>
765 <dd class=
"description">True colorspace
</dd>
766 <dt>cupsCompression
</dt>
767 <dd class=
"description">Device compression to use
</dd>
769 <dd class=
"description">Height of page image in pixels
</dd>
770 <dt>cupsImagingBBox[
4]
<span class=
"info"> CUPS
1.2 </span></dt>
771 <dd class=
"description">Floating point ImagingBoundingBox *
772 (scaling factor not applied)
</dd>
773 <dt>cupsInteger[
16]
<span class=
"info"> CUPS
1.2 </span></dt>
774 <dd class=
"description">User-defined integer values
</dd>
775 <dt>cupsMarkerType[
64]
<span class=
"info"> CUPS
1.2 </span></dt>
776 <dd class=
"description">Ink/toner type
</dd>
777 <dt>cupsMediaType
</dt>
778 <dd class=
"description">Media type code
</dd>
779 <dt>cupsNumColors
<span class=
"info"> CUPS
1.2 </span></dt>
780 <dd class=
"description">Number of colors
</dd>
781 <dt>cupsPageSizeName[
64]
<span class=
"info"> CUPS
1.2 </span></dt>
782 <dd class=
"description">PageSize name
</dd>
783 <dt>cupsPageSize[
2]
<span class=
"info"> CUPS
1.2 </span></dt>
784 <dd class=
"description">Floating point PageSize (scaling *
785 factor not applied)
</dd>
786 <dt>cupsReal[
16]
<span class=
"info"> CUPS
1.2 </span></dt>
787 <dd class=
"description">User-defined floating-point values
</dd>
788 <dt>cupsRenderingIntent[
64]
<span class=
"info"> CUPS
1.2 </span></dt>
789 <dd class=
"description">Color rendering intent
</dd>
790 <dt>cupsRowCount
</dt>
791 <dd class=
"description">Rows per band
</dd>
792 <dt>cupsRowFeed
</dt>
793 <dd class=
"description">Feed between bands
</dd>
794 <dt>cupsRowStep
</dt>
795 <dd class=
"description">Spacing between lines
</dd>
796 <dt>cupsString[
16][
64]
<span class=
"info"> CUPS
1.2 </span></dt>
797 <dd class=
"description">User-defined string values
</dd>
799 <dd class=
"description">Width of page image in pixels
</dd>
801 <h3 class=
"struct"><a name=
"cups_page_header_s">cups_page_header_s
</a></h3>
802 <p class=
"description">Version
1 page header
</p>
803 <p class=
"code">struct cups_page_header_s {
<br>
804 unsigned AdvanceDistance;
<br>
805 cups_adv_t AdvanceMedia;
<br>
806 cups_bool_t Collate;
<br>
807 cups_cut_t CutMedia;
<br>
808 cups_bool_t Duplex;
<br>
809 unsigned HWResolution[
2];
<br>
810 unsigned ImagingBoundingBox[
4];
<br>
811 cups_bool_t InsertSheet;
<br>
812 cups_jog_t Jog;
<br>
813 cups_edge_t LeadingEdge;
<br>
814 cups_bool_t ManualFeed;
<br>
815 unsigned Margins[
2];
<br>
816 char MediaClass[
64];
<br>
817 char MediaColor[
64];
<br>
818 unsigned MediaPosition;
<br>
819 char MediaType[
64];
<br>
820 unsigned MediaWeight;
<br>
821 cups_bool_t MirrorPrint;
<br>
822 cups_bool_t NegativePrint;
<br>
823 unsigned NumCopies;
<br>
824 cups_orient_t Orientation;
<br>
825 cups_bool_t OutputFaceUp;
<br>
826 char OutputType[
64];
<br>
827 unsigned PageSize[
2];
<br>
828 cups_bool_t Separations;
<br>
829 cups_bool_t TraySwitch;
<br>
830 cups_bool_t Tumble;
<br>
831 unsigned cupsBitsPerColor;
<br>
832 unsigned cupsBitsPerPixel;
<br>
833 unsigned cupsBytesPerLine;
<br>
834 cups_order_t cupsColorOrder;
<br>
835 cups_cspace_t cupsColorSpace;
<br>
836 unsigned cupsCompression;
<br>
837 unsigned cupsHeight;
<br>
838 unsigned cupsMediaType;
<br>
839 unsigned cupsRowCount;
<br>
840 unsigned cupsRowFeed;
<br>
841 unsigned cupsRowStep;
<br>
842 unsigned cupsWidth;
<br>
844 <h4 class=
"members">Members
</h4>
846 <dt>AdvanceDistance
</dt>
847 <dd class=
"description">AdvanceDistance value in points
</dd>
848 <dt>AdvanceMedia
</dt>
849 <dd class=
"description">AdvanceMedia value (see above)
</dd>
851 <dd class=
"description">Collated copies value
</dd>
853 <dd class=
"description">CutMedia value (see above)
</dd>
855 <dd class=
"description">Duplexed (double-sided) value
</dd>
856 <dt>HWResolution[
2]
</dt>
857 <dd class=
"description">Resolution in dots-per-inch
</dd>
858 <dt>ImagingBoundingBox[
4]
</dt>
859 <dd class=
"description">Pixel region that is painted (points)
</dd>
860 <dt>InsertSheet
</dt>
861 <dd class=
"description">InsertSheet value
</dd>
863 <dd class=
"description">Jog value (see above)
</dd>
864 <dt>LeadingEdge
</dt>
865 <dd class=
"description">LeadingEdge value (see above)
</dd>
867 <dd class=
"description">ManualFeed value
</dd>
869 <dd class=
"description">Lower-lefthand margins in points
</dd>
870 <dt>MediaClass[
64]
</dt>
871 <dd class=
"description">MediaClass string
</dd>
872 <dt>MediaColor[
64]
</dt>
873 <dd class=
"description">MediaColor string
</dd>
874 <dt>MediaPosition
</dt>
875 <dd class=
"description">MediaPosition value
</dd>
876 <dt>MediaType[
64]
</dt>
877 <dd class=
"description">MediaType string
</dd>
878 <dt>MediaWeight
</dt>
879 <dd class=
"description">MediaWeight value in grams/m^
2</dd>
880 <dt>MirrorPrint
</dt>
881 <dd class=
"description">MirrorPrint value
</dd>
882 <dt>NegativePrint
</dt>
883 <dd class=
"description">NegativePrint value
</dd>
885 <dd class=
"description">Number of copies to produce
</dd>
886 <dt>Orientation
</dt>
887 <dd class=
"description">Orientation value (see above)
</dd>
888 <dt>OutputFaceUp
</dt>
889 <dd class=
"description">OutputFaceUp value
</dd>
890 <dt>OutputType[
64]
</dt>
891 <dd class=
"description">OutputType string
</dd>
892 <dt>PageSize[
2]
</dt>
893 <dd class=
"description">Width and length of page in points
</dd>
894 <dt>Separations
</dt>
895 <dd class=
"description">Separations value
</dd>
897 <dd class=
"description">TraySwitch value
</dd>
899 <dd class=
"description">Tumble value
</dd>
900 <dt>cupsBitsPerColor
</dt>
901 <dd class=
"description">Number of bits for each color
</dd>
902 <dt>cupsBitsPerPixel
</dt>
903 <dd class=
"description">Number of bits for each pixel
</dd>
904 <dt>cupsBytesPerLine
</dt>
905 <dd class=
"description">Number of bytes per line
</dd>
906 <dt>cupsColorOrder
</dt>
907 <dd class=
"description">Order of colors
</dd>
908 <dt>cupsColorSpace
</dt>
909 <dd class=
"description">True colorspace
</dd>
910 <dt>cupsCompression
</dt>
911 <dd class=
"description">Device compression to use
</dd>
913 <dd class=
"description">Height of page image in pixels
</dd>
914 <dt>cupsMediaType
</dt>
915 <dd class=
"description">Media type code
</dd>
916 <dt>cupsRowCount
</dt>
917 <dd class=
"description">Rows per band
</dd>
918 <dt>cupsRowFeed
</dt>
919 <dd class=
"description">Feed between bands
</dd>
920 <dt>cupsRowStep
</dt>
921 <dd class=
"description">Spacing between lines
</dd>
923 <dd class=
"description">Width of page image in pixels
</dd>
925 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
926 <h3 class=
"enumeration"><a name=
"cups_adv_e">cups_adv_e
</a></h3>
927 <p class=
"description">AdvanceMedia attribute values
</p>
928 <h4 class=
"constants">Constants
</h4>
930 <dt>CUPS_ADVANCE_FILE
</dt>
931 <dd class=
"description">Advance the roll after this file
</dd>
932 <dt>CUPS_ADVANCE_JOB
</dt>
933 <dd class=
"description">Advance the roll after this job
</dd>
934 <dt>CUPS_ADVANCE_NONE
</dt>
935 <dd class=
"description">Never advance the roll
</dd>
936 <dt>CUPS_ADVANCE_PAGE
</dt>
937 <dd class=
"description">Advance the roll after this page
</dd>
938 <dt>CUPS_ADVANCE_SET
</dt>
939 <dd class=
"description">Advance the roll after this set
</dd>
941 <h3 class=
"enumeration"><a name=
"cups_bool_e">cups_bool_e
</a></h3>
942 <p class=
"description">Types...
</p>
943 <h4 class=
"constants">Constants
</h4>
946 <dd class=
"description">Logical false
</dd>
948 <dd class=
"description">Logical true
</dd>
950 <h3 class=
"enumeration"><a name=
"cups_cspace_e">cups_cspace_e
</a></h3>
951 <p class=
"description"></p>
952 <h4 class=
"constants">Constants
</h4>
954 <dt>CUPS_CSPACE_CIELab
<span class=
"info"> CUPS
1.1.19 </span></dt>
955 <dd class=
"description">CIE Lab
</dd>
956 <dt>CUPS_CSPACE_CIEXYZ
<span class=
"info"> CUPS
1.1.19 </span></dt>
957 <dd class=
"description">CIE XYZ
</dd>
958 <dt>CUPS_CSPACE_CMY
</dt>
959 <dd class=
"description">Cyan, magenta, yellow
</dd>
960 <dt>CUPS_CSPACE_CMYK
</dt>
961 <dd class=
"description">Cyan, magenta, yellow, black
</dd>
962 <dt>CUPS_CSPACE_GMCK
</dt>
963 <dd class=
"description">Gold, magenta, yellow, black
</dd>
964 <dt>CUPS_CSPACE_GMCS
</dt>
965 <dd class=
"description">Gold, magenta, yellow, silver
</dd>
966 <dt>CUPS_CSPACE_GOLD
</dt>
967 <dd class=
"description">Gold foil
</dd>
968 <dt>CUPS_CSPACE_ICC1
<span class=
"info"> CUPS
1.1.19 </span></dt>
969 <dd class=
"description">ICC-based,
1 color
</dd>
970 <dt>CUPS_CSPACE_ICC2
<span class=
"info"> CUPS
1.1.19 </span></dt>
971 <dd class=
"description">ICC-based,
2 colors
</dd>
972 <dt>CUPS_CSPACE_ICC3
<span class=
"info"> CUPS
1.1.19 </span></dt>
973 <dd class=
"description">ICC-based,
3 colors
</dd>
974 <dt>CUPS_CSPACE_ICC4
<span class=
"info"> CUPS
1.1.19 </span></dt>
975 <dd class=
"description">ICC-based,
4 colors
</dd>
976 <dt>CUPS_CSPACE_ICC5
<span class=
"info"> CUPS
1.1.19 </span></dt>
977 <dd class=
"description">ICC-based,
5 colors
</dd>
978 <dt>CUPS_CSPACE_ICC6
<span class=
"info"> CUPS
1.1.19 </span></dt>
979 <dd class=
"description">ICC-based,
6 colors
</dd>
980 <dt>CUPS_CSPACE_ICC7
<span class=
"info"> CUPS
1.1.19 </span></dt>
981 <dd class=
"description">ICC-based,
7 colors
</dd>
982 <dt>CUPS_CSPACE_ICC8
<span class=
"info"> CUPS
1.1.19 </span></dt>
983 <dd class=
"description">ICC-based,
8 colors
</dd>
984 <dt>CUPS_CSPACE_ICC9
<span class=
"info"> CUPS
1.1.19 </span></dt>
985 <dd class=
"description">ICC-based,
9 colors
</dd>
986 <dt>CUPS_CSPACE_ICCA
<span class=
"info"> CUPS
1.1.19 </span></dt>
987 <dd class=
"description">ICC-based,
10 colors
</dd>
988 <dt>CUPS_CSPACE_ICCB
<span class=
"info"> CUPS
1.1.19 </span></dt>
989 <dd class=
"description">ICC-based,
11 colors
</dd>
990 <dt>CUPS_CSPACE_ICCC
<span class=
"info"> CUPS
1.1.19 </span></dt>
991 <dd class=
"description">ICC-based,
12 colors
</dd>
992 <dt>CUPS_CSPACE_ICCD
<span class=
"info"> CUPS
1.1.19 </span></dt>
993 <dd class=
"description">ICC-based,
13 colors
</dd>
994 <dt>CUPS_CSPACE_ICCE
<span class=
"info"> CUPS
1.1.19 </span></dt>
995 <dd class=
"description">ICC-based,
14 colors
</dd>
996 <dt>CUPS_CSPACE_ICCF
<span class=
"info"> CUPS
1.1.19 </span></dt>
997 <dd class=
"description">ICC-based,
15 colors
</dd>
998 <dt>CUPS_CSPACE_K
</dt>
999 <dd class=
"description">Black
</dd>
1000 <dt>CUPS_CSPACE_KCMY
</dt>
1001 <dd class=
"description">Black, cyan, magenta, yellow
</dd>
1002 <dt>CUPS_CSPACE_KCMYcm
</dt>
1003 <dd class=
"description">Black, cyan, magenta, yellow, *
1004 light-cyan, light-magenta
</dd>
1005 <dt>CUPS_CSPACE_RGB
</dt>
1006 <dd class=
"description">Red, green, blue
</dd>
1007 <dt>CUPS_CSPACE_RGBA
</dt>
1008 <dd class=
"description">Red, green, blue, alpha
</dd>
1009 <dt>CUPS_CSPACE_RGBW
<span class=
"info"> CUPS
1.2 </span></dt>
1010 <dd class=
"description">Red, green, blue, white
</dd>
1011 <dt>CUPS_CSPACE_SILVER
</dt>
1012 <dd class=
"description">Silver foil
</dd>
1013 <dt>CUPS_CSPACE_W
</dt>
1014 <dd class=
"description">Luminance
</dd>
1015 <dt>CUPS_CSPACE_WHITE
</dt>
1016 <dd class=
"description">White ink (as black)
</dd>
1017 <dt>CUPS_CSPACE_YMC
</dt>
1018 <dd class=
"description">Yellow, magenta, cyan
</dd>
1019 <dt>CUPS_CSPACE_YMCK
</dt>
1020 <dd class=
"description">Yellow, magenta, cyan, black
</dd>
1022 <h3 class=
"enumeration"><a name=
"cups_cut_e">cups_cut_e
</a></h3>
1023 <p class=
"description"></p>
1024 <h4 class=
"constants">Constants
</h4>
1026 <dt>CUPS_CUT_FILE
</dt>
1027 <dd class=
"description">Cut the roll after this file
</dd>
1028 <dt>CUPS_CUT_JOB
</dt>
1029 <dd class=
"description">Cut the roll after this job
</dd>
1030 <dt>CUPS_CUT_NONE
</dt>
1031 <dd class=
"description">Never cut the roll
</dd>
1032 <dt>CUPS_CUT_PAGE
</dt>
1033 <dd class=
"description">Cut the roll after this page
</dd>
1034 <dt>CUPS_CUT_SET
</dt>
1035 <dd class=
"description">Cut the roll after this set
</dd>
1037 <h3 class=
"enumeration"><a name=
"cups_edge_e">cups_edge_e
</a></h3>
1038 <p class=
"description"></p>
1039 <h4 class=
"constants">Constants
</h4>
1041 <dt>CUPS_EDGE_BOTTOM
</dt>
1042 <dd class=
"description">Leading edge is the bottom of the page
</dd>
1043 <dt>CUPS_EDGE_LEFT
</dt>
1044 <dd class=
"description">Leading edge is the left of the page
</dd>
1045 <dt>CUPS_EDGE_RIGHT
</dt>
1046 <dd class=
"description">Leading edge is the right of the page
</dd>
1047 <dt>CUPS_EDGE_TOP
</dt>
1048 <dd class=
"description">Leading edge is the top of the page
</dd>
1050 <h3 class=
"enumeration"><a name=
"cups_jog_e">cups_jog_e
</a></h3>
1051 <p class=
"description"></p>
1052 <h4 class=
"constants">Constants
</h4>
1054 <dt>CUPS_JOG_FILE
</dt>
1055 <dd class=
"description">Move pages after this file
</dd>
1056 <dt>CUPS_JOG_JOB
</dt>
1057 <dd class=
"description">Move pages after this job
</dd>
1058 <dt>CUPS_JOG_NONE
</dt>
1059 <dd class=
"description">Never move pages
</dd>
1060 <dt>CUPS_JOG_SET
</dt>
1061 <dd class=
"description">Move pages after this set
</dd>
1063 <h3 class=
"enumeration"><a name=
"cups_mode_e">cups_mode_e
</a></h3>
1064 <p class=
"description"></p>
1065 <h4 class=
"constants">Constants
</h4>
1067 <dt>CUPS_RASTER_READ
</dt>
1068 <dd class=
"description">Open stream for reading
</dd>
1069 <dt>CUPS_RASTER_WRITE
</dt>
1070 <dd class=
"description">Open stream for writing
</dd>
1071 <dt>CUPS_RASTER_WRITE_COMPRESSED
<span class=
"info"> CUPS
1.3 </span></dt>
1072 <dd class=
"description">Open stream for compressed writing
</dd>
1074 <h3 class=
"enumeration"><a name=
"cups_order_e">cups_order_e
</a></h3>
1075 <p class=
"description">cupsColorOrder attribute values
</p>
1076 <h4 class=
"constants">Constants
</h4>
1078 <dt>CUPS_ORDER_BANDED
</dt>
1079 <dd class=
"description">CCC MMM YYY KKK ...
</dd>
1080 <dt>CUPS_ORDER_CHUNKED
</dt>
1081 <dd class=
"description">CMYK CMYK CMYK ...
</dd>
1082 <dt>CUPS_ORDER_PLANAR
</dt>
1083 <dd class=
"description">CCC ... MMM ... YYY ... KKK ...
</dd>
1085 <h3 class=
"enumeration"><a name=
"cups_orient_e">cups_orient_e
</a></h3>
1086 <p class=
"description"></p>
1087 <h4 class=
"constants">Constants
</h4>
1089 <dt>CUPS_ORIENT_0
</dt>
1090 <dd class=
"description">Don't rotate the page
</dd>
1091 <dt>CUPS_ORIENT_180
</dt>
1092 <dd class=
"description">Turn the page upside down
</dd>
1093 <dt>CUPS_ORIENT_270
</dt>
1094 <dd class=
"description">Rotate the page clockwise
</dd>
1095 <dt>CUPS_ORIENT_90
</dt>
1096 <dd class=
"description">Rotate the page counter-clockwise
</dd>