[cups.general] How to insert multiple filters for one application type in Mime.convs

Michael Sweet msweet at apple.com
Mon Apr 26 09:15:48 PDT 2010


On Apr 26, 2010, at 7:17 AM, andrew wrote:
> Hi There,
> 
> I have a question regarding the mime.convs file - if you might be able to help me that'd be much appreciated.
> 
> I have my mime.types file set up properly, and the mime.convs file is forwarding my print jobs to the proper filter based on the application type - ie. I have 'application/foo' being filtered in the mime.types file based on a search string in the document, and I have 'application/foo' defined in my mime.convs file which calls a filter 'filter1_2ps'.
> 
> I want to be able to call a second filter now in mime.convs for 'application/foo' (such as 'filter2_ps') but adding a new line doesn't work.  Nor does separating the filters by comma. If i simple add a new line, only the first filter gets executed, and if I add a comma, the jobs fails completely.
> 
> Has anybody had any experience with adding multiple filters for a single application type in the mime.convs file before?  If it can't be done, does anybody know of any other methods that I could try?

OK, so you can't define multiple filters in mime.convs for the same type pair, e.g.:

    application/foo application/bar 100 filter1
    application/foo application/bar 100 filter2

will lead to filter1 *or* filter2 being executed - which one is implementation-dependent, but currently I think we'll use filter1.  To run multiple filters for a single pairing you can either create a wrapper script or use intermediate types, e.g.:

    application/foo vendor/filter1 100 filter1
    vendor/filter1 application/bar 100 filter2

where "vendor/filter1" would be defined in your .types file with no matching rules.

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair








More information about the cups mailing list