how to filter to pdf, then pass to custom backend?

Ted Tanaka ted.tanaka at gmail.com
Mon Apr 16 08:42:29 PDT 2012


Thanks for the reply, Paul.

I may be getting confused between filter and backend.  Are you suggesting I have my custom backend call the CUPS-PDF backend?  I wasn't planning on adding a custom filter, just a custom backend.  And for some reason I didn't think a backend could call another backend, unless of course I someone connect together the signals and stdin/stdout/stderr.

Thanks!


> You can call as many filters as you want from your custom filter.  Just pass $1 - $5 and usually you have to fib on $6 since you are stacking filters.  Usually I just use my temp files in $TMPDIR.  Just don't forget to clean up after yourself.  Let me know if you need an example let me know.
>
> > Hey everyone -
> >
> > Hope you can help me out.  I need to convert print jobs to PDF then pass them to a custom backend.
> >
> > The options seem to be:
> > - add a pstopdf filter, then call my custom backend
> > - write something like the pdf2email script that calls ghostscript to convert to pdf
> > - figure out how to daisy chain backends and use CUPS-PDF, then chain my custom backend
> > - hack CUPS-PDF to add my custom functionality.
> >
> > I know there's CUPS-PDF, but since there can be only a single backend, I can't add my own custom backend.
> >
> > I noticed a pstopdf filter, but when I added it to mime.conv, I get the error:
> >
> >  client-error-document-format-not-supported: Unsupported format 'application/postscript'
> >
> > Any suggestions on the best way to do this?
> >
> > Thanks!
>





More information about the cups mailing list