Error " settings to access the printer '"' are not valid."
I have an application ASP.Net MVC that makes product sale and printing of this sale we work with several brands of thermal printers (not tax) such as: Tanca, Bematech, Epson, among others.. we use to print the windows spooler, however, recently the customer bought a computer that already comes with the printer integrated into it.. when we send the print of the sale the following error occurs: "The settings to access the 'CUSTOM_IMPRESSORA' printer are not be."
We are doing the printing as follows:
public void impressaoVenda(VendaModel venda, String itens)
{
PrintDocument printDoc = new PrintDocument();
PrintController printController = new StandardPrintController();
printDoc.PrintController = printController;
PaperSize paperSize = new PaperSize("BOBINA", 800, 999999);
printDoc.DefaultPageSettings.PaperSize = paperSize;
printDoc.PrinterSettings.DefaultPageSettings.PaperSize = paperSize;
String nomeImpressora = venda.Funcionario_Logado.Impressora;
int vias = 1;
printDoc.PrinterSettings.PrinterName = nomeImpressora;
printDoc.DocumentName = "Cupom";
this.itens = itens;
this.venda = venda;
printDoc.PrintPage += new PrintPageEventHandler(this.PrintPageVenda);
printDoc.Print();
limparObjetosImpressao();
}
The error occurs in the following Line:
printDoc.Print();
Do not reach or enter the method.
Has anyone been through this?
1 answers
I had the same problem with one from Bematech, the error was the same and apparently followed almost the same example you gave in the code... I went to the manufacturer's website: https://www.bematech.com.br/manuais-e-drivers /
Had some options and after installing one of these options... Work: