Skip to content

This epson fiscal printer is a small library to print fiscal invoices and non fiscal documents using C#.

License

Notifications You must be signed in to change notification settings

hannes2706/epson-fiscal-printer

Repository files navigation

Epson Fiscal Printer

This epson fiscal printer is a small library to print fiscal invoices and non fiscal documents using C#.
I have tested this library with the Epson FP81.

Currently the api only works with the default port: 9100

Print invoice

EpsonFiscalPrinter epsonFiscalPrinter = new EpsonFiscalPrinter("<ip_address>");

epsonFiscalPrinter.BeginInvoice();
epsonFiscalPrinter.AddProduct("Your product", 21.9m);
epsonFiscalPrinter.AddProduct("Another product", 5m);
epsonFiscalPrinter.EndInvoice(PaymentType.CASH);

var epsonFiscalPrinterResponse = epsonFiscalPrinter.Print();

if (!epsonFiscalPrinterResponse.IsSuccess) {
  Console.WriteLine("ErrorResponse code:" + epsonFiscalPrinterResponse.Code + " status: " + epsonFiscalPrinterResponse.Status + " AdditionalInfo: " + epsonFiscalPrinterResponse.AdditionalInfo);
}

Print document

EpsonFiscalPrinter epsonFiscalPrinter = new EpsonFiscalPrinter("<ip_address>");
epsonFiscalPrinter.BeginDocument();
epsonFiscalPrinter.AddTextToDocument("Hello world!", FontType.LARGE);
epsonFiscalPrinter.AddTextToDocument("Here you can write whatever you want");
epsonFiscalPrinter.EndDocument();

epsonFiscalPrinter.Print();     

Payment types

PaymentType.CASH  
PaymentType.CREDIT_CARD

epsonFiscalPrinter.Print();        

About

This epson fiscal printer is a small library to print fiscal invoices and non fiscal documents using C#.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages