customizing printcap to email file
what I would like to do is have windows boxes print to a unix printer filter which would convert the file into pdf format and put the file into a directory where it could be emailed out. Anyone tried this? First off, I tried modifying the printcap if= entry to take the file and save it as a file. That was a no go - I just got an error. Now I am thinking about just stopping the printer, which would spool the files in the spool directory. I still need to initiate execution of a program to grab those files and convert them. I am about to start experimenting with this, but I thought that someone might have already done this type of thing. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: customizing printcap to email file
At 3:33 PM -0500 4/3/03, David Banning wrote: what I would like to do is have windows boxes print to a unix printer filter which would convert the file into pdf format and put the file into a directory where it could be emailed out. Anyone tried this? First off, I tried modifying the printcap if= entry to take the file and save it as a file. That was a no go - I just got an error. This is should be workable, although there are probably a number of subtle details that you'll need to pay attention to. You will probably want to set a log file (lf=) for the printer, as some useful error messages might show up there. Other errors show up in /var/log/messages or /var/log/lpd-errs. What error did you get? Note that you'd want to set if= to an executable script, and that the script should just *read* from stdin and write to where you want it written. Eg: #!/bin/sh cat /tmp/somefile First try to get it to work by writing to a /tmp file. If you get that working, you can then move on to getting it to work more like what you really want. -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: customizing printcap to email file
On Thu, 3 Apr 2003, David Banning wrote: what I would like to do is have windows boxes print to a unix printer filter which would convert the file into pdf format and put the file into a directory where it could be emailed out. Anyone tried this? First off, I tried modifying the printcap if= entry to take the file and save it as a file. That was a no go - I just got an error. Now I am thinking about just stopping the printer, which would spool the files in the spool directory. I still need to initiate execution of a program to grab those files and convert them. Setting it up as an input filter is the better way, I think. You just need to create a filter (script or program) and point the if= parameter to that. It's easier to debug filters before they're being called by lpd. Set up a script that takes STDIN, processes it into PDF, then mails it. That's your filter. After it's been tested, put it someplace known (filters often are placed in /usr/local/libexec) and give the whole path in the if= entry. -Warren Block * Rapid City, South Dakota USA ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]