Last post Dec 07, 2012 02:30 PM by bamartin007
Mar 11, 2011 08:08 PM|bamartin007|LINK
On my intranet IIS web servers, we've been using the
RawPrinterHelper class for quite a while (at least a year or two) to send print jobs to networked Zebra printers. One particular printer intermittently errors out after the StartPagePrinter method; the Win32 error is #183 ("Cannot create a file when that
file already exists"). Many times, this error will continue with each successive print job to that printer, and will sometimes all of a sudden start working again (I can manually get it temporarily working again by restarting the web-server's print-spooler).
The print job never makes it to the print-server when it errors out...it appears to get hung up in the web-server's print spooler. Also note that print jobs to other networked printers during these times continue to work fine.
I've tried (or attempted) some of the "winspool.drv" methods (such as "AbortPrinter" and "SetJob"), but haven't had any luck (not that I know for sure that I have been using those methods correctly). Any ideas on how to handle this "Cannot create a file
when that file already exists" error?
Mar 14, 2011 05:47 PM|bamartin007|LINK
In regards to this problem, I just noticed an interesting thing this morning. First of all, I was incorrect about the print jobs not making it to the print-server; they do make it to the print-server. What is strange is that, in the RawPrinterHelper class,
the document name is assigned as part of the StartDocPrinter() method; that document name (in this case called "Zebra Print Job") will normally show up in the print-server's print queue when that job comes through. However, when print jobs are sent to the
problem printer from that specific web-server, the "Document Name" shows up as
"Remote Downlevel Document". Sending documents to any other printer (whether they are on the same print-server or another) all show up with the correct "Document Name". Sending documents from a similary configured development web-server to the problem
printer works fine (the document name show up correctly). FYI, no printers have been manually added to these web servers.
Any ideas on why the document would show up with the "Remote Downlevel Document"
Dec 07, 2012 02:11 AM|kelewang|LINK
Hi bamartin007, so you have solved this problem already? i am facing the similar problem. same zebra printer, just a bit difference, I am using codesoft(one label design software) provided API to print to remote network printer instead of direct sending
raw bytes to printer. I watched that document has been added into the print queue, but in about 1 minutes, spooler show error-printing.
any drops or comments will be appreciated, thanks!
Dec 07, 2012 02:30 PM|bamartin007|LINK
Hi kelewang, we never did find the root cause of the problem. The printer ended up getting replaced and we haven't seen the error since then.