From 28b9d139c05c6edd6ebc25f466792b8e806d0fa6 Mon Sep 17 00:00:00 2001 From: msweet Date: Fri, 17 Oct 2008 22:12:14 +0000 Subject: [PATCH] Merge changes from CUPS 1.4svn-r8067 (tentative CUPS 1.4b1) git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1021 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES-1.3.txt | 7 + Makefile | 2 +- backend/usb-darwin.c | 2 +- cups/conflicts.c | 316 +++++----- data/utf-8 | 22 +- doc/Makefile | 11 +- doc/cups-printable.css | 96 ++- doc/cups.css | 9 +- doc/help/postscript-driver.html | 255 ++++++++ doc/help/ppd-compiler.html | 839 +++++++++++++++++++++++++++ doc/help/ref-ppdcfile.html | 2 +- doc/images/cups-command-chain.png | Bin 0 -> 14902 bytes doc/images/cups-command-chain.svg | 439 ++++++++++++++ doc/images/cups-postscript-chain.png | Bin 0 -> 17498 bytes doc/images/cups-postscript-chain.svg | 531 +++++++++++++++++ doc/images/cups-raster-chain.png | Bin 0 -> 16916 bytes doc/images/cups-raster-chain.svg | 534 +++++++++++++++++ examples/Makefile | 128 ++++ examples/color.drv | 44 ++ examples/constraint.drv | 48 ++ examples/custom.drv | 41 ++ examples/grouping.drv | 36 ++ examples/laserjet-basic.drv | 88 +++ examples/laserjet-pjl.drv | 101 ++++ examples/minimum.drv | 26 + examples/postscript.drv | 46 ++ examples/r300-basic.drv | 75 +++ examples/r300-colorman.drv | 85 +++ examples/r300-remote.drv | 85 +++ filter/bannertops.c | 2 +- filter/image-png.c | 4 +- filter/pstext.c | 3 + man/drv.man.in | 2 +- packaging/cups.list.in | 9 +- 34 files changed, 3690 insertions(+), 198 deletions(-) create mode 100644 doc/help/postscript-driver.html create mode 100644 doc/help/ppd-compiler.html create mode 100644 doc/images/cups-command-chain.png create mode 100644 doc/images/cups-command-chain.svg create mode 100644 doc/images/cups-postscript-chain.png create mode 100644 doc/images/cups-postscript-chain.svg create mode 100644 doc/images/cups-raster-chain.png create mode 100644 doc/images/cups-raster-chain.svg create mode 100644 examples/Makefile create mode 100644 examples/color.drv create mode 100644 examples/constraint.drv create mode 100644 examples/custom.drv create mode 100644 examples/grouping.drv create mode 100644 examples/laserjet-basic.drv create mode 100644 examples/laserjet-pjl.drv create mode 100644 examples/minimum.drv create mode 100644 examples/postscript.drv create mode 100644 examples/r300-basic.drv create mode 100644 examples/r300-colorman.drv create mode 100644 examples/r300-remote.drv diff --git a/CHANGES-1.3.txt b/CHANGES-1.3.txt index 173fbfe2a..c97869573 100644 --- a/CHANGES-1.3.txt +++ b/CHANGES-1.3.txt @@ -1,6 +1,13 @@ CHANGES-1.3.txt --------------- +CHANGES IN CUPS V1.3.10 + + - SECURITY: The PNG image reading code did not validate the + image size properly, leading to a potential buffer overflow + (STR #2974) + + CHANGES IN CUPS V1.3.9 - SECURITY: The HP-GL/2 filter did not range check pen numbers diff --git a/Makefile b/Makefile index cd19f8358..44beff0a3 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ include Makedefs DIRS = cups filter backend berkeley cgi-bin driver locale man monitor \ notifier ppdc scheduler systemv test \ $(PHPDIR) \ - conf data doc $(FONTS) templates + conf data doc examples $(FONTS) templates # diff --git a/backend/usb-darwin.c b/backend/usb-darwin.c index 3f12405f8..f25fbe017 100644 --- a/backend/usb-darwin.c +++ b/backend/usb-darwin.c @@ -1712,7 +1712,7 @@ static void setup_cfLanguage(void) lang[0] = CFStringCreateWithCString(kCFAllocatorDefault, requestedLang, kCFStringEncodingUTF8); langArray = CFArrayCreate(kCFAllocatorDefault, (const void **)lang, sizeof(lang) / sizeof(lang[0]), &kCFTypeArrayCallBacks); - CFPreferencesSetAppValue(CFSTR("AppleLanguages"), langArray, kCFPreferencesCurrentApplication); + CFPreferencesSetValue(CFSTR("AppleLanguages"), langArray, kCFPreferencesCurrentApplication, kCFPreferencesAnyUser, kCFPreferencesAnyHost); fprintf(stderr, "DEBUG: usb: AppleLanguages=\"%s\"\n", requestedLang); CFRelease(lang[0]); diff --git a/cups/conflicts.c b/cups/conflicts.c index aab26d1e7..b05ecd57d 100644 --- a/cups/conflicts.c +++ b/cups/conflicts.c @@ -544,213 +544,205 @@ ppd_load_constraints(ppd_file_t *ppd) /* I - PPD file */ installable = NULL; /* - * See what kind of constraint data we have in the PPD... + * Load old-style [Non]UIConstraints data... */ - if ((constattr = ppdFindAttr(ppd, "cupsUIConstraints", NULL)) != NULL) + for (i = ppd->num_consts, oldconst = ppd->consts; i > 0; i --, oldconst ++) { /* - * Load new-style cupsUIConstraints data... + * Weed out nearby duplicates, since the PPD spec requires that you + * define both "*Foo foo *Bar bar" and "*Bar bar *Foo foo"... */ - for (; constattr; - constattr = ppdFindNextAttr(ppd, "cupsUIConstraints", NULL)) - { - if (!constattr->value) - { - DEBUG_puts("ppd_load_constraints: Bad cupsUIConstraints value!"); - continue; - } + if (i > 1 && + !strcasecmp(oldconst[0].option1, oldconst[1].option2) && + !strcasecmp(oldconst[0].choice1, oldconst[1].choice2) && + !strcasecmp(oldconst[0].option2, oldconst[1].option1) && + !strcasecmp(oldconst[0].choice2, oldconst[1].choice1)) + continue; - for (i = 0, vptr = strchr(constattr->value, '*'); - vptr; - i ++, vptr = strchr(vptr + 1, '*')); + /* + * Allocate memory... + */ - if (i == 0) - { - DEBUG_puts("ppd_load_constraints: Bad cupsUIConstraints value!"); - continue; - } + if ((consts = calloc(1, sizeof(_ppd_cups_uiconsts_t))) == NULL) + { + DEBUG_puts("ppd_load_constraints: Unable to allocate memory for " + "UIConstraints!"); + return; + } - if ((consts = calloc(1, sizeof(_ppd_cups_uiconsts_t))) == NULL) - { - DEBUG_puts("ppd_load_constraints: Unable to allocate memory for " - "cupsUIConstraints!"); - return; - } + if ((constptr = calloc(2, sizeof(_ppd_cups_uiconst_t))) == NULL) + { + free(consts); + DEBUG_puts("ppd_load_constraints: Unable to allocate memory for " + "UIConstraints!"); + return; + } - if ((constptr = calloc(i, sizeof(_ppd_cups_uiconst_t))) == NULL) - { - free(consts); - DEBUG_puts("ppd_load_constraints: Unable to allocate memory for " - "cupsUIConstraints!"); - return; - } + /* + * Fill in the information... + */ - consts->num_constraints = i; - consts->constraints = constptr; + consts->num_constraints = 2; + consts->constraints = constptr; - strlcpy(consts->resolver, constattr->spec, sizeof(consts->resolver)); + if (!strncasecmp(oldconst->option1, "Custom", 6) && + !strcasecmp(oldconst->choice1, "True")) + { + constptr[0].option = ppdFindOption(ppd, oldconst->option1 + 6); + constptr[0].choice = ppdFindChoice(constptr[0].option, "Custom"); + constptr[0].installable = 0; + } + else + { + constptr[0].option = ppdFindOption(ppd, oldconst->option1); + constptr[0].choice = ppdFindChoice(constptr[0].option, + oldconst->choice1); + constptr[0].installable = ppd_is_installable(installable, + oldconst->option1); + } - for (i = 0, vptr = strchr(constattr->value, '*'); - vptr; - i ++, vptr = strchr(vptr, '*'), constptr ++) - { - /* - * Extract "*Option Choice" or just "*Option"... - */ + if (!constptr[0].option || (!constptr[0].choice && oldconst->choice1[0])) + { + DEBUG_printf(("ppd_load_constraints: Unknown option *%s %s!\n", + oldconst->option1, oldconst->choice1)); + free(consts->constraints); + free(consts); + continue; + } - for (vptr ++, ptr = option; *vptr && !isspace(*vptr & 255); vptr ++) - if (ptr < (option + sizeof(option) - 1)) - *ptr++ = *vptr; + if (!strncasecmp(oldconst->option2, "Custom", 6) && + !strcasecmp(oldconst->choice2, "True")) + { + constptr[1].option = ppdFindOption(ppd, oldconst->option2 + 6); + constptr[1].choice = ppdFindChoice(constptr[1].option, "Custom"); + constptr[1].installable = 0; + } + else + { + constptr[1].option = ppdFindOption(ppd, oldconst->option2); + constptr[1].choice = ppdFindChoice(constptr[1].option, + oldconst->choice2); + constptr[1].installable = ppd_is_installable(installable, + oldconst->option2); + } - *ptr = '\0'; + if (!constptr[1].option || (!constptr[1].choice && oldconst->choice2[0])) + { + DEBUG_printf(("ppd_load_constraints: Unknown option *%s %s!\n", + oldconst->option2, oldconst->choice2)); + free(consts->constraints); + free(consts); + continue; + } - while (isspace(*vptr & 255)) - vptr ++; + consts->installable = constptr[0].installable || constptr[1].installable; - if (*vptr == '*') - choice[0] = '\0'; - else - { - for (ptr = choice; *vptr && !isspace(*vptr & 255); vptr ++) - if (ptr < (choice + sizeof(choice) - 1)) - *ptr++ = *vptr; + /* + * Add it to the constraints array... + */ - *ptr = '\0'; - } + cupsArrayAdd(ppd->cups_uiconstraints, consts); + } - if (!strncasecmp(option, "Custom", 6) && !strcasecmp(choice, "True")) - { - _cups_strcpy(option, option + 6); - strcpy(choice, "Custom"); - } + /* + * Then load new-style constraints... + */ - constptr->option = ppdFindOption(ppd, option); - constptr->choice = ppdFindChoice(constptr->option, choice); - constptr->installable = ppd_is_installable(installable, option); - consts->installable |= constptr->installable; + for (constattr = ppdFindAttr(ppd, "cupsUIConstraints", NULL); + constattr; + constattr = ppdFindNextAttr(ppd, "cupsUIConstraints", NULL)) + { + if (!constattr->value) + { + DEBUG_puts("ppd_load_constraints: Bad cupsUIConstraints value!"); + continue; + } - if (!constptr->option || (!constptr->choice && choice[0])) - { - DEBUG_printf(("ppd_load_constraints: Unknown option *%s %s!\n", - option, choice)); - break; - } - } + for (i = 0, vptr = strchr(constattr->value, '*'); + vptr; + i ++, vptr = strchr(vptr + 1, '*')); - if (!vptr) - cupsArrayAdd(ppd->cups_uiconstraints, consts); - else - { - free(consts->constraints); - free(consts); - } + if (i == 0) + { + DEBUG_puts("ppd_load_constraints: Bad cupsUIConstraints value!"); + continue; } - } - else - { - /* - * Load old-style [Non]UIConstraints data... - */ - for (i = ppd->num_consts, oldconst = ppd->consts; i > 0; i --, oldconst ++) + if ((consts = calloc(1, sizeof(_ppd_cups_uiconsts_t))) == NULL) { - /* - * Weed out nearby duplicates, since the PPD spec requires that you - * define both "*Foo foo *Bar bar" and "*Bar bar *Foo foo"... - */ - - if (i > 1 && - !strcasecmp(oldconst[0].option1, oldconst[1].option2) && - !strcasecmp(oldconst[0].choice1, oldconst[1].choice2) && - !strcasecmp(oldconst[0].option2, oldconst[1].option1) && - !strcasecmp(oldconst[0].choice2, oldconst[1].choice1)) - continue; + DEBUG_puts("ppd_load_constraints: Unable to allocate memory for " + "cupsUIConstraints!"); + return; + } - /* - * Allocate memory... - */ + if ((constptr = calloc(i, sizeof(_ppd_cups_uiconst_t))) == NULL) + { + free(consts); + DEBUG_puts("ppd_load_constraints: Unable to allocate memory for " + "cupsUIConstraints!"); + return; + } - if ((consts = calloc(1, sizeof(_ppd_cups_uiconsts_t))) == NULL) - { - DEBUG_puts("ppd_load_constraints: Unable to allocate memory for " - "UIConstraints!"); - return; - } + consts->num_constraints = i; + consts->constraints = constptr; - if ((constptr = calloc(2, sizeof(_ppd_cups_uiconst_t))) == NULL) - { - free(consts); - DEBUG_puts("ppd_load_constraints: Unable to allocate memory for " - "UIConstraints!"); - return; - } + strlcpy(consts->resolver, constattr->spec, sizeof(consts->resolver)); + for (i = 0, vptr = strchr(constattr->value, '*'); + vptr; + i ++, vptr = strchr(vptr, '*'), constptr ++) + { /* - * Fill in the information... + * Extract "*Option Choice" or just "*Option"... */ - consts->num_constraints = 2; - consts->constraints = constptr; + for (vptr ++, ptr = option; *vptr && !isspace(*vptr & 255); vptr ++) + if (ptr < (option + sizeof(option) - 1)) + *ptr++ = *vptr; - if (!strncasecmp(oldconst->option1, "Custom", 6) && - !strcasecmp(oldconst->choice1, "True")) - { - constptr[0].option = ppdFindOption(ppd, oldconst->option1 + 6); - constptr[0].choice = ppdFindChoice(constptr[0].option, "Custom"); - constptr[0].installable = 0; - } - else - { - constptr[0].option = ppdFindOption(ppd, oldconst->option1); - constptr[0].choice = ppdFindChoice(constptr[0].option, - oldconst->choice1); - constptr[0].installable = ppd_is_installable(installable, - oldconst->option1); - } + *ptr = '\0'; - if (!constptr[0].option || (!constptr[0].choice && oldconst->choice1[0])) - { - DEBUG_printf(("ppd_load_constraints: Unknown option *%s %s!\n", - oldconst->option1, oldconst->choice1)); - free(consts->constraints); - free(consts); - continue; - } + while (isspace(*vptr & 255)) + vptr ++; - if (!strncasecmp(oldconst->option2, "Custom", 6) && - !strcasecmp(oldconst->choice2, "True")) - { - constptr[1].option = ppdFindOption(ppd, oldconst->option2 + 6); - constptr[1].choice = ppdFindChoice(constptr[1].option, "Custom"); - constptr[1].installable = 0; - } + if (*vptr == '*') + choice[0] = '\0'; else { - constptr[1].option = ppdFindOption(ppd, oldconst->option2); - constptr[1].choice = ppdFindChoice(constptr[1].option, - oldconst->choice2); - constptr[1].installable = ppd_is_installable(installable, - oldconst->option2); + for (ptr = choice; *vptr && !isspace(*vptr & 255); vptr ++) + if (ptr < (choice + sizeof(choice) - 1)) + *ptr++ = *vptr; + + *ptr = '\0'; } - if (!constptr[1].option || (!constptr[1].choice && oldconst->choice2[0])) + if (!strncasecmp(option, "Custom", 6) && !strcasecmp(choice, "True")) { - DEBUG_printf(("ppd_load_constraints: Unknown option *%s %s!\n", - oldconst->option2, oldconst->choice2)); - free(consts->constraints); - free(consts); - continue; + _cups_strcpy(option, option + 6); + strcpy(choice, "Custom"); } - consts->installable = constptr[0].installable || constptr[1].installable; + constptr->option = ppdFindOption(ppd, option); + constptr->choice = ppdFindChoice(constptr->option, choice); + constptr->installable = ppd_is_installable(installable, option); + consts->installable |= constptr->installable; - /* - * Add it to the constraints array... - */ + if (!constptr->option || (!constptr->choice && choice[0])) + { + DEBUG_printf(("ppd_load_constraints: Unknown option *%s %s!\n", + option, choice)); + break; + } + } + if (!vptr) cupsArrayAdd(ppd->cups_uiconstraints, consts); + else + { + free(consts->constraints); + free(consts); } } } diff --git a/data/utf-8 b/data/utf-8 index 6a1667a9d..044691b46 100644 --- a/data/utf-8 +++ b/data/utf-8 @@ -27,14 +27,14 @@ charset utf8 # Each font that is listed will be downloaded to the printer when used. # -0000 00FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-Bold-Oblique -0100 01FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-Bold-Oblique -0200 02FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-Bold-Oblique -0300 03FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-Bold-Oblique -0400 04FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-Bold-Oblique -1E00 1EFF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-Bold-Oblique -2000 20FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-Bold-Oblique -2300 23FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-Bold-Oblique -2400 24FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-Bold-Oblique -2500 25FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-Bold-Oblique -2600 26FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-Bold-Oblique +0000 00FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-BoldOblique +0100 01FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-BoldOblique +0200 02FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-BoldOblique +0300 03FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-BoldOblique +0400 04FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-BoldOblique +1E00 1EFF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-BoldOblique +2000 20FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-BoldOblique +2300 23FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-BoldOblique +2400 24FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-BoldOblique +2500 25FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-BoldOblique +2600 26FF ltor single Monospace Monospace-Bold Monospace-Oblique Monospace-BoldOblique diff --git a/doc/Makefile b/doc/Makefile index 92a397f93..016b1d201 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -54,13 +54,10 @@ HELPFILES = \ help/man-cupsaccept.html \ help/man-backend.html \ help/man-cancel.html \ - help/man-classes.conf.html \ - help/man-client.conf.html \ help/man-cups-config.html \ help/man-cups-lpd.html \ help/man-cups-polld.html \ help/man-cupsaddsmb.html \ - help/man-cupsd.conf.html \ help/man-cupsd.html \ help/man-cupsenable.html \ help/man-cupstestdsc.html \ @@ -80,11 +77,17 @@ HELPFILES = \ help/man-lpstat.html \ help/man-mime.convs.html \ help/man-mime.types.html \ - help/man-printers.conf.html \ + help/man-ppdc.html \ + help/man-ppdhtml.html \ + help/man-ppdi.html \ + help/man-ppdmerge.html \ + help/man-ppdpo.html \ help/network.html \ help/options.html \ help/overview.html \ help/policies.html \ + help/postscript-driver.html \ + help/ppd-compiler.html \ help/ref-access_log.html \ help/ref-classes-conf.html \ help/ref-client-conf.html \ diff --git a/doc/cups-printable.css b/doc/cups-printable.css index 5256cae38..e4ad1fbff 100644 --- a/doc/cups-printable.css +++ b/doc/cups-printable.css @@ -19,6 +19,11 @@ PRE.command { margin-left: 36pt; } +P.example { + font-style: italic; + margin-left: 36pt; +} + PRE.example { background: #eeeeee; border: dotted thin #999999; @@ -46,6 +51,16 @@ BLOCKQUOTE { padding: 10pt; } +A IMG { + border: none; +} + +A:link:hover IMG { + background: #f0f0f0; + border-radius: 10px; + -moz-border-radius: 10px; +} + A:link, A:visited { font-weight: normal; text-decoration: none; @@ -59,6 +74,19 @@ SUB, SUP { font-size: 50%; } +TR.data, TD.data, TR.data TD { + margin-top: 10pt; + padding: 5pt; + border-bottom: solid 1pt #999999; +} + +TR.data TH { + border-bottom: solid 1pt #999999; + padding-top: 10pt; + padding-left: 5pt; + text-align: left; +} + DIV.table TABLE { border: solid thin #999999; border-collapse: collapse; @@ -102,19 +130,23 @@ DIV.figure CAPTION { } TH.label { - padding-top: 5pt; text-align: right; vertical-align: top; } +TH.sublabel { + text-align: right; + font-weight: normal; +} + HR { border: solid thin; } SPAN.info { - background: #000000; - border: thin solid #000000; - color: #ffffff; + background: black; + border: thin solid black; + color: white; font-size: 80%; font-style: italic; font-weight: bold; @@ -130,6 +162,57 @@ H2.title, H3.title { border-bottom: solid 2pt #000000; } +DIV.indent, TABLE.indent { + margin-top: 2em; + margin-left: auto; + margin-right: auto; + width: 90%; +} + +TABLE.indent { + border-collapse: collapse; +} + +TABLE.indent TD, TABLE.indent TH { + padding: 0; +} + +TABLE.list { + border-collapse: collapse; + margin-left: auto; + margin-right: auto; + width: 90%; +} + +TABLE.list TH { + background: white; + border-bottom: solid thin #cccccc; + color: #444444; + padding-top: 10pt; + padding-left: 5pt; + text-align: left; + vertical-align: bottom; + white-space: nowrap; +} + +TABLE.list TH A { + color: #4444cc; +} + +TABLE.list TD { + border-bottom: solid thin #eeeeee; + padding-top: 5pt; + padding-left: 5pt; +} + +TABLE.list TR:nth-child(even) { + background: #f8f8f8; +} + +TABLE.list TR:nth-child(odd) { + background: #f4f4f4; +} + DT { margin-left: 36pt; margin-top: 12pt; @@ -148,11 +231,6 @@ P.summary { font-family: monaco, courier, monospace; } -SPAN.message { - font-style: italic; - font-size: smaller; -} - DIV.summary TABLE { border: solid thin #999999; border-collapse: collapse; diff --git a/doc/cups.css b/doc/cups.css index 44f8f7c65..a12db9ca8 100644 --- a/doc/cups.css +++ b/doc/cups.css @@ -23,6 +23,11 @@ PRE.command { margin-left: 36pt; } +P.example { + font-style: italic; + margin-left: 36pt; +} + PRE.example { background: white; border: dotted thin #999999; @@ -322,11 +327,9 @@ DIV.sidebar P.l2 { TABLE.inset { background: #f0f0f0; border: thin solid #e0e0e0; - margin-left: auto; - margin-right: auto; margin-top: 1em; padding: 0; - width: 90%; + width: 100%; /* These are not implemented by all browsers, but that's OK */ border-radius: 5px; -moz-border-radius: 5px; diff --git a/doc/help/postscript-driver.html b/doc/help/postscript-driver.html new file mode 100644 index 000000000..89f2df99b --- /dev/null +++ b/doc/help/postscript-driver.html @@ -0,0 +1,255 @@ + + + + Developing PostScript Printer Drivers + + + +

This document describes how to develop printer drivers for PostScript printers. Topics include: printer driver basics, creating new PPD files, importing existing PPD files, using custom filters, implementing color management, adding Mac OS X features, and deploying your driver.

+ +
+ + + + + + +
See AlsoProgramming: Developing Raster Printer Drivers
+ Programming: Filter and Backend Programming
+ Programming: Introduction to the PPD Compiler
+ Programming: Raster API
+ References: PPD Compiler Driver Information File Reference
+ Specifications: CUPS PPD Extensions
+ + +

Printer Driver Basics

+ +

A CUPS PostScript printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, zero or more filter programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.

+ +

Every time a user prints something the scheduler program, cupsd(8), determines the format of the print job and the programs required to convert that job into something the printer understands. CUPS includes filter programs for many common formats, for example to convert Portable Document Format (PDF) files into device-independent PostScript, and then from device-independent PostScript to device-dependent PostScript. Figure 1 shows the data flow of a typical print job.

+ +
+ + +
Figure 1: PostScript Filter Chain
PostScript Filter Chain
+ +

The optional PostScript filter can be provided to add printer-specific commands to the PostScript output that cannot be represented in the PPD file or to reorganize the output for special printer features. Typically this is used to support advanced job management or finishing functions on the printer. CUPS includes a generic PostScript filter that handles all PPD-defined commands.

+ +

The optional port monitor handles interface-specific protocol or encoding issues. For example, many PostScript printers support the Binary Communications Protocol (BCP) and Tagged Binary Communications Protocol (TBCP) to allow applications to print 8-bit ("binary") PostScript jobs. CUPS includes port monitors for BCP and TBCP, and you can supply your own port monitors as needed.

+ +

The backend handles communications with the printer, sending print data from the last filter to the printer and relaying back-channel data from the printer to the upstream filters. CUPS includes backend programs for common direct-connect interfaces and network protocols, and you can provide your own backend to support custom interfaces and protocols.

+ +

The scheduler also supports a special "command" file format for sending maintenance commands and status queries to a printer or printer driver. Command print jobs typically use a single command filter program defined in the PPD file to generate the appropriate printer commands and handle any responses from the printer. Figure 2 shows the data flow of a typical command job.

+ +
+ + +
Figure 2: Command Filter Chain
Command Filter Chain
+ +

PostScript printer drivers typically do not require their own command filter since CUPS includes a generic PostScript command filter that supports all of the standard functions using PPD-defined commands.

+ + +

Creating New PPD Files

+ +

We recommend using the CUPS PPD compiler, ppdc(1), to create new PPD files since it manages many of the tedious (and error-prone!) details of paper sizes and localization for you. It also allows you to easily support multiple devices from a single source file. For more information see the "Introduction to the PPD Compiler" document. Listing 1 shows a driver information file for a black-and-white PostScript printer.

+ +

Listing 1: "examples/postscript.drv"

+ +
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// Specify this is a PostScript printer driver
+DriverType ps
+
+// List the fonts that are supported, in this case all standard fonts
+Font *
+
+// Manufacturer, model name, and version
+Manufacturer "Foo"
+ModelName "Foo LaserProofer 2000"
+Version 1.0
+
+// PostScript printer attributes
+Attribute DefaultColorSpace "" Gray
+Attribute LandscapeOrientation "" Minus90
+Attribute LanguageLevel "" "3"
+Attribute Product "" "(Foo LaserProofer 2000)"
+Attribute PSVersion "" "(3010) 0"
+Attribute TTRasterizer "" Type42
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize Legal
+MediaSize A4
+
+// Query command for page size
+Attribute "?PageSize" "" "
+      save
+      currentpagedevice /PageSize get aload pop
+      2 copy gt {exch} if (Unknown)
+      23 dict
+              dup [612 792] (Letter) put
+              dup [612 1008] (Legal) put
+              dup [595 842] (A4) put
+              {exch aload pop 4 index sub abs 5 le exch 
+               5 index sub abs 5 le and
+              {exch pop exit} {pop} ifelse
+      } bind forall = flush pop pop
+      restore"
+
+// Specify the name of the PPD file we want to generate
+PCFileName "fooproof.ppd"
+
+ +

Required Attributes

+ +

PostScript drivers require the attributes listed in Table 1. If not specified, the defaults for CUPS drivers are used. A typical PostScript driver information file would include the following attributes:

+ +
+Attribute DefaultColorSpace "" Gray
+Attribute LandscapeOrientation "" Minus90
+Attribute LanguageLevel "" "3"
+Attribute Product "" "(Foo LaserProofer 2000)"
+Attribute PSVersion "" "(3010) 0"
+Attribute TTRasterizer "" Type42
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1: Required PostScript Printer Driver Attributes
AttributeDescription
DefaultColorSpaceThe default colorspace: + Gray, RGB, CMY, or + CMYK. If not specified, then RGB is + assumed.
LandscapeOrientationThe preferred landscape + orientation: Plus90, Minus90, or + Any. If not specified, Plus90 is + assumed.
LanguageLevelThe PostScript language + level supported by the device: 1, 2, or 3. If not + specified, 2 is assumed.
ProductThe string returned by + the PostScript product operator, which + must include parenthesis to conform with + PostScript syntax rules for strings. Multiple + Product attributes may be specified to support + multiple products with the same PPD file. If not + specified, "(ESP Ghostscript)" and "(GNU Ghostscript)" + are assumed.
PSVersionThe PostScript + interpreter version numbers as returned by the + version and revision operators. The + required format is "(version) revision". Multiple + PSVersion attributes may be specified to + support multiple interpreter version numbers. If not + specified, "(3010) 705" and "(3010) 707" are + assumed.
TTRasterizerThe type of TrueType + font rasterizer supported by the device, if any. The + supported values are None, Accept68k, + Type42, and TrueImage. If not + specified, None is assumed.
+ +

Query Commands

+ +

Most PostScript printer PPD files include query commands (?PageSize, etc.) that allow applications to query the printer for its current settings and configuration. Query commands are included in driver information files as attributes. For example, the example in Listing 1 uses the following definition for the PageSize query command:

+ +
+Attribute "?PageSize" "" "
+      save
+      currentpagedevice /PageSize get aload pop
+      2 copy gt {exch} if (Unknown)
+      23 dict
+              dup [612 792] (Letter) put
+              dup [612 1008] (Legal) put
+              dup [595 842] (A4) put
+              {exch aload pop 4 index sub abs 5 le exch 
+               5 index sub abs 5 le and
+              {exch pop exit} {pop} ifelse
+      } bind forall = flush pop pop
+      restore"
+
+ +

Query commands can span multiple lines, however no single line may contain more than 255 characters.

+ +

Importing Existing PPD Files

+ +

CUPS includes a utility called ppdi(1) +which allows you to import existing PPD files into the driver information file +format used by the PPD compiler ppdc(1). Once +imported, you can modify, localize, and regenerate the PPD files easily. Type +the following command to import the PPD file mydevice.ppd into the +driver information file mydevice.drv:

+ +
+ppdi -o mydevice.drv mydevice.ppd
+
+ +

If you have a whole directory of PPD files that you would like to import, +you can list multiple filenames or use shell wildcards to import more than one +PPD file on the command-line:

+ +
+ppdi -o mydevice.drv mydevice1.ppd mydevice2.ppd
+ppdi -o mydevice.drv *.ppd
+
+ +

If the driver information file already exists, the new PPD +file entries are appended to the end of the file. Each PPD file +is placed in its own group of curly braces within the driver +information file.

+ + +

Using Custom Filters

+ +

Normally a PostScript printer driver will not utilize any additional print filters. For drivers that provide additional filters such as a CUPS command file filter for doing printer maintenance, you must also list the following Filter directive to handle printing PostScript files:

+ +
+Filter application/vnd.cups-postscript 0 -
+
+ + +

Implementing Color Management

+ +

Talk about ICC color profiles and sRGB as two best options.

+ + +

Adding Mac OS X Features

+ +

Talk about help books, icons, and PDEs.

+ + +

Deploying Your Driver

+ +

Talk about install locations, etc.

+ + + + diff --git a/doc/help/ppd-compiler.html b/doc/help/ppd-compiler.html new file mode 100644 index 000000000..aa52b8821 --- /dev/null +++ b/doc/help/ppd-compiler.html @@ -0,0 +1,839 @@ + + + + Introduction to the PPD Compiler + + + +

This document describes how to use the CUPS PostScript Printer Description +(PPD) file compiler. The PPD compiler generates PPD files from simple text files +that describe the features and capabilities of one or more printers.

+ +
+ + + + + + +
See AlsoProgramming: Developing Raster Printer Drivers
+ Programming: Developing PostScript Printer Drivers
+ Programming: Filter and Backend Programming
+ Programming: Raster API
+ References: PPD Compiler Driver Information File Reference
+ Specifications: CUPS PPD Extensions
+ + +

The Basics

+ +

The PPD compiler, ppdc(1), is a +simple command-line tool that takes a single driver information file, +which by convention uses the extension .drv, and produces one or more +PPD files that may be distributed with your printer drivers for use with CUPS. +For example, you would run the following command to create the English language +PPD files defined by the driver information file mydrivers.drv:

+ +
+ppdc mydrivers.drv
+
+ +

The PPD files are placed in a subdirectory called +ppd. The -d option is used to put the PPD +files in a different location, for example:

+ +
+ppdc -d myppds mydrivers.drv
+
+ +

places the PPD files in a subdirectory named +myppds. Finally, use the -l option to +specify the language localization for the PPD files that are +created, for example:

+ +
+ppdc -d myppds/de -l de mydrivers.drv
+ppdc -d myppds/en -l en mydrivers.drv
+ppdc -d myppds/es -l es mydrivers.drv
+ppdc -d myppds/fr -l fr mydrivers.drv
+ppdc -d myppds/it -l it mydrivers.drv
+
+ +

creates PPD files in German (de), English (en), Spanish (es), +French (fr), and Italian (it) in the corresponding +subdirectories. Specify multiple languages (separated by commas) to produce +"globalized" PPD files:

+ +
+ppdc -d myppds -l de,en,es,fr,it mydrivers.drv
+
+ + +

Driver Information Files

+ +

The driver information files accepted by the PPD compiler are +plain text files that define the various attributes and options +that are included in the PPD files that are generated. A driver +information file can define the information for one or more printers and +their corresponding PPD files.

+ +

Listing 1: "examples/minimum.drv"

+ +
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// List the fonts that are supported, in this case all standard fonts...
+Font *
+
+// Manufacturer, model name, and version
+Manufacturer "Foo"
+ModelName "FooJet 2000"
+Version 1.0
+
+// Each filter provided by the driver...
+Filter application/vnd.cups-raster 100 rastertofoo
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize A4
+
+// Supported resolutions
+*Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+// Specify the name of the PPD file we want to generate...
+PCFileName "foojet2k.ppd"
+
+ + +

A Simple Example

+ +

The example in Listing 1 shows a driver information +file which defines the minimum required attributes to provide a valid PPD file. +The first part of the file includes standard definition files for fonts and +media sizes:

+ +
+#include <font.defs>
+#include <media.defs>
+
+ +

The #include directive works just like the C/C++ include directive; +files included using the angle brackets (<filename>) are found +in any of the standard include directories and files included using quotes +("filename") are found in the same directory as the source or include +file. The <font.defs> include file defines the standard fonts +which are included with GPL Ghostscript and the Apple PDF RIP, while the +<media.defs> include file defines the standard media sizes +listed in Appendix B of the Adobe PostScript Printer Description File Format +Specification.

+ +

CUPS provides several other standard include files:

+ + + +

Next we list all of the fonts that are available in the driver; for CUPS +raster drivers, the following line is all that is usually supplied:

+ +
+Font *
+
+ +

The Font directive specifies the name of a single font or the +asterisk to specify all fonts. For example, you would use the following line to +define an additional bar code font that you are supplying with your printer +driver:

+ +
+//   name         encoding  version  charset  status
+Font Barcode-Foo  Special   "(1.0)"  Special  ROM
+
+ +

The name of the font is Barcode-Foo. Since it is not a standard +text font, the encoding and charset name Special is used. The version +number is 1.0 and the status (where the font is located) is +ROM to indicate that the font does not need to be embedded in +documents that use the font for this printer.

+ +

Third comes the manufacturer, model name, and version number information +strings:

+ +
+Manufacturer "Foo"
+ModelName "FooJet 2000"
+Version 1.0
+
+ +

These strings are used when the user (or auto-configuration program) selects +the printer driver for a newly connected device.

+ +

The list of filters comes after the information strings; for the example in +Listing 1, we have a single filter that takes CUPS +raster data:

+ +
+Filter application/vnd.cups-raster 100 rastertofoo
+
+ +

Each filter specified in the driver information file is the equivalent of a +printer driver for that format; if a user submits a print job in a different +format, CUPS figures out the sequence of commands that will produce a supported +format for the least relative cost.

+ +

Once we have defined the driver information we specify the supported options. +For the example driver we support a single resolution of 600 dots per inch and +two media sizes, A4 and Letter:

+ +
+*MediaSize Letter
+MediaSize A4
+
+*Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+ +

The asterisk in front of the MediaSize and Resolution +directives specify that those option choices are the default. The +MediaSize directive is followed by a media size name which is normally +defined in the <media.defs> file and corresponds to a standard +Adobe media size name. If the default media size is Letter, the PPD +compiler will override it to be A4 for non-English localizations for +you automatically.

+ +

The Resolution directive accepts several values after it as +follows:

+ +
    + +
  1. Colorspace for this resolution, if any. In the example file, the + colorspace k is used which corresponds to black. For printer + drivers that support color printing, this field is usually specified as + "-" for "no change".
  2. + +
  3. Bits per color. In the example file, we define 8 bits per color, for + a continuous-tone grayscale output. All versions of CUPS support 1 and + 8 bits per color. CUPS 1.2 and higher (Mac OS X 10.5 and higher) also + supports 16 bits per color.
  4. + +
  5. Rows per band. In the example file, we define 0 rows per band to + indicate that our printer driver does not process the page in + bands.
  6. + +
  7. Row feed. In the example, we define the feed value to be 0 to + indicate that our printer driver does not interleave the output.
  8. + +
  9. Row step. In the example, we define the step value to be 0 to + indicate that our printer driver does not interleave the output. This + value normally indicates the spacing between the nozzles of an inkjet + printer - when combined with the previous two values, it informs the + driver how to stagger the output on the page to produce interleaved + lines on the page for higher-resolution output.
  10. + +
  11. Choice name and text. In the example, we define the choice name and + text to be "600dpi/600 DPI". The name and text are separated by + slash (/) character; if no text is specified, then the name is + used as the text. The PPD compiler parses the name to determine the + actual resolution; the name can be of the form + RESOLUTIONdpi for resolutions that are equal + horizontally and vertically or HRESxVRESdpi for + isometric resolutions. Only integer resolution values are supported, so + a resolution name of 300dpi is valid while 300.1dpi is + not.
  12. + +
+ +

Finally, the PCFileName directive specifies that the named PPD file +should be written for the current driver definitions:

+ +
+PCFileName "foojet2k.ppd"
+
+ +

The filename follows the directive and must conform to the Adobe +filename requirements in the Adobe Postscript Printer Description File Format +Specification. Specifically, the filename may not exceed 8 characters followed +by the extension .ppd. The FileName directive can be used to +specify longer filenames:

+ +
+FileName "FooJet 2000"
+
+ + +

Grouping and Inheritance

+ +

The previous example created a single PPD file. Driver information files can +also define multiple printers by using the PPD compiler grouping functionality. +Directives are grouped using the curly braces ({ and }) and +every group that uses the PCFileName or FileName directives +produces a PPD file with that name. Listing 2 shows a +variation of the original example that uses two groups to define two printers +that share the same printer driver filter but provide two different resolution +options.

+ +

Listing 2: "examples/grouping.drv"

+ +
+
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// List the fonts that are supported, in this case all standard fonts...
+Font *
+
+// Manufacturer and version
+Manufacturer "Foo"
+Version 1.0
+
+// Each filter provided by the driver...
+Filter application/vnd.cups-raster 100 rastertofoo
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize A4
+
+{
+  // Supported resolutions
+  *Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+  // Specify the model name and filename...
+  ModelName "FooJet 2000"
+  PCFileName "foojet2k.ppd"
+}
+
+{
+  // Supported resolutions
+  *Resolution k 8 0 0 0 "1200dpi/1200 DPI"
+
+  // Specify the model name and filename...
+  ModelName "FooJet 2001"
+  PCFileName "foojt2k1.ppd"
+}
+
+ +

The second example is essentially the same as the first, except that each +printer model is defined inside of a pair of curly braces. For example, the +first printer is defined using:

+ +
+{
+  // Supported resolutions
+  *Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+  // Specify the model name and filename...
+  ModelName "FooJet 2000"
+  PCFileName "foojet2k.ppd"
+}
+
+ +

The printer inherits all of the definitions from the parent group (the +top part of the file) and adds the additional definitions inside the curly +braces for that printer driver. When we define the second group, it also +inherits the same definitions from the parent group but none of the +definitions from the first driver. Groups can be nested to any number of levels +to support variations of similar models without duplication of information.

+ + +

Color Support

+ +

For printer drivers that support color printing, the +ColorDevice and ColorModel directives should be +used to tell the printing system that color output is desired +and in what formats. Listing 3 shows a +variation of the previous example which includes a color printer +that supports printing at 300 and 600 DPI.

+ +

The key changes are the addition of the ColorDevice +directive:

+ +
+ColorDevice true
+
+ +

which tells the printing system that the printer supports +color printing, and the ColorModel directives:

+ +
+ColorModel Gray/Grayscale w chunky 0
+*ColorModel RGB/Color rgb chunky 0
+
+ +

which tell the printing system which colorspaces are supported by the printer +driver for color printing. Each of the ColorModel directives is +followed by the option name and text (Gray/Grayscale and +RGB/Color), the colorspace name (w and rgb), the +color organization (chunky), and the compression mode number +(0) to be passed to the driver. The option name can be any of the +standard Adobe ColorModel names:

+ + + +

Custom names can be used, however it is recommended that you use your vendor +prefix for any custom names, for example "fooName".

+ +

The colorspace name can be any of the following universally supported +colorspaces:

+ + + +

The color organization can be any of the following values:

+ + + +

The compression mode value is passed to the driver in the +cupsCompression attribute. It is traditionally used to select an +appropriate compression mode for the color model but can be used for any +purpose, such as specifying a photo mode vs. standard mode.

+ +

Listing 3: "examples/color.drv"

+ +
+
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// List the fonts that are supported, in this case all standard fonts...
+Font *
+
+// Manufacturer and version
+Manufacturer "Foo"
+Version 1.0
+
+// Each filter provided by the driver...
+Filter application/vnd.cups-raster 100 rastertofoo
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize A4
+
+{
+  // Supported resolutions
+  *Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+  // Specify the model name and filename...
+  ModelName "FooJet 2000"
+  PCFileName "foojet2k.ppd"
+}
+
+{
+  // Supports color printing
+  ColorDevice true
+
+  // Supported colorspaces
+  ColorModel Gray/Grayscale w chunky 0
+  *ColorModel RGB/Color rgb chunky 0
+
+  // Supported resolutions
+  *Resolution - 8 0 0 0 "300dpi/300 DPI"
+  Resolution - 8 0 0 0 "600dpi/600 DPI"
+
+  // Specify the model name and filename...
+  ModelName "FooJet Color"
+  PCFileName "foojetco.ppd"
+}
+
+ + +

Defining Custom Options and Option Groups

+ +

The Group, Option, and Choice +directives are used to define or select a group, option, or +choice. Listing 4 shows a variation of +the first example that provides two custom options in a group +named "Footasm".

+ +

Listing 4: "examples/custom.drv"

+ +
+
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// List the fonts that are supported, in this case all standard fonts...
+Font *
+
+// Manufacturer, model name, and version
+Manufacturer "Foo"
+ModelName "FooJet 2000"
+Version 1.0
+
+// Each filter provided by the driver...
+Filter application/vnd.cups-raster 100 rastertofoo
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize A4
+
+// Supported resolutions
+*Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+// Option Group
+Group "Footasm"
+
+  // Boolean option
+  Option "fooEnhance/Resolution Enhancement" Boolean AnySetup 10
+    *Choice True/Yes "<</cupsCompression 1>>setpagedevice"
+    Choice False/No "<</cupsCompression 0>>setpagedevice"
+
+  // Multiple choice option
+  Option "fooOutputType/Output Quality" PickOne AnySetup 10
+    *Choice "Auto/Automatic Selection"
+            "<</OutputType(Auto)>>setpagedevice""
+    Choice "Text/Optimize for Text"
+            "<</OutputType(Text)>>setpagedevice""
+    Choice "Graph/Optimize for Graphics"
+            "<</OutputType(Graph)>>setpagedevice""
+    Choice "Photo/Optimize for Photos"
+            "<</OutputType(Photo)>>setpagedevice""
+
+// Specify the name of the PPD file we want to generate...
+PCFileName "foojet2k.ppd"
+
+ +

The custom group is introduced by the Group +directive which is followed by the name and optionally text for +the user:

+ +
+Group "Footasm/Footastic Options"
+
+ +

The group name must conform to the PPD specification and +cannot exceed 40 characters in length. If you specify user text, +it cannot exceed 80 characters in length. The groups +General, Extra, and +InstallableOptions are predefined by CUPS; the general +and extra groups are filled by the UI options defined by the PPD +specification. The InstallableOptions group is reserved +for options that define whether accessories for the printer +(duplexer unit, finisher, stapler, etc.) are installed.

+ +

Once the group is specified, the Option directive is +used to introduce a new option:

+ +
+Option "fooEnhance/Resolution Enhancement" Boolean AnySetup 10
+
+ +

The directive is followed by the name of the option and any +optional user text, the option type, the PostScript document group, and +the sort order number. The option name must conform to the PPD specification +and cannot exceed 40 characters in length. If you specify user text, it +cannot exceed 80 characters in length.

+ +

The option type can be Boolean for true/false +selections, PickOne for picking one of many choices, or +PickMany for picking zero or more choices. Boolean +options can have at most two choices with the names +False and True. Pick options can have any +number of choices, although for Windows compatibility reasons +the number of choices should not exceed 255.

+ +

The PostScript document group is typically AnySetup, +meaning that the option can be introduced at any point in the +PostScript document. Other values include PageSetup to +include the option before each page and DocumentSetup +to include the option once at the beginning of the document.

+ +

The sort order number is used to sort the printer commands +associated with each option choice within the PostScript +document. This allows you to setup certain options before others +as required by the printer. For most CUPS raster printer +drivers, the value 10 can be used for all options.

+ +

Once the option is specified, each option choice can be +listed using the Choice directive:

+ +
+*Choice True/Yes "<</cupsCompression 1>>setpagedevice"
+Choice False/No "<</cupsCompression 0>>setpagedevice"
+
+ +

The directive is followed by the choice name and optionally +user text, and the PostScript commands that should be inserted +when printing a file to this printer. The option name must +conform to the PPD specification and cannot exceed 40 characters +in length. If you specify user text, it cannot exceed 80 +characters in length.

+ +

The PostScript commands are also interpreted by any RIP +filters, so these commands typically must be present for all +option choices. Most commands take the form:

+ +
+<</name value>>setpagedevice
+
+ +

where name is the name of the PostScript page device +attribute and value is the numeric or string value for +that attribute.

+ + +

Defining Constants

+ +

Sometimes you will want to define constants for your drivers +so that you can share values in different groups within the same +driver information file, or to share values between different +driver information files using the #include directive. +The #define directive is used to define constants for +use in your printer definitions:

+ +
+#define NAME value
+
+ +

The NAME is any sequence of letters, numbers, and +the underscore. The value is a number or string; if the +value contains spaces you must put double quotes around it, for +example:

+ +
+#define FOO "My String Value"
+
+ +

Constants can also be defined on the command-line using the -D +option:

+ +
+ppdc -DNAME="value" filename.drv
+
+ +

Once defined, you use the notation $NAME to substitute the value of +the constant in the file, for example:

+ +
+#define MANUFACTURER "Foo"
+#define FOO_600      0
+#define FOO_1200     1
+
+{
+  Manufacturer "$MANUFACTURER"
+  ModelNumber $FOO_600
+  ModelName "FooJet 2000"
+  ...
+}
+
+{
+  Manufacturer "$MANUFACTURER"
+  ModelNumber $FOO_1200
+  ModelName "FooJet 2001"
+  ...
+}
+
+ +

Numeric constants can be bitwise OR'd together by placing the constants +inside parenthesis, for example:

+ +
+// ModelNumber capability bits
+#define DUPLEX 1
+#define COLOR  2
+
+...
+
+{
+  // Define a model number specifying the capabilities of the printer...
+  ModelNumber ($DUPLEX $COLOR)
+  ...
+}
+
+ + +

Conditional Statements

+ +

The PPD compiler supports conditional compilation using the #if, +#elif, #else, and #endif directives. The #if +and #elif directives are followed by a constant name or an expression. +For example, to include a group of options when "ADVANCED" is defined:

+ +
+#if ADVANCED
+Group "Advanced/Advanced Options"
+  Option "fooCyanAdjust/Cyan Adjustment"
+    Choice "plus10/+10%" ""
+    Choice "plus5/+5%" ""
+    *Choice "none/No Adjustment" ""
+    Choice "minus5/-5%" ""
+    Choice "minus10/-10%" ""
+  Option "fooMagentaAdjust/Magenta Adjustment"
+    Choice "plus10/+10%" ""
+    Choice "plus5/+5%" ""
+    *Choice "none/No Adjustment" ""
+    Choice "minus5/-5%" ""
+    Choice "minus10/-10%" ""
+  Option "fooYellowAdjust/Yellow Adjustment"
+    Choice "plus10/+10%" ""
+    Choice "plus5/+5%" ""
+    *Choice "none/No Adjustment" ""
+    Choice "minus5/-5%" ""
+    Choice "minus10/-10%" ""
+  Option "fooBlackAdjust/Black Adjustment"
+    Choice "plus10/+10%" ""
+    Choice "plus5/+5%" ""
+    *Choice "none/No Adjustment" ""
+    Choice "minus5/-5%" ""
+    Choice "minus10/-10%" ""
+#endif
+
+ + +

Defining Constraints

+ +

Constraints are strings that are used to specify that one or more option +choices are incompatible, for example two-sided printing on transparency media. +Constraints are also used to prevent the use of uninstalled features such as the +duplexer unit, additional media trays, and so forth.

+ +

The UIConstraints directive is used to specify a constraint that is +placed in the PPD file. The directive is followed by a string using one of the +following formats:

+ +
+UIConstraints "*Option1 *Option2"
+UIConstraints "*Option1 Choice1 *Option2"
+UIConstraints "*Option1 *Option2 Choice2"
+UIConstraints "*Option1 Choice1 *Option2 Choice2"
+
+ +

Each option name is preceded by the asterisk (*). If no choice is +given for an option, then all choices except False and +None will conflict with the other option and choice(s). Since the PPD +compiler automatically adds reciprocal constraints (option A conflicts with +option B, so therefore option B conflicts with option A), you need only specify +the constraint once.

+ +

Listing 5: "examples/constraint.drv"

+ +
+
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// List the fonts that are supported, in this case all standard fonts...
+Font *
+
+// Manufacturer, model name, and version
+Manufacturer "Foo"
+ModelName "FooJet 2000"
+Version 1.0
+
+// Each filter provided by the driver...
+Filter application/vnd.cups-raster 100 rastertofoo
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize A4
+
+// Supported resolutions
+*Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+// Installable Option Group
+Group "InstallableOptions/Options Installed"
+
+  // Duplexing unit option
+  Option "OptionDuplexer/Duplexing Unit" Boolean AnySetup 10
+    Choice True/Installed ""
+    *Choice "False/Not Installed" ""
+
+// General Option Group
+Group General
+
+  // Duplexing option
+  Option "Duplex/Two-Sided Printing" PickOne AnySetup 10
+    *Choice "None/No" "<</Duplex false>>setpagedevice""
+    Choice "DuplexNoTumble/Long Edge Binding"
+           "<</Duplex true/Tumble false>>setpagedevice""
+    Choice "DuplexTumble/Short Edge Binding"
+           "<</Duplex true/Tumble true>>setpagedevice""
+
+// Only allow duplexing if the duplexer is installed
+UIConstraints "*Duplex *OptionDuplexer False"
+
+// Specify the name of the PPD file we want to generate...
+PCFileName "foojet2k.ppd"
+
+ +

Listing 5 shows a variation of the first example with +an added Duplex option and installable option for the duplexer, +OptionDuplex. A constraint is added at the end to specify that any +choice of the Duplex option that is not None is incompatible +with the "Duplexer Installed" option set to "Not Installed" +(False):

+ +
+UIConstraints "*Duplex *OptionDuplexer False"
+
+ +

Enhanced Constraints

+ +

CUPS 1.4 supports constraints between 2 or more options using the +Attribute directive. cupsUIConstraints attributes define +the constraints, while cupsUIResolver attributes define option changes +to resolve constraints. For example, we can specify the previous duplex +constraint with a resolver that turns off duplexing with the following two +lines:

+ +
+Attribute cupsUIConstraints DuplexOff "*Duplex *OptionDuplexer False"
+Attribute cupsUIResolver DuplexOff "*Duplex None"
+
+ + + diff --git a/doc/help/ref-ppdcfile.html b/doc/help/ref-ppdcfile.html index 86619e3ef..4549586b6 100644 --- a/doc/help/ref-ppdcfile.html +++ b/doc/help/ref-ppdcfile.html @@ -2404,7 +2404,7 @@ supported keywords for each type.


* = This color order is not supported by the current Apple RIP filters and should not be used when developing printer drivers for - MacOS X 10.2 or 10.3. + Mac OS X. diff --git a/doc/images/cups-command-chain.png b/doc/images/cups-command-chain.png new file mode 100644 index 0000000000000000000000000000000000000000..a7218e5ce45e57783db68fb655cdd0de11d91749 GIT binary patch literal 14902 zc-p<2WmuHq+vY(Ol(cD35fGI|IurzC=m7;m3F+=G5dkFy29ZXAK?E7PQ>2u1={C z&&9=s!_3;k!9d^Eh{ML-Bz{$t1`qERp4`(X>aGbZBOadZJ4dw}eI9dL#zY1V#sS=| zX2eqM4&uevB|jkfHlAN)yODV>^AoYeSI@-iNQar+d))T?sQOm@0*~e6gA+TOk`Ypo z;h`!g-Hs-M@TS%JxvjF*P>;S7Z{4+}pL~i^7jM76{0pfWD}o0 zL3btK+xy&mk;nhpBK}uEk{O1R)&X%>4rx}=;80E;9!#W_V&`!(((EE zXZH3yA3uJ)%gp>0yYNgwq5JC9tE<18nlgsVogOfYi;J_vQ|R{X+pC8=OBz#CQys6% z9nJc7mim19_*QHjYP{hh&y?U|2~14pKBc6j52Y1Is)y^av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&xzc103py}P?xmUGCHf#lsZFz4A+<4Z_LxTldrC*rc2 z2BL#o+&^07vDGfJwhpSJmWgEkmYTY;yW76UsH)0mX=(W(DCo~l-fgJ>E@0Nm%1Yc4 zAn-uLoyFso>h*quaBj%j=gyt`u3f?bISIEmukv6vp3k!X(?EfV#ClXJZe^pSm8Di( zOSAImg$oy`tpxB7yW*C6bex@?`OLeU*ZV!zs+xSxj&xjPwt$PNweVS~X!K>qp_#=G2P7}ve!78>m#?s1 zr9uQxPfvTEWp9dYrkZI5AkA$tI#uW*Gc5W9RLz3u!iBQwJ<*00aFJ}7OE=IT)~na9 zv97@RcROm_l)R|_62N08rp(|T84oXS8FZ?ncld+mLdrOFIst|)-5B?2fR>b$lxi67 zCmo_&3Ns$@l(A80Gn|aT|31Kd&WfF%-&w}daogLW3HMP2(bk4wN&yXwj#zJfeSP0> z9?I|xSmoJ?$6b)7sV~J7yZxr@$*R@t7X?9QM*a- z@ooG0)Dtg#`-DO{&b7w!UNdfsi;f#JAc;PnMim`78SYx8qvj04#cs|{Pj~nB_7?y5 zrvS1rfq{WB@Vy9__rE{QHaYnYe&OKY0CkvJURH2-7ye(XujSfx#5y)q&R5*8JGmSRHC=Y9oj-qC7l2!&a7-JeF2g z*PxrNjlCLPzI^$*ptv}!hmW0~n|ot(bLQ_mYA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + PPD + + + + OptionalCommandFilter + + + + + + + + + CommandFile + + + + + + Printer + + + + + OptionalPortMonitor + + + + + Backend + + + diff --git a/doc/images/cups-postscript-chain.png b/doc/images/cups-postscript-chain.png new file mode 100644 index 0000000000000000000000000000000000000000..41f8bced8af249d2c233771248a36633ea5a8889 GIT binary patch literal 17498 zc-p1BbyQSg`!))qq=1T~gs4bKBOnqAiZGN6DBTi6mvk#20#ZYF%+TG^El78FcgIlQ zGrsTno$svk{c+Yhv(|=T_TJBa_I+RXbzj%sd+`4#_kj?f3LgUlgHTH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E#>U3)Kx9@ltL;VHO;yqGFZZ`T*VebZ@37|2HJ8+EWvfh3|2>->xGnT8}9r zB2q_4#p~G8-rkP>y5hK?=|ex$(R}NJB`LXhfl%j_u9%#g>x(Jjw-rwH` zvA;(`A`WmK#jg1?I3S?f6%_MYX=y30t?l8qQE%dvIY?dAY0bk_cqj`Y003X@e%qsp zy0e9Vx$obSOiMKI5f zGDH;{8@t@f!ND>GrnX#K%DW1O!y%x=e!Y3m%F1dgEiL_TAs`?y^#rTZmzKUXcQ-XX z=>bdI)YK)is_LB3)O2$VpOnSy25A0+gue=(pD`BN`TS8UT(iW z(3-ipRK5T2A69_$`FBMS{Qv!b7XRP=IY#LX4i8@9*Y@M?6b$f^dN21bUrfjQe*rEE B#y9`~ literal 0 Hc-jL100001 diff --git a/doc/images/cups-postscript-chain.svg b/doc/images/cups-postscript-chain.svg new file mode 100644 index 000000000..d1e2d3e84 --- /dev/null +++ b/doc/images/cups-postscript-chain.svg @@ -0,0 +1,531 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + PPD + + + + + Printer + + + + + OptionalPortMonitor + + + + + Backend + + + + OptionalPostScriptFilter + + OptionalPostScriptFilter + + + + + + + + + + + + PrintFile + + + + + + + CUPSFilters + + + CUPSFilters + + + + + diff --git a/doc/images/cups-raster-chain.png b/doc/images/cups-raster-chain.png new file mode 100644 index 0000000000000000000000000000000000000000..5349bd9f573c0ffd8e630deb29a1c24f593da68c GIT binary patch literal 16916 zc-pOeWmHsAyf27?5`uzsD2jA=Hz+yu(DnA{ zz4zU>-u>`Cyjg2xJ5PPmH+{uOzs zBLsfjc9v9leHXlZ?wUq`|KD?v*K$Tf!#6^`(euUgEWt0yTx8z3sM(vlxEnc{p}D)e zvsv0%JDV6en6cSAS)}ZUkfWhJMpKY}@!BJGd(QLCYqN{i{ax;MrlNo#Y`aXByOV#3HJj0Dzu*w=V87^zXZnRka_*B50?E5iq&>~PBhmh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O^F1Q=WXy7$QdEE<{>Yg znx2-OnVGS_SPaI;7D>!$lvgqyptXFF!Cs&+TZts?U+MxA1vPUXgDNMRnd$+=u4BSM z%gxnpL%r)(mzEbLOwZ8JFg4fGU&o75CO)}iAmjPt(nBACrjg6C4|Gw~qUWc-f5v+A zSdSwdRaAz;;+fPB)FAOi-ERm$?)g7|{;UkhXP27Gv}d(MuYuS~95QbE_YsGPgO^T! k{$Kvo!2gH8Td;kD{!Tb;HDOYa5)Hf*WR#^#Bn^Z97ZhY#;{X5v literal 0 Hc-jL100001 diff --git a/doc/images/cups-raster-chain.svg b/doc/images/cups-raster-chain.svg new file mode 100644 index 000000000..5130c8191 --- /dev/null +++ b/doc/images/cups-raster-chain.svg @@ -0,0 +1,534 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + PPD + + + + + Printer + + + + + OptionalPortMonitor + + + + + Backend + + + + OptionalPostScriptFilter + + + RequiredRasterFilter + + + + + + + + + + + + + PrintFile + + + + + + + CUPSFilters + + + CUPSFilters + + + + + diff --git a/examples/Makefile b/examples/Makefile new file mode 100644 index 000000000..928d71c15 --- /dev/null +++ b/examples/Makefile @@ -0,0 +1,128 @@ +# +# "$Id$" +# +# PPD compiler example makefile for the Common UNIX Printing System (CUPS). +# +# Copyright 2007-2008 by Apple Inc. +# Copyright 2002-2005 by Easy Software Products. +# +# These coded instructions, statements, and computer programs are the +# property of Apple Inc. and are protected by Federal copyright +# law. Distribution and use rights are outlined in the file "LICENSE.txt" +# which should have been included with this file. If this file is +# file is missing or damaged, see the license at "http://www.cups.org/". +# + +# +# Include standard definitions... +# + +include ../Makedefs + + +# +# Examples... +# + +EXAMPLES = \ + color.drv \ + constraint.drv \ + custom.drv \ + grouping.drv \ + laserjet-basic.drv \ + laserjet-pjl.drv \ + minimum.drv \ + postscript.drv \ + r300-basic.drv \ + r300-colorman.drv \ + r300-remote.drv + + +# +# Make everything... +# + +all: + + +# +# Make library targets... +# + +libs: + + +# +# Make unit tests... +# + +unittests: + + +# +# Clean everything... +# + +clean: + + +# +# Dummy depend... +# + +depend: + + +# +# Install all targets... +# + +install: all install-data install-headers install-libs install-exec + + +# +# Install data files... +# + +install-data: + $(INSTALL_DIR) $(DATADIR)/examples + for file in $(EXAMPLES); do \ + $(INSTALL_DATA) $$file $(DATADIR)/examples; \ + done + + +# +# Install programs... +# + +install-exec: + + +# +# Install headers... +# + +install-headers: + + +# +# Install libraries... +# + +install-libs: + + +# +# Uninstall files... +# + +uninstall: + for file in $(EXAMPLES); do \ + $(RM) $(DATADIR)/examples/$$file; \ + done + -$(RMDIR) $(DATADIR)/examples + + +# +# End of "$Id$". +# diff --git a/examples/color.drv b/examples/color.drv new file mode 100644 index 000000000..69984c4b9 --- /dev/null +++ b/examples/color.drv @@ -0,0 +1,44 @@ +// Include standard font and media definitions +#include +#include + +// List the fonts that are supported, in this case all standard +// fonts... +Font * + +// Manufacturer and version +Manufacturer "Foo" +Version 1.0 + +// Each filter provided by the driver... +Filter application/vnd.cups-raster 100 rastertofoo + +// Supported page sizes +*MediaSize Letter +MediaSize A4 + +{ + // Supported resolutions + *Resolution k 8 0 0 0 "600dpi/600 DPI" + + // Specify the model name and filename... + ModelName "FooJet 2000" + PCFileName "foojet2k.ppd" +} + +{ + // Supports color printing + ColorDevice true + + // Supported colorspaces + ColorModel Gray/Grayscale w chunky 0 + *ColorModel RGB/Color rgb chunky 0 + + // Supported resolutions + *Resolution - 8 0 0 0 "300dpi/300 DPI" + Resolution - 8 0 0 0 "600dpi/600 DPI" + + // Specify the model name and filename... + ModelName "FooJet Color" + PCFileName "foojetco.ppd" +} diff --git a/examples/constraint.drv b/examples/constraint.drv new file mode 100644 index 000000000..6acb7f106 --- /dev/null +++ b/examples/constraint.drv @@ -0,0 +1,48 @@ +// Include standard font and media definitions +#include +#include + +// List the fonts that are supported, in this case all standard +// fonts... +Font * + +// Manufacturer, model name, and version +Manufacturer "Foo" +ModelName "FooJet 2000" +Version 1.0 + +// Each filter provided by the driver... +Filter application/vnd.cups-raster 100 rastertofoo + +// Supported page sizes +*MediaSize Letter +MediaSize A4 + +// Supported resolutions +*Resolution k 8 0 0 0 "600dpi/600 DPI" + +// Installable Option Group +Group "InstallableOptions/Options Installed" + + // Duplexing unit option + Option "Option1/Duplexing Unit" Boolean AnySetup 10 + Choice True/Installed "" + *Choice "False/Not Installed" "" + +// General Option Group +Group General + + // Duplexing option + Option "Duplex/Two-Sided Printing" PickOne AnySetup 10 + *Choice "None/No" "<>setpagedevice" + Choice "DuplexNoTumble/Long Edge Binding" + "<>setpagedevice" + Choice "DuplexTumble/Short Edge Binding" + "<>setpagedevice" + +// Only allow duplexing if the duplexer is installed +UIConstraints "*Duplex *Option1 False" + +// Specify the name of the PPD file we want to generate... +PCFileName "foojet2k.ppd" + diff --git a/examples/custom.drv b/examples/custom.drv new file mode 100644 index 000000000..1001c4fc1 --- /dev/null +++ b/examples/custom.drv @@ -0,0 +1,41 @@ +// Include standard font and media definitions +#include +#include + +// List the fonts that are supported, in this case all standard +// fonts... +Font * + +// Manufacturer, model name, and version +Manufacturer "Foo" +ModelName "FooJet 2000" +Version 1.0 + +// Each filter provided by the driver... +Filter application/vnd.cups-raster 100 rastertofoo + +// Supported page sizes +*MediaSize Letter +MediaSize A4 + +// Supported resolutions +*Resolution k 8 0 0 0 "600dpi/600 DPI" + +// Option Group +Group "Footasm" + + // Boolean option + Option "fooEnhance/Resolution Enhancement" Boolean AnySetup 10 + *Choice True/Yes "<>setpagedevice" + Choice False/No "<>setpagedevice" + + // Multiple choice option + Option "fooOutputType/Output Quality" PickOne AnySetup 10 + *Choice "Auto/Automatic Selection" "<>setpagedevice" + Choice "Text/Optimize for Text" "<>setpagedevice" + Choice "Graph/Optimize for Graphics" "<>setpagedevice" + Choice "Photo/Optimize for Photos" "<>setpagedevice" + +// Specify the name of the PPD file we want to generate... +PCFileName "foojet2k.ppd" + diff --git a/examples/grouping.drv b/examples/grouping.drv new file mode 100644 index 000000000..da66d74fc --- /dev/null +++ b/examples/grouping.drv @@ -0,0 +1,36 @@ +// Include standard font and media definitions +#include +#include + +// List the fonts that are supported, in this case all standard +// fonts... +Font * + +// Manufacturer and version +Manufacturer "Foo" +Version 1.0 + +// Each filter provided by the driver... +Filter application/vnd.cups-raster 100 rastertofoo + +// Supported page sizes +*MediaSize Letter +MediaSize A4 + +{ + // Supported resolutions + *Resolution k 8 0 0 0 "600dpi/600 DPI" + + // Specify the model name and filename... + ModelName "FooJet 2000" + PCFileName "foojet2k.ppd" +} + +{ + // Supported resolutions + *Resolution k 8 0 0 0 "1200dpi/1200 DPI" + + // Specify the model name and filename... + ModelName "FooJet 2001" + PCFileName "foojt2k1.ppd" +} diff --git a/examples/laserjet-basic.drv b/examples/laserjet-basic.drv new file mode 100644 index 000000000..6924ed7b8 --- /dev/null +++ b/examples/laserjet-basic.drv @@ -0,0 +1,88 @@ +// Include standard font and media definitions +#include +#include + +// Include HP-PCL driver definitions +#include + +// Specify that this driver uses the HP-PCL driver... +DriverType pcl + +// Specify the driver options via the model number... +ModelNumber ($PCL_PAPER_SIZE $PCL_PJL $PCL_PJL_RESOLUTION) + +// List the fonts that are supported, in this case all standard +// fonts... +Font * + +// Manufacturer and driver version +Manufacturer "HP" +Version 1.0 + +// Supported page sizes and their margins +HWMargins 18 12 18 12 +*MediaSize Letter +MediaSize Legal +MediaSize Executive +MediaSize Monarch +MediaSize Statement +MediaSize FanFoldGermanLegal + +HWMargins 18 12.72 18 12.72 +MediaSize Env10 + +HWMargins 9.72 12 9.72 12 +MediaSize A4 +MediaSize A5 +MediaSize B5 +MediaSize EnvC5 +MediaSize EnvDL +MediaSize EnvISOB5 +MediaSize Postcard +MediaSize DoublePostcard + +// Only black-and-white output with mode 3 compression... +ColorModel Gray k chunky 3 + +// Supported resolutions +Resolution - 1 0 0 0 "300dpi/300 DPI" +*Resolution - 8 0 0 0 "600dpi/600 DPI" + +// Supported input slots +*InputSlot 7 "Auto/Automatic Selection" +InputSlot 2 "Manual/Tray 1 - Manual Feed" +InputSlot 4 "Upper/Tray 1" +InputSlot 1 "Lower/Tray 2" +InputSlot 5 "LargeCapacity/Tray 3" + +// Tray 3 is an option... +Installable "OptionLargeCapacity/Tray 3 Installed" +UIConstraints "*OptionLargeCapacity False *InputSlot LargeCapacity" + +{ + // HP LaserJet 2100 Series + Throughput 10 + ModelName "LaserJet 2100 Series" + PCFileName "hpljt211.ppd" +} + +{ + // LaserJet 2200 and 2300 series have duplexer option... + Duplex normal + Installable "OptionDuplex/Duplexer Installed" + UIConstraints "*OptionDuplex False *Duplex" + + { + // HP LaserJet 2200 Series + Throughput 19 + ModelName "LaserJet 2200 Series" + PCFileName "hpljt221.ppd" + } + + { + // HP LaserJet 2300 Series + Throughput 25 + ModelName "LaserJet 2300 Series" + PCFileName "hpljt231.ppd" + } +} diff --git a/examples/laserjet-pjl.drv b/examples/laserjet-pjl.drv new file mode 100644 index 000000000..32a0bc4f0 --- /dev/null +++ b/examples/laserjet-pjl.drv @@ -0,0 +1,101 @@ +// Include standard font and media definitions +#include +#include + +// Include HP-PCL driver definitions +#include + +// Specify that this driver uses the HP-PCL driver... +DriverType pcl + +// Specify the driver options via the model number... +ModelNumber ($PCL_PAPER_SIZE $PCL_PJL $PCL_PJL_RESOLUTION) + +// List the fonts that are supported, in this case all standard +// fonts... +Font * + +// Manufacturer and driver version +Manufacturer "HP" +Version 2.0 + +// Supported page sizes and their margins +HWMargins 18 12 18 12 +*MediaSize Letter +MediaSize Legal +MediaSize Executive +MediaSize Monarch +MediaSize Statement +MediaSize FanFoldGermanLegal + +HWMargins 18 12.72 18 12.72 +MediaSize Env10 + +HWMargins 9.72 12 9.72 12 +MediaSize A4 +MediaSize A5 +MediaSize B5 +MediaSize EnvC5 +MediaSize EnvDL +MediaSize EnvISOB5 +MediaSize Postcard +MediaSize DoublePostcard + +// Only black-and-white output with mode 3 compression... +ColorModel Gray k chunky 3 + +// Supported resolutions +Resolution - 1 0 0 0 "300dpi/300 DPI" +*Resolution - 8 0 0 0 "600dpi/600 DPI" + +// Supported input slots +*InputSlot 7 "Auto/Automatic Selection" +InputSlot 2 "Manual/Tray 1 - Manual Feed" +InputSlot 4 "Upper/Tray 1" +InputSlot 1 "Lower/Tray 2" +InputSlot 5 "LargeCapacity/Tray 3" + +// Tray 3 is an option... +Installable "OptionLargeCapacity/Tray 3 Installed" +UIConstraints "*OptionLargeCapacity False *InputSlot LargeCapacity" + +// PJL options +Attribute cupsPJL cupsRET "@PJL SET SMOOTHING=%?False:OFF;%?True:ON;%n" + +Option "cupsRET/Smoothing" Boolean DocumentSetup 10 + Choice "False/Off" "" + *Choice "True/On" "" + +Attribute cupsPJL cupsTonerSave "@PJL SET ECONOMODE=%?False:OFF;%?True:ON;%n" + +Option "cupsTonerSave/Save Toner" Boolean DocumentSetup 10 + *Choice "False/No" "" + Choice "True/Yes" "" + +{ + // HP LaserJet 2100 Series + Throughput 10 + ModelName "LaserJet 2100 Series PJL" + PCFileName "hpljt212.ppd" +} + +{ + // LaserJet 2200 and 2300 series have duplexer option... + Duplex normal + Installable "OptionDuplex/Duplexer Installed" + UIConstraints "*OptionDuplex False *Duplex" + + { + // HP LaserJet 2200 Series + Throughput 19 + ModelName "LaserJet 2200 Series PJL" + PCFileName "hpljt222.ppd" + } + + { + // HP LaserJet 2300 Series + Throughput 25 + ModelName "LaserJet 2300 Series PJL" + PCFileName "hpljt232.ppd" + } +} diff --git a/examples/minimum.drv b/examples/minimum.drv new file mode 100644 index 000000000..ac6e38db0 --- /dev/null +++ b/examples/minimum.drv @@ -0,0 +1,26 @@ +// Include standard font and media definitions +#include +#include + +// List the fonts that are supported, in this case all standard +// fonts... +Font * + +// Manufacturer, model name, and version +Manufacturer "Foo" +ModelName "FooJet 2000" +Version 1.0 + +// Each filter provided by the driver... +Filter application/vnd.cups-raster 100 rastertofoo + +// Supported page sizes +*MediaSize Letter +MediaSize A4 + +// Supported resolutions +*Resolution k 8 0 0 0 "600dpi/600 DPI" + +// Specify the name of the PPD file we want to generate... +PCFileName "foojet2k.ppd" + diff --git a/examples/postscript.drv b/examples/postscript.drv new file mode 100644 index 000000000..ebb02f8a0 --- /dev/null +++ b/examples/postscript.drv @@ -0,0 +1,46 @@ +// Include standard font and media definitions +#include +#include + +// Specify this is a PostScript printer driver +DriverType ps + +// List the fonts that are supported, in this case all standard fonts +Font * + +// Manufacturer, model name, and version +Manufacturer "Foo" +ModelName "Foo LaserProofer 2000" +Version 1.0 + +// PostScript printer attributes +Attribute DefaultColorSpace "" Gray +Attribute LandscapeOrientation "" Minus90 +Attribute LanguageLevel "" "3" +Attribute Product "" "(Foo LaserProofer 2000)" +Attribute PSVersion "" "(3010) 0" +Attribute TTRasterizer "" Type42 + +// Supported page sizes +*MediaSize Letter +MediaSize Legal +MediaSize A4 + +// Query command for page size +Attribute "?PageSize" "" " + save + currentpagedevice /PageSize get aload pop + 2 copy gt {exch} if (Unknown) + 23 dict + dup [612 792] (Letter) put + dup [612 1008] (Legal) put + dup [595 842] (A4) put + {exch aload pop 4 index sub abs 5 le exch + 5 index sub abs 5 le and + {exch pop exit} {pop} ifelse + } bind forall = flush pop pop + restore" + +// Specify the name of the PPD file we want to generate +PCFileName "fooproof.ppd" + diff --git a/examples/r300-basic.drv b/examples/r300-basic.drv new file mode 100644 index 000000000..e203d511d --- /dev/null +++ b/examples/r300-basic.drv @@ -0,0 +1,75 @@ +// Include standard font and media definitions +#include +#include + +// Include ESC/P driver definitions +#include + +// Specify that this driver uses the ESC/P driver... +DriverType escp + +// Specify the driver options via the model number... +ModelNumber ($ESCP_ESCK $ESCP_EXT_UNITS $ESCP_EXT_MARGINS $ESCP_USB + $ESCP_PAGE_SIZE $ESCP_RASTER_ESCI) + +// List the fonts that are supported, in this case all standard +// fonts... +Font * + +// Manufacturer and driver version +Manufacturer "Epson" +Version 1.0 + +// Supported page sizes and their margins +HWMargins 8.4 0 8.4 0 +*MediaSize Letter +MediaSize Legal +MediaSize Executive +MediaSize Statement +MediaSize A4 +MediaSize A5 +MediaSize A6 +MediaSize B5 +MediaSize Env10 +MediaSize EnvC5 +MediaSize EnvDL +MediaSize EnvISOB5 +MediaSize Postcard +MediaSize DoublePostcard + +VariablePaperSize Yes +MinSize 1in 4in +MaxSize 8.5in 44in + +// Four color modes are supported... +ColorModel Gray/Grayscale w chunky 1 +ColorModel Black k chunky 1 +*ColorModel RGB/Color rgb chunky 1 +ColorModel CMYK cmyk chunky 1 + +// Supported resolutions +Resolution - 8 90 0 103 "360dpi/360 DPI" +*Resolution - 8 90 0 206 "720dpi/720 DPI" +Resolution - 8 90 0 412 "1440dpi/1440 DPI" + +// Very basic dithering settings +Attribute cupsInkChannels "" 6 +Attribute cupsInkLimit "" 2.0 + +Attribute cupsCyanLtDk "" "0.5 1.0" +Attribute cupsMagentaLtDk "" "0.5 1.0" + +Attribute cupsAllDither 360dpi "0.5 0.75 1.0" +Attribute cupsAllDither 720dpi "0.6 0.9 1.2" +Attribute cupsAllDither 1440dpi "0.9 1.35" + +Attribute cupsESCPDotSize 360dpi 16 +Attribute cupsESCPDotSize 720dpi 17 +Attribute cupsESCPDotSize 1440dpi 18 + +{ + // EPSON Stylus Photo R300 Series + Throughput 1 + ModelName "Stylus Photo R300" + PCFileName "epspr301.ppd" +} diff --git a/examples/r300-colorman.drv b/examples/r300-colorman.drv new file mode 100644 index 000000000..ddaf58ec7 --- /dev/null +++ b/examples/r300-colorman.drv @@ -0,0 +1,85 @@ +// Include standard font and media definitions +#include +#include + +// Include ESC/P driver definitions +#include + +// Specify that this driver uses the ESC/P driver... +DriverType escp + +// Specify the driver options via the model number... +ModelNumber ($ESCP_ESCK $ESCP_EXT_UNITS $ESCP_EXT_MARGINS $ESCP_USB + $ESCP_PAGE_SIZE $ESCP_RASTER_ESCI $ESCP_REMOTE) + +// List the fonts that are supported, in this case all standard +// fonts... +Font * + +// Manufacturer and driver version +Manufacturer "Epson" +Version 3.0 + +// Supported page sizes and their margins +HWMargins 0 0 0 0 +*MediaSize Letter +MediaSize Legal +MediaSize Executive +MediaSize Statement +MediaSize A4 +MediaSize A5 +MediaSize A6 +MediaSize B5 +MediaSize Env10 +MediaSize EnvC5 +MediaSize EnvDL +MediaSize EnvISOB5 +MediaSize Postcard +MediaSize DoublePostcard + +VariablePaperSize Yes +MinSize 1in 4in +MaxSize 8.5in 44in + +// Borderless printing offset... +Attribute cupsESCPFP "" 0 + +// Four color modes are supported... +ColorModel Gray/Grayscale w chunky 1 +ColorModel Black k chunky 1 +*ColorModel RGB/Color rgb chunky 1 +ColorModel CMYK cmyk chunky 1 + +// Supported resolutions +Resolution - 8 90 0 103 "360dpi/360 DPI" +*Resolution - 8 90 0 206 "720dpi/720 DPI" +Resolution - 8 90 0 412 "1440dpi/1440 DPI" + +// Paper trays... +*InputSlot 0 "Auto/Auto Select" +InputSlot 1 "Manual/Manual Feed" + +Attribute cupsESCPPP 0 "1 255" +Attribute cupsESCPPP 1 "2 1" + +// Very basic dithering settings +Attribute cupsInkChannels "" 6 +Attribute cupsInkLimit "" 3.0 + +Attribute cupsCyanLtDk "" "0.5 1.0" +Attribute cupsMagentaLtDk "" "0.5 1.0" + +Attribute cupsAllDither 360dpi "0.5 0.75 1.0" +Attribute cupsAllDither 720dpi "0.6 0.9 1.2" +Attribute cupsAllDither 1440dpi "0.9 1.35" + +Attribute cupsESCPDotSize 360dpi 16 +Attribute cupsESCPDotSize 720dpi 17 +Attribute cupsESCPDotSize 1440dpi 18 + +{ + // EPSON Stylus Photo R300 Series + Throughput 1 + ModelName "Epson Stylus Photo R300" + PCFileName "epspr303.ppd" +} diff --git a/examples/r300-remote.drv b/examples/r300-remote.drv new file mode 100644 index 000000000..c3065d00c --- /dev/null +++ b/examples/r300-remote.drv @@ -0,0 +1,85 @@ +// Include standard font and media definitions +#include +#include + +// Include ESC/P driver definitions +#include + +// Specify that this driver uses the ESC/P driver... +DriverType escp + +// Specify the driver options via the model number... +ModelNumber ($ESCP_ESCK $ESCP_EXT_UNITS $ESCP_EXT_MARGINS $ESCP_USB + $ESCP_PAGE_SIZE $ESCP_RASTER_ESCI $ESCP_REMOTE) + +// List the fonts that are supported, in this case all standard +// fonts... +Font * + +// Manufacturer and driver version +Manufacturer "Epson" +Version 2.0 + +// Supported page sizes and their margins +HWMargins 0 0 0 0 +*MediaSize Letter +MediaSize Legal +MediaSize Executive +MediaSize Statement +MediaSize A4 +MediaSize A5 +MediaSize A6 +MediaSize B5 +MediaSize Env10 +MediaSize EnvC5 +MediaSize EnvDL +MediaSize EnvISOB5 +MediaSize Postcard +MediaSize DoublePostcard + +VariablePaperSize Yes +MinSize 1in 4in +MaxSize 8.5in 44in + +// Borderless printing offset... +Attribute cupsESCPFP "" -80 + +// Four color modes are supported... +ColorModel Gray/Grayscale w chunky 1 +ColorModel Black k chunky 1 +*ColorModel RGB/Color rgb chunky 1 +ColorModel CMYK cmyk chunky 1 + +// Supported resolutions +Resolution - 8 90 0 103 "360dpi/360 DPI" +*Resolution - 8 90 0 206 "720dpi/720 DPI" +Resolution - 8 90 0 412 "1440dpi/1440 DPI" + +// Paper trays... +*InputSlot 0 "Auto/Auto Select" +InputSlot 1 "Manual/Manual Feed" + +Attribute cupsESCPPP 0 "1 255" +Attribute cupsESCPPP 1 "2 1" + +// Very basic dithering settings +Attribute cupsInkChannels "" 6 +Attribute cupsInkLimit "" 2.0 + +Attribute cupsCyanLtDk "" "0.5 1.0" +Attribute cupsMagentaLtDk "" "0.5 1.0" + +Attribute cupsAllDither 360dpi "0.5 0.75 1.0" +Attribute cupsAllDither 720dpi "0.6 0.9 1.2" +Attribute cupsAllDither 1440dpi "0.9 1.35" + +Attribute cupsESCPDotSize 360dpi 16 +Attribute cupsESCPDotSize 720dpi 17 +Attribute cupsESCPDotSize 1440dpi 18 + +{ + // EPSON Stylus Photo R300 Series + Throughput 1 + ModelName "Epson Stylus Photo R300" + PCFileName "epspr302.ppd" +} diff --git a/filter/bannertops.c b/filter/bannertops.c index ab27adec0..70342b1ac 100644 --- a/filter/bannertops.c +++ b/filter/bannertops.c @@ -587,7 +587,7 @@ write_banner(banner_file_t *banner, /* I - Banner file */ * Start the page... */ - printf("%%Page: %s %d\n", i == 1 ? "coverpage" : "coverback", i); + printf("%%%%Page: %s %d\n", i == 1 ? "coverpage" : "coverback", i); puts("gsave"); printf("%.1f %.1f translate\n", PageLeft, PageBottom); puts("0 setgray"); diff --git a/filter/image-png.c b/filter/image-png.c index 95cc9eacd..c2f3c493c 100644 --- a/filter/image-png.c +++ b/filter/image-png.c @@ -178,7 +178,7 @@ _cupsImageReadPNG( { bufsize = img->xsize * img->ysize; - if ((bufsize / img->ysize) != img->xsize) + if ((bufsize / img->xsize) != img->ysize) { fprintf(stderr, "DEBUG: PNG image dimensions (%ux%u) too large!\n", (unsigned)width, (unsigned)height); @@ -190,7 +190,7 @@ _cupsImageReadPNG( { bufsize = img->xsize * img->ysize * 3; - if ((bufsize / (img->ysize * 3)) != img->xsize) + if ((bufsize / (img->xsize * 3)) != img->ysize) { fprintf(stderr, "DEBUG: PNG image dimensions (%ux%u) too large!\n", (unsigned)width, (unsigned)height); diff --git a/filter/pstext.c b/filter/pstext.c index e809e40ff..1517a608b 100644 --- a/filter/pstext.c +++ b/filter/pstext.c @@ -84,6 +84,9 @@ psTextEmbedFonts(ps_text_t *fonts) /* I - Font data */ fclose(fp); } + else + fprintf(stderr, "DEBUG: Unable to open font file \"%s\" - %s\n", + filename, strerror(errno)); puts("\n%%EndResource"); } diff --git a/man/drv.man.in b/man/drv.man.in index 6e553adbd..504f662f6 100644 --- a/man/drv.man.in +++ b/man/drv.man.in @@ -11,7 +11,7 @@ .\" which should have been included with this file. If this file is .\" file is missing or damaged, see the license at "http://www.cups.org/". .\" -.TH ppdc 1 "Common UNIX Printing System" "20 May 2008" "Apple Inc." +.TH drv 1 "Common UNIX Printing System" "20 May 2008" "Apple Inc." .SH NAME drv \- cups driver interface for ppd compiler files .SH SYNOPSIS diff --git a/packaging/cups.list.in b/packaging/cups.list.in index 5678d4d89..196677851 100644 --- a/packaging/cups.list.in +++ b/packaging/cups.list.in @@ -548,9 +548,11 @@ f 0644 root sys $DATADIR/data/testprint data/testprint d 0755 root sys $DATADIR/drv - f 0644 root sys $DATADIR/drv/sample.drv ppdc/sample.drv +d 0755 root sys $DATADIR/examples - +f 0644 root sys $DATADIR/examples examples/*.drv + d 0755 root sys $DATADIR/fonts - -f 0644 root sys $DATADIR/fonts fonts/Courier* -f 0644 root sys $DATADIR/fonts/Symbol fonts/Symbol +f 0644 root sys $DATADIR/fonts fonts/Monospace* d 0755 root sys $DATADIR/mime - f 0644 root sys $DATADIR/mime/mime.convs conf/mime.convs @@ -640,6 +642,9 @@ f 0644 root sys $LIBDIR/libcupsppdc.a ppdc/libcupsppdc.a d 0755 root sys $DOCDIR/help - f 0644 root sys $DOCDIR/help doc/help/api*.html +f 0644 root sys $DOCDIR/help/postscript-driver.html doc/help/postscript-driver.html +f 0644 root sys $DOCDIR/help/ppd-compiler.html doc/help/ppd-compiler.html +f 0644 root sys $DOCDIR/help/raster-driver.html doc/help/raster-driver.html f 0644 root sys $DOCDIR/help doc/help/spec*.html %subpackage -- 2.39.2