problem with postscript %%title

Helge Blischke h.blischke at acm.org
Mon Sep 27 09:20:19 PDT 2010


Daniel Stoeck wrote:

> I know this is not a pure CUPS problem. But I thought I might find my
> answer here. I want to use following command:
> 
>     lp -d THEPRINTERNAME -t THETITLEIWANT /tmp/theepsfilename.ps
> 
> The printer is one of many virtual PDF printers and I want to use the -t
> title argument to set the title respective the name of the PDF that will
> be genereated. But the PostScript file contains
> 
>     %%Title: anothername
> 
> which overwrites the -t argument or is preferred in some way. Does anyone
> here know a solution for this?
> 
> (the background of this is that I have manymanymany print jobs with the
> same %%Title variable within the PostScript file and I have to make the
> name of each upcoming PDF unique)
> 
> Regards,
> Daniel

If you only need to modify the file name of the destination PDF, you could 
use the prtofile backend in combination with the title2file snippet and 
calling ghostscript as a postprocessor.

If you need in addition to alter the value of the /Title key in the PDF's 
docinfo, you need to change the %%Ttitle: comment in the PostScript file (or 
delete it and put a suitable pdfmark statement into Ghostscript's command 
line.

Helge





More information about the cups mailing list