I am looking for some guidance on creating a script that will check a specific folder, print all documents (if any) and then delete those documents. I would also like to run this script as a cron job.
The reason I am looking to do this is because I currently have a PHP webapp that creates pdf invoices on the fly and saves them in a certain folder, but I have no way of automatically printing these documents from the web (I imagine for security/spam issues).
I am no language preference but would ideally like the script to be able to control how many copies are printed, which tray to use in the printer etc.
exec("lp generated_invoice.pdf", $output, $status);
– depquid Apr 17 '13 at 16:03