]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/api-raster.html
Load cups into easysw/current.
[thirdparty/cups.git] / doc / help / api-raster.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2 <html>
3 <!-- SECTION: Programming -->
4 <head>
5 <title>Raster API</title>
6 <meta name='keywords' content='Programming'>
7 <meta name='creator' content='Mini-XML v2.3'>
8 <style type='text/css'><!--
9 h1, h2, h3, p { font-family: sans-serif; text-align: justify; }
10 tt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }
11 pre { font-weight: bold; color: #7f0000; margin-left: 2em; }
12 span.info { background: #000000; border: solid thin #000000; color: #ffffff; font-size: 80%; font-style: italic; font-weight: bold; white-space: nowrap; }
13 h3 span.info { float: right; font-size: 100%; }
14 h1.title, h2.title, h3.title { border-bottom: solid 2px #000000; }
15 --></style>
16 </head>
17 <body>
18 <!--
19 "$Id$"
20
21 Raster API introduction for the Common UNIX Printing System (CUPS).
22
23 Copyright 1997-2006 by Easy Software Products.
24
25 These coded instructions, statements, and computer programs are the
26 property of Easy Software Products and are protected by Federal
27 copyright law. Distribution and use rights are outlined in the file
28 "LICENSE.txt" which should have been included with this file. If this
29 file is missing or damaged please contact Easy Software Products
30 at:
31
32 Attn: CUPS Licensing Information
33 Easy Software Products
34 44141 Airport View Drive, Suite 204
35 Hollywood, Maryland 20636 USA
36
37 Voice: (301) 373-9600
38 EMail: cups-info@cups.org
39 WWW: http://www.cups.org
40 -->
41
42 <h2 class='title'>Introduction</h2>
43
44 <p>The CUPS raster API provides a standard interface for reading
45 and writing CUPS raster streams which are used for printing to
46 raster printers. Because the raster format is updated from time
47 to time, it is important to use this API to avoid
48 incompatibilities with newer versions of CUPS.</p>
49
50 <h2 class='title'>General Usage</h2>
51
52 <p>The <var>&lt;cups/raster.h&gt;</var> header file must be
53 included to use the <tt>cupsRaster</tt> functions.</p>
54
55 <p>Programs using these functions must be linked to the CUPS
56 imaging library: <var>libcupsimage.a</var>,
57 <var>libcupsimage.so.2</var>, <var>libcupsimage.2.dylib</var>,
58 <var>libcupsimage_s.a</var>, or <var>libcupsimage2.lib</var>
59 depending on the platform. The following command compiles
60 <var>myprogram.c</var> using GCC and the CUPS imaging
61 library:</p>
62
63 <pre class='command'>
64 <kbd>gcc -o myprogram myprogram.c -lcupsimage</kbd>
65 </pre>
66
67 <h2 class='title'>Compatibility</h2>
68
69 <p>Unless otherwise specified, the raster API functions require
70 CUPS 1.1 or higher.</p>
71
72 <h2 class='title'>Licensing</h2>
73
74 <p>The CUPS raster API is provided under the terms of the GNU
75 Library General Public License, with exceptions for MacOS X-based
76 programs. Please see the CUPS license agreement for more
77 information.</p>
78 <h2 class='title'>Contents</h2>
79 <ul>
80 <li><a href='#ENUMERATIONS'>Enumerations</a></li>
81 <li><a href='#FUNCTIONS'>Functions</a></li>
82 <li><a href='#STRUCTURES'>Structures</a></li>
83 <li><a href='#TYPES'>Types</a></li>
84 </ul>
85 <!-- NEW PAGE -->
86 <h2 class='title'><a name='ENUMERATIONS'>Enumerations</a></h2>
87 <ul>
88 <li><a href='#cups_adv_e'><tt>cups_adv_e</tt></a> </li>
89 <li><a href='#cups_bool_e'><tt>cups_bool_e</tt></a> </li>
90 </ul>
91 <!-- NEW PAGE -->
92 <h3 class='title'><a name='cups_adv_e'>cups_adv_e</a></h3>
93 <h4>Description</h4>
94 <p>AdvanceMedia attribute values</p>
95 <h4>Values</h4>
96 <div class='table'><table align='center' border='1' width='80%'>
97 <thead><tr><th>Name</th><th>Description</th></tr></thead>
98 <tbody>
99 <tr><td><tt>CUPS_ADVANCE_FILE</tt> </td><td>Advance the roll after this file</td></tr>
100 <tr><td><tt>CUPS_ADVANCE_JOB</tt> </td><td>Advance the roll after this job</td></tr>
101 <tr><td><tt>CUPS_ADVANCE_NONE</tt> </td><td>Never advance the roll</td></tr>
102 <tr><td><tt>CUPS_ADVANCE_PAGE</tt> </td><td>Advance the roll after this page</td></tr>
103 <tr><td><tt>CUPS_ADVANCE_SET</tt> </td><td>Advance the roll after this set</td></tr>
104 </tbody></table></div>
105 <!-- NEW PAGE -->
106 <h3 class='title'><a name='cups_bool_e'>cups_bool_e</a></h3>
107 <h4>Description</h4>
108 <p>Types...</p>
109 <h4>Values</h4>
110 <div class='table'><table align='center' border='1' width='80%'>
111 <thead><tr><th>Name</th><th>Description</th></tr></thead>
112 <tbody>
113 <tr><td><tt>CUPS_FALSE</tt> </td><td>Logical false</td></tr>
114 <tr><td><tt>CUPS_TRUE</tt> </td><td>Logical true</td></tr>
115 </tbody></table></div>
116 <!-- NEW PAGE -->
117 <h2 class='title'><a name='FUNCTIONS'>Functions</a></h2>
118 <ul>
119 <li><a href='#cupsRasterClose'><tt>cupsRasterClose()</tt></a> </li>
120 <li><a href='#cupsRasterInterpretPPD'><tt>cupsRasterInterpretPPD()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
121 <li><a href='#cupsRasterOpen'><tt>cupsRasterOpen()</tt></a> </li>
122 <li><a href='#cupsRasterReadHeader'><tt>cupsRasterReadHeader()</tt></a> </li>
123 <li><a href='#cupsRasterReadHeader2'><tt>cupsRasterReadHeader2()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
124 <li><a href='#cupsRasterReadPixels'><tt>cupsRasterReadPixels()</tt></a> </li>
125 <li><a href='#cupsRasterWriteHeader'><tt>cupsRasterWriteHeader()</tt></a> </li>
126 <li><a href='#cupsRasterWriteHeader2'><tt>cupsRasterWriteHeader2()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
127 <li><a href='#cupsRasterWritePixels'><tt>cupsRasterWritePixels()</tt></a> </li>
128 </ul>
129 <!-- NEW PAGE -->
130 <h3 class='title'><a name='cupsRasterClose'>cupsRasterClose()</a></h3>
131 <h4>Description</h4>
132 <p>Close a raster stream.</p>
133 <h4>Syntax</h4>
134 <pre>
135 void
136 cupsRasterClose(
137 <a href='#cups_raster_t'>cups_raster_t</a> * r);
138 </pre>
139 <h4>Arguments</h4>
140 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
141 <thead><tr><th>Name</th><th>Description</th></tr></thead>
142 <tbody>
143 <tr><td><tt>r</tt></td><td>Stream to close</td></tr>
144 </tbody></table></div>
145 <h4>Returns</h4>
146 <p>Nothing.</p>
147 <!-- NEW PAGE -->
148 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsRasterInterpretPPD'>cupsRasterInterpretPPD()</a></h3>
149 <h4>Description</h4>
150 <p>Interpret PPD commands to create a page header.
151
152 This function does not mark the options in the PPD using the &quot;num_options&quot;
153 and &quot;options&quot; arguments. Instead, mark the options prior to calling
154 cupsRasterInterpretPPD() - this allows you to do per-page options
155 without manipulating the options array.
156
157 The &quot;func&quot; argument specifies an optional callback function that is
158 called prior to the computation of the final raster data. The function
159 can make changes to the cups_page_header2_t data as needed to use a
160 supported raster format and then returns 0 on success and -1 if the
161 requested attributes cannot be supported.
162
163 cupsRasterInterpretPPD() supports a subset of the PostScript language.
164 Currently only the [, ], &lt;&lt;, &gt;&gt;, {, }, cleartomark, copy, dup, index,
165 pop, roll, setpagedevice, and stopped operators are supported.
166
167 </p>
168 <h4>Syntax</h4>
169 <pre>
170 int
171 cupsRasterInterpretPPD(
172 <a href='#cups_page_header2_t'>cups_page_header2_t</a> * h,
173 ppd_file_t * ppd,
174 int num_options,
175 cups_option_t * options,
176 <a href='#cups_interpret_cb_t'>cups_interpret_cb_t</a> func);
177 </pre>
178 <h4>Arguments</h4>
179 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
180 <thead><tr><th>Name</th><th>Description</th></tr></thead>
181 <tbody>
182 <tr><td><tt>h</tt></td><td>Page header</td></tr>
183 <tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
184 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
185 <tr><td><tt>options</tt></td><td>Options</td></tr>
186 <tr><td><tt>func</tt></td><td>Optional page header callback</td></tr>
187 </tbody></table></div>
188 <h4>Returns</h4>
189 <p>0 on success, -1 on failure</p>
190 <!-- NEW PAGE -->
191 <h3 class='title'><a name='cupsRasterOpen'>cupsRasterOpen()</a></h3>
192 <h4>Description</h4>
193 <p>Open a raster stream.</p>
194 <h4>Syntax</h4>
195 <pre>
196 <a href='#cups_raster_t'>cups_raster_t</a> *
197 cupsRasterOpen(
198 int fd,
199 cups_mode_t mode);
200 </pre>
201 <h4>Arguments</h4>
202 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
203 <thead><tr><th>Name</th><th>Description</th></tr></thead>
204 <tbody>
205 <tr><td><tt>fd</tt></td><td>File descriptor</td></tr>
206 <tr><td><tt>mode</tt></td><td>Mode</td></tr>
207 </tbody></table></div>
208 <h4>Returns</h4>
209 <p>New stream</p>
210 <!-- NEW PAGE -->
211 <h3 class='title'><a name='cupsRasterReadHeader'>cupsRasterReadHeader()</a></h3>
212 <h4>Description</h4>
213 <p>Read a raster page header and store it in a
214 V1 page header structure.</p>
215 <h4>Syntax</h4>
216 <pre>
217 unsigned
218 cupsRasterReadHeader(
219 <a href='#cups_raster_t'>cups_raster_t</a> * r,
220 <a href='#cups_page_header_t'>cups_page_header_t</a> * h);
221 </pre>
222 <h4>Arguments</h4>
223 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
224 <thead><tr><th>Name</th><th>Description</th></tr></thead>
225 <tbody>
226 <tr><td><tt>r</tt></td><td>Raster stream</td></tr>
227 <tr><td><tt>h</tt></td><td>Pointer to header data</td></tr>
228 </tbody></table></div>
229 <h4>Returns</h4>
230 <p>1 on success, 0 on fail</p>
231 <!-- NEW PAGE -->
232 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsRasterReadHeader2'>cupsRasterReadHeader2()</a></h3>
233 <h4>Description</h4>
234 <p>Read a raster page header and store it in a
235 V2 page header structure.
236
237 </p>
238 <h4>Syntax</h4>
239 <pre>
240 unsigned
241 cupsRasterReadHeader2(
242 <a href='#cups_raster_t'>cups_raster_t</a> * r,
243 <a href='#cups_page_header2_t'>cups_page_header2_t</a> * h);
244 </pre>
245 <h4>Arguments</h4>
246 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
247 <thead><tr><th>Name</th><th>Description</th></tr></thead>
248 <tbody>
249 <tr><td><tt>r</tt></td><td>Raster stream</td></tr>
250 <tr><td><tt>h</tt></td><td>Pointer to header data</td></tr>
251 </tbody></table></div>
252 <h4>Returns</h4>
253 <p>1 on success, 0 on fail</p>
254 <!-- NEW PAGE -->
255 <h3 class='title'><a name='cupsRasterReadPixels'>cupsRasterReadPixels()</a></h3>
256 <h4>Description</h4>
257 <p>Read raster pixels.</p>
258 <h4>Syntax</h4>
259 <pre>
260 unsigned
261 cupsRasterReadPixels(
262 <a href='#cups_raster_t'>cups_raster_t</a> * r,
263 unsigned char * p,
264 unsigned len);
265 </pre>
266 <h4>Arguments</h4>
267 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
268 <thead><tr><th>Name</th><th>Description</th></tr></thead>
269 <tbody>
270 <tr><td><tt>r</tt></td><td>Raster stream</td></tr>
271 <tr><td><tt>p</tt></td><td>Pointer to pixel buffer</td></tr>
272 <tr><td><tt>len</tt></td><td>Number of bytes to read</td></tr>
273 </tbody></table></div>
274 <h4>Returns</h4>
275 <p>Number of bytes read</p>
276 <!-- NEW PAGE -->
277 <h3 class='title'><a name='cupsRasterWriteHeader'>cupsRasterWriteHeader()</a></h3>
278 <h4>Description</h4>
279 <p>Write a raster page header from a V1 page
280 header structure.</p>
281 <h4>Syntax</h4>
282 <pre>
283 unsigned
284 cupsRasterWriteHeader(
285 <a href='#cups_raster_t'>cups_raster_t</a> * r,
286 <a href='#cups_page_header_t'>cups_page_header_t</a> * h);
287 </pre>
288 <h4>Arguments</h4>
289 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
290 <thead><tr><th>Name</th><th>Description</th></tr></thead>
291 <tbody>
292 <tr><td><tt>r</tt></td><td>Raster stream</td></tr>
293 <tr><td><tt>h</tt></td><td>Raster page header</td></tr>
294 </tbody></table></div>
295 <h4>Returns</h4>
296 <p>1 on success, 0 on failure</p>
297 <!-- NEW PAGE -->
298 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsRasterWriteHeader2'>cupsRasterWriteHeader2()</a></h3>
299 <h4>Description</h4>
300 <p>Write a raster page header from a V2 page
301 header structure.
302
303 </p>
304 <h4>Syntax</h4>
305 <pre>
306 unsigned
307 cupsRasterWriteHeader2(
308 <a href='#cups_raster_t'>cups_raster_t</a> * r,
309 <a href='#cups_page_header2_t'>cups_page_header2_t</a> * h);
310 </pre>
311 <h4>Arguments</h4>
312 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
313 <thead><tr><th>Name</th><th>Description</th></tr></thead>
314 <tbody>
315 <tr><td><tt>r</tt></td><td>Raster stream</td></tr>
316 <tr><td><tt>h</tt></td><td>Raster page header</td></tr>
317 </tbody></table></div>
318 <h4>Returns</h4>
319 <p>1 on success, 0 on failure</p>
320 <!-- NEW PAGE -->
321 <h3 class='title'><a name='cupsRasterWritePixels'>cupsRasterWritePixels()</a></h3>
322 <h4>Description</h4>
323 <p>Write raster pixels.</p>
324 <h4>Syntax</h4>
325 <pre>
326 unsigned
327 cupsRasterWritePixels(
328 <a href='#cups_raster_t'>cups_raster_t</a> * r,
329 unsigned char * p,
330 unsigned len);
331 </pre>
332 <h4>Arguments</h4>
333 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
334 <thead><tr><th>Name</th><th>Description</th></tr></thead>
335 <tbody>
336 <tr><td><tt>r</tt></td><td>Raster stream</td></tr>
337 <tr><td><tt>p</tt></td><td>Bytes to write</td></tr>
338 <tr><td><tt>len</tt></td><td>Number of bytes to write</td></tr>
339 </tbody></table></div>
340 <h4>Returns</h4>
341 <p>Number of bytes written</p>
342 <!-- NEW PAGE -->
343 <h2 class='title'><a name='STRUCTURES'>Structures</a></h2>
344 <ul>
345 <li><a href='#cups_page_header2_s'><tt>cups_page_header2_s</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
346 <li><a href='#cups_page_header_s'><tt>cups_page_header_s</tt></a> </li>
347 </ul>
348 <!-- NEW PAGE -->
349 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cups_page_header2_s'>cups_page_header2_s</a></h3>
350 <h4>Description</h4>
351 <p>Version 2 Page Header </p>
352 <h4>Definition</h4>
353 <pre>
354 struct cups_page_header2_s
355 {
356 unsigned AdvanceDistance;
357 cups_adv_t AdvanceMedia;
358 cups_bool_t Collate;
359 cups_cut_t CutMedia;
360 cups_bool_t Duplex;
361 unsigned HWResolution[2];
362 unsigned ImagingBoundingBox[4];
363 cups_bool_t InsertSheet;
364 cups_jog_t Jog;
365 cups_edge_t LeadingEdge;
366 cups_bool_t ManualFeed;
367 unsigned Margins[2];
368 char MediaClass[64];
369 char MediaColor[64];
370 unsigned MediaPosition;
371 char MediaType[64];
372 unsigned MediaWeight;
373 cups_bool_t MirrorPrint;
374 cups_bool_t NegativePrint;
375 unsigned NumCopies;
376 cups_orient_t Orientation;
377 cups_bool_t OutputFaceUp;
378 char OutputType[64];
379 unsigned PageSize[2];
380 cups_bool_t Separations;
381 cups_bool_t TraySwitch;
382 cups_bool_t Tumble;
383 unsigned cupsBitsPerColor;
384 unsigned cupsBitsPerPixel;
385 float cupsBorderlessScalingFactor;
386 unsigned cupsBytesPerLine;
387 cups_order_t cupsColorOrder;
388 cups_cspace_t cupsColorSpace;
389 unsigned cupsCompression;
390 unsigned cupsHeight;
391 float cupsImagingBBox[4];
392 unsigned cupsInteger[16];
393 char cupsMarkerType[64];
394 unsigned cupsMediaType;
395 unsigned cupsNumColors;
396 char cupsPageSizeName[64];
397 float cupsPageSize[2];
398 float cupsReal[16];
399 char cupsRenderingIntent[64];
400 unsigned cupsRowCount;
401 unsigned cupsRowFeed;
402 unsigned cupsRowStep;
403 char cupsString[16][64];
404 unsigned cupsWidth;
405 };
406 </pre>
407 <h4>Members</h4>
408 <div class='table'><table align='center' border='1' width='80%'>
409 <thead><tr><th>Name</th><th>Description</th></tr></thead>
410 <tbody>
411 <tr><td><tt>AdvanceDistance</tt> </td><td>AdvanceDistance value in points</td></tr>
412 <tr><td><tt>AdvanceMedia</tt> </td><td>AdvanceMedia value (see above)</td></tr>
413 <tr><td><tt>Collate</tt> </td><td>Collated copies value</td></tr>
414 <tr><td><tt>CutMedia</tt> </td><td>CutMedia value (see above)</td></tr>
415 <tr><td><tt>Duplex</tt> </td><td>Duplexed (double-sided) value</td></tr>
416 <tr><td><tt>HWResolution[2]</tt> </td><td>Resolution in dots-per-inch</td></tr>
417 <tr><td><tt>ImagingBoundingBox[4]</tt> </td><td>Pixel region that is painted (points)</td></tr>
418 <tr><td><tt>InsertSheet</tt> </td><td>InsertSheet value</td></tr>
419 <tr><td><tt>Jog</tt> </td><td>Jog value (see above)</td></tr>
420 <tr><td><tt>LeadingEdge</tt> </td><td>LeadingEdge value (see above)</td></tr>
421 <tr><td><tt>ManualFeed</tt> </td><td>ManualFeed value</td></tr>
422 <tr><td><tt>Margins[2]</tt> </td><td>Lower-lefthand margins in points</td></tr>
423 <tr><td><tt>MediaClass[64]</tt> </td><td>MediaClass string</td></tr>
424 <tr><td><tt>MediaColor[64]</tt> </td><td>MediaColor string</td></tr>
425 <tr><td><tt>MediaPosition</tt> </td><td>MediaPosition value</td></tr>
426 <tr><td><tt>MediaType[64]</tt> </td><td>MediaType string</td></tr>
427 <tr><td><tt>MediaWeight</tt> </td><td>MediaWeight value in grams/m^2</td></tr>
428 <tr><td><tt>MirrorPrint</tt> </td><td>MirrorPrint value</td></tr>
429 <tr><td><tt>NegativePrint</tt> </td><td>NegativePrint value</td></tr>
430 <tr><td><tt>NumCopies</tt> </td><td>Number of copies to produce</td></tr>
431 <tr><td><tt>Orientation</tt> </td><td>Orientation value (see above)</td></tr>
432 <tr><td><tt>OutputFaceUp</tt> </td><td>OutputFaceUp value</td></tr>
433 <tr><td><tt>OutputType[64]</tt> </td><td>OutputType string</td></tr>
434 <tr><td><tt>PageSize[2]</tt> </td><td>Width and length of page in points</td></tr>
435 <tr><td><tt>Separations</tt> </td><td>Separations value</td></tr>
436 <tr><td><tt>TraySwitch</tt> </td><td>TraySwitch value</td></tr>
437 <tr><td><tt>Tumble</tt> </td><td>Tumble value</td></tr>
438 <tr><td><tt>cupsBitsPerColor</tt> </td><td>Number of bits for each color</td></tr>
439 <tr><td><tt>cupsBitsPerPixel</tt> </td><td>Number of bits for each pixel</td></tr>
440 <tr><td><tt>cupsBorderlessScalingFactor</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Scaling that was applied to page data </td></tr>
441 <tr><td><tt>cupsBytesPerLine</tt> </td><td>Number of bytes per line</td></tr>
442 <tr><td><tt>cupsColorOrder</tt> </td><td>Order of colors</td></tr>
443 <tr><td><tt>cupsColorSpace</tt> </td><td>True colorspace</td></tr>
444 <tr><td><tt>cupsCompression</tt> </td><td>Device compression to use</td></tr>
445 <tr><td><tt>cupsHeight</tt> </td><td>Height of page image in pixels</td></tr>
446 <tr><td><tt>cupsImagingBBox[4]</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Floating point ImagingBoundingBox *
447 (scaling factor not applied) </td></tr>
448 <tr><td><tt>cupsInteger[16]</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>User-defined integer values </td></tr>
449 <tr><td><tt>cupsMarkerType[64]</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Ink/toner type </td></tr>
450 <tr><td><tt>cupsMediaType</tt> </td><td>Media type code</td></tr>
451 <tr><td><tt>cupsNumColors</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Number of colors </td></tr>
452 <tr><td><tt>cupsPageSizeName[64]</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>PageSize name </td></tr>
453 <tr><td><tt>cupsPageSize[2]</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Floating point PageSize (scaling *
454 factor not applied) </td></tr>
455 <tr><td><tt>cupsReal[16]</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>User-defined floating-point values </td></tr>
456 <tr><td><tt>cupsRenderingIntent[64]</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Color rendering intent </td></tr>
457 <tr><td><tt>cupsRowCount</tt> </td><td>Rows per band</td></tr>
458 <tr><td><tt>cupsRowFeed</tt> </td><td>Feed between bands</td></tr>
459 <tr><td><tt>cupsRowStep</tt> </td><td>Spacing between lines</td></tr>
460 <tr><td><tt>cupsString[16][64]</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>User-defined string values </td></tr>
461 <tr><td><tt>cupsWidth</tt> </td><td>Width of page image in pixels</td></tr>
462 </tbody></table></div>
463 <!-- NEW PAGE -->
464 <h3 class='title'><a name='cups_page_header_s'>cups_page_header_s</a></h3>
465 <h4>Description</h4>
466 <p>Version 1 Page Header</p>
467 <h4>Definition</h4>
468 <pre>
469 struct cups_page_header_s
470 {
471 unsigned AdvanceDistance;
472 cups_adv_t AdvanceMedia;
473 cups_bool_t Collate;
474 cups_cut_t CutMedia;
475 cups_bool_t Duplex;
476 unsigned HWResolution[2];
477 unsigned ImagingBoundingBox[4];
478 cups_bool_t InsertSheet;
479 cups_jog_t Jog;
480 cups_edge_t LeadingEdge;
481 cups_bool_t ManualFeed;
482 unsigned Margins[2];
483 char MediaClass[64];
484 char MediaColor[64];
485 unsigned MediaPosition;
486 char MediaType[64];
487 unsigned MediaWeight;
488 cups_bool_t MirrorPrint;
489 cups_bool_t NegativePrint;
490 unsigned NumCopies;
491 cups_orient_t Orientation;
492 cups_bool_t OutputFaceUp;
493 char OutputType[64];
494 unsigned PageSize[2];
495 cups_bool_t Separations;
496 cups_bool_t TraySwitch;
497 cups_bool_t Tumble;
498 unsigned cupsBitsPerColor;
499 unsigned cupsBitsPerPixel;
500 unsigned cupsBytesPerLine;
501 cups_order_t cupsColorOrder;
502 cups_cspace_t cupsColorSpace;
503 unsigned cupsCompression;
504 unsigned cupsHeight;
505 unsigned cupsMediaType;
506 unsigned cupsRowCount;
507 unsigned cupsRowFeed;
508 unsigned cupsRowStep;
509 unsigned cupsWidth;
510 };
511 </pre>
512 <h4>Members</h4>
513 <div class='table'><table align='center' border='1' width='80%'>
514 <thead><tr><th>Name</th><th>Description</th></tr></thead>
515 <tbody>
516 <tr><td><tt>AdvanceDistance</tt> </td><td>AdvanceDistance value in points</td></tr>
517 <tr><td><tt>AdvanceMedia</tt> </td><td>AdvanceMedia value (see above)</td></tr>
518 <tr><td><tt>Collate</tt> </td><td>Collated copies value</td></tr>
519 <tr><td><tt>CutMedia</tt> </td><td>CutMedia value (see above)</td></tr>
520 <tr><td><tt>Duplex</tt> </td><td>Duplexed (double-sided) value</td></tr>
521 <tr><td><tt>HWResolution[2]</tt> </td><td>Resolution in dots-per-inch</td></tr>
522 <tr><td><tt>ImagingBoundingBox[4]</tt> </td><td>Pixel region that is painted (points)</td></tr>
523 <tr><td><tt>InsertSheet</tt> </td><td>InsertSheet value</td></tr>
524 <tr><td><tt>Jog</tt> </td><td>Jog value (see above)</td></tr>
525 <tr><td><tt>LeadingEdge</tt> </td><td>LeadingEdge value (see above)</td></tr>
526 <tr><td><tt>ManualFeed</tt> </td><td>ManualFeed value</td></tr>
527 <tr><td><tt>Margins[2]</tt> </td><td>Lower-lefthand margins in points</td></tr>
528 <tr><td><tt>MediaClass[64]</tt> </td><td>MediaClass string</td></tr>
529 <tr><td><tt>MediaColor[64]</tt> </td><td>MediaColor string</td></tr>
530 <tr><td><tt>MediaPosition</tt> </td><td>MediaPosition value</td></tr>
531 <tr><td><tt>MediaType[64]</tt> </td><td>MediaType string</td></tr>
532 <tr><td><tt>MediaWeight</tt> </td><td>MediaWeight value in grams/m^2</td></tr>
533 <tr><td><tt>MirrorPrint</tt> </td><td>MirrorPrint value</td></tr>
534 <tr><td><tt>NegativePrint</tt> </td><td>NegativePrint value</td></tr>
535 <tr><td><tt>NumCopies</tt> </td><td>Number of copies to produce</td></tr>
536 <tr><td><tt>Orientation</tt> </td><td>Orientation value (see above)</td></tr>
537 <tr><td><tt>OutputFaceUp</tt> </td><td>OutputFaceUp value</td></tr>
538 <tr><td><tt>OutputType[64]</tt> </td><td>OutputType string</td></tr>
539 <tr><td><tt>PageSize[2]</tt> </td><td>Width and length of page in points</td></tr>
540 <tr><td><tt>Separations</tt> </td><td>Separations value</td></tr>
541 <tr><td><tt>TraySwitch</tt> </td><td>TraySwitch value</td></tr>
542 <tr><td><tt>Tumble</tt> </td><td>Tumble value</td></tr>
543 <tr><td><tt>cupsBitsPerColor</tt> </td><td>Number of bits for each color</td></tr>
544 <tr><td><tt>cupsBitsPerPixel</tt> </td><td>Number of bits for each pixel</td></tr>
545 <tr><td><tt>cupsBytesPerLine</tt> </td><td>Number of bytes per line</td></tr>
546 <tr><td><tt>cupsColorOrder</tt> </td><td>Order of colors</td></tr>
547 <tr><td><tt>cupsColorSpace</tt> </td><td>True colorspace</td></tr>
548 <tr><td><tt>cupsCompression</tt> </td><td>Device compression to use</td></tr>
549 <tr><td><tt>cupsHeight</tt> </td><td>Height of page image in pixels</td></tr>
550 <tr><td><tt>cupsMediaType</tt> </td><td>Media type code</td></tr>
551 <tr><td><tt>cupsRowCount</tt> </td><td>Rows per band</td></tr>
552 <tr><td><tt>cupsRowFeed</tt> </td><td>Feed between bands</td></tr>
553 <tr><td><tt>cupsRowStep</tt> </td><td>Spacing between lines</td></tr>
554 <tr><td><tt>cupsWidth</tt> </td><td>Width of page image in pixels</td></tr>
555 </tbody></table></div>
556 <!-- NEW PAGE -->
557 <h2 class='title'><a name='TYPES'>Types</a></h2>
558 <ul>
559 <li><a href='#cups_interpret_cb_t'><tt>cups_interpret_cb_t</tt></a> </li>
560 <li><a href='#cups_page_header2_t'><tt>cups_page_header2_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
561 <li><a href='#cups_page_header_t'><tt>cups_page_header_t</tt></a> </li>
562 <li><a href='#cups_raster_t'><tt>cups_raster_t</tt></a> </li>
563 </ul>
564 <!-- NEW PAGE -->
565 <h3 class='title'><a name='cups_interpret_cb_t'>cups_interpret_cb_t</a></h3>
566 <h4>Description</h4>
567 <p>Prototypes...</p>
568 <h4>Definition</h4>
569 <pre>
570 typedef int (*cups_interpret_cb_t)(<a href='#cups_page_header2_t'>cups_page_header2_t</a> *header, int preferred_bits);
571 </pre>
572 <!-- NEW PAGE -->
573 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cups_page_header2_t'>cups_page_header2_t</a></h3>
574 <h4>Description</h4>
575 <p>Version 2 Page Header </p>
576 <h4>Definition</h4>
577 <pre>
578 typedef struct <a href='#cups_page_header2_s'>cups_page_header2_s</a> cups_page_header2_t;
579 </pre>
580 <!-- NEW PAGE -->
581 <h3 class='title'><a name='cups_page_header_t'>cups_page_header_t</a></h3>
582 <h4>Description</h4>
583 <p>Version 1 Page Header</p>
584 <h4>Definition</h4>
585 <pre>
586 typedef struct <a href='#cups_page_header_s'>cups_page_header_s</a> cups_page_header_t;
587 </pre>
588 <!-- NEW PAGE -->
589 <h3 class='title'><a name='cups_raster_t'>cups_raster_t</a></h3>
590 <h4>Description</h4>
591 <p>Raster stream data</p>
592 <h4>Definition</h4>
593 <pre>
594 typedef struct _cups_raster_s cups_raster_t;
595 </pre>
596 </body>
597 </html>