Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.ArgumentException when trying to send a print command #52

Open
arno-developer opened this issue Mar 4, 2022 · 1 comment
Open

Comments

@arno-developer
Copy link

Good day,

I get the following error when I try to trigger the TestPrinter function.

  • ''IBM860' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name')'

I am using a EPSON TM-T70II thermal printer and my code is as follow (C# dotnet core 6, Console app ):

try
{
    printer = new Printer("EPSON TM-T70II Receipt");
    printer.TestPrinter();
}
catch (Exception ex)
{
    Console.WriteLine($"Printer Error: {ex}");
    throw new Exception(ex.Message, ex);
}
@KaiPser
Copy link

KaiPser commented Apr 5, 2022

Hi,

maybe you found the solution in the meantime. Had the same issue right now. Solution was found on gitlab as well, to make it short:

--
System.Text.EncodingProvider ppp = System.Text.CodePagesEncodingProvider.Instance;
Encoding.RegisterProvider(ppp);

Worked for some users including me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants