Epicor Report Printing Issue

We are getting following Issue while our second Task Agent is trying to process the report printing:

System.Exception: Initial DocumentProperties call failed. Error 1392: The file or directory is corrupted and unreadable at PdfPrintingNet.PdfPrint.c6e27125e412036c9e584c2e46cb51f7a(Byte[] cdbbe4698d85f704fb0f22ac792e56f47, String c4f15c193045594e277ed09e85e293fa6, String cc035c63003d26e77cf79bef83c7e504f, String cceb9b617f6e8532922232e6cdc63cb66, PrinterSettings c4a5d3cfb3105d0d72441638a2332f4dc, PdfWatermark cd6cc9058a2d92015b56d02d2020b2023) at PdfPrintingNet.PdfPrint.Print(Byte[] pdfArray, String password, String printerJobName)

Any clue ?

Did you ever manage to resolve this error as im now seeing this when printing to a specific printer.

IF I remember well, this was an issue due to a watermark present on the report that was going outside the boundary of the printing area or paper. Do you have any ?

No, no watermarks.
I can also print the same document to another printer…
I have completely removed and re-added this printer and no change.
The clients print fine when printing directly just not through Epicor.

Please post your error,

Hi, my error is below.

The Error 1392 can mean that it could not access the printer. So you need to go to the machine the task agent is running on and make sure that the user that service runs at can access the printer being used for that report.

Moreover, you need to evaluate Server Event Viewer Logs. Also, try to print on some local shared printer just to close down the issue source.
Printer connectivity is also important .,.,

Hi, this printer is perfectly fine outside of Epicor.
The printers were working and then stopped.

The service is being run as Local System.
I have given access to the printer to all Epicor related user accounts and no change.

Hi, is there anything else you could add?
Epicor is the only application we cant print from.

is base report working fine?

There could be different issues at your end, that needs more info.

1- Check Epicor Printer Maintenance and verify the Network path (IP) is accessible from the Epicor Task Agent Server,
2- Check if the Printer IP is same as in Printer Maint.
3- Stop - Start the Print Spooler Service from the Server
4- Clear the Print Spool folder: C:\Windows\System32\spool\PRINTERS

@Ricky90 - Did you ever get this resolved? I just ran into this issue.

First, I hate printers and this is not my AO. But we had this same error message a few weeks ago.

In short, we fixed it by buying a new printer.

OK, I’ll rewind. So, 95-ish% of our printing is done with client printers, meaning if you can print to it from Excel on your machine, you can use it in Epicor. Always works, done deal.

But. We use the EKW (EMWW) android app, which forced me to set up some “Server Printers” in Epicor.

This has always worked fine, AFAIK, if the printer has an ethernet cord or is wi-fi enabled.

When it failed was when we tried to do a printer share with a printer that was connected by USB (only). I mean, sometimes it works. And then when it doesn’t, it really doesn’t. So we just bought a wi-fi printer and replaced the USB one and we are good now.

Another big thing, the printer needs to be installed on, and shared from, the app server that has the task agent.

image

(That same info is here, too.)

Also, I found that all I needed to do to replicate the issues was to use the Test Printer button in Printer Maintenance. Saves a lot of time.

This is a pic from before fixing the issue.

1 Like

@JasonMcD - thanks so much for all that information! My issue ended up being DNS related. Go figure! I used the Test Printer button, but I could only use it once before having to restart the client. If I tried using it twice it the client would hang and eventually crash.

That is wild reading that server-side printers need to be installed and shared from the Epicor server. None of ours are and they still work.

1 Like

I believe that. My boss found that to be, um, unusual advice. However, (a) for us it was tremendously faster when shared from the app server, and (b) it’s Epicor’s official recommendation, so if you were to ever put in a ticket, you need to do that to make them happy.

Glad you got it working.

(a) for us it was tremendously faster when shared from the app server

Well shoot, that’s worth it. Guess I will be switching them now!

Now this is a very old topic, but I have run into the exact same issue recently.
In my case, it was related to the fact that the printer uses a Type 4 driver.
Was yours a Type 4 driver printer?

In my case, the workaround was to use the “printer share name” rather than the “printer name”. This would require you to set up classic printer sharing, even though Type 4 printers do not require classic sharing, as there are no client drivers to share.

@JasonMcD I too hate printing and related. How is it that something so essential and seemingly simple can, in fact, be so difficult. When did they add the “Test Printer” button? I’m on 10.2.400 and there’s no such button on the Printer Maintenance form.

Oh I couldn’t tell you. I never even tried setting up printers till 10.2.500 or later.