DemoPOS 0.0.1
See the version list below for details.
dotnet add package DemoPOS --version 0.0.1
NuGet\Install-Package DemoPOS -Version 0.0.1
<PackageReference Include="DemoPOS" Version="0.0.1" />
paket add DemoPOS --version 0.0.1
#r "nuget: DemoPOS, 0.0.1"
// Install DemoPOS as a Cake Addin #addin nuget:?package=DemoPOS&version=0.0.1 // Install DemoPOS as a Cake Tool #tool nuget:?package=DemoPOS&version=0.0.1
DemoPOS
DemoPOS is a simple and lightweight fluent wrapper around RawPrint and ESCPOS to allow for simple and direct printing to a thermal printer installed on a windows machine (Such as an Epson TM-T88IV for example).
The usage is quite straightforward:
To get a list of names of installed printers on the machine, use the RegistryHelper class:
var printers = RegistryHelper.GetInstalledPrinterNames();
Then, create a new DocumentManager with the desired ESC/POS Printer of your choice:
var manager = new DocumentManager(PrinterName);
You can then chain various commands via a fluent style api, such as:
manager.AddTitle("Hello World")
.AddLine("This is a test print")
.AddLine("On a thermal printer.")
.AddQrCode("http://www.example.com")
.AddEmptyLines(5)
.Cut();
To send the commands to the printer, either use the print command (this will clear the command buffer)
manager.Print();
or use the PrintAndContinue command, to keep the buffer (for repetitive printing of the same receipt, for example)
manager.Continue();
If you have any issues with this package, or would like more features (commands) added to the DocumentManager, feel free to open a feature or a pull request on this repository!
Packages Used
- RawPrint
- ESCPOS
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. |
-
net8.0-windows7.0
- ESCPOS (>= 1.2.4)
- RawPrint.NetStd (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.