Dave Slinn
12/27/2002 5:17:00 PM
I am creating an intranet application and would like to use WebServices to
offload all printing services onto a separate server. I have created a
simple web service that uses a PrintDocument object (available from the
Windows Forms tab), and everything seems to work fine - the object gets
initialized, the PrintPage event is fired, the DrawString and DrawRectangle
functions I have added to the PrintPage handler seem to execute, and control
is returned to the calling PrintDocument1.Print method, and the web service
function returns true.
However, a couple of seconds later a Printers Folder message pops up saying
there was an error writing to the specified printer. I check the Event Log
and the following info is there:
"The document dave's test output owned by ASPNET failed to print. Win32
error code returned by the print processor: 3003 (0xbbb)."
I look up error 3003 and this is the text - "A StartDocPrinter call was not
issued. "
When I use this code in a Windows Form appication, it works fine. Why, when
the Windows Forms controls are available for use in a web service, does this
not work? Does it have something to do with the fact that when you issue
the Print method of a PrintDocument there is a window that pops up
displaying the status of the print job. Can I disable this and make the
webservice GUI-less? Is this the problem?
Any help would be appreciated.
- Dave