controlling font, size and orientation of samba text jobs

Kurt Pfeifle kpfeifle at danka.de
Thu Aug 17 07:44:00 PDT 2006


Steve Hanselman <steveh at brendata.co.uk> wrote (Thursday 17 August 2006 11:48):

> Hi,
> 
> we run a number of old DOS applications that spool output through 
> Samba, I have a print filter that takes this text, runs it through 
> enscript with various options depending on the queue, landscape, 
> font size, number up etc.
> 
> This was fine on the old printing system on RH7.1, but I'm 
> struggling to see the correct way to do this with CUPS.
> 
> The only way I can see to do this is to generate a queue for each, 
> don't use the normal ppd's but use the foomatic ones and then add 
> a cupsFilter entry for text/plain to point to my filter, 

You can add a cupsFilter entry to *any* PPDs; they are not an
invention of Foomatic, but of CUPS.

You can add more than one cupsFilter entry to a PPD.

You could also use an "interface script" with CUPS (no PPD at 
all) for a queue. See "man 7 filter" and the -i parameter in
"man lpadmin". Just make the interface script your text-to-
whatever filter...

> is this 
> the correct way or is there a way of either setting these 
> attributes for texttops on a per queue basis or using the standard 
> ppd and having a filter override on that? 

The texttops and following filters in the chain understand
print options like landscape, number-up, font size, margins,
prettyprint, duplex etc. For font size, tranform it into "lpi" 
and "cpi" (lines per inch and characters per inch):

  -o cpi=10.6
  -o lpi=6.3

or whatever.

Yes, and you can set different defaults per queue. (Hint: "man
lpoptions"; or just use KDE's kprinter, and click "Save" when you
are done setting up all your options). 

More Details are here:

  for CUPS 1.1.x: http://www.cups.org/doc-1.1/sum.html#4_1 ff.
  for CUPS 1.2.x: http://www.cups.org/documentation.php/options.html

> Steve

Cheers,
Kurt




More information about the cups mailing list