printing to file
anonymous at easysw.com
Thu Jul 8 09:17:13 PDT 2004
> I have to create printfiles and send them via rsh to an old printer.
> But how can I get my file? Sending via rsh is not the problem,
> only creating the file on disk does not work.
> I tried different approaches, (up to writing my own backend...)
I used my own "backend" to debug the printerfilters.
It should be easy to rewrite to meet your needs.
-- snip ---
# echo "start ($*)" >/tmp/file.debug
if [ -n "$6" ]; then
cat "$6" > /tmp/printerfile
cat - > /tmp/printerfile
# rsh to otherhost
rm -f /tmp/printerfile
-- snap ---
you MUST test and change the code before using, i just cut'n'pasted
some lines out of my script.
You shuld use "mktemp" to generate safe tmp-files ("printerfile").
name the script "file", copy it to your backend-directory and configure your printer to use "file" as backend ("DeviceURI file:/whatever"
in your /etc/cups/printers.conf).
More information about the cups