The default printer could not be loaded.

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Merger for .NET (v4)  /  Re: The default printer could not be loaded.

DynamicPDF Merger for .NET (v4) Forum

I am getting the following error message:
The default printer could not be loaded.

When I do the followind variable declaration:
Dim printJob As PrintJob = New PrintJob(Printer.[Default])

I am using the product ceTe.DynamicPDF.Printing.NET Ver. 4.20.0 and this is the full stack trace:

   at #Lmi.#koi.#d3d()
   at ceTe.DynamicPDF.Printing.Printer.get_Default()
   at PortalProveedores.frmImprimirFacturas.btnImprimir_Click(Object sender, EventArgs e) in C:\ABiSoft\Proyectos\Grupo PSA\TFS\PortalProveedoresPSA\Forms\frmImprimirFacturas.aspx.vb:line 274
   at DevExpress.Web.ASPxButton.OnClick(EventArgs e)
   at DevExpress.Web.ASPxButton.RaisePostBackEvent(String eventArgument)
   at DevExpress.Web.ASPxWebControl.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Posted by a ceTe Software moderator - Commonly asked question
Hi,

In your code, please try and specify the actual printer's name in place of Printer.Default. The ASP.NET code runs under the IIS user account, and it may not have access to the printer you are trying to print to or may have a different default printer.

The printers are typically installed and configured for each account and a default printer might be a different printer for the internet user account or it might not have been configured correctly. Please make sure that the printer is configured correctly so that the application can access it for printing.

Also using PrintManager you can read the printers installed using Printer.GetLocalPrinter() method, you will be able to see what printers are installed for the internet user account and pick the correct printer to print to.

Thanks,
ceTe Software Support Team
That would be an issue because the web application is hosted on a third party shared server and it has not any default printer configured; and, and the same time, we are talinkg about a web application, isn't suppose to get the printers list from the cliente machine and not from the IIS server? otherwise, how the print will come out?

Thanks

Misael
Posted by a ceTe Software moderator
Hi,

It is not possible to print the PDF documents on a client's machine through their browser using DynamicPDF PrintManager. 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.

Also please note that the respective printer driver needs to be installed on the server where the application is running.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 12:24 PM.