Error "Settings to access '"' printer are not valid."

Asked

Viewed 189 times

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?

1 answer

1


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 accessed the manufacturer’s website: https://www.bematech.com.br/manuais-e-drivers/

I had some options and after installing one of these options... It worked: inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.