Comment 6 for bug 264727

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I had a look into the source code of the PPD generator of CUPS DDK, and the PPD generator actively blocks out certain keywords from being manually introduced with the "Attribute" directive in the .drv file. One of these blacklisted cases is all keywords beginning with "*ParamCustom". See the file ppdc/ppdc-driver.cxx, function ppdcDriver::write_ppd_file(), lines 515-536 in the CUPS DDK package.

So it is absolutely impossible to create a custom page size section as we had generated with Foomatic. To have "*ParamCustomPageSize" keywords one is forced to have the

*CustomPageSize True: "pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice"

line.

If one looks into ppdc/ppdc-driver.cxx, function ppdcDriver::write_ppd_file(), lines 862-874 one gets the impression that one can define the "*CustomPageSize True: ..." line in the .drv file, but there is no directive available for .drv files which populates the variable custom_size_code. The method to populate the variable, ppdcDriver::set_custom_size_code() is never called in the whole source code of CUPS DDK. This is a bug in CUPS DDK which prevents its suitability for providing custom page size functionality for arbitrary drivers, especially for drivers which are flexible in taking PostScript or PDF as input.