Mega Search
23.2 Million


Sign Up

Make a donation  
Dissappearing print job with TPrinter  
News Group: borland.public.delphi.nativeapi.win32

If I use a network printer with the Tprinter object and the network printer is not available because the network is down, TPrinter allows me to execute the end doc method with out raising an EPrinter exception. The print job then dissappears into the ether. I have simulated this scenario by pulling out my network cable at the critical moment. Other applications such as word and notepad can detect that the printer is unavailable and bring up a dialog box. I tried to detect this error condition myself using windows GDI function call GetPrinter, with level 2. However getprinter returns 0 in the status field, however I get the correct printer driver name etc. My question is how do I detect if a network printer is unavailable ?

Thanks for any help in advance

Jack Taylor

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 30-Dec-2007, at 3:39 PM EST
From: Jack Taylor