XML2ESCPOS 0.5.2
See the version list below for details.
dotnet add package XML2ESCPOS --version 0.5.2
NuGet\Install-Package XML2ESCPOS -Version 0.5.2
<PackageReference Include="XML2ESCPOS" Version="0.5.2" />
paket add XML2ESCPOS --version 0.5.2
#r "nuget: XML2ESCPOS, 0.5.2"
// Install XML2ESCPOS as a Cake Addin #addin nuget:?package=XML2ESCPOS&version=0.5.2 // Install XML2ESCPOS as a Cake Tool #tool nuget:?package=XML2ESCPOS&version=0.5.2
XML2ESCPOS
Net Standard library that provides a simple XML Template engine with support for images, variables and loops. For ESC / POS Thermal Printers. You can print to Windows printers (using the print queue so windows takes care of waiting for it to turn on or have paper) or directly to network printers.
Example:
string plantilla = "<C><RESET/><CENTER/><B>Hello!</B><BR><BR><END/></C>";
XML2ESCPOS.XML2ESCPOS.Print("Epson", plantilla, false);
Printer print:
**Hello!**
Usage:
Print(PrinterOrIP, Plantilla, EsIP, NombreTrabajo, CodePage, Vars, BucleVars)
ImpresoraOrIP: (Required String) Windows Printer Name if EsIP = false or IP Address if EsIP = true
Plantilla: (Required String) String with the Template
EsIP: (Optional Bool, Default is True) If PrinterOrIp is System Windows Printer Name you must set to false. If PrinterOrIP is Ip Address you can ignore it or you can set to True
NombreTrabajo: (Optional String, Default is "Printer Job") Print job name
CodePage: (Optional Int, Default is 858) Codepage that has the thermal printer configured. https://docs.microsoft.com/en-us/windows/win32/intl/code-page-identifiers
Vars: (Opcional List<KeyValuePair<string, string>>) List of the variables that you are going to use with their name and value. More Info
BubleVars: (Opcional IEnumerable<KeyValuePair<string, string>>) List of variables that are the lists that you will use with each loop with its name More Info
Vars:
Example:
string plantilla = "<C><RESET/><LEFT/><B>Hello <![CDATA[MyName]]>!</B><BR><BR><END/></C>";
List<KeyValuePair<string, string>> valores = new List<KeyValuePair<string, string>>();
valores.Add(new KeyValuePair<string, string>("MyName", "Jesus"));
XML2ESCPOS.XML2ESCPOS.Print("Epson", plantilla, false, Vars:valores);
Printer print:
Hello Jesus!
BucleVars:
Example:
public class Client
{
public string Name { get; set; }
}
string plantilla = "<C><RESET/><LEFT/><LOOP VARNAME='clientes'><B>Hello <![CDATA[cliente.Name]]>!</B><BR></LOOP><BR><END/></C>";
List<Client> lc = new List<Client>();
lc.Add(new ClienteT { Name = "Jesus" });
lc.Add(new ClienteT { Name = "Juan" });
List<KeyValuePair<string,object>> valoresBucle = new List<KeyValuePair<string,object>>();
KeyValuePair<string,object> clientevar = new KeyValuePair<string,object>("cliente", lc);
valoresBucle.Add(clientevar);
XML2ESCPOS.XML2ESCPOS.Print("Epson", plantilla, false, BucleVars:valoresBucle);
Printer print:
Hello Jesus!
Hello Juan!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- GuiLabs.Language.Xml (>= 1.2.46)
- RawPrint.NetStd (>= 1.0.0)
- SkiaSharp (>= 2.80.2)
- System.Text.Encoding.CodePages (>= 5.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.