I created a program to print every html file in a directory to Canon LBP800 printer.
It can be more than 500 files (pages). Can someone help me to provide codes on how to pause the program if printer is not ready(out of paper etc.). If the program keep printing, and printer is not ready some of the data sent to the printer will be lost.

Thanks in advance.