0

I have a script that is designed to batch print invoices, based on user selection (such as all invoices between selected start end end dates). For the most part, it works fine. Wonderfully, in fact. I can run one batch print after another, different users can, etc.

However, if nothing is printed for an extended period of time (such as an hour or so), the print script stops being able to send things to the printer. No errors or anything. It says that it printed, but there's no stream of paper to validate that claim.

Rebooting the server seems to get it to work again, but as you can imagine, this isn't readily an option. Sometimes simply deleting and re-adding the printer will work, but, again, not a real sustainable option.

I've adjusted the timeouts on the printer so that it won't hibernate or anything, and the printer in question is on the same network that the server is.

The print script in question actually does terminate at the end of the print cycle, so it's not like there's a forcefully terminated process that leaves something open that shouldn't be (note that the script also closes the printer at the end).

Any advice on how to rectify this issue would be greatly appreciated.

Mardalla
  • 41
  • 1
  • 6
  • using a web language like php to perform an actual print task, that's a new one for me! Hard to help though without seeing any code... – Pevara May 19 '16 at 19:33
  • Like pevara said, its uncommon to do this with just PHP. I would recommend some application php sends its request to using `exec` or alike to send a request to a [simple java printer spooler](http://stackoverflow.com/questions/9661295/how-to-access-the-printer-queue-within-java) – Xorifelse May 19 '16 at 19:43

0 Answers0