[cups.general] Raw printing via IPP

Johannes Meixner jsmeix at suse.de
Tue Jan 24 05:10:39 PST 2006


Hello,

On Jan 24 06:04 paulthompson at orange.net wrote (shortened):
> If I change the '-' in mime.convs to another filter I can see that program
> being executed in the error_log (it of course fails as the format doesn't
> match) so it is correctly assessing the input coming over the internet as
> octet-stream and trying to convert it into raw. Basically, it seems that CUPS
> is failing to recognise the '-' as the special pass-thru filter.

I don't know why this happens but shouldn't it work when you
simply replace the '-' in mime.convs by a wrapper for 'cat'?

Note that any filter must be capable of reading from a filename
on the command-line (as the optional argv[6]) or from stdin.
Example:
----------------------------------------------------------------
#! /bin/bash
# have the input at fd0 (stdin) in any case
[ -n "$6" ] && exec <"$6"
# forward the data
cat -
----------------------------------------------------------------
For details see for example
http://portal.suse.com/sdb/en/2003/06/jsmeix_print-cups-filters.html

Of course you may win a "useless use of cat award"
but who cares when a quick hack is o.k. for you ;-)

Note that after enabling the application/octet-stream fallbacks
any user can print (accidentally) any binary nonsense which
is sent directly to the ptinter which may lead to tons of sheets
printed with meaningless characters.


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5      Mail: jsmeix at suse.de
90409 Nuernberg, Germany                    WWW: http://www.suse.de/





More information about the cups mailing list