Suppressing print error dialogs

  • Thread starter Thread starter Walt Halfdime
  • Start date Start date
W

Walt Halfdime

Hi,

I have some code that attempts to print a document using Windows API
calls. It works fine. However, if the printer runs out of a paper, I
end up with a dialog popping up on the PC to which the printer is
connected, with a message like 'There was an error found when printing
the document "NAME" to LPT1:. The printer is out of paper. Do you want
to retry or cancel the job?' with 'Retry' and 'Cancel' buttons.

Once this dialog has appeared, all further print requests block and
never get processed until the dialog is manually closed, by clicking
'Cancel'. This isn't practical, as my code is running as part of an
unsupervised server process.

Is there a configuration setting I can set to suppress display of such
dialogs? Is there something I could have programmatically set when
submitting the job?

I've been doing my testing using both a HP LaserJet 4000 and HP
LaserJet 6MP and I get the same results for both.

Any help very much appreciated. Thanks in advance.

Cheers,
Walt.
 
Back
Top