Michael Loßin on Mon, 8 Apr 2002 19:47:58 +0200 (CEST)(envelope-from owner-apsfilter-help@apsfilter.org)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: passing options to subfilters?


On 04-Apr-02 Michal Szymanski wrote:
> Is it possible to dynamically control the subfilter (like a2ps) used by
> apsfilter and be able to pass options specific for a2ps in the
> "lpr" command line?

In general, no. The apsfilter script most likely is running
under a privileged user, so we must not allow arbitrary
options (to any subfilter) to be used. We did allow a similar
construction once and ran into serious security problems.

But if you can explain which a2ps option you actually want
to use, maybe we can create a special switch for it.

Another approach would be to perform the necessary steps
*before* sending the stuff to the spooler, i.e.
        a2ps -my -options my_file | lpr -P my_printer

> And, BTW, could somebody explain how does 'apsfilter' construct options
> passed to 'a2ps'? There are at least 2 variables in apsfilterrc:
> 
>#A2PS_BASIC="--delegate=no -X iso1 -g"
>#A2PS_BASIC='-X iso1'
>#A2PS_OPTS='-X iso1 -m --borders=yes --prologue=color
>#--highlight-level=heavy'
> 
> It seems as if A2PS_OPTS included A2PS_BASIC, but what will happen if I
> uncomment (and change) both?

A2PS_OPTS does actually overwrite the complete command line
and will be used if it is set (with only "-q -o -" added,
so the output will be properly sent to stdout).

A2PS_BASIC is used to supply a basic set of options that are
extended with (the file specific set of) paper size, color,
file type, ... parameters.


HTH
Michael