How to write a (pre-)filter

Anna Foglein foeglein at mi.uni-erlangen.de
Fri Mar 16 11:35:10 CET 2007


Hi, 
 
> > If a filter is the wrong approach anyway, what would be the 
> right one?
> 
> 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.

Wow, it works this nicely? Great! So this "%in" is the KDEPrint-created ps?
:)
 
> > Anyway, when KDEPrint prints something for e.g. user 
> "anna", with what
> > user ID is this done? (This could be important for things 
> like reading
> > ssh keys etc.)
> 
> Scripts associated with pseudo printers are executed in the user
> space (they are independent of CUPS); more specifically within the
> kded daemon. So the script is executed with the current user ID.

Very good, one more potential problem solved!

Thank you very much for the short and quick answer to my long and tedious
question!

bye
Anna



More information about the kde-print mailing list