How to write a (pre-)filter - a little follow-up

Goffioul Michael goffioul at imec.be
Fri Mar 16 14:27:37 CET 2007


> Hi again,
> 
> > You don't need a filter for this. If your script can be called as 
> > simply as "miprint file_to_print", then create a pseudo/special 
> > printer and define its command to "miprint %in". The script will be 
> > fed with a temporary postscript file, kdeprint will take 
> care of the 
> > temporary file creation and removal.
> 
> Tried, tested, works. :-) The command editor also seems to 
> have a way of including optional arguments (%filterargs?) - 
> does this work with this solution as well? (e.g. it would be 
> nice to be able to include a "-P" flag if I want to print on 
> the "private" printing quota, or "-r <hostname>" if the Sun 
> that I usually log on to is down for a change...) Actually 
> asking you all this bit by bit is probably getting on your 
> nerves, so is there any kind of documentation out there for 
> this kind of thing?

There's no documentation, but what you want to do is possible.
In that case, you use a filter as a pseudo-printer. The easiest
is to look at the print-to-pdf implementation, this is the most
complete example. You should be able to easily understand of to
create your own options (with the command editor).

Michael.


More information about the kde-print mailing list