printing to file

Anonymous anonymous at easysw.com
Thu Jul 8 09:17:13 PDT 2004


Hello ,

> 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 ---
#!/bin/sh

# echo "start ($*)" >/tmp/file.debug

if [ -n "$6"  ]; then
  cat "$6" > /tmp/printerfile
else
  cat - >  /tmp/printerfile
fi

# rsh to otherhost

rm -f /tmp/printerfile

exit 0
-- 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).


Cheers





More information about the cups mailing list