Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/share/cups/doc-root/help/ drwxr-xr-x |
Viewing file: Select action/file-type: PPD API
Contents
OverviewThe CUPS PPD API provides read-only access the data in PostScript Printer
Description ("PPD") files which are used for all printers with a driver. With
it you can obtain the data necessary to display printer options to users, mark
option choices and check for conflicting choices, and output marked choices in
PostScript output. The Note: Loading a PPD FileThe #include <cups/ppd.h> ppd_file_t *ppd = ppdOpenFile(getenv("PPD")); The return value is a pointer to a new
#include <cups/ppd.h> ppd_file_t *ppd; ppdClose(ppd); Once closed, pointers to the Options and GroupsPPD files support multiple options, which are stored in arrays of
Each option in turn is associated with a group stored in a
Option choices are selected by marking them using one of three functions. The
first is #include <cups/ppd.h> ppd_file_t *ppd; ppdMarkDefaults(ppd); The second is #include <cups/ppd.h> ppd_file_t *ppd; ppdMarkOption(ppd, "InputSlot", "Upper"); The last function is
#include <cups/ppd.h> ppd_file_t *ppd = ppdOpenFile(getenv("PPD")); cups_option_t *options = NULL; int num_options = cupsParseOptions(argv[5], 0, &options); ppdMarkDefaults(ppd); cupsMarkOptions(ppd, num_options, options); cupsFreeOptions(num_options, options); ConstraintsPPD files support specification of conflict conditions, called
constraints, between different options. Constraints are stored in an array of
Page SizesPage sizes are special options which have physical dimensions and margins
associated with them. The size information is stored in
#include <cups/ppd.h> ppd_file_t *ppd; ppd_size_t *size = ppdPageSize(ppd, NULL); Besides the standard page sizes listed in a PPD file, some printers
support variable or custom page sizes. Custom page sizes are supported if the
#include <cups/ppd.h> ppd_file_t *ppd; /* Get an 576x720 point custom page size */ ppd_size_t *size = ppdPageSize(ppd, "Custom.576x720"); /* Get an 8x10 inch custom page size */ ppd_size_t *size = ppdPageSize(ppd, "Custom.8x10in"); /* Get a 100x200 millimeter custom page size */ ppd_size_t *size = ppdPageSize(ppd, "Custom.100x200mm"); /* Get a 12.7x34.5 centimeter custom page size */ ppd_size_t *size = ppdPageSize(ppd, "Custom.12.7x34.5cm"); If the PPD does not support variable page sizes, the
AttributesEvery PPD file is composed of one or more attributes. Most of these attributes are used to define groups, options, choices, and page sizes, however several informational attributes may be present which you can access in your program or filter. Attributes normally look like one of the following examples in a PPD file: *name: "value" *name spec: "value" *name spec/text: "value" The #include <cups/ppd.h> ppd_file_t *ppd; ppd_attr_t *attr; for (attr = ppdFindAttr(ppd, "Product", NULL); attr != NULL; attr = ppdFindNextAttr(ppd, "Product", NULL)) puts(attr->value); FunctionsCUPS 1.4/Mac OS X 10.6 cupsGetConflictsGet a list of conflicting options in a marked PPD.
int cupsGetConflicts ( Parameters
Return ValueNumber of conflicting options DiscussionThis function gets a list of options that would conflict if "option" and
"choice" were marked in the PPD. You would typically call this function
after marking the currently selected options in the PPD in order to
determine whether a new option selection would cause a conflict. cupsMarkOptionsMark command-line options in a PPD file.
int cupsMarkOptions ( Parameters
Return Value1 if conflicts exist, 0 otherwise DiscussionThis function maps the IPP "finishings", "media", "mirror", "multiple-document-handling", "output-bin", "printer-resolution", and "sides" attributes to their corresponding PPD options and choices. CUPS 1.4/Mac OS X 10.6 cupsResolveConflictsResolve conflicts in a marked PPD.
int cupsResolveConflicts ( Parameters
Return Value1 on success, 0 on failure DiscussionThis function attempts to resolve any conflicts in a marked PPD, returning
a list of option changes that are required to resolve them. On input,
"num_options" and "options" contain any pending option changes that have
not yet been marked, while "option" and "choice" contain the most recent
selection which may or may not be in "num_options" or "options". ppdCloseFree all memory used by the PPD file.
void ppdClose ( Parameters
ppdCollectCollect all marked options that reside in the specified section.
int ppdCollect ( Parameters
Return ValueNumber of options marked DiscussionThe choices array should be freed using CUPS 1.2/Mac OS X 10.5 ppdCollect2Collect all marked options that reside in the specified section and minimum order.
int ppdCollect2 ( Parameters
Return ValueNumber of options marked DiscussionThe choices array should be freed using ppdConflictsCheck to see if there are any conflicts among the marked option choices.
int ppdConflicts ( Parameters
Return ValueNumber of conflicts found DiscussionThe returned value is the same as returned by ppdEmitEmit code for marked options to a file.
int ppdEmit ( Parameters
Return Value0 on success, -1 on failure CUPS 1.2/Mac OS X 10.5 ppdEmitAfterOrderEmit a subset of the code for marked options to a file.
int ppdEmitAfterOrder ( Parameters
Return Value0 on success, -1 on failure DiscussionWhen "limit" is non-zero, this function only emits options whose
OrderDependency value is greater than or equal to "min_order". ppdEmitFdEmit code for marked options to a file.
int ppdEmitFd ( Parameters
Return Value0 on success, -1 on failure ppdEmitJCLEmit code for JCL options to a file.
int ppdEmitJCL ( Parameters
Return Value0 on success, -1 on failure CUPS 1.2/Mac OS X 10.5 ppdEmitJCLEndEmit JCLEnd code to a file.
int ppdEmitJCLEnd ( Parameters
Return Value0 on success, -1 on failure CUPS 1.2/Mac OS X 10.5 ppdEmitStringGet a string containing the code for marked options.
char *ppdEmitString ( Parameters
Return ValueString containing option code or DiscussionWhen "min_order" is greater than zero, this function only includes options
whose OrderDependency value is greater than or equal to "min_order".
Otherwise, all options in the specified section are included in the
returned string. CUPS 1.1.19/Mac OS X 10.3 ppdErrorStringReturns the text assocated with a status.
const char *ppdErrorString ( Parameters
Return ValueStatus string CUPS 1.1.19/Mac OS X 10.3 ppdFindAttrFind the first matching attribute.
ppd_attr_t *ppdFindAttr ( Parameters
Return ValueAttribute or ppdFindChoiceReturn a pointer to an option choice.
ppd_choice_t *ppdFindChoice ( Parameters
Return ValueChoice pointer or CUPS 1.2/Mac OS X 10.5 ppdFindCustomOptionFind a custom option.
ppd_coption_t *ppdFindCustomOption ( Parameters
Return ValueCustom option or NULL CUPS 1.2/Mac OS X 10.5 ppdFindCustomParamFind a parameter for a custom option.
ppd_cparam_t *ppdFindCustomParam ( Parameters
Return ValueCustom parameter or NULL ppdFindMarkedChoiceReturn the marked choice for the specified option.
ppd_choice_t *ppdFindMarkedChoice ( Parameters
Return ValuePointer to choice or CUPS 1.1.19/Mac OS X 10.3 ppdFindNextAttrFind the next matching attribute.
ppd_attr_t *ppdFindNextAttr ( Parameters
Return ValueAttribute or ppdFindOptionReturn a pointer to the specified option.
ppd_option_t *ppdFindOption ( Parameters
Return ValuePointer to option or CUPS 1.2/Mac OS X 10.5 ppdFirstCustomParamReturn the first parameter for a custom option.
ppd_cparam_t *ppdFirstCustomParam ( Parameters
Return ValueCustom parameter or NULL CUPS 1.2/Mac OS X 10.5 ppdFirstOptionReturn the first option in the PPD file.
ppd_option_t *ppdFirstOption ( Parameters
Return ValueFirst option or DiscussionOptions are returned from all groups in ascending alphanumeric order. CUPS 1.4/Mac OS X 10.6 ppdInstallableConflictTest whether an option choice conflicts with an installable option.
int ppdInstallableConflict ( Parameters
Return Value1 if conflicting, 0 if not conflicting DiscussionThis function tests whether a particular option choice is available based on constraints against options in the "InstallableOptions" group. ppdIsMarkedCheck to see if an option is marked.
int ppdIsMarked ( Parameters
Return ValueNon-zero if option is marked CUPS 1.1.19/Mac OS X 10.3 ppdLastErrorReturn the status from the last ppdOpen*().
ppd_status_t ppdLastError ( Parameters
Return ValueStatus code CUPS 1.2/Mac OS X 10.5 ppdLocalizeLocalize the PPD file to the current locale.
int ppdLocalize ( Parameters
Return Value0 on success, -1 on error DiscussionAll groups, options, and choices are localized, as are ICC profile descriptions, printer presets, and custom option parameters. Each localized string uses the UTF-8 character encoding. ppdLocalizeAttrLocalize an attribute.
ppd_attr_t *ppdLocalizeAttr ( Parameters
Return ValueLocalized attribute or DiscussionThis function uses the current locale to find the localized attribute for the given main and option keywords. If no localized version of the attribute exists for the current locale, the unlocalized version is returned. CUPS 1.3/Mac OS X 10.5 ppdLocalizeIPPReasonGet the localized version of a cupsIPPReason attribute.
const char *ppdLocalizeIPPReason ( Parameters
Return ValueValue or NULL if not found DiscussionThis function uses the current locale to find the corresponding reason
text or URI from the attribute value. If "scheme" is NULL or "text",
the returned value contains human-readable (UTF-8) text from the translation
string or attribute value. Otherwise the corresponding URI is returned. CUPS 1.4/Mac OS X 10.6 ppdLocalizeMarkerNameGet the localized version of a marker-names attribute value.
const char *ppdLocalizeMarkerName ( Parameters
Return ValueValue or DiscussionThis function uses the current locale to find the corresponding name
text from the attribute value. If no localized text for the requested
name can be found, ppdMarkDefaultsMark all default options in the PPD file.
void ppdMarkDefaults ( Parameters
ppdMarkOptionMark an option in a PPD file and return the number of conflicts.
int ppdMarkOption ( Parameters
Return ValueNumber of conflicts CUPS 1.2/Mac OS X 10.5 ppdNextCustomParamReturn the next parameter for a custom option.
ppd_cparam_t *ppdNextCustomParam ( Parameters
Return ValueCustom parameter or NULL CUPS 1.2/Mac OS X 10.5 ppdNextOptionReturn the next option in the PPD file.
ppd_option_t *ppdNextOption ( Parameters
Return ValueNext option or DiscussionOptions are returned from all groups in ascending alphanumeric order. ppdOpenRead a PPD file into memory.
ppd_file_t *ppdOpen ( Parameters
Return ValuePPD file record CUPS 1.2/Mac OS X 10.5 ppdOpen2Read a PPD file into memory.
ppd_file_t *ppdOpen2 ( Parameters
Return ValuePPD file record or ppdOpenFdRead a PPD file into memory.
ppd_file_t *ppdOpenFd ( Parameters
Return ValuePPD file record or ppdOpenFileRead a PPD file into memory.
ppd_file_t *ppdOpenFile ( Parameters
Return ValuePPD file record or ppdPageLengthGet the page length for the given size.
float ppdPageLength ( Parameters
Return ValueLength of page in points or 0.0 ppdPageSizeGet the page size record for the given size.
ppd_size_t *ppdPageSize ( Parameters
Return ValueSize record for page or NULL CUPS 1.4/Mac OS X 10.6 ppdPageSizeLimitsReturn the custom page size limits.
int ppdPageSizeLimits ( Parameters
Return Value1 if custom sizes are supported, 0 otherwise DiscussionThis function returns the minimum and maximum custom page sizes and printable
areas based on the currently-marked (selected) options. ppdPageWidthGet the page width for the given size.
float ppdPageWidth ( Parameters
Return ValueWidth of page in points or 0.0 CUPS 1.1.20/Mac OS X 10.4 ppdSetConformanceSet the conformance level for PPD files.
void ppdSetConformance ( Parameters
Data TypesCUPS 1.1.19/Mac OS X 10.3 ppd_attr_tPPD Attribute Structure typedef struct ppd_attr_s ppd_attr_t; ppd_choice_tOption choices typedef struct ppd_choice_s ppd_choice_t; CUPS 1.1.19/Mac OS X 10.3 ppd_conform_tConformance Levels typedef enum ppd_conform_e ppd_conform_t; ppd_const_tConstraints typedef struct ppd_const_s ppd_const_t; CUPS 1.2/Mac OS X 10.5 ppd_coption_tCustom Option typedef struct ppd_coption_s ppd_coption_t; CUPS 1.2/Mac OS X 10.5 ppd_cparam_tCustom Parameter typedef struct ppd_cparam_s ppd_cparam_t; CUPS 1.2/Mac OS X 10.5 ppd_cplimit_tCustom Parameter Limit typedef union ppd_cplimit_u ppd_cplimit_t; CUPS 1.2/Mac OS X 10.5 ppd_cptype_tCustom Parameter Type typedef enum ppd_cptype_e ppd_cptype_t; CUPS 1.2/Mac OS X 10.5 ppd_cpvalue_tCustom Parameter Value typedef union ppd_cpvalue_u ppd_cpvalue_t; ppd_cs_tColorspaces typedef enum ppd_cs_e ppd_cs_t; ppd_emul_tEmulators typedef struct ppd_emul_s ppd_emul_t; ppd_file_tPPD File typedef struct ppd_file_s ppd_file_t; ppd_group_tGroups typedef struct ppd_group_s ppd_group_t; ppd_option_tOptions typedef struct ppd_option_s ppd_option_t; ppd_profile_tsRGB Color Profiles typedef struct ppd_profile_s ppd_profile_t; ppd_section_tOrder dependency sections typedef enum ppd_section_e ppd_section_t; ppd_size_tPage Sizes typedef struct ppd_size_s ppd_size_t; CUPS 1.1.19/Mac OS X 10.3 ppd_status_tStatus Codes typedef enum ppd_status_e ppd_status_t; ppd_ui_tUI Types typedef enum ppd_ui_e ppd_ui_t; StructuresCUPS 1.1.19/Mac OS X 10.3 ppd_attr_sPPD Attribute Structure struct ppd_attr_s { Members
ppd_choice_sOption choices struct ppd_choice_s { Members
ppd_const_sConstraints struct ppd_const_s { Members
CUPS 1.2/Mac OS X 10.5 ppd_coption_sCustom Option struct ppd_coption_s { Members
CUPS 1.2/Mac OS X 10.5 ppd_cparam_sCustom Parameter struct ppd_cparam_s { Members
ppd_emul_sEmulators struct ppd_emul_s { Members
ppd_file_sPPD File struct ppd_file_s { Members
ppd_group_sGroups struct ppd_group_s { Members
ppd_option_sOptions struct ppd_option_s { Members
ppd_profile_ssRGB Color Profiles struct ppd_profile_s { Members
ppd_size_sPage Sizes struct ppd_size_s { Members
UnionsCUPS 1.2/Mac OS X 10.5 ppd_cplimit_uCustom Parameter Limit union ppd_cplimit_u { Members
CUPS 1.2/Mac OS X 10.5 ppd_cpvalue_uCustom Parameter Value union ppd_cpvalue_u { Members
ConstantsCUPS 1.1.19/Mac OS X 10.3 ppd_conform_eConformance Levels Constants
CUPS 1.2/Mac OS X 10.5 ppd_cptype_eCustom Parameter Type Constants
ppd_cs_eColorspaces Constants
ppd_section_eOrder dependency sections Constants
CUPS 1.1.19/Mac OS X 10.3 ppd_status_eStatus Codes Constants
ppd_ui_eUI Types Constants
|
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0107 ]-- |