0
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 fiscal) 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 printing of the sale occurs the following error: "Settings to access the printer 'CUSTOM_IMPRESSORA' are not valid."
We are making the impression 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 on the following line:
printDoc.Print();
Not even getting into the method.
Someone’s been through it?