3 <META NAME="COPYRIGHT" CONTENT="Copyright 1997-2000, All Rights Reserved">
4 <META NAME="DOCNUMBER" CONTENT="CUPS-SPM-1.1">
5 <META NAME="Author" CONTENT="Easy Software Products">
6 <TITLE>CUPS Software Programmers Manual</TITLE>
10 <H1 ALIGN="RIGHT">Preface</H1>
12 <P>This software programmers manual provides software programming
13 information for the Common UNIX Printing System ("CUPS") Version 1.1.
15 <EMBED SRC="system-overview.shtml">
18 <H2>Document Overview</H2>
20 <P>This software programmers manual is organized into the following sections:
23 <LI><A HREF="#OVERVIEW">1 - Printing System Overview</A>
24 <LI><A HREF="#CUPS_API">2 - The CUPS API</A>
25 <LI><A HREF="#WRITING_FILTERS">3 - Writing Filters</A>
26 <LI><A HREF="#WRITING_DRIVERS">4 - Writing Printer Drivers</A>
27 <LI><A HREF="#WRITING_BACKENDS">5 - Writing Backends</A>
28 <LI><A HREF="#LICENSE">A - Software License Agreement</A>
29 <LI><A HREF="#CONSTANTS">B - Constants</A>
30 <LI><A HREF="#STRUCTURES">C - Structures</A>
31 <LI><A HREF="#FUNCTIONS">D - Functions</A>
34 <H2>Notation Conventions</H2>
36 <P>Various font and syntax conventions are used in this guide. Examples and
37 their meanings and uses are explained below:
39 <CENTER><TABLE WIDTH="80%">
42 <TD> </TD>
45 <TR><TD> </TD></TR>
47 <TD><CODE>lpstat</CODE><BR>
48 <CODE>lpstat(1)</CODE></TD>
50 <TD> </TD>
52 <TD>The names of commands; the first mention of a command or
53 function in a chapter is followed by a manual page section
56 <TR><TD> </TD></TR>
58 <TD><VAR>/var</VAR><BR>
59 <VAR>/usr/share/cups/data/testprint.ps</VAR></TD>
61 <TD> </TD>
63 <TD>File and directory names.</TD>
65 <TR><TD> </TD></TR>
67 <TD NOWRAP><TT>Request ID is Printer-123</TT></TD>
69 <TD> </TD>
71 <TD>Screen output.</TD>
73 <TR><TD> </TD></TR>
75 <TD NOWRAP><KBD>lp -d printer filename ENTER</KBD></TD>
77 <TD> </TD>
79 <TD>Literal user input; special keys like <KBD>ENTER</B></KBD> are
82 <TR><TD> </TD></TR>
86 <TD> </TD>
88 <TD>Numbers in the text are written using the period (.) to indicate
89 the decimal point.</TD>
94 <H2>Abbreviations</H2>
96 The following abbreviations are used throughout this manual:
102 <DD>Kilobytes, or 1024 bytes<BR>
105 <DD>Megabytes, or 1048576 bytes<BR>
108 <DD>Gigabytes, or 1073741824 bytes<BR>
113 <H2>Other References</H2>
118 <DT>CUPS Software Administrators Manual
120 <DD>An administration guide for the CUPS software.<BR>
122 <DT>CUPS Software Users Manual
124 <DD>An end-user guide for using the CUPS software.<BR>
130 <EMBED SRC="printing-overview.shtml">
133 <H1 ALIGN="RIGHT"><A NAME="CUPS_API">2 - The CUPS API</A></H1>
135 <P>This chapter describes the CUPS Application Programmers Interface ("API").
137 <H2>The CUPS API Library</H2>
139 <P>The CUPS library provides a whole collection of interfaces needed to
140 support the internal needs of the CUPS software as well as the needs of
141 applications, filters, printer drivers, and backends.
143 <P>Unlike the rest of CUPS, the CUPS API library is provided under the
144 GNU Library General Public License. This means that you can use the
145 CUPS API library in both proprietary and open-source programs.
147 <P>Programs that use the CUPS API library typically will include the
148 <CODE><cups/cups.h></CODE> header file:
151 #include <cups/cups.h>
155 jobid = cupsPrintFile("myprinter", "filename.ps", "title",
156 num_options, options);
159 <P>Use the <CODE>-lcups</CODE> compiler option when linking to the CUPS API
163 <B>cc -o program program.c -lcups ENTER</B>
166 <P>Additional options and libraries may be required depending on the
167 operating system and the location of the CUPS API library.
169 <H3>Detecting the CUPS API Library in GNU Autoconf</H3>
171 <P>GNU autoconf is a popular configuration tool used by many programs.
172 Add the following lines to your <VAR>configure.in</CODE> file to check
173 for the CUPS API library in your configuration script:
176 AC_CHECK_LIB(socket,socket,
177 if test "$uname" != "IRIX"; then
178 LIBS="-lsocket $LIBS"
180 echo "Not using -lsocket since you are running IRIX."
182 AC_CHECK_LIB(nsl,gethostbyaddr,
183 if test "$uname" != "IRIX"; then
186 echo "Not using -lnsl since you are running IRIX."
189 AC_CHECK_LIB(cups,httpConnect)
192 <H2>Printing Services</H2>
194 <P>The CUPS API library provides some basic printing services for applications
195 that need to print files.
197 <H3>Include Files</H3>
199 <P>The include file used by all of these functions is
200 <CODE><cups/cups.h></CODE>:
203 #include <cups/cups.h>
206 <H3>Printing a File</H3>
208 <P>The CUPS API provides two functions for printing files. The first is
209 <CODE>cupsPrintFile</CODE> which prints a single named file:
212 #include <cups/cups.h>
220 jobid = cupsPrintFile("<I>name</I>", "<I>filename</I>", "<I>title</I>", 0, NULL);
223 <P>The <CODE>name</CODE> string is the name of the printer or class to
224 print to. The <CODE>filename</CODE> string is the name of the file to
225 print. The <CODE>title</CODE> string is the name of the print job, e.g.
226 "Acme Word Document".
228 <P>The return value is a unique ID number for the print job or 0 if there
231 <H3>Printing Multiple Files</H3>
233 <P>The second printing function is <CODE>cupsPrintFiles</CODE>:
236 #include <cups/cups.h>
242 const char *files[100];
245 jobid = cupsPrintFiles("name", <I>num_files</I>, <I>files</I>, "title", 0, NULL);
248 <P>Instead of passing a filename string as with <CODE>cupsPrintFile()</CODE>,
249 you pass a file count (<CODE>num_files</CODE>) and filename pointer array
250 (<CODE>files</CODE>) for each file that you want to print.
252 <P>As with <CODE>cupsPrintFile()</CODE>, the return value is a unique ID for
255 <H3>Cancelling Jobs</H3>
257 <P>The <CODE>cupsCancelJob()</CODE> function cancels a queued print job:
260 #include <cups/cups.h>
268 status = cupsCancelJob("<I>name</I>", <I>jobid</I>);
271 <P>The <CODE>name</CODE> string specifies the destination and is used
272 to determine the server to send the request to. The <CODE>jobid</CODE>
273 value is the integer returned from a previous <CODE>cupsPrintFile()</CODE>
274 or <CODE>cupsPrintFiles()</CODE> call.
276 <P><CODE>cupsCancelJob()</CODE> returns <CODE>1</CODE> if the job was
277 successfully cancelled and <CODE>0</CODE> if there was an error.
279 <H3>Getting the Available Printers and Classes</H3>
281 <P>The <CODE>cupsGetDests()</CODE> function can be used to get a list
282 of the available printers, classes, and instances that a user has defined:
285 #include <cups/cups.h>
294 num_dests = cupsGetDests(&dests);
297 <P>Each destination is stored in a <CODE>cups_dest_t</CODE> structure which
298 defines the printer or class name, the instance name (if any), if it is the
299 default destination, and the default options the user has defined for the
303 typedef struct /**** Destination ****/
305 char *name, /* Printer or class name */
306 *instance; /* Local instance name or NULL */
307 int is_default; /* Is this printer the default? */
308 int num_options; /* Number of options */
309 cups_option_t *options; /* Options */
313 <P>The destinations are sorted by name and instance for your convenience.
314 Once you have the list of available destinations, you can lookup a specific
315 destination using the <CODE>cupsGetDest()</CODE> function:
318 #include <cups/cups.h>
328 mydest = cupsGetDest("<I>name</I>", "<I>instance</I>", num_dests, dests);
331 <P>The <CODE>name</CODE> string is the printer or class name. You can pass
332 a value of <CODE>NULL</CODE> to get the default destination.
334 <P>The <CODE>instance</CODE> string is the user-defined instance name. Pass
335 <CODE>NULL</CODE> to select the default instance, e.g. "name" instead of
338 <H3>Printing with Options</H3>
340 <P>All of the previous printing examples have passed <CODE>0</CODE> and
341 <CODE>NULL</CODE> for the last two arguments to the <CODE>cupsPrintFile()</CODE>
342 and <CODE>cupsPrintFiles()</CODE> functions. These last two arguments are the
343 number of options and a pointer to the option array:
346 int cupsPrintFile(const char *name, const char *filename, const char *title,
347 int num_options, cups_option_t *options);
348 int cupsPrintFiles(const char *name, int num_files, const char **files,
349 const char *title, int num_options,
350 cups_option_t *options);
353 <P>The <CODE>cups_option_t</CODE> structure holds each option and its value.
354 These are converted as needed and passed to the CUPS server when printing a
357 <P>The simplest way of handling options is to use the <CODE>num_options</CODE>
358 and <CODE>options</CODE> members of the <CODE>cups_dest_t</CODE>
359 structure described earlier:
362 #include <cups/cups.h>
373 mydest = cupsGetDest("<I>name</I>", "<I>instance</I>", num_dests, dests);
375 jobid = cupsPrintFile(mydest->name, "filename", "title",
376 mydest->num_options, mydest->options);
379 <P>This effectively uses the options a user has previous selected without a
382 <H3>Setting Printer Options</H3>
384 <P>Options can also be set by your program using the <CODE>cupsAddOption()</CODE>
388 #include <cups/cups.h>
393 cups_option_t *options;
402 num_options = cupsAddOption("<I>name</I>", "<I>value</I>", num_options, &options);
403 num_options = cupsAddOption("<I>name</I>", "<I>value</I>", num_options, &options);
404 num_options = cupsAddOption("<I>name</I>", "<I>value</I>", num_options, &options);
405 num_options = cupsAddOption("<I>name</I>", "<I>value</I>", num_options, &options);
408 <P>The <CODE>name</CODE> string is the name of the option, and the
409 <CODE>value</CODE> string is the value for that option.
411 <P>Each call to <CODE>cupsAddOption()</CODE> returns the new number of
412 options. Since adding two options with the same name overwrites the
413 first value with the second, do not assume that calling
414 <CODE>cupsAddOptions()</CODE> 20 times will result in 20 options.
416 <P>Call <CODE>cupsFreeOptions</CODE> once you are done using the options:
419 #include <cups/cups.h>
424 cups_option_t *options;
428 cupsFreeOptions(num_options, options);
431 <H3>Getting Errors</H3>
433 <P>If any of the CUPS API printing functions returns an error, the reason for
434 that error can be found by calling <CODE>cupsLastError()</CODE> and
435 <CODE>cupsErrorString()</CODE>. <CODE>cupsLastError()</CODE> returns the
436 last IPP error code that was encountered. <CODE>cupsErrorString()</CODE>
437 converts the error code to a localized message string suitable for
438 presentation to the user:
441 #include <cups/cups.h>
450 puts(cupsErrorString(cupsLastError()));
453 <H2>PPD Services</H2>
455 <P>CUPS includes functions to access and manipulate PostScript Printer
456 Description ("PPD") files that are used with the printer drivers in CUPS.
458 <P>Each PPD file enumerates the available features provided by a
459 printer, including conflict information for specific options (e.g.
460 can't duplex output on envelopes.)
462 <H3>Include Files</H3>
464 <P>Include the <CODE><cups/ppd.h></CODE> header file to use the PPD
468 #include <cups/ppd.h>
471 <P>This header file is also included by the
472 <CODE><cups/cups.h></CODE> header file.
474 <H3>Getting a PPD File for a Printer</H3>
476 <P>The <CODE>cupsGetPPD()</CODE> function retrieves the PPD file for the
477 named printer or class:
480 #include <cups/cups.h>
484 const char *filename;
486 filename = cupsGetPPD("<I>name</I>");
489 <P>The <CODE>name</CODE> string is the name of the printer or class, including
490 the remote server name as appropriate (e.g. "printer@server".)
492 <P>The return value is a pointer to a filename in static storage; this value
493 is overwritten with each call to <CODE>cupsGetPPD()</CODE>. If the printer
494 or class does not exist, a <CODE>NULL</CODE> pointer will be returned.
496 <H3>Loading a PPD File</H3>
498 <P>The <CODE>ppdOpenFile()</CODE> function "opens" a PPD file and loads it
502 #include <cups/ppd.h>
508 ppd = ppdOpenFile("<I>filename</I>");
511 <P>The <CODE>filename</CODE> string is the name of the file to load, such as
512 the value returned by the <CODE>cupsGetPPD()</CODE> function.
514 <P>The return value is a pointer to a structure describing the contents of the
515 PPD file or NULL if the PPD file could not be read.
517 <H3>Freeing PPD File Information</H3>
519 <P>Once you are done using a PPD file, call the <CODE>ppdClose()</CODE> function
520 to free all memory that has been used:
523 #include <cups/ppd.h>
534 <H3>The PPD File Structure</H3>
536 <P>Each PPD file contains a number of capability attributes, printer options,
537 and conflict definitions. The page size options also include the physical
538 margins for the printer and the minimum and maximum sizes for the printer.
539 All of this information is stored in the <CODE>ppd_file_t</CODE> structure.
541 <H4>Capabilities</H4>
543 <P>Each PPD file contains a number of informational attributes that
544 describe the capabilities of the printer. These are provided in the
545 <CODE>ppd_file_t</CODE> structure in the following members:
547 <CENTER><TABLE WIDTH="80%" BORDER="1">
554 <TD><CODE>accurate_screens</CODE></TD>
555 <TD><CODE>int</CODE></TD>
556 <TD>1 = supports accurate screens</TD>
559 <TD><CODE>color_device</CODE></TD>
560 <TD><CODE>int</CODE></TD>
561 <TD>1 = color device</TD>
564 <TD><CODE>colorspace</CODE></TD>
565 <TD><CODE>ppd_cs_t</CODE></TD>
566 <TD>Default colorspace: PPD_CS_CMYK, PPD_CS_CMY, PPD_CS_GRAY,
567 PPD_CS_RGB, PPD_CS_RGBK, PPD_CS_N</TD>
570 <TD><CODE>contone_only</CODE></TD>
571 <TD><CODE>int</CODE></TD>
572 <TD>1 = printer is continuous tone only</TD>
575 <TD><CODE>num_emulations<BR>
576 emulations</CODE></TD>
578 ppd_emul_t *</CODE></TD>
579 <TD>Emulations supported by the printer</TD>
582 <TD><CODE>flip_duplex</CODE></TD>
583 <TD><CODE>int</CODE></TD>
584 <TD>1 = need to flip odd pages when duplexing</TD>
587 <TD><CODE>num_fonts<BR>
591 <TD>The fonts available on the printer.</TD>
594 <TD><CODE>jcl_begin<BR>
597 <TD><CODE>char *</CODE></TD>
598 <TD>Job Control Language commands for PostScript output</TD>
601 <TD><CODE>landscape</CODE></TD>
602 <TD><CODE>int</CODE></TD>
603 <TD>Landscape orientation, -90 or 90 degrees</TD>
606 <TD><CODE>lang_encoding</CODE></TD>
607 <TD><CODE>char *</CODE></TD>
608 <TD>The character used for the option strings</TD>
611 <TD><CODE>lang_version</CODE></TD>
612 <TD><CODE>char *</CODE></TD>
613 <TD>The language used for the options strings (English, French, etc.)</TD>
616 <TD><CODE>language_level</CODE></TD>
617 <TD><CODE>int</CODE></TD>
618 <TD>PostScript language level, 1 to 3</TD>
621 <TD><CODE>manual_copies</CODE></TD>
622 <TD><CODE>int</CODE></TD>
623 <TD>1 = Copies are done manually</TD>
626 <TD><CODE>model_number</CODE></TD>
627 <TD><CODE>int</CODE></TD>
628 <TD>Driver-specific model number.</TD>
631 <TD><CODE>patches</CODE></TD>
632 <TD><CODE>char *</CODE></TD>
633 <TD>Patch commands to send to the printer</TD>
636 <TD><CODE>manufacturer</CODE></TD>
637 <TD><CODE>char *</CODE></TD>
638 <TD>The Manufacturer attribute from the PPD file, if any</TD>
641 <TD><CODE>modelname</CODE></TD>
642 <TD><CODE>char *</CODE></TD>
643 <TD>The ModelName attribute from the PPD file</TD>
646 <TD><CODE>nickname</CODE></TD>
647 <TD><CODE>char *</CODE></TD>
648 <TD>The NickName attribute from the PPD file, if any</TD>
651 <TD><CODE>product</CODE></TD>
652 <TD><CODE>char *</CODE></TD>
653 <TD>The Product attribute from the PPD file, if any</TD>
656 <TD><CODE>shortnickname</CODE></TD>
657 <TD><CODE>char *</CODE></TD>
658 <TD>The ShortNickName attribute from the PPD file, if any</TD>
661 <TD><CODE>throughput</CODE></TD>
662 <TD><CODE>int</CODE></TD>
663 <TD>Number of pages per minute</TD>
666 <TD><CODE>ttrasterizer</CODE></TD>
667 <TD><CODE>char *</CODE></TD>
668 <TD>The TruType font rasterizer (Type42)</TD>
671 <TD><CODE>variable_sizes</CODE></TD>
672 <TD><CODE>int</CODE></TD>
673 <TD>1 = supports variable sizes</TD>
677 <H4>Options and Groups</H4>
679 <P>PPD files support multiple options, which are stored in
680 <CODE>ppd_option_t</CODE> and <CODE>ppd_choice_t</CODE> structures by
683 <P>Each option in turn is associated with a group
684 stored in the <CODE>ppd_group_t</CODE> structure. Groups can be
685 specified in the PPD file; if an option is not associated with a group
686 then it is put in a "General" or "Extra" group depending on the option.
688 <P>Groups can also have sub-groups; CUPS currently limits the depth of
689 sub-groups to 1 level to reduce programming complexity.
693 <P>PPD files support specification of conflict conditions between
694 different options. Conflicts are stored in <CODE>ppd_conflict_t</CODE>
695 structures which specify the options that conflict with each other.
699 <P>PPD files specify all of the available pages sizes and the physical
700 margins associated with them. These sizes are stored in
701 <CODE>ppd_size_t</CODE> structures and are available in the
702 <CODE>num_sizes</CODE> and <CODE>sizes</CODE> members of the
703 <CODE>ppd_file_t</CODE> structure. You can lookup a particular page size
704 with the <CODE>ppdPageWidth()</CODE>, <CODE>ppdPageLength()</CODE>, and
705 <CODE>ppdPageSize()</CODE> functions:
708 #include <cups/ppd.h>
719 size = ppdPageSize(ppd, "<I>size</I>");
720 width = ppdPageWidth(ppd, "<I>size</I>");
721 length = ppdPageLength(ppd, "<I>size</I>");
724 <P>The <CODE>size</CODE> string is the named page size option. The
725 width and length are in points; there are 72 points per inch. The
726 <CODE>ppd_size_t</CODE> structure contains the width, length, and
730 typedef struct /**** Page Sizes ****/
732 int marked; /* Page size selected? */
733 char name[41]; /* Media size option */
734 float width, /* Width of media in points */
735 length, /* Length of media in points */
736 left, /* Left printable margin in points */
737 bottom, /* Bottom printable margin in points */
738 right, /* Right printable margin in points */
739 top; /* Top printable margin in points */
743 <H4>Custom Page Sizes</H4>
745 <P>Besides the standard page sizes listed in a PPD file, some printers
746 support variable or custom page sizes. If <CODE>variables_sizes</CODE>
747 is non-zero, the <CODE>custom_min</CODE>, <CODE>custom_max</CODE>, and
748 <CODE>custom_margins</CODE> members of the <CODE>ppd_file_t</CODE>
749 structure define the limits of the variable sizes.
751 <P>To get the resulting media size, use a page size string of
752 <CODE>Custom.<I>width</I>x<I>length</I></CODE>, where <CODE>width</CODE>
753 and <CODE>length</CODE> are integer values in points:
756 Custom.612x792 [8.5 inches wide, 11 inches long]
757 Custom.1224x792 [17 inches wide, 11 inches long]
760 <H3>Marking Options</H3>
762 <P>Before marking any user-defined options, call the <CODE>ppdMarkDefaults()</CODE>
763 function to mark the default options from the PPD file:
766 #include <cups/ppd.h>
774 ppdMarkDefaults(ppd);
777 <P>Then call the <CODE>ppdMarkOption()</CODE> function to mark individual
781 #include <cups/ppd.h>
790 conflicts = ppdMarkOption(ppd, "<I>name</I>", "<I>value</I>");
793 <P>The <CODE>name</CODE> and <CODE>value</CODE> strings choose a
794 particular option and choice, respectively. The return value is 0
795 if there are not conflicts created by the selection.
797 <P>CUPS also provides a convenience function for marking all options
798 in the <CODE>cups_option_t</CODE> structure:
801 #include <cups/cups.h>
807 cups_option_t *options;
812 conflicts = cupsMarkOptions(ppd, num_options, options);
815 <P>The <CODE>cupsMarkOptions()</CODE> function also handles mapping the
816 IPP job template attributes to PPD options. The return value is the number
817 of conflicts present.
819 <H3>Checking for Conflicts</H3>
821 <P>The <CODE>ppdMarkOption()</CODE> and <CODE>cupsMarkOptions()</CODE>
822 functions return the number of conflicts with the currently marked options.
824 <P>Call the <CODE>ppdConflicts()</CODE> function to get the number of
825 conflicts after you have marked all of the options:
828 #include <cups/cups.h>
837 conflicts = ppdConflicts(ppd);
840 <P>The return value is the number of conflicting options, or 0 if there
844 <H1 ALIGN="RIGHT"><A NAME="WRITING_FILTERS">3 - Writing Filters</A></H1>
846 <P>This chapter describes how to write a file filter for CUPS.
850 <H3>Security Considerations</H3>
852 <H3>Users and Groups</H3>
854 <H3>Temporary Files</H3>
856 <H3>Page Accounting</H3>
859 <H2>Command-Line Arguments</H2>
861 <H3>Copy Generation</H3>
864 <H2>Environment Variables</H2>
867 <H2>Writing a HTML Filter</H2>
870 <H1 ALIGN="RIGHT"><A NAME="WRITING_DRIVERS">4 - Writing Filters</A></H1>
872 <P>This chapter discusses how to write a printer driver, which is a
873 special filter program that converts CUPS raster data into the
874 appropriate commands and data required for a printer.
878 <H3>Page Accounting</H3>
880 <H3>Color Management</H3>
883 <H2>Raster Functions</H2>
885 <H3>cupsRasterOpen()</H3>
887 <H3>cupsRasterReadHeader()</H3>
889 <H3>cupsRasterReadPixels()</H3>
891 <H3>cupsRasterClose()</H3>
894 <H2>Writing a HP-PCL Driver</H2>
897 <H1 ALIGN="RIGHT"><A NAME="WRITING_BACKENDS">5 - Writing Filters</A></H1>
899 <P>This chapter describes how to write a backend for CUPS. Backends
900 communicate directly with printers and allow printer drivers and
901 filters to send data using any type of connection transparently.
905 <H3>Security Considerations</H3>
907 <H3>Users and Groups</H3>
909 <H3>Temporary Files</H3>
911 <H3>Page Accounting</H3>
916 <H2>Command-Line Arguments</H2>
918 <H3>Copy Generation</H3>
921 <H2>Environment Variables</H2>
924 <H2>Writing a Serial Port Backend</H2>
927 <H1 ALIGN="RIGHT"><A NAME="LICENSE">A - Software License Agreement</A></H1>
929 <EMBED SRC="../LICENSE.html">
932 <H1 ALIGN="RIGHT"><A NAME="CONSTANTS">B - Constants</A></H1>
934 <P>This appendix lists all of the constants that are defined by the CUPS
937 <H2>CUPS Constants</H2>
939 <H2>HTTP Constants</H2>
941 <H2>IPP Constants</H2>
943 <H2>Language Constants</H2>
945 <H2>PPD Constants</H2>
947 <H2>Raster Constants</H2>
950 <H1 ALIGN="RIGHT"><A NAME="STRUCTURES">C - Structures</A></H1>
952 <P>This appendix describes all of the structures that are defined by the CUPS
956 <H1 ALIGN="RIGHT"><A HREF="FUNCTIONS">D - Functions</A></H1>
958 <P>This appendix provides a reference for all of the CUPS API functions.
960 <!-- NEW PAGE --><H2><A NAME="cupsAddOption">cupsAddOption()</A></H2>
966 cupsAddOption(const char *name,
969 cups_option_t **options);
974 <CENTER><TABLE WIDTH="80%" BORDER>
981 <TD>The name of the option.</TD>
985 <TD>The value of the option.</TD>
989 <TD>Number of options currently in the array.</TD>
993 <TD>Pointer to the options array.</TD>
999 <P>The new number of options.
1001 <H3>Description</H3>
1003 <P><CODE>cupsAddOption()</CODE> adds an option to the specified array.
1008 #include <cups.h>
1012 /* Declare the options array */
1014 <A HREF="#cups_option_t">cups_option_t</A> *options;
1016 /* Initialize the options array */
1018 options = (cups_option_t *)0;
1020 /* Add options using cupsAddOption() */
1021 num_options = cupsAddOption("media", "letter", num_options, &options);
1022 num_options = cupsAddOption("resolution", "300dpi", num_options, &options);
1027 <A HREF="#cupsFreeOptions"><CODE>cupsFreeOptions()</CODE></A>,
1028 <A HREF="#cupsGetOption"><CODE>cupsGetOption()</CODE></A>,
1029 <A HREF="#cupsParseOptions"><CODE>cupsParseOptions()</CODE></A>
1031 <!-- NEW PAGE --><H2><A NAME="cupsCancelJob">cupsCancelJob()</A></H2>
1037 cupsCancelJob(const char *dest,
1043 <CENTER><TABLE WIDTH="80%" BORDER>
1046 <TH>Description</TH>
1050 <TD>Printer or class name</TD>
1060 <P>1 on success, 0 on failure. On failure the error can be found by calling
1061 <A HREF="#cupsLastError"><CODE>cupsLastError()</CODE></A>.
1063 <H3>Description</H3>
1065 <P><CODE>cupsCancelJob()</CODE> cancels the specifies job.
1070 #include <cups.h>
1072 cupsCancelJob("LaserJet", 1);
1078 <A HREF="#cupsLastError"><CODE>cupsLastError()</CODE></A>,
1079 <A HREF="#cupsPrintFile"><CODE>cupsPrintFile()</CODE></A>
1081 <!-- NEW PAGE --><H2><A NAME="cupsDoFileRequest">cupsDoFileRequest()</A></H2>
1087 cupsDoFileRequest(http_t *http,
1089 const char *resource,
1090 const char *filename);
1095 <CENTER><TABLE WIDTH="80%" BORDER>
1098 <TH>Description</TH>
1102 <TD>HTTP connection to server.</TD>
1106 <TD>IPP request data.</TD>
1110 <TD>HTTP resource name for POST.</TD>
1114 <TD>File to send with POST request (<CODE>NULL</CODE> pointer if none.)</TD>
1120 <P>IPP response data or <CODE>NULL</CODE> if the request fails. On failure
1121 the error can be found by calling
1122 <A HREF="#cupsLastError"><CODE>cupsLastError()</CODE></A>.
1124 <H3>Description</H3>
1126 <P><CODE>cupsDoFileRequest()</CODE> does a HTTP POST request and provides the
1127 IPP request and optionally the contents of a file to the IPP server. It also
1128 handles resubmitting the request and performing password authentication as
1134 #include <cups.h>
1136 <A HREF="#http_t">http_t</A> *http;
1137 <A HREF="#cups_lang_t">cups_lang_t</A> *language;
1138 <A HREF="#ipp_t">ipp_t</A> *request;
1143 /* Get the default language */
1144 language = <A HREF="#cupsLangDefault">cupsLangDefault()</A>;
1146 /* Create a new IPP request */
1147 request = <A HREF="#ippNew">ippNew()</A>;
1149 request->request.op.operation_id = IPP_PRINT_FILE;
1150 request->request.op.request_id = 1;
1152 /* Add required attributes */
1153 <A HREF="#ippAddString">ippAddString</A>(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
1154 "attributes-charset", NULL, <A HREF="#cupsLangEncoding">cupsLangEncoding</A>(language));
1156 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
1157 "attributes-natural-language", NULL,
1158 language != NULL ? language->language : "C");
1160 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
1161 NULL, "ipp://hostname/resource");
1163 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
1164 NULL, <A HREF="#cupsUser">cupsUser()</A>);
1166 /* Do the request... */
1167 response = cupsDoFileRequest(http, request, "/resource", "filename.txt");
1173 <A HREF="#cupsLangDefault"><CODE>cupsLangDefault()</CODE></A>,
1174 <A HREF="#cupsLangEncoding"><CODE>cupsLangEncoding()</CODE></A>,
1175 <A HREF="#cupsUser"><CODE>cupsUser()</CODE></A>,
1176 <A HREF="#httpConnect"><CODE>httpConnect()</CODE></A>,
1177 <A HREF="#ippAddString"><CODE>ippAddString()</CODE></A>,
1178 <A HREF="#ippNew"><CODE>ippNew()</CODE></A>
1180 <!-- NEW PAGE --><H2><A NAME="cupsDoRequest">cupsDoRequest()</A></H2>
1186 cupsDoRequest(http_t *http,
1188 const char *resource);
1193 <CENTER><TABLE WIDTH="80%" BORDER>
1196 <TH>Description</TH>
1200 <TD>HTTP connection to server.</TD>
1204 <TD>IPP request data.</TD>
1208 <TD>HTTP resource name for POST.</TD>
1214 <P>IPP response data or <CODE>NULL</CODE> if the request fails. On failure
1215 the error can be found by calling
1216 <A HREF="#cupsLastError"><CODE>cupsLastError()</CODE></A>.
1218 <H3>Description</H3>
1220 <P><CODE>cupsDoRequest()</CODE> does a HTTP POST request and provides
1221 the IPP request to the IPP server. It also handles resubmitting the
1222 request and performing password authentication as needed.
1227 #include <cups.h>
1229 <A HREF="#http_t">http_t</A> *http;
1230 <A HREF="#cups_lang_t">cups_lang_t</A> *language;
1231 <A HREF="#ipp_t">ipp_t</A> *request;
1236 /* Get the default language */
1237 language = <A HREF="#cupsLangDefault">cupsLangDefault()</A>;
1239 /* Create a new IPP request */
1240 request = <A HREF="#ippNew">ippNew()</A>;
1242 request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
1243 request->request.op.request_id = 1;
1245 /* Add required attributes */
1246 <A HREF="#ippAddString">ippAddString</A>(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
1247 "attributes-charset", NULL, <A HREF="#cupsLangEncoding">cupsLangEncoding</A>(language));
1249 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
1250 "attributes-natural-language", NULL,
1251 language != NULL ? language->language : "C");
1253 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
1254 NULL, "ipp://hostname/resource");
1256 /* Do the request... */
1257 response = cupsDoRequest(http, request, "/resource");
1263 <A HREF="#cupsLangDefault"><CODE>cupsLangDefault()</CODE></A>,
1264 <A HREF="#cupsLangEncoding"><CODE>cupsLangEncoding()</CODE></A>,
1265 <A HREF="#cupsUser"><CODE>cupsUser()</CODE></A>,
1266 <A HREF="#httpConnect"><CODE>httpConnect()</CODE></A>,
1267 <A HREF="#ippAddString"><CODE>ippAddString()</CODE></A>,
1268 <A HREF="#ippNew"><CODE>ippNew()</CODE></A>
1270 <!-- NEW PAGE --><H2><A NAME="cupsFreeOptions">cupsFreeOptions()</A></H2>
1276 cupsFreeOptions(int num_options,
1277 cups_option_t *options);
1281 <CENTER><TABLE WIDTH="80%" BORDER>
1284 <TH>Description</TH>
1287 <TD>num_options</TD>
1288 <TD>Number of options in array.</TD>
1292 <TD>Pointer to options array.</TD>
1296 <H3>Description</H3>
1298 <P><CODE>cupsFreeOptions()</CODE> frees all memory associated with the
1299 option array specified.
1304 #include <cups/cups.h>
1307 cups_option_t *options;
1311 cupsFreeOptions(num_options, options);
1317 <A HREF="#cupsAddOption">cupsAddOption()</A>,
1318 <A HREF="#cupsGetOption">cupsGetOption()</A>,
1319 <A HREF="#cupsMarkOptions">cupsMarkOptions()</A>,
1320 <A HREF="#cupsParseOptions">cupsParseOptions()</A>
1322 <!-- NEW PAGE --><H2><A NAME="cupsGetClasses">cupsGetClasses()</A></H2>
1328 cupsGetClasses(char ***classes);
1333 <CENTER><TABLE WIDTH="80%" BORDER>
1336 <TH>Description</TH>
1340 <TD>Pointer to character pointer array.</TD>
1346 <P>The number of printer classes available.
1348 <H3>Description</H3>
1350 <P><CODE>cupsGetClasses()</CODE> gets a list of the available printer classes.
1351 The returned array should be freed using the <CODE>free()</CODE> when it is
1357 #include <cups/cups.h>
1365 num_classes = cupsGetClasses(&classes);
1369 if (num_classes > 0)
1371 for (i = 0; i < num_classes; i ++)
1381 <A HREF="#cupsGetDefault">cupsGetDefault()</CODE>,
1382 <A HREF="#cupsGetPrinters">cupsGetPrinters()</CODE>
1384 <!-- NEW PAGE --><H2><A NAME="cupsGetDefault">cupsGetDefault()</A></H2>
1390 cupsGetDefault(void);
1395 <P>A pointer to the default destination.
1397 <H3>Description</H3>
1399 <P><CODE>cupsGetDefault()</CODE> gets the default destination printer or class.
1400 The default destination is stored in a static string and will be overwritten
1401 (usually with the same value) after each call.
1406 #include <cups/cups.h>
1408 printf("The default destination is %s\n", cupsGetDefault());
1414 <A HREF="#cupsGetClasses">cupsGetClasses()</CODE>,
1415 <A HREF="#cupsGetPrinters">cupsGetPrinters()</CODE>
1417 <!-- NEW PAGE --><H2><A NAME="cupsGetOption">cupsGetOption()</A></H2>
1423 cupsGetOption(const char *name,
1425 cups_option_t *options);
1430 <CENTER><TABLE WIDTH="80%" BORDER>
1433 <TH>Description</TH>
1437 <TD>The name of the option.</TD>
1440 <TD>num_options</TD>
1441 <TD>The number of options in the array.</TD>
1445 <TD>The options array.</TD>
1451 <P>A pointer to the option values or <CODE>NULL</CODE> if the option is
1454 <H3>Description</H3>
1456 <P><CODE>cupsGetOption()</CODE> returns the first occurrence of the
1457 named option. If the option is not included in the options array then a
1458 <CODE>NULL</CODE> pointer is returned.
1461 #include <cups/cups.h>
1464 cups_option_t *options;
1469 media = cupsGetOption("media", num_options, options);
1475 <A HREF="#cupsAddOption">cupsAddOption()</A>,
1476 <A HREF="#cupsFreeOptions">cupsFreeOptions()</A>,
1477 <A HREF="#cupsMarkOptions">cupsMarkOptions()</A>,
1478 <A HREF="#cupsParseOptions">cupsParseOptions()</A>
1480 <!-- NEW PAGE --><H2><A NAME="cupsGetPassword">cupsGetPassword()</A></H2>
1486 cupsGetPassword(const char *prompt);
1491 <CENTER><TABLE WIDTH="80%" BORDER>
1494 <TH>Description</TH>
1498 <TD>The prompt to display to the user.</TD>
1504 <P>A pointer to the password that was entered or <CODE>NULL</CODE> if no
1505 password was entered.
1507 <H3>Description</H3>
1509 <P><CODE>cupsGetPassword()</CODE> displays the prompt string and asks the user
1510 for a password. The password text is not echoed to the user.
1515 #include <cups/cups.h>
1521 password = cupsGetPassword("Please enter a password:");
1527 <A HREF="#cupsServer">cupsServer()</A>,
1528 <A HREF="#cupsUser()">cupsUser()</A>
1530 <!-- NEW PAGE --><H2><A NAME="cupsGetPPD">cupsGetPPD()</A></H2>
1536 cupsGetPPD(const char *printer);
1541 <CENTER><TABLE WIDTH="80%" BORDER>
1544 <TH>Description</TH>
1548 <TD>The name of the printer.</TD>
1554 <P>The name of a temporary file containing the PPD file or <CODE>NULL</CODE>
1555 if the printer cannot be located or does not have a PPD file.
1557 <H3>Description</H3>
1559 <P><CODE>cupsGetPPD()</CODE> gets a copy of the PPD file for the named printer.
1560 The printer name can be of the form "printer" or "printer@hostname".
1562 <P>You should remove (unlink) the PPD file after you are done using it. The
1563 filename is stored in a static buffer and will be overwritten with each call
1564 to <CODE>cupsGetPPD()</CODE>.
1569 #include <cups/cups.h>
1575 ppd = cupsGetPPD("printer@hostname");
1582 <!-- NEW PAGE --><H2><A NAME="cupsGetPrinters">cupsGetPrinters()</A></H2>
1588 cupsGetPrinters(char ***printers);
1593 <CENTER><TABLE WIDTH="80%" BORDER>
1596 <TH>Description</TH>
1600 <TD>Pointer to character pointer array.</TD>
1606 <P>The number of printer printers available.
1608 <H3>Description</H3>
1610 <P><CODE>cupsGetPrinters()</CODE> gets a list of the available printers.
1611 The returned array should be freed using the <CODE>free()</CODE> when it is
1617 #include <cups/cups.h>
1625 num_printers = cupsGetPrinters(&printers);
1629 if (num_printers > 0)
1631 for (i = 0; i < num_printers; i ++)
1641 <A HREF="#cupsGetClasses">cupsGetClasses()</CODE>,
1642 <A HREF="#cupsGetDefault">cupsGetDefault()</CODE>
1644 <!-- NEW PAGE --><H2><A NAME="cupsLangDefault">cupsLangDefault()</A></H2>
1650 cupsLangDefault(void);
1655 <P>A pointer to the default language structure.
1657 <H3>Description</H3>
1659 <P><CODE>cupsLangDefault()</CODE> returns a language structure for the default
1660 language. The default language is defined by the <CODE>LANG</CODE> environment
1661 variable. If the specified language cannot be located then the POSIX (English)
1664 <P>Call <CODE>cupsLangFree()</CODE> to free any memory associated with the
1665 language structure when you are done.
1670 #include <cups/language.h>
1672 cups_lang_t *language;
1675 language = cupsLangDefault();
1679 cupsLangFree(language);
1685 <A HREF="#cupsLangEncoding">cupsLangEncoding()</A>,
1686 <A HREF="#cupsLangFlush">cupsLangFlush()</A>,
1687 <A HREF="#cupsLangFree">cupsLangFree()</A>,
1688 <A HREF="#cupsLangGet">cupsLangGet()</A>,
1689 <A HREF="#cupsLangString">cupsLangString()</A>
1691 <!-- NEW PAGE --><H2><A NAME="cupsLangEncoding">cupsLangEncoding()</A></H2>
1697 cupsLangEncoding(cups_lang_t *language);
1702 <CENTER><TABLE WIDTH="80%" BORDER>
1705 <TH>Description</TH>
1709 <TD>The language structure.</TD>
1715 <P>A pointer to the encoding string.
1717 <H3>Description</H3>
1719 <P><CODE>cupsLangEncoding()</CODE> returns the language encoding used for the
1720 specified language, e.g. "iso-8859-1", "utf-8", etc.
1725 #include <cups/language.h>
1727 cups_lang_t *language;
1731 language = cupsLangDefault();
1732 encoding = cupsLangEncoding(language);
1735 cupsLangFree(language);
1741 <A HREF="#cupsLangDefault">cupsLangDefault()</A>,
1742 <A HREF="#cupsLangFlush">cupsLangFlush()</A>,
1743 <A HREF="#cupsLangFree">cupsLangFree()</A>,
1744 <A HREF="#cupsLangGet">cupsLangGet()</A>,
1745 <A HREF="#cupsLangString">cupsLangString()</A>
1747 <!-- NEW PAGE --><H2><A NAME="cupsLangFlush">cupsLangFlush()</A></H2>
1753 cupsLangFlush(void);
1756 <H3>Description</H3>
1758 <P><CODE>cupsLangFlush()</CODE> frees all language structures that have been
1764 #include <cups/language.h>
1774 <A HREF="#cupsLangDefault">cupsLangDefault()</A>,
1775 <A HREF="#cupsLangEncoding">cupsLangEncoding()</A>,
1776 <A HREF="#cupsLangFree">cupsLangFree()</A>,
1777 <A HREF="#cupsLangGet">cupsLangGet()</A>,
1778 <A HREF="#cupsLangString">cupsLangString()</A>
1780 <!-- NEW PAGE --><H2><A NAME="cupsLangFree">cupsLangFree()</A></H2>
1786 cupsLangFree(cups_lang_t *language);
1791 <CENTER><TABLE WIDTH="80%" BORDER>
1794 <TH>Description</TH>
1798 <TD>The language structure to free.</TD>
1802 <H3>Description</H3>
1804 <P><CODE>cupsLangFree()</CODE> frees the specified language structure.
1809 #include <cups/language.h>
1811 cups_lang_t *language;
1814 cupsLangFree(language);
1820 <A HREF="#cupsLangDefault">cupsLangDefault()</A>,
1821 <A HREF="#cupsLangEncoding">cupsLangEncoding()</A>,
1822 <A HREF="#cupsLangFlush">cupsLangFlush()</A>,
1823 <A HREF="#cupsLangGet">cupsLangGet()</A>,
1824 <A HREF="#cupsLangString">cupsLangString()</A>
1826 <!-- NEW PAGE --><H2><A NAME="cupsLangGet">cupsLangGet()</A></H2>
1832 cupsLangGet(const char *name);
1837 <CENTER><TABLE WIDTH="80%" BORDER>
1840 <TH>Description</TH>
1844 <TD>The name of the locale.</TD>
1850 <P>A pointer to a language structure.
1852 <H3>Description</H3>
1854 <P><CODE>cupsLangGet()</CODE> returns a language structure for the specified
1855 locale. If the locale is not defined then the POSIX (English) locale is
1861 #include <cups/language.h>
1863 cups_lang_t *language;
1867 language = cupsLangGet("fr");
1871 cupsLangFree(language);
1877 <A HREF="#cupsLangDefault">cupsLangDefault()</A>,
1878 <A HREF="#cupsLangEncoding">cupsLangEncoding()</A>,
1879 <A HREF="#cupsLangFlush">cupsLangFlush()</A>,
1880 <A HREF="#cupsLangFree">cupsLangFree()</A>,
1881 <A HREF="#cupsLangString">cupsLangString()</A>
1883 <!-- NEW PAGE --><H2><A NAME="cupsLangString">cupsLangString()</A></H2>
1889 cupsLangString(cups_lang_t *language,
1895 <CENTER><TABLE WIDTH="80%" BORDER>
1898 <TH>Description</TH>
1902 <TD>The language to query.</TD>
1906 <TD>The message number.</TD>
1912 <P>A pointer to the message string or <CODE>NULL</CODE> if the message is
1915 <H3>Description</H3>
1917 <P><CODE>cupsLangString()</CODE> returns a pointer to the specified message
1918 string in the specified language.
1923 #include <cups/language.h>
1925 cups_lang_t *language;
1929 language = cupsLangGet("fr");
1931 s = cupsLangString(language, CUPS_MSG_YES);
1935 cupsLangFree(language);
1941 <A HREF="#cupsLangDefault">cupsLangDefault()</A>,
1942 <A HREF="#cupsLangEncoding">cupsLangEncoding()</A>,
1943 <A HREF="#cupsLangFlush">cupsLangFlush()</A>,
1944 <A HREF="#cupsLangFree">cupsLangFree()</A>,
1945 <A HREF="#cupsLangGet">cupsLangGet()</A>
1947 <!-- NEW PAGE --><H2><A NAME="cupsLastError">cupsLastError()</A></H2>
1953 cupsLastError(void);
1958 <P>An enumeration containing the last IPP error.
1960 <H3>Description</H3>
1962 <P><CODE>cupsLastError()</CODE> returns the last IPP error that occurred.
1963 If no error occurred then it will return <CODE>IPP_OK</CODE> or
1964 <CODE>IPP_OK_CONFLICT</CODE>.
1969 #include <cups/cups.h>
1971 ipp_status_t status;
1975 status = cupsLastError();
1981 <A HREF="#cupsCancelJob">cupsCancelJob()</A>,
1982 <A HREF="#cupsPrintFile">cupsPrintFile()</A>
1984 <!-- NEW PAGE --><H2><A NAME="cupsMarkOptions">cupsMarkOptions()</A></H2>
1990 cupsMarkOptions(ppd_file_t *ppd,
1992 cups_option_t *options);
1997 <CENTER><TABLE WIDTH="80%" BORDER>
2000 <TH>Description</TH>
2004 <TD>The PPD file to mark.</TD>
2007 <TD>num_options</TD>
2008 <TD>The number of options in the options array.</TD>
2012 <TD>A pointer to the options array.</TD>
2018 <P>The number of conflicts found.
2020 <H3>Description</H3>
2022 <P><CODE>cupsMarkOptions()</CODE> marks options in the PPD file. It also
2023 handles mapping of IPP option names and values to PPD option names.
2028 #include <cups/cups.h>
2031 cups_option_t *options;
2036 cupsMarkOptions(ppd, num_options, options);
2042 <A HREF="#cupsAddOption">cupsAddOption()</A>,
2043 <A HREF="#cupsFreeOptions">cupsFreeOptions()</A>,
2044 <A HREF="#cupsGetOption">cupsGetOption()</A>,
2045 <A HREF="#cupsParseOptions">cupsParseOptions()</A>
2047 <!-- NEW PAGE --><H2><A NAME="cupsParseOptions">cupsParseOptions()</A></H2>
2053 cupsParseOptions(const char *arg,
2055 cups_option_t **options);
2060 <CENTER><TABLE WIDTH="80%" BORDER>
2063 <TH>Description</TH>
2067 <TD>The string containing one or more options.</TD>
2070 <TD>num_options</TD>
2071 <TD>The number of options in the options array.</TD>
2075 <TD>A pointer to the options array pointer.</TD>
2081 <P>The new number of options in the array.
2083 <H3>Description</H3>
2085 <P><CODE>cupsParseOptions()</CODE> parses the specifies string for one
2086 or more options of the form "name=value", "name", or "noname". It can
2087 be called multiple times to combine the options from several strings.
2092 #include <cups/cups.h>
2095 cups_option_t *options;
2100 options = (cups_option_t *)0;
2101 num_options = cupsParseOptions(argv[5], num_options, &options);
2107 <A HREF="#cupsAddOption">cupsAddOption()</A>,
2108 <A HREF="#cupsFreeOptions">cupsFreeOptions()</A>,
2109 <A HREF="#cupsGetOption">cupsGetOption()</A>,
2110 <A HREF="#cupsMarkOptions">cupsMarkOptions()</A>
2112 <!-- NEW PAGE --><H2><A NAME="cupsPrintFile">cupsPrintFile()</A></H2>
2118 cupsPrintFile(const char *printer,
2119 const char *filename,
2122 cups_option_t *options);
2127 <CENTER><TABLE WIDTH="80%" BORDER>
2130 <TH>Description</TH>
2134 <TD>The printer or class to print to.</TD>
2138 <TD>The file to print.</TD>
2142 <TD>The job title.</TD>
2145 <TD>num_options</TD>
2146 <TD>The number of options in the options array.</TD>
2150 <TD>A pointer to the options array.</TD>
2156 <P>The new job ID number or 0 on error.
2158 <H3>Description</H3>
2160 <P><CODE>cupsPrintFile()</CODE> sends a file to the specified printer or
2161 class for printing. If the job cannot be printed the error code can be
2162 found by calling <CODE>cupsLastError()</CODE>.
2167 #include <cups/cups.h>
2170 cups_option_t *options;
2175 jobid = cupsPrintFile("printer@hostname", "filename.ps", "Job Title",
2176 num_options, options);
2182 <A HREF="#cupsCancelJob">cupsCancelJob()</A>,
2183 <A HREF="#cupsLastError">cupsLastError()</A>,
2184 <A HREF="#cupsPrintFiles">cupsPrintFiles()</A>
2186 <!-- NEW PAGE --><H2><A NAME="cupsPrintFiles">cupsPrintFiles()</A></H2>
2192 cupsPrintFiles(const char *printer,
2197 cups_option_t *options);
2202 <CENTER><TABLE WIDTH="80%" BORDER>
2205 <TH>Description</TH>
2209 <TD>The printer or class to print to.</TD>
2213 <TD>The number of files to print.</TD>
2217 <TD>The files to print.</TD>
2221 <TD>The job title.</TD>
2224 <TD>num_options</TD>
2225 <TD>The number of options in the options array.</TD>
2229 <TD>A pointer to the options array.</TD>
2235 <P>The new job ID number or 0 on error.
2237 <H3>Description</H3>
2239 <P><CODE>cupsPrintFiles()</CODE> sends multiple files to the specified
2240 printer or class for printing. If the job cannot be printed the error
2241 code can be found by calling <CODE>cupsLastError()</CODE>.
2246 #include <cups/cups.h>
2249 const char *files[100];
2251 cups_option_t *options;
2256 jobid = cupsPrintFiles("printer@hostname", num_files, files,
2257 "Job Title", num_options, options);
2263 <A HREF="#cupsCancelJob">cupsCancelJob()</A>,
2264 <A HREF="#cupsLastError">cupsLastError()</A>,
2265 <A HREF="#cupsPrintFile">cupsPrintFile()</A>
2267 <!-- NEW PAGE --><H2><A NAME="cupsRasterClose">cupsRasterClose()</A></H2>
2273 cupsRasterClose(cups_raster_t *ras);
2278 <CENTER><TABLE WIDTH="80%" BORDER>
2281 <TH>Description</TH>
2285 <TD>The raster stream to close.</TD>
2289 <H3>Description</H3>
2291 <P><CODE>cupsRasterClose()</CODE> closes the specified raster stream.
2296 #include <cups/raster.h>
2302 cupsRasterClose(ras);
2308 <A HREF="#cupsRasterOpen">cupsRasterOpen()</A>,
2309 <A HREF="#cupsRasterReadHeader">cupsRasterReadHeader()</A>,
2310 <A HREF="#cupsRasterReadPixels">cupsRasterReadPixels()</A>,
2311 <A HREF="#cupsRasterWriteHeader">cupsRasterWriteHeader()</A>,
2312 <A HREF="#cupsRasterWritePixels">cupsRasterWritePixels()</A>
2315 <!-- NEW PAGE --><H2><A NAME="cupsRasterOpen">cupsRasterOpen()</A></H2>
2321 cupsRasterOpen(int fd,
2327 <CENTER><TABLE WIDTH="80%" BORDER>
2330 <TH>Description</TH>
2334 <TD>The file descriptor to use.</TD>
2338 <TD>The mode to use; <CODE>CUPS_RASTER_READ</CODE> or
2339 <CODE>CUPS_RASTER_WRITE</CODE>.</TD>
2345 <P>A pointer to a raster stream or <CODE>NULL</CODE> if there was an error.
2347 <H3>Description</H3>
2349 <P><CODE>cupsRasterOpen()</CODE> opens a raster stream for reading or writing.
2354 #include <cups/raster.h>
2360 ras = cupsRasterOpen(0, CUPS_RASTER_READ);
2366 <A HREF="#cupsRasterClose">cupsRasterClose()</A>,
2367 <A HREF="#cupsRasterReadHeader">cupsRasterReadHeader()</A>,
2368 <A HREF="#cupsRasterReadPixels">cupsRasterReadPixels()</A>,
2369 <A HREF="#cupsRasterWriteHeader">cupsRasterWriteHeader()</A>,
2370 <A HREF="#cupsRasterWritePixels">cupsRasterWritePixels()</A>
2372 <!-- NEW PAGE --><H2><A NAME="cupsRasterReadHeader">cupsRasterReadHeader()</A></H2>
2378 cupsRasterReadHeader(cups_raster_t *ras,
2379 cups_page_header_t *header);
2384 <CENTER><TABLE WIDTH="80%" BORDER>
2387 <TH>Description</TH>
2391 <TD>The raster stream to read from.</TD>
2395 <TD>A pointer to a page header structure to read into.</TD>
2401 <P>1 on success, 0 on EOF or error.
2403 <H3>Description</H3>
2405 <P><CODE>cupsRasterReadHeader()</CODE> reads a page header from the specified
2411 #include <cups/raster.h>
2415 cups_raster_header_t header;
2416 unsigned char pixels[8192];
2419 while (cupsRasterReadHeader(ras, &header))
2423 for (line = 0; line < header.cupsHeight; line ++)
2425 cupsRasterReadPixels(ras, pixels, header.cupsBytesPerLine);
2435 <A HREF="#cupsRasterClose">cupsRasterClose()</A>,
2436 <A HREF="#cupsRasterOpen">cupsRasterOpen()</A>,
2437 <A HREF="#cupsRasterReadPixels">cupsRasterReadPixels()</A>,
2438 <A HREF="#cupsRasterWriteHeader">cupsRasterWriteHeader()</A>,
2439 <A HREF="#cupsRasterWritePixels">cupsRasterWritePixels()</A>
2441 <!-- NEW PAGE --><H2><A NAME="cupsRasterReadPixels">cupsRasterReadPixels()</A></H2>
2447 cupsRasterReadPixels(cups_raster_t *ras,
2448 unsigned char *pixels,
2454 <CENTER><TABLE WIDTH="80%" BORDER>
2457 <TH>Description</TH>
2461 <TD>The raster stream to read from.</TD>
2465 <TD>The pointer to a pixel buffer.</TD>
2469 <TD>The number of bytes of pixel data to read.</TD>
2475 <P>The number of bytes read or 0 on EOF or error.
2477 <H3>Description</H3>
2479 <P><CODE>cupsRasterReadPixels()</CODE> reads pixel data from the specified
2485 #include <cups/raster.h>
2489 cups_raster_header_t header;
2490 unsigned char pixels[8192];
2493 while (cupsRasterReadHeader(ras, &header))
2497 for (line = 0; line < header.cupsHeight; line ++)
2499 cupsRasterReadPixels(ras, pixels, header.cupsBytesPerLine);
2509 <A HREF="#cupsRasterClose">cupsRasterClose()</A>,
2510 <A HREF="#cupsRasterOpen">cupsRasterOpen()</A>,
2511 <A HREF="#cupsRasterReadHeader">cupsRasterReadHeader()</A>,
2512 <A HREF="#cupsRasterWriteHeader">cupsRasterWriteHeader()</A>,
2513 <A HREF="#cupsRasterWritePixels">cupsRasterWritePixels()</A>
2515 <!-- NEW PAGE --><H2><A NAME="cupsRasterWriteHeader">cupsRasterWriteHeader()</A></H2>
2521 cupsRasterWriteHeader(cups_raster_t *ras,
2522 cups_page_header_t *header);
2527 <CENTER><TABLE WIDTH="80%" BORDER>
2530 <TH>Description</TH>
2534 <TD>The raster stream to write to.</TD>
2538 <TD>A pointer to the page header to write.</TD>
2544 <P>1 on success, 0 on error.
2546 <H3>Description</H3>
2548 <P><CODE>cupsRasterWriteHeader()</CODE> writes the specified page header to
2554 #include <cups/raster.h>
2558 cups_raster_header_t header;
2559 unsigned char pixels[8192];
2562 cupsRasterWriteHeader(ras, &header);
2564 for (line = 0; line < header.cupsHeight; line ++)
2568 cupsRasterWritePixels(ras, pixels, header.cupsBytesPerLine);
2575 <A HREF="#cupsRasterClose">cupsRasterClose()</A>,
2576 <A HREF="#cupsRasterOpen">cupsRasterOpen()</A>,
2577 <A HREF="#cupsRasterReadHeader">cupsRasterReadHeader()</A>,
2578 <A HREF="#cupsRasterReadPixels">cupsRasterReadPixels()</A>,
2579 <A HREF="#cupsRasterWritePixels">cupsRasterWritePixels()</A>
2581 <!-- NEW PAGE --><H2><A NAME="cupsRasterWritePixels">cupsRasterWritePixels()</A></H2>
2587 cupsRasterWritePixels(cups_raster_t *ras,
2588 unsigned char *pixels,
2594 <CENTER><TABLE WIDTH="80%" BORDER>
2597 <TH>Description</TH>
2601 <TD>The raster stream to write to.</TD>
2605 <TD>The pixel data to write.</TD>
2609 <TD>The number of bytes to write.</TD>
2615 <P>The number of bytes written.
2617 <H3>Description</H3>
2619 <P><CODE>cupsRasterWritePixels()</CODE> writes the specified pixel data to a
2625 #include <cups/raster.h>
2629 cups_raster_header_t header;
2630 unsigned char pixels[8192];
2633 cupsRasterWriteHeader(ras, &header);
2635 for (line = 0; line < header.cupsHeight; line ++)
2639 cupsRasterWritePixels(ras, pixels, header.cupsBytesPerLine);
2646 <A HREF="#cupsRasterClose">cupsRasterClose()</A>,
2647 <A HREF="#cupsRasterOpen">cupsRasterOpen()</A>,
2648 <A HREF="#cupsRasterReadHeader">cupsRasterReadHeader()</A>,
2649 <A HREF="#cupsRasterReadPixels">cupsRasterReadPixels()</A>,
2650 <A HREF="#cupsRasterWriteHeader">cupsRasterWriteHeader()</A>
2652 <!-- NEW PAGE --><H2><A NAME="cupsServer">cupsServer()</A></H2>
2663 <P>A pointer to the default server name.
2665 <H3>Description</H3>
2667 <P><CODE>cupsServer()</CODE> returns a pointer to the default server name.
2668 The server name is stored in a static location and will be overwritten with
2669 every call to <CODE>cupsServer()</CODE>
2671 <P>The default server is determined from the following locations:
2675 <LI>The <CODE>CUPS_SERVER</CODE> environment variable,
2677 <LI>The <CODE>ServerName</CODE> directive in the
2678 <VAR>cupsd.conf</VAR> file,
2680 <LI>The default host, "localhost".
2687 #include <cups/cups.h>
2691 server = cupsServer();
2697 <A HREF="#cupsGetPassword">cupsGetPassword()</A>,
2698 <A HREF="#cupsUser">cupsUser()</A>
2700 <!-- NEW PAGE --><H2><A NAME="cupsTempFile">cupsTempFile()</A></H2>
2706 cupsTempFile(char *filename,
2712 <CENTER><TABLE WIDTH="80%" BORDER>
2715 <TH>Description</TH>
2719 <TD>The character string to hold the temporary filename.</TD>
2723 <TD>The size of the filename string in bytes.</TD>
2729 <P>A pointer to <CODE>filename</CODE>.
2731 <H3>Description</H3>
2733 <P><CODE>cupsTempFile()</CODE> generates a temporary filename for the
2734 <VAR>/var/tmp</VAR> directory or the directory specified by the
2735 <CODE>TMPDIR</CODE> environment variable.
2740 #include <cups/cups.h>
2744 cupsTempFile(filename, sizeof(filename));
2747 <!-- NEW PAGE --><H2><A NAME="cupsUser">cupsUser()</A></H2>
2758 <P>A pointer to the current username or <CODE>NULL</CODE> if the user ID is
2761 <H3>Description</H3>
2763 <P><CODE>cupsUser()</CODE> returns the name associated with the current
2764 user ID as reported by the <CODE>getuid()</CODE> system call.
2769 #include <cups/cups.h>
2779 <A HREF="#cupsGetPassword">cupsGetPassword()</A>,
2780 <A HREF="#cupsServer">cupsServer()</A>
2782 <!-- NEW PAGE --><H2><A NAME="httpBlocking">httpBlocking()</A></H2>
2791 <CENTER><TABLE WIDTH="80%" BORDER>
2794 <TH>Description</TH>
2804 <H3>Description</H3>
2814 <!-- NEW PAGE --><H2><A NAME="httpCheck">httpCheck()</A></H2>
2823 <CENTER><TABLE WIDTH="80%" BORDER>
2826 <TH>Description</TH>
2836 <H3>Description</H3>
2846 <!-- NEW PAGE --><H2><A NAME="httpClearFields">httpClearFields()</A></H2>
2855 <CENTER><TABLE WIDTH="80%" BORDER>
2858 <TH>Description</TH>
2868 <H3>Description</H3>
2878 <!-- NEW PAGE --><H2><A NAME="httpClose">httpClose()</A></H2>
2887 <CENTER><TABLE WIDTH="80%" BORDER>
2890 <TH>Description</TH>
2900 <H3>Description</H3>
2910 <!-- NEW PAGE --><H2><A NAME="httpConnect">httpConnect()</A></H2>
2919 <CENTER><TABLE WIDTH="80%" BORDER>
2922 <TH>Description</TH>
2932 <H3>Description</H3>
2942 <!-- NEW PAGE --><H2><A NAME="httpDecode64">httpDecode64()</A></H2>
2951 <CENTER><TABLE WIDTH="80%" BORDER>
2954 <TH>Description</TH>
2964 <H3>Description</H3>
2974 <!-- NEW PAGE --><H2><A NAME="httpDelete">httpDelete()</A></H2>
2983 <CENTER><TABLE WIDTH="80%" BORDER>
2986 <TH>Description</TH>
2996 <H3>Description</H3>
3006 <!-- NEW PAGE --><H2><A NAME="httpEncode64">httpEncode64()</A></H2>
3015 <CENTER><TABLE WIDTH="80%" BORDER>
3018 <TH>Description</TH>
3028 <H3>Description</H3>
3038 <!-- NEW PAGE --><H2><A NAME="httpError">httpError()</A></H2>
3047 <CENTER><TABLE WIDTH="80%" BORDER>
3050 <TH>Description</TH>
3060 <H3>Description</H3>
3070 <!-- NEW PAGE --><H2><A NAME="httpFlush">httpFlush()</A></H2>
3079 <CENTER><TABLE WIDTH="80%" BORDER>
3082 <TH>Description</TH>
3092 <H3>Description</H3>
3102 <!-- NEW PAGE --><H2><A NAME="httpGet">httpGet()</A></H2>
3111 <CENTER><TABLE WIDTH="80%" BORDER>
3114 <TH>Description</TH>
3124 <H3>Description</H3>
3134 <!-- NEW PAGE --><H2><A NAME="httpGets">httpGets()</A></H2>
3143 <CENTER><TABLE WIDTH="80%" BORDER>
3146 <TH>Description</TH>
3156 <H3>Description</H3>
3166 <!-- NEW PAGE --><H2><A NAME="httpGetDateString">httpGetDateString()</A></H2>
3175 <CENTER><TABLE WIDTH="80%" BORDER>
3178 <TH>Description</TH>
3188 <H3>Description</H3>
3198 <!-- NEW PAGE --><H2><A NAME="httpGetDateTime">httpGetDateTime()</A></H2>
3207 <CENTER><TABLE WIDTH="80%" BORDER>
3210 <TH>Description</TH>
3220 <H3>Description</H3>
3230 <!-- NEW PAGE --><H2><A NAME="httpGetField">httpGetField()</A></H2>
3239 <CENTER><TABLE WIDTH="80%" BORDER>
3242 <TH>Description</TH>
3252 <H3>Description</H3>
3262 <!-- NEW PAGE --><H2><A NAME="httpGetLength">httpGetLength()</A></H2>
3271 <CENTER><TABLE WIDTH="80%" BORDER>
3274 <TH>Description</TH>
3284 <H3>Description</H3>
3294 <!-- NEW PAGE --><H2><A NAME="httpHead">httpHead()</A></H2>
3303 <CENTER><TABLE WIDTH="80%" BORDER>
3306 <TH>Description</TH>
3316 <H3>Description</H3>
3326 <!-- NEW PAGE --><H2><A NAME="httpInitialize">httpInitialize()</A></H2>
3335 <CENTER><TABLE WIDTH="80%" BORDER>
3338 <TH>Description</TH>
3348 <H3>Description</H3>
3358 <!-- NEW PAGE --><H2><A NAME="httpOptions">httpOptions()</A></H2>
3367 <CENTER><TABLE WIDTH="80%" BORDER>
3370 <TH>Description</TH>
3380 <H3>Description</H3>
3390 <!-- NEW PAGE --><H2><A NAME="httpPost">httpPost()</A></H2>
3399 <CENTER><TABLE WIDTH="80%" BORDER>
3402 <TH>Description</TH>
3412 <H3>Description</H3>
3422 <!-- NEW PAGE --><H2><A NAME="httpPrintf">httpPrintf()</A></H2>
3431 <CENTER><TABLE WIDTH="80%" BORDER>
3434 <TH>Description</TH>
3444 <H3>Description</H3>
3454 <!-- NEW PAGE --><H2><A NAME="httpPut">httpPut()</A></H2>
3463 <CENTER><TABLE WIDTH="80%" BORDER>
3466 <TH>Description</TH>
3476 <H3>Description</H3>
3486 <!-- NEW PAGE --><H2><A NAME="httpRead">httpRead()</A></H2>
3495 <CENTER><TABLE WIDTH="80%" BORDER>
3498 <TH>Description</TH>
3508 <H3>Description</H3>
3518 <!-- NEW PAGE --><H2><A NAME="httpReconnect">httpReconnect()</A></H2>
3527 <CENTER><TABLE WIDTH="80%" BORDER>
3530 <TH>Description</TH>
3540 <H3>Description</H3>
3550 <!-- NEW PAGE --><H2><A NAME="httpSeparate">httpSeparate()</A></H2>
3559 <CENTER><TABLE WIDTH="80%" BORDER>
3562 <TH>Description</TH>
3572 <H3>Description</H3>
3582 <!-- NEW PAGE --><H2><A NAME="httpSetField">httpSetField()</A></H2>
3591 <CENTER><TABLE WIDTH="80%" BORDER>
3594 <TH>Description</TH>
3604 <H3>Description</H3>
3614 <!-- NEW PAGE --><H2><A NAME="httpTrace">httpTrace()</A></H2>
3623 <CENTER><TABLE WIDTH="80%" BORDER>
3626 <TH>Description</TH>
3636 <H3>Description</H3>
3646 <!-- NEW PAGE --><H2><A NAME="httpUpdate">httpUpdate()</A></H2>
3655 <CENTER><TABLE WIDTH="80%" BORDER>
3658 <TH>Description</TH>
3668 <H3>Description</H3>
3678 <!-- NEW PAGE --><H2><A NAME="httpWrite">httpWrite()</A></H2>
3687 <CENTER><TABLE WIDTH="80%" BORDER>
3690 <TH>Description</TH>
3700 <H3>Description</H3>
3710 <!-- NEW PAGE --><H2><A NAME="ippAddBoolean">ippAddBoolean()</A></H2>
3719 <CENTER><TABLE WIDTH="80%" BORDER>
3722 <TH>Description</TH>
3732 <H3>Description</H3>
3742 <!-- NEW PAGE --><H2><A NAME="ippAddBooleans">ippAddBooleans()</A></H2>
3751 <CENTER><TABLE WIDTH="80%" BORDER>
3754 <TH>Description</TH>
3764 <H3>Description</H3>
3774 <!-- NEW PAGE --><H2><A NAME="ippAddDate">ippAddDate()</A></H2>
3783 <CENTER><TABLE WIDTH="80%" BORDER>
3786 <TH>Description</TH>
3796 <H3>Description</H3>
3806 <!-- NEW PAGE --><H2><A NAME="ippAddInteger">ippAddInteger()</A></H2>
3815 <CENTER><TABLE WIDTH="80%" BORDER>
3818 <TH>Description</TH>
3828 <H3>Description</H3>
3838 <!-- NEW PAGE --><H2><A NAME="ippAddIntegers">ippAddIntegers()</A></H2>
3847 <CENTER><TABLE WIDTH="80%" BORDER>
3850 <TH>Description</TH>
3860 <H3>Description</H3>
3870 <!-- NEW PAGE --><H2><A NAME="ippAddRange">ippAddRange()</A></H2>
3879 <CENTER><TABLE WIDTH="80%" BORDER>
3882 <TH>Description</TH>
3892 <H3>Description</H3>
3902 <!-- NEW PAGE --><H2><A NAME="ippAddRanges">ippAddRanges()</A></H2>
3911 <CENTER><TABLE WIDTH="80%" BORDER>
3914 <TH>Description</TH>
3924 <H3>Description</H3>
3934 <!-- NEW PAGE --><H2><A NAME="ippAddResolution">ippAddResolution()</A></H2>
3943 <CENTER><TABLE WIDTH="80%" BORDER>
3946 <TH>Description</TH>
3956 <H3>Description</H3>
3966 <!-- NEW PAGE --><H2><A NAME="ippAddResolutions">ippAddResolutions()</A></H2>
3975 <CENTER><TABLE WIDTH="80%" BORDER>
3978 <TH>Description</TH>
3988 <H3>Description</H3>
3998 <!-- NEW PAGE --><H2><A NAME="ippAddSeparator">ippAddSeparator()</A></H2>
4007 <CENTER><TABLE WIDTH="80%" BORDER>
4010 <TH>Description</TH>
4020 <H3>Description</H3>
4030 <!-- NEW PAGE --><H2><A NAME="ippAddString">ippAddString()</A></H2>
4039 <CENTER><TABLE WIDTH="80%" BORDER>
4042 <TH>Description</TH>
4052 <H3>Description</H3>
4062 <!-- NEW PAGE --><H2><A NAME="ippAddStrings">ippAddStrings()</A></H2>
4071 <CENTER><TABLE WIDTH="80%" BORDER>
4074 <TH>Description</TH>
4084 <H3>Description</H3>
4094 <!-- NEW PAGE --><H2><A NAME="ippDateToTime">ippDateToTime()</A></H2>
4103 <CENTER><TABLE WIDTH="80%" BORDER>
4106 <TH>Description</TH>
4116 <H3>Description</H3>
4126 <!-- NEW PAGE --><H2><A NAME="ippDelete">ippDelete()</A></H2>
4135 <CENTER><TABLE WIDTH="80%" BORDER>
4138 <TH>Description</TH>
4148 <H3>Description</H3>
4158 <!-- NEW PAGE --><H2><A NAME="ippFindAttribute">ippFindAttribute()</A></H2>
4167 <CENTER><TABLE WIDTH="80%" BORDER>
4170 <TH>Description</TH>
4180 <H3>Description</H3>
4190 <!-- NEW PAGE --><H2><A NAME="ippLength">ippLength()</A></H2>
4199 <CENTER><TABLE WIDTH="80%" BORDER>
4202 <TH>Description</TH>
4212 <H3>Description</H3>
4222 <!-- NEW PAGE --><H2><A NAME="ippNew">ippNew()</A></H2>
4231 <CENTER><TABLE WIDTH="80%" BORDER>
4234 <TH>Description</TH>
4244 <H3>Description</H3>
4254 <!-- NEW PAGE --><H2><A NAME="ippPort">ippPort()</A></H2>
4263 <CENTER><TABLE WIDTH="80%" BORDER>
4266 <TH>Description</TH>
4276 <H3>Description</H3>
4286 <!-- NEW PAGE --><H2><A NAME="ippRead">ippRead()</A></H2>
4295 <CENTER><TABLE WIDTH="80%" BORDER>
4298 <TH>Description</TH>
4308 <H3>Description</H3>
4318 <!-- NEW PAGE --><H2><A NAME="ippTimeToDate">ippTimeToDate()</A></H2>
4327 <CENTER><TABLE WIDTH="80%" BORDER>
4330 <TH>Description</TH>
4340 <H3>Description</H3>
4350 <!-- NEW PAGE --><H2><A NAME="ippWrite">ippWrite()</A></H2>
4359 <CENTER><TABLE WIDTH="80%" BORDER>
4362 <TH>Description</TH>
4372 <H3>Description</H3>
4382 <!-- NEW PAGE --><H2><A NAME="ppdClose">ppdClose()</A></H2>
4391 <CENTER><TABLE WIDTH="80%" BORDER>
4394 <TH>Description</TH>
4404 <H3>Description</H3>
4414 <!-- NEW PAGE --><H2><A NAME="ppdConflicts">ppdConflicts()</A></H2>
4423 <CENTER><TABLE WIDTH="80%" BORDER>
4426 <TH>Description</TH>
4436 <H3>Description</H3>
4446 <!-- NEW PAGE --><H2><A NAME="pddEmitFd">pddEmitFd()</A></H2>
4455 <CENTER><TABLE WIDTH="80%" BORDER>
4458 <TH>Description</TH>
4468 <H3>Description</H3>
4478 <!-- NEW PAGE --><H2><A NAME="ppdEmit">ppdEmit()</A></H2>
4487 <CENTER><TABLE WIDTH="80%" BORDER>
4490 <TH>Description</TH>
4500 <H3>Description</H3>
4510 <!-- NEW PAGE --><H2><A NAME="ppdFindChoice">ppdFindChoice()</A></H2>
4519 <CENTER><TABLE WIDTH="80%" BORDER>
4522 <TH>Description</TH>
4532 <H3>Description</H3>
4542 <!-- NEW PAGE --><H2><A NAME="ppdFindMarkedChoice">ppdFindMarkedChoice()</A></H2>
4551 <CENTER><TABLE WIDTH="80%" BORDER>
4554 <TH>Description</TH>
4564 <H3>Description</H3>
4574 <!-- NEW PAGE --><H2><A NAME="ppdFindOption">ppdFindOption()</A></H2>
4583 <CENTER><TABLE WIDTH="80%" BORDER>
4586 <TH>Description</TH>
4596 <H3>Description</H3>
4606 <!-- NEW PAGE --><H2><A NAME="ppdIsMarked">ppdIsMarked()</A></H2>
4615 <CENTER><TABLE WIDTH="80%" BORDER>
4618 <TH>Description</TH>
4628 <H3>Description</H3>
4638 <!-- NEW PAGE --><H2><A NAME="ppdMarkDefaults">ppdMarkDefaults()</A></H2>
4647 <CENTER><TABLE WIDTH="80%" BORDER>
4650 <TH>Description</TH>
4660 <H3>Description</H3>
4670 <!-- NEW PAGE --><H2><A NAME="ppdMarkOption">ppdMarkOption()</A></H2>
4679 <CENTER><TABLE WIDTH="80%" BORDER>
4682 <TH>Description</TH>
4692 <H3>Description</H3>
4702 <!-- NEW PAGE --><H2><A NAME="ppdOpenFd">ppdOpenFd()</A></H2>
4711 <CENTER><TABLE WIDTH="80%" BORDER>
4714 <TH>Description</TH>
4724 <H3>Description</H3>
4734 <!-- NEW PAGE --><H2><A NAME="ppdOpenFile">ppdOpenFile()</A></H2>
4743 <CENTER><TABLE WIDTH="80%" BORDER>
4746 <TH>Description</TH>
4756 <H3>Description</H3>
4766 <!-- NEW PAGE --><H2><A NAME="ppdOpen">ppdOpen()</A></H2>
4775 <CENTER><TABLE WIDTH="80%" BORDER>
4778 <TH>Description</TH>
4788 <H3>Description</H3>
4798 <!-- NEW PAGE --><H2><A NAME="ppdPageLength">ppdPageLength()</A></H2>
4807 <CENTER><TABLE WIDTH="80%" BORDER>
4810 <TH>Description</TH>
4820 <H3>Description</H3>
4830 <!-- NEW PAGE --><H2><A NAME="ppdPageSize">ppdPageSize()</A></H2>
4839 <CENTER><TABLE WIDTH="80%" BORDER>
4842 <TH>Description</TH>
4852 <H3>Description</H3>
4862 <!-- NEW PAGE --><H2><A NAME="ppdPageWidth">ppdPageWidth()</A></H2>
4871 <CENTER><TABLE WIDTH="80%" BORDER>
4874 <TH>Description</TH>
4884 <H3>Description</H3>