]>
Commit | Line | Data |
---|---|---|
b423cd4c | 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 | <!-- | |
c07d5b2d | 19 | "$Id: api-raster.html 177 2006-06-21 00:20:03Z jlovell $" |
b423cd4c | 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><cups/raster.h></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 | 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_bool_e'><tt>cups_bool_e</tt></a> </li> | |
89 | <li><a href='#cups_mode_e'><tt>cups_mode_e</tt></a> </li> | |
90 | </ul> | |
91 | <!-- NEW PAGE --> | |
92 | <h3 class='title'><a name='cups_bool_e'>cups_bool_e</a></h3> | |
93 | <h4>Description</h4> | |
94 | <p>Types...</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_FALSE</tt> </td><td>Logical false</td></tr> | |
100 | <tr><td><tt>CUPS_TRUE</tt> </td><td>Logical true</td></tr> | |
101 | </tbody></table></div> | |
102 | <!-- NEW PAGE --> | |
103 | <h3 class='title'><a name='cups_mode_e'>cups_mode_e</a></h3> | |
104 | <h4>Description</h4> | |
105 | <p>Raster modes</p> | |
106 | <h4>Values</h4> | |
107 | <div class='table'><table align='center' border='1' width='80%'> | |
108 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
109 | <tbody> | |
110 | <tr><td><tt>CUPS_RASTER_READ</tt> </td><td>Open stream for reading</td></tr> | |
111 | <tr><td><tt>CUPS_RASTER_WRITE</tt> </td><td>Open stream for writing</td></tr> | |
112 | </tbody></table></div> | |
113 | <!-- NEW PAGE --> | |
114 | <h2 class='title'><a name='FUNCTIONS'>Functions</a></h2> | |
115 | <ul> | |
116 | <li><a href='#cupsRasterClose'><tt>cupsRasterClose()</tt></a> </li> | |
117 | <li><a href='#cupsRasterInterpretPPD'><tt>cupsRasterInterpretPPD()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
118 | <li><a href='#cupsRasterOpen'><tt>cupsRasterOpen()</tt></a> </li> | |
119 | <li><a href='#cupsRasterReadHeader'><tt>cupsRasterReadHeader()</tt></a> </li> | |
120 | <li><a href='#cupsRasterReadHeader2'><tt>cupsRasterReadHeader2()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
121 | <li><a href='#cupsRasterReadPixels'><tt>cupsRasterReadPixels()</tt></a> </li> | |
122 | <li><a href='#cupsRasterWriteHeader'><tt>cupsRasterWriteHeader()</tt></a> </li> | |
123 | <li><a href='#cupsRasterWriteHeader2'><tt>cupsRasterWriteHeader2()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
124 | <li><a href='#cupsRasterWritePixels'><tt>cupsRasterWritePixels()</tt></a> </li> | |
125 | </ul> | |
126 | <!-- NEW PAGE --> | |
127 | <h3 class='title'><a name='cupsRasterClose'>cupsRasterClose()</a></h3> | |
128 | <h4>Description</h4> | |
129 | <p>Close a raster stream.</p> | |
130 | <h4>Syntax</h4> | |
131 | <pre> | |
132 | void | |
133 | cupsRasterClose( | |
134 | <a href='#cups_raster_t'>cups_raster_t</a> * r); | |
135 | </pre> | |
136 | <h4>Arguments</h4> | |
137 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
138 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
139 | <tbody> | |
140 | <tr><td><tt>r</tt></td><td>Stream to close</td></tr> | |
141 | </tbody></table></div> | |
142 | <h4>Returns</h4> | |
143 | <p>Nothing.</p> | |
144 | <!-- NEW PAGE --> | |
145 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='cupsRasterInterpretPPD'>cupsRasterInterpretPPD()</a></h3> | |
146 | <h4>Description</h4> | |
147 | <p>Interpret PPD commands to create a page header. | |
148 | ||
149 | This function does not mark the options in the PPD using the "num_options" | |
150 | and "options" arguments. Instead, mark the options prior to calling | |
151 | cupsRasterInterpretPPD() - this allows you to do per-page options | |
152 | without manipulating the options array. | |
153 | ||
154 | </p> | |
155 | <h4>Syntax</h4> | |
156 | <pre> | |
157 | int | |
158 | cupsRasterInterpretPPD( | |
159 | <a href='#cups_page_header2_t'>cups_page_header2_t</a> * h, | |
160 | ppd_file_t * ppd, | |
161 | int num_options, | |
162 | cups_option_t * options); | |
163 | </pre> | |
164 | <h4>Arguments</h4> | |
165 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
166 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
167 | <tbody> | |
168 | <tr><td><tt>h</tt></td><td>Page header</td></tr> | |
169 | <tr><td><tt>ppd</tt></td><td>PPD file</td></tr> | |
170 | <tr><td><tt>num_options</tt></td><td>Number of options</td></tr> | |
171 | <tr><td><tt>options</tt></td><td>Options</td></tr> | |
172 | </tbody></table></div> | |
173 | <h4>Returns</h4> | |
174 | <p>0 on success, -1 on failure</p> | |
175 | <!-- NEW PAGE --> | |
176 | <h3 class='title'><a name='cupsRasterOpen'>cupsRasterOpen()</a></h3> | |
177 | <h4>Description</h4> | |
178 | <p>Open a raster stream.</p> | |
179 | <h4>Syntax</h4> | |
180 | <pre> | |
181 | <a href='#cups_raster_t'>cups_raster_t</a> * | |
182 | cupsRasterOpen( | |
183 | int fd, | |
184 | cups_mode_t mode); | |
185 | </pre> | |
186 | <h4>Arguments</h4> | |
187 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
188 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
189 | <tbody> | |
190 | <tr><td><tt>fd</tt></td><td>File descriptor</td></tr> | |
191 | <tr><td><tt>mode</tt></td><td>Mode</td></tr> | |
192 | </tbody></table></div> | |
193 | <h4>Returns</h4> | |
194 | <p>New stream</p> | |
195 | <!-- NEW PAGE --> | |
196 | <h3 class='title'><a name='cupsRasterReadHeader'>cupsRasterReadHeader()</a></h3> | |
197 | <h4>Description</h4> | |
198 | <p>Read a raster page header and store it in a | |
199 | V1 page header structure.</p> | |
200 | <h4>Syntax</h4> | |
201 | <pre> | |
202 | unsigned | |
203 | cupsRasterReadHeader( | |
204 | <a href='#cups_raster_t'>cups_raster_t</a> * r, | |
205 | <a href='#cups_page_header_t'>cups_page_header_t</a> * h); | |
206 | </pre> | |
207 | <h4>Arguments</h4> | |
208 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
209 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
210 | <tbody> | |
211 | <tr><td><tt>r</tt></td><td>Raster stream</td></tr> | |
212 | <tr><td><tt>h</tt></td><td>Pointer to header data</td></tr> | |
213 | </tbody></table></div> | |
214 | <h4>Returns</h4> | |
215 | <p>1 on success, 0 on fail</p> | |
216 | <!-- NEW PAGE --> | |
217 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='cupsRasterReadHeader2'>cupsRasterReadHeader2()</a></h3> | |
218 | <h4>Description</h4> | |
219 | <p>Read a raster page header and store it in a | |
220 | V2 page header structure. | |
221 | ||
222 | </p> | |
223 | <h4>Syntax</h4> | |
224 | <pre> | |
225 | unsigned | |
226 | cupsRasterReadHeader2( | |
227 | <a href='#cups_raster_t'>cups_raster_t</a> * r, | |
228 | <a href='#cups_page_header2_t'>cups_page_header2_t</a> * h); | |
229 | </pre> | |
230 | <h4>Arguments</h4> | |
231 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
232 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
233 | <tbody> | |
234 | <tr><td><tt>r</tt></td><td>Raster stream</td></tr> | |
235 | <tr><td><tt>h</tt></td><td>Pointer to header data</td></tr> | |
236 | </tbody></table></div> | |
237 | <h4>Returns</h4> | |
238 | <p>1 on success, 0 on fail</p> | |
239 | <!-- NEW PAGE --> | |
240 | <h3 class='title'><a name='cupsRasterReadPixels'>cupsRasterReadPixels()</a></h3> | |
241 | <h4>Description</h4> | |
242 | <p>Read raster pixels.</p> | |
243 | <h4>Syntax</h4> | |
244 | <pre> | |
245 | unsigned | |
246 | cupsRasterReadPixels( | |
247 | <a href='#cups_raster_t'>cups_raster_t</a> * r, | |
248 | unsigned char * p, | |
249 | unsigned len); | |
250 | </pre> | |
251 | <h4>Arguments</h4> | |
252 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
253 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
254 | <tbody> | |
255 | <tr><td><tt>r</tt></td><td>Raster stream</td></tr> | |
256 | <tr><td><tt>p</tt></td><td>Pointer to pixel buffer</td></tr> | |
257 | <tr><td><tt>len</tt></td><td>Number of bytes to read</td></tr> | |
258 | </tbody></table></div> | |
259 | <h4>Returns</h4> | |
260 | <p>Number of bytes read</p> | |
261 | <!-- NEW PAGE --> | |
262 | <h3 class='title'><a name='cupsRasterWriteHeader'>cupsRasterWriteHeader()</a></h3> | |
263 | <h4>Description</h4> | |
264 | <p>Write a raster page header from a V1 page | |
265 | header structure.</p> | |
266 | <h4>Syntax</h4> | |
267 | <pre> | |
268 | unsigned | |
269 | cupsRasterWriteHeader( | |
270 | <a href='#cups_raster_t'>cups_raster_t</a> * r, | |
271 | <a href='#cups_page_header_t'>cups_page_header_t</a> * h); | |
272 | </pre> | |
273 | <h4>Arguments</h4> | |
274 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
275 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
276 | <tbody> | |
277 | <tr><td><tt>r</tt></td><td>Raster stream</td></tr> | |
278 | <tr><td><tt>h</tt></td><td>Raster page header</td></tr> | |
279 | </tbody></table></div> | |
280 | <h4>Returns</h4> | |
281 | <p>1 on success, 0 on failure</p> | |
282 | <!-- NEW PAGE --> | |
283 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='cupsRasterWriteHeader2'>cupsRasterWriteHeader2()</a></h3> | |
284 | <h4>Description</h4> | |
285 | <p>Write a raster page header from a V2 page | |
286 | header structure. | |
287 | ||
288 | </p> | |
289 | <h4>Syntax</h4> | |
290 | <pre> | |
291 | unsigned | |
292 | cupsRasterWriteHeader2( | |
293 | <a href='#cups_raster_t'>cups_raster_t</a> * r, | |
294 | <a href='#cups_page_header2_t'>cups_page_header2_t</a> * h); | |
295 | </pre> | |
296 | <h4>Arguments</h4> | |
297 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
298 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
299 | <tbody> | |
300 | <tr><td><tt>r</tt></td><td>Raster stream</td></tr> | |
301 | <tr><td><tt>h</tt></td><td>Raster page header</td></tr> | |
302 | </tbody></table></div> | |
303 | <h4>Returns</h4> | |
304 | <p>1 on success, 0 on failure</p> | |
305 | <!-- NEW PAGE --> | |
306 | <h3 class='title'><a name='cupsRasterWritePixels'>cupsRasterWritePixels()</a></h3> | |
307 | <h4>Description</h4> | |
308 | <p>Write raster pixels.</p> | |
309 | <h4>Syntax</h4> | |
310 | <pre> | |
311 | unsigned | |
312 | cupsRasterWritePixels( | |
313 | <a href='#cups_raster_t'>cups_raster_t</a> * r, | |
314 | unsigned char * p, | |
315 | unsigned len); | |
316 | </pre> | |
317 | <h4>Arguments</h4> | |
318 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
319 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
320 | <tbody> | |
321 | <tr><td><tt>r</tt></td><td>Raster stream</td></tr> | |
322 | <tr><td><tt>p</tt></td><td>Bytes to write</td></tr> | |
323 | <tr><td><tt>len</tt></td><td>Number of bytes to write</td></tr> | |
324 | </tbody></table></div> | |
325 | <h4>Returns</h4> | |
326 | <p>Number of bytes written</p> | |
327 | <!-- NEW PAGE --> | |
328 | <h2 class='title'><a name='STRUCTURES'>Structures</a></h2> | |
329 | <ul> | |
330 | <li><a href='#cups_page_header2_s'><tt>cups_page_header2_s</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
331 | <li><a href='#cups_page_header_s'><tt>cups_page_header_s</tt></a> </li> | |
332 | </ul> | |
333 | <!-- NEW PAGE --> | |
334 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='cups_page_header2_s'>cups_page_header2_s</a></h3> | |
335 | <h4>Description</h4> | |
336 | <p>Version 2 Page Header </p> | |
337 | <h4>Definition</h4> | |
338 | <pre> | |
339 | struct cups_page_header2_s | |
340 | { | |
341 | unsigned AdvanceDistance; | |
342 | cups_adv_t AdvanceMedia; | |
343 | cups_bool_t Collate; | |
344 | cups_cut_t CutMedia; | |
345 | cups_bool_t Duplex; | |
346 | unsigned HWResolution[2]; | |
347 | unsigned ImagingBoundingBox[4]; | |
348 | cups_bool_t InsertSheet; | |
349 | cups_jog_t Jog; | |
350 | cups_edge_t LeadingEdge; | |
351 | cups_bool_t ManualFeed; | |
352 | unsigned Margins[2]; | |
353 | char MediaClass[64]; | |
354 | char MediaColor[64]; | |
355 | unsigned MediaPosition; | |
356 | char MediaType[64]; | |
357 | unsigned MediaWeight; | |
358 | cups_bool_t MirrorPrint; | |
359 | cups_bool_t NegativePrint; | |
360 | unsigned NumCopies; | |
361 | cups_orient_t Orientation; | |
362 | cups_bool_t OutputFaceUp; | |
363 | char OutputType[64]; | |
364 | unsigned PageSize[2]; | |
365 | cups_bool_t Separations; | |
366 | cups_bool_t TraySwitch; | |
367 | cups_bool_t Tumble; | |
368 | unsigned cupsBitsPerColor; | |
369 | unsigned cupsBitsPerPixel; | |
370 | float cupsBorderlessScalingFactor; | |
371 | unsigned cupsBytesPerLine; | |
372 | cups_order_t cupsColorOrder; | |
373 | cups_cspace_t cupsColorSpace; | |
374 | unsigned cupsCompression; | |
375 | unsigned cupsHeight; | |
376 | float cupsImagingBBox[4]; | |
377 | unsigned cupsInteger[16]; | |
378 | char cupsMarkerType[64]; | |
379 | unsigned cupsMediaType; | |
380 | unsigned cupsNumColors; | |
381 | char cupsPageSizeName[64]; | |
382 | float cupsPageSize[2]; | |
383 | float cupsReal[16]; | |
384 | char cupsRenderingIntent[64]; | |
385 | unsigned cupsRowCount; | |
386 | unsigned cupsRowFeed; | |
387 | unsigned cupsRowStep; | |
388 | char cupsString[16][64]; | |
389 | unsigned cupsWidth; | |
390 | }; | |
391 | </pre> | |
392 | <h4>Members</h4> | |
393 | <div class='table'><table align='center' border='1' width='80%'> | |
394 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
395 | <tbody> | |
396 | <tr><td><tt>AdvanceDistance</tt> </td><td>AdvanceDistance value in points</td></tr> | |
397 | <tr><td><tt>AdvanceMedia</tt> </td><td>AdvanceMedia value (see above)</td></tr> | |
398 | <tr><td><tt>Collate</tt> </td><td>Collated copies value</td></tr> | |
399 | <tr><td><tt>CutMedia</tt> </td><td>CutMedia value (see above)</td></tr> | |
400 | <tr><td><tt>Duplex</tt> </td><td>Duplexed (double-sided) value</td></tr> | |
401 | <tr><td><tt>HWResolution[2]</tt> </td><td>Resolution in dots-per-inch</td></tr> | |
402 | <tr><td><tt>ImagingBoundingBox[4]</tt> </td><td>Pixel region that is painted (points)</td></tr> | |
403 | <tr><td><tt>InsertSheet</tt> </td><td>InsertSheet value</td></tr> | |
404 | <tr><td><tt>Jog</tt> </td><td>Jog value (see above)</td></tr> | |
405 | <tr><td><tt>LeadingEdge</tt> </td><td>LeadingEdge value (see above)</td></tr> | |
406 | <tr><td><tt>ManualFeed</tt> </td><td>ManualFeed value</td></tr> | |
407 | <tr><td><tt>Margins[2]</tt> </td><td>Lower-lefthand margins in points</td></tr> | |
408 | <tr><td><tt>MediaClass[64]</tt> </td><td>MediaClass string</td></tr> | |
409 | <tr><td><tt>MediaColor[64]</tt> </td><td>MediaColor string</td></tr> | |
410 | <tr><td><tt>MediaPosition</tt> </td><td>MediaPosition value</td></tr> | |
411 | <tr><td><tt>MediaType[64]</tt> </td><td>MediaType string</td></tr> | |
412 | <tr><td><tt>MediaWeight</tt> </td><td>MediaWeight value in grams/m^2</td></tr> | |
413 | <tr><td><tt>MirrorPrint</tt> </td><td>MirrorPrint value</td></tr> | |
414 | <tr><td><tt>NegativePrint</tt> </td><td>NegativePrint value</td></tr> | |
415 | <tr><td><tt>NumCopies</tt> </td><td>Number of copies to produce</td></tr> | |
416 | <tr><td><tt>Orientation</tt> </td><td>Orientation value (see above)</td></tr> | |
417 | <tr><td><tt>OutputFaceUp</tt> </td><td>OutputFaceUp value</td></tr> | |
418 | <tr><td><tt>OutputType[64]</tt> </td><td>OutputType string</td></tr> | |
419 | <tr><td><tt>PageSize[2]</tt> </td><td>Width and length of page in points</td></tr> | |
420 | <tr><td><tt>Separations</tt> </td><td>Separations value</td></tr> | |
421 | <tr><td><tt>TraySwitch</tt> </td><td>TraySwitch value</td></tr> | |
422 | <tr><td><tt>Tumble</tt> </td><td>Tumble value</td></tr> | |
423 | <tr><td><tt>cupsBitsPerColor</tt> </td><td>Number of bits for each color</td></tr> | |
424 | <tr><td><tt>cupsBitsPerPixel</tt> </td><td>Number of bits for each pixel</td></tr> | |
425 | <tr><td><tt>cupsBorderlessScalingFactor</tt> <span class='info'> CUPS 1.2 </span></td><td>Scaling that was applied to page data </td></tr> | |
426 | <tr><td><tt>cupsBytesPerLine</tt> </td><td>Number of bytes per line</td></tr> | |
427 | <tr><td><tt>cupsColorOrder</tt> </td><td>Order of colors</td></tr> | |
428 | <tr><td><tt>cupsColorSpace</tt> </td><td>True colorspace</td></tr> | |
429 | <tr><td><tt>cupsCompression</tt> </td><td>Device compression to use</td></tr> | |
430 | <tr><td><tt>cupsHeight</tt> </td><td>Height of page image in pixels</td></tr> | |
431 | <tr><td><tt>cupsImagingBBox[4]</tt> <span class='info'> CUPS 1.2 </span></td><td>Floating point ImagingBoundingBox * | |
432 | (scaling factor not applied) </td></tr> | |
433 | <tr><td><tt>cupsInteger[16]</tt> <span class='info'> CUPS 1.2 </span></td><td>User-defined integer values </td></tr> | |
434 | <tr><td><tt>cupsMarkerType[64]</tt> <span class='info'> CUPS 1.2 </span></td><td>Ink/toner type </td></tr> | |
435 | <tr><td><tt>cupsMediaType</tt> </td><td>Media type code</td></tr> | |
436 | <tr><td><tt>cupsNumColors</tt> <span class='info'> CUPS 1.2 </span></td><td>Number of colors </td></tr> | |
437 | <tr><td><tt>cupsPageSizeName[64]</tt> <span class='info'> CUPS 1.2 </span></td><td>PageSize name </td></tr> | |
438 | <tr><td><tt>cupsPageSize[2]</tt> <span class='info'> CUPS 1.2 </span></td><td>Floating point PageSize (scaling * | |
439 | factor not applied) </td></tr> | |
440 | <tr><td><tt>cupsReal[16]</tt> <span class='info'> CUPS 1.2 </span></td><td>User-defined floating-point values </td></tr> | |
441 | <tr><td><tt>cupsRenderingIntent[64]</tt> <span class='info'> CUPS 1.2 </span></td><td>Color rendering intent </td></tr> | |
442 | <tr><td><tt>cupsRowCount</tt> </td><td>Rows per band</td></tr> | |
443 | <tr><td><tt>cupsRowFeed</tt> </td><td>Feed between bands</td></tr> | |
444 | <tr><td><tt>cupsRowStep</tt> </td><td>Spacing between lines</td></tr> | |
445 | <tr><td><tt>cupsString[16][64]</tt> <span class='info'> CUPS 1.2 </span></td><td>User-defined string values </td></tr> | |
446 | <tr><td><tt>cupsWidth</tt> </td><td>Width of page image in pixels</td></tr> | |
447 | </tbody></table></div> | |
448 | <!-- NEW PAGE --> | |
449 | <h3 class='title'><a name='cups_page_header_s'>cups_page_header_s</a></h3> | |
450 | <h4>Description</h4> | |
451 | <p>Version 1 Page Header</p> | |
452 | <h4>Definition</h4> | |
453 | <pre> | |
454 | struct cups_page_header_s | |
455 | { | |
456 | unsigned AdvanceDistance; | |
457 | cups_adv_t AdvanceMedia; | |
458 | cups_bool_t Collate; | |
459 | cups_cut_t CutMedia; | |
460 | cups_bool_t Duplex; | |
461 | unsigned HWResolution[2]; | |
462 | unsigned ImagingBoundingBox[4]; | |
463 | cups_bool_t InsertSheet; | |
464 | cups_jog_t Jog; | |
465 | cups_edge_t LeadingEdge; | |
466 | cups_bool_t ManualFeed; | |
467 | unsigned Margins[2]; | |
468 | char MediaClass[64]; | |
469 | char MediaColor[64]; | |
470 | unsigned MediaPosition; | |
471 | char MediaType[64]; | |
472 | unsigned MediaWeight; | |
473 | cups_bool_t MirrorPrint; | |
474 | cups_bool_t NegativePrint; | |
475 | unsigned NumCopies; | |
476 | cups_orient_t Orientation; | |
477 | cups_bool_t OutputFaceUp; | |
478 | char OutputType[64]; | |
479 | unsigned PageSize[2]; | |
480 | cups_bool_t Separations; | |
481 | cups_bool_t TraySwitch; | |
482 | cups_bool_t Tumble; | |
483 | unsigned cupsBitsPerColor; | |
484 | unsigned cupsBitsPerPixel; | |
485 | unsigned cupsBytesPerLine; | |
486 | cups_order_t cupsColorOrder; | |
487 | cups_cspace_t cupsColorSpace; | |
488 | unsigned cupsCompression; | |
489 | unsigned cupsHeight; | |
490 | unsigned cupsMediaType; | |
491 | unsigned cupsRowCount; | |
492 | unsigned cupsRowFeed; | |
493 | unsigned cupsRowStep; | |
494 | unsigned cupsWidth; | |
495 | }; | |
496 | </pre> | |
497 | <h4>Members</h4> | |
498 | <div class='table'><table align='center' border='1' width='80%'> | |
499 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
500 | <tbody> | |
501 | <tr><td><tt>AdvanceDistance</tt> </td><td>AdvanceDistance value in points</td></tr> | |
502 | <tr><td><tt>AdvanceMedia</tt> </td><td>AdvanceMedia value (see above)</td></tr> | |
503 | <tr><td><tt>Collate</tt> </td><td>Collated copies value</td></tr> | |
504 | <tr><td><tt>CutMedia</tt> </td><td>CutMedia value (see above)</td></tr> | |
505 | <tr><td><tt>Duplex</tt> </td><td>Duplexed (double-sided) value</td></tr> | |
506 | <tr><td><tt>HWResolution[2]</tt> </td><td>Resolution in dots-per-inch</td></tr> | |
507 | <tr><td><tt>ImagingBoundingBox[4]</tt> </td><td>Pixel region that is painted (points)</td></tr> | |
508 | <tr><td><tt>InsertSheet</tt> </td><td>InsertSheet value</td></tr> | |
509 | <tr><td><tt>Jog</tt> </td><td>Jog value (see above)</td></tr> | |
510 | <tr><td><tt>LeadingEdge</tt> </td><td>LeadingEdge value (see above)</td></tr> | |
511 | <tr><td><tt>ManualFeed</tt> </td><td>ManualFeed value</td></tr> | |
512 | <tr><td><tt>Margins[2]</tt> </td><td>Lower-lefthand margins in points</td></tr> | |
513 | <tr><td><tt>MediaClass[64]</tt> </td><td>MediaClass string</td></tr> | |
514 | <tr><td><tt>MediaColor[64]</tt> </td><td>MediaColor string</td></tr> | |
515 | <tr><td><tt>MediaPosition</tt> </td><td>MediaPosition value</td></tr> | |
516 | <tr><td><tt>MediaType[64]</tt> </td><td>MediaType string</td></tr> | |
517 | <tr><td><tt>MediaWeight</tt> </td><td>MediaWeight value in grams/m^2</td></tr> | |
518 | <tr><td><tt>MirrorPrint</tt> </td><td>MirrorPrint value</td></tr> | |
519 | <tr><td><tt>NegativePrint</tt> </td><td>NegativePrint value</td></tr> | |
520 | <tr><td><tt>NumCopies</tt> </td><td>Number of copies to produce</td></tr> | |
521 | <tr><td><tt>Orientation</tt> </td><td>Orientation value (see above)</td></tr> | |
522 | <tr><td><tt>OutputFaceUp</tt> </td><td>OutputFaceUp value</td></tr> | |
523 | <tr><td><tt>OutputType[64]</tt> </td><td>OutputType string</td></tr> | |
524 | <tr><td><tt>PageSize[2]</tt> </td><td>Width and length of page in points</td></tr> | |
525 | <tr><td><tt>Separations</tt> </td><td>Separations value</td></tr> | |
526 | <tr><td><tt>TraySwitch</tt> </td><td>TraySwitch value</td></tr> | |
527 | <tr><td><tt>Tumble</tt> </td><td>Tumble value</td></tr> | |
528 | <tr><td><tt>cupsBitsPerColor</tt> </td><td>Number of bits for each color</td></tr> | |
529 | <tr><td><tt>cupsBitsPerPixel</tt> </td><td>Number of bits for each pixel</td></tr> | |
530 | <tr><td><tt>cupsBytesPerLine</tt> </td><td>Number of bytes per line</td></tr> | |
531 | <tr><td><tt>cupsColorOrder</tt> </td><td>Order of colors</td></tr> | |
532 | <tr><td><tt>cupsColorSpace</tt> </td><td>True colorspace</td></tr> | |
533 | <tr><td><tt>cupsCompression</tt> </td><td>Device compression to use</td></tr> | |
534 | <tr><td><tt>cupsHeight</tt> </td><td>Height of page image in pixels</td></tr> | |
535 | <tr><td><tt>cupsMediaType</tt> </td><td>Media type code</td></tr> | |
536 | <tr><td><tt>cupsRowCount</tt> </td><td>Rows per band</td></tr> | |
537 | <tr><td><tt>cupsRowFeed</tt> </td><td>Feed between bands</td></tr> | |
538 | <tr><td><tt>cupsRowStep</tt> </td><td>Spacing between lines</td></tr> | |
539 | <tr><td><tt>cupsWidth</tt> </td><td>Width of page image in pixels</td></tr> | |
540 | </tbody></table></div> | |
541 | <!-- NEW PAGE --> | |
542 | <h2 class='title'><a name='TYPES'>Types</a></h2> | |
543 | <ul> | |
544 | <li><a href='#cups_page_header2_t'><tt>cups_page_header2_t</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
545 | <li><a href='#cups_page_header_t'><tt>cups_page_header_t</tt></a> </li> | |
546 | <li><a href='#cups_raster_t'><tt>cups_raster_t</tt></a> </li> | |
547 | </ul> | |
548 | <!-- NEW PAGE --> | |
549 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='cups_page_header2_t'>cups_page_header2_t</a></h3> | |
550 | <h4>Description</h4> | |
551 | <p>Version 2 Page Header </p> | |
552 | <h4>Definition</h4> | |
553 | <pre> | |
554 | typedef struct <a href='#cups_page_header2_s'>cups_page_header2_s</a> cups_page_header2_t; | |
555 | </pre> | |
556 | <!-- NEW PAGE --> | |
557 | <h3 class='title'><a name='cups_page_header_t'>cups_page_header_t</a></h3> | |
558 | <h4>Description</h4> | |
559 | <p>Version 1 Page Header</p> | |
560 | <h4>Definition</h4> | |
561 | <pre> | |
562 | typedef struct <a href='#cups_page_header_s'>cups_page_header_s</a> cups_page_header_t; | |
563 | </pre> | |
564 | <!-- NEW PAGE --> | |
565 | <h3 class='title'><a name='cups_raster_t'>cups_raster_t</a></h3> | |
566 | <h4>Description</h4> | |
567 | <p>Raster stream data</p> | |
568 | <h4>Definition</h4> | |
569 | <pre> | |
570 | typedef struct _cups_raster_s cups_raster_t; | |
571 | </pre> | |
572 | </body> | |
573 | </html> |