I am having issues figuring out how to add a filter for a raw queue in CUPS - if this is possible.Basically, what I need to do, is convert a TIFF to PS before sending it to the raw queue. The printer does not have built-in TIFF support, so the output is junk.I need to keep the printer setup as a raw queue, and cannot add a second print queue for this same printer for the filtering.Is there anyway to capture a TIFF file (desirably for a single printer) and convert it to PS before sending it raw?Would this be something I would do in the mime.convs for the raw application?
CUPS filter for a raw queue
centos;printing;cups
I have found a solution to this. Basically, I am creating a new printer with a custom backend, that lets me manipulate the incoming data before sending it out again. So I have one printer acting as a wrapper, that receives the data, converts the image, then sends it to the actual printer.To accomplish this, there is an openSUSE RPM package that provides a CUPS pipe backend that can be used with CentOS. This backend is used like a command line pipe.I downloaded that RPM above and extracted the pipe script. This script copied to /usr/lib/cups/backend/pipe and made executable.I then wrote a small script, that will take the printing information passed to it, including printer options from the printer URI. This script does the image conversion (for this task TIFF to PDF) if needed, and then sends it on to the actual printer.#!/bin/bashFILE=${PIPE_BACKEND_ARGV6}MIME_TYPE=$(file --mime-type ${FILE} | awk '{print $2}')if [[ $MIME_TYPE == *tiff ]]  then    tiff2pdf -o /tmp/printConv-$$.pdf $FILE    FILE=/tmp/printConv-$$.pdf    CONV=1filpr -P $1 ${FILE}if [[ $CONV -eq 1 ]]  then   rm ${FILE}fiI then setup a wrapper printer with the following URI syntax:pipe:/path/to/cups-wrapper-script?actualPrinterNameHere the pipe backend is used. It calls the script at /path/to/cups-wrapper-script with the argument actualPrinterName, which is used to tell the script what actual printer to send the job to.