Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inserting another filter into the CUPS chain?



Dave Camp wrote:
I'm working on a CUPS raster printer filter and I need to get a another custom filter to be run on the PDF spool file before cgpdftoraster is run.

Is there an easy way to do that? From what I've read, I don't see anything that lets me insert random filters into the print chain.

The fallback solution we're thinking of is to specify that our printer filter takes a custom data format, indicate that our custom PDF filter takes Apple PDF as input and outputs our custom data format, and make our intermediate filter launch cgpfdtoraster behind the scenes. Is there a better way to solve this?

List a script-based filter that handles application/pdf and then runs your PDF filter, cgpdftoraster, and your printer filter, e.g.:

    #!/bin/sh
    yourpdffilter "$1" "$2" "$3" "$4" "$5" $6 | \
        cgpdftoraster "$1" "$2" "$3" "$4" "$5" | \
        yourrasterfilter "$1" "$2" "$3" "$4" "$5"
    exit $?

Note that $6 should *not* be quoted (it will be a filename without
spaces or not present), but everything else must be.

--
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Printing mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/printing/email@hidden

This email sent to email@hidden
References: 
 >Inserting another filter into the CUPS chain? (From: Dave Camp <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.