printer help?
-
hi, i need to display the printer status. whether it is connected or switched on or not. there is any api call or mfc call for this. share with me. any one help to me. thanks in advance. Murali.M
-
hi, i need to display the printer status. whether it is connected or switched on or not. there is any api call or mfc call for this. share with me. any one help to me. thanks in advance. Murali.M
There aren't any good way to get printer status in windows with most print drivers.... 1) First 2k, and XP does not poll printer status unless you submit a job. 2) GetPrinter return status success even if printer turned off 3) Let's say you submited job... and do something like GetJob.... - Error reported after ~60 seconds - Most print drivers will only report "printer out of paper" as universal error, printer offline / opened / low inc -> "out of paper". - Now let's say spooler returned status printed and job removed from the job queue. It really means nothing. Printer buffers are so large these days your entire job could be spooled to printer buffer before printer even tried to print. - You detected somewhat error in the print queue, and decided to cancel the job... it takes about 90 seconds to cancel print job... If during those 90 seconds error condition is fixed, job will be printed anyway... I wrote some code in the past for "secured & guaranted" check printing and it was a pain ... Had to exclude number of printers ( badly written drivers )... Also AddMonitor is helpfull but only for local printing....