Options in PPD files

uski cups.20.uski at spamgourmet.com
Wed Nov 16 14:16:51 PST 2005


Hello,

I am trying to improve the PPD supplied by Canon for my iP4000 printer.
Their proprietary driver has some strange features: it uses a filter to convert the settings from the PPD file to a command line command.

In this command line, there may be several parameters, like --cartridge which can be either photo or color, to set the cartridge type.
There may also be --grayscale to select grayscale printing.

I have tried to control the --grayscale parameter, but I wasn't able to.
If I put this in the PPD:

*OpenUI *CNGrayscale/Grayscale: Boolean
*DefaultCNGrayscale: False
*CNGrayscale True/Yes: ""
*CNGrayscale False/No: ""
*CloseUI: *CNGrayscale

..then their filter will see the CNGrayscale keyword, and it will add "--grayscale" to the command line, but it will also add True or False: the printer will not print, because the command line tool doesn't wait a parameter after --grayscale and it thinks "True" or "False" is a file to read the data from.

Is there a way to set or unset a value depending on the user's choices ? I think something like that may be appropriate, but my knowledge is too low to make it work:

*OpenUI *CGrayscale/Grayscale: Boolean
*DefaultCGrayscale: False
*CGrayscale True/Yes: "define CNGrayscale here, with a null value (or a space), so that no extra command line parameter is added"
*CGrayscale False/No: ""
*CloseUI: *CGrayscale

Thanks if you can help. This is driving me nuts !
uski




More information about the cups-devel mailing list