The printer named could not be opened. Error code: 5

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF PrintManager for .NET (v4)  /  Re: The printer named could not be opened. Error code: 5

DynamicPDF PrintManager for .NET (v4) Forum

Hi,

I'm trying to print to a shared printer but I got this error message:
ceTe.DynamicPDF.Printing.PrintingException: 'The printer named "\\server\printer" could not be opened. Error code: 5'

Authorization is not an issue since I can print any files without problem except when using this software.
Has anybody encountered this?

Thanks in advanced.
Posted by a ceTe Software moderator
Hi,

The error code 5 is a windows error and indicates permission issues. The printer to which you are trying to print is not accessible to the application.

Please make sure the printer to which you are printing is accessible by the application. Also install the respective printer driver on the system or the server where in application is running.

You can get the list of printers to which you can print using GetLocalPrinters method. Please refer to the documentation on getting list of installed printers here

Please note that it is not possible to print the PDF documents on client's machine using our DynamicPDF PrintManager product. The DynamicPDF PrintManager component will only print on the server side if it is used in web application as it has no access to the client's printer.

Thanks,
ceTe Software Suppprt Team
Your documentation states that your application can used the shared network printer. But when I used the GetLocalPrinters method, it could not see my shared printer.
Permission is not an issue since I can print directly if I use the \\server\printer method.
Posted by a ceTe Software moderator
Hi,

It looks like the respective printer driver is not installed on the server where the application is running, and this is the reason for not listing the shared printer in the retrieved collection.

GetLocalPrinter method lists all printers which are installed locally.

Yes. please use correct UNC path for shared printer for printing on network pritners

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 9:23 AM.