*.types, *.convs, filters, and cupsFilter
Paul
paul.conklin at cerner.com
Tue May 3 09:01:00 PDT 2011
sparing you all the long sad story as to the why, here is what I'm trying to accomplish. I want CUPS to ALWAYS call a filter script, regardless of type. it's working well except when I send a pcl type job, according to the mime.types as well as the c* file, it is matching as type application/vnd.cups-raw. I can make this model work by commenting out that type from mime.types, but I really don't want to. Ideas? Here is my current config. paultest is my filter name. Eventually i'm going to fine tune my types, but I did the hand of god approach first to just try and catch them all.
paul.types
application/paul
paul.convs
application/pdf application/paul 0 -
application/postscript application/paul 0 -
application/vnd.hp-HPGL application/paul 0 -
image/gif application/paul 0 -
image/png application/paul 0 -
image/jpeg application/paul 0 -
image/tiff application/paul 0 -
image/x-photocd application/paul 0 -
image/x-portable-anymap application/paul 0 -
image/x-portable-bitmap application/paul 0 -
image/x-portable-graymap application/paul 0 -
image/x-portable-pixmap application/paul 0 -
image/x-sgi-rgb application/paul 0 -
image/x-xbitmap application/paul 0 -
image/x-xpixmap application/paul 0 -
image/x-sun-raster application/paul 0 -
image/x-alias application/paul 0 -
image/x-bitmap application/paul 0 -
image/x-icon application/paul 0 -
application/x-cshell application/paul 0 -
application/x-perl application/paul 0 -
application/x-shell application/paul 0 -
application/x-csource application/paul 0 -
text/html application/paul 0 -
text/plain application/paul 0 -
text/css application/paul 0 -
application/rss+xml application/paul 0 -
application/vnd.cups-command application/paul 0 -
application/vnd.cups-form application/paul 0 -
application/vnd.cups-pdf application/paul 0 -
application/vnd.cups-postscript application/paul 0 -
application/vnd.cups-ppd application/paul 0 -
application/vnd.cups-raster application/paul 0 -
application/vnd.cups-raw application/paul 0 -
application/octet-stream application/paul 0 -
PPD Line
*cupsFilter: "application/paul 0 paultest"
paultest
#!/usr/bin/ksh
echo "0:$0" >> $TMPDIR/$$.paul
echo "1:$1" >> $TMPDIR/$$.paul
echo "2:$2" >> $TMPDIR/$$.paul
echo "3:$3" >> $TMPDIR/$$.paul
echo "4:$4" >> $TMPDIR/$$.paul
echo "5:$5" >> $TMPDIR/$$.paul
echo "6:$6" >> $TMPDIR/$$.paul
echo "APPLE_LANGUAGE: " $APPLE_LANGUAGE >> $TMPDIR/$$.paul
echo "CHARSET: " $CHARSET >> $TMPDIR/$$.paul
echo "CLASS: " $CLASS >> $TMPDIR/$$.paul
echo "CONTENT_TYPE: " $CONTENT_TYPE >> $TMPDIR/$$.paul
echo "CUPS_CACHEDIR: " $CUPS_CACHEDIR >> $TMPDIR/$$.paul
echo "CUPS_DATADIR: " $CUPS_DATADIR >> $TMPDIR/$$.paul
echo "CUPS_FILETYPE: " $CUPS_FILETYPE >> $TMPDIR/$$.paul
echo "CUPS_SERVERROOT: " $CUPS_SERVERROOT >> $TMPDIR/$$.paul
echo "DEVICE_URI: " $DEVICE_URI >> $TMPDIR/$$.paul
echo "FINAL_CONTENT_TYPE: " $FINAL_CONTENT_TYPE >> $TMPDIR/$$.paul
echo "LANG: " $LANG >> $TMPDIR/$$.paul
echo "PPD: " $PPD >> $TMPDIR/$$.paul
echo "PRINTER: " $PRINTER >> $TMPDIR/$$.paul
echo "RIP_CACHE: " $RIP_CACHE >> $TMPDIR/$$.paul
echo "TMPDIR: " $TMPDIR >> $TMPDIR/$$.paul
echo "Library:" >> $TMPDIR/$$.paul
grep 'CER_FORM' $PPD | cut -f2 -d':' >> $TMPDIR/$$.paul
echo "Forms:" >> $TMPDIR/$$.paul
lpoptions -d$PRINTER -l | grep *True | cut -f 1 -d ":" | cut -f 1 -d "/" >> $TMPDIR/$$.paul
cat $6
More information about the cups
mailing list