Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Print to Unix systems without direct printer access' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Print to Unix systems without direct printer access
Authored by: fenner on Apr 20, '05 05:53:00PM
A small modification to your script which may make it more reliable: use
lpr -r printUpload.pdf
Most versions of lpr support the "-r" flag, which specifies that it should remove the file after printing is done. It may be possible that the
lpr printUpload.pdf; sleep 1; rm printUpload.pdf
will remove the file before lpr gets a chance to actually send it to the printer.

[ Reply to This | # ]
Print to Unix systems without direct printer access
Authored by: PeteVerdon on Apr 23, '05 07:44:59PM

Yup, that's a lot better. Bear in mind that this was a quick hack written quite quickly after I was fed up with doing it manually one too many times. But anything involving sleep is usually a monstrous hack.



[ Reply to This | # ]
Print to Unix systems without direct printer access
Authored by: PeteVerdon on May 10, '05 08:56:34AM

I've just tried to make this modification, and it seems the version of lpr on our Sun server doesn't in fact have an option to remove the file. Never mind - I'm out of there in a month or so any way.

Pete



[ Reply to This | # ]