[cups] Watermark not printing in CUPS

Helge Blischke helgeblischke at web.de
Mon Feb 2 07:18:23 PST 2015


A convenient way to provide additional PostScript code is to put it into the
value of the PPD key
*JobPatchFile n "……“
where n is an integer number (needed in case you need several such files)
and …… stands for the PostScript code to execute.

Note that this code is inserted at the beginning of the prolog section of the job file
and should normally only define procedures and „global“ variables.
Note further that the example code you used makes use of key/value pairs for
the setpagedevice operator that are not standard and my be refused (generate an
error) by the PS interpreter, so you probably need to redefine the setpagedevice
operator by a procedure which handles the custom keys.

> Am 02.02.2015 um 15:09 schrieb Michael Sweet <msweet at apple.com>:
> 
> Joseph,
> 
> The examples in the CUPS PPD spec are not directly usable in a PostScript printer or in a CUPS driver - you need additional code (PostScript or otherwise) in order to make the options do something.
> 
> 
>> On Feb 2, 2015, at 9:01 AM, Joseph Fisher <jxfish2 at gmail.com> wrote:
>> 
>> To whom it may concern,
>> 
>> I added a printer through CUPS.
>> 
>> I then added code to the newly created PPD file to enable this code:
>> 
>>    http://www.cups.org/documentation.php/spec-ppd.html  -  Custom Options
>> section of the document
>> 
>> **% Base JCL key code option *JCLOpenUI JCLPasscode/Key Code: PickOne
>> *OrderDependency: 10 JCLSetup *JCLPasscode *DefaultJCLPasscode: None
>> *JCLPasscode None/No Code: "" *JCLPasscode 1111: "@PJL SET PASSCODE =
>> 1111<0A>" *JCLPasscode 2222: "@PJL SET PASSCODE = 2222<0A>" *JCLPasscode
>> 3333: "@PJL SET PASSCODE = 3333<0A>" *JCLCloseUI: *JCLPasscode *% Custom
>> JCL key code option *CustomJCLPasscode True: "@PJL SET PASSCODE = \1<0A>"
>> *ParamCustomJCLPasscode Code/Key Code: 1 passcode 4 4 *
>> 
>> **% Base PostScript watermark option*
>> *OpenUI WatermarkText/Watermark Text: PickOne
>> *OrderDependency: 10 AnySetup *WatermarkText
>> *DefaultWatermarkText: None
>> *WatermarkText None: ""
>> *WatermarkText Draft: "<</cupsString1(Draft)>>setpagedevice"
>> *CloseUI: *WatermarkText
>> **% Custom PostScript watermark option*
>> *CustomWatermarkText True: "<</cupsString1 3 -1 roll>>setpagedevice"
>> *ParamCustomWatermarkText Text: 1 string 0 32
>> **% Base PostScript gamma/density option*
>> *OpenUI GammaDensity/Gamma and Density: PickOne
>> *OrderDependency: 10 AnySetup *GammaDensity
>> *DefaultGammaDensity: Normal
>> *GammaDensity Normal/Normal: "<</cupsReal1 1.0/cupsReal2 1.0>>setpagedevice"
>> *GammaDensity Light/Lighter: "<</cupsReal1 0.9/cupsReal2 0.67>>setpagedevice"
>> *GammaDensity Dark/Darker: "<</cupsReal1 1.1/cupsReal2 1.5>>setpagedevice"
>> *CloseUI: *GammaDensity
>> **% Custom PostScript gamma/density option*
>> *CustomGammaDensity True: "<</cupsReal1 3 -1 roll/cupsReal2 5 -1>>setpagedevice"
>> *ParamCustomGammaDensity Gamma: 1 curve 0.1 10
>> *ParamCustomGammaDensity Density: 2 real 0 2
>> 
>> 
>> 
>> After adding the code to the PPD file and bouncing CUPS, the new Watermark
>> options now appear inside of the CUPS web admin page.
>> 
>> Everything looks perfect inside of the GUI.
>> 
>> I can select exactly what I want to configure inside of the GUI, but when I
>> attempt to print, no watermark ever appears.
>> 
>> Has anyone else had this same issue before?
>> 
>> If so, does anyone have a solution to the problem?
>> 
>> Did I simply miss putting something else in the PPD file that was required?
>> 
>> Thanks in advance,
>> 
>> JCF
>> _______________________________________________
>> cups mailing list
>> cups at cups.org
>> https://www.cups.org/mailman/listinfo/cups
> 
> _________________________________________________________
> Michael Sweet, Senior Printing System Engineer, PWG Chair
> 
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups




More information about the cups mailing list