Skip to content

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.

EricksonLopez.Printing Overview

EricksonLopez.Printing (1.0.0 on NuGet, L3, 1,297 downloads) builds ESC/POS receipt byte streams and ZPL II industrial labels with EricksonLopez.Result-based IPrinterClient transports over TCP, pooled TCP, serial ports, and SignalR hubs.

  • Zero-exception Result<bool> transport contract: IPrinterClient.PrintAsync returns structured PrintingErrorCodes (TransmissionError, SocketError, Timeout, Canceled, InvalidOptions) instead of throwing on network or hardware failures.
  • Injection-safe receipt & label builders: EscPosBuilder(Encoding? encoding = null, bool safeMode = true) sanitizes control characters by default, and ZplBuilder(bool safeMode = false) offers ZplSanitizer and safeMode: true protection against raw ZPL injection.
  • Non-idempotent physical print protection: ResilientPrinterClient / ResilientPrintingExtensions.WithRetry(...) distinguishes pre-transmission connection errors from mid-stream transmission failures so physical receipts are not duplicated on retry.
flowchart LR
Bld["EscPosBuilder / ZplBuilder"] --> Doc["Immutable IPrintDocument"]
Doc --> Res["ResilientPrinterClient (WithRetry)"]
Res --> Tr["PooledTcpPrinterClient / TcpPrinterClient / SerialPrinterClient / PrinterHub"]
ESC/POS & ZPL Document Builder to Printer Transport FlowEscPosBuilder or ZplBuilder produces an immutable IPrintDocument that routes through optional ResilientPrinterClient retry policies to TcpPrinterClient, PooledTcpPrinterClient, SerialPrinterClient, or HubPrinterDispatcher.
View accessible text summary and structure

EscPosBuilder or ZplBuilder produces an immutable IPrintDocument that routes through optional ResilientPrinterClient retry policies to TcpPrinterClient, PooledTcpPrinterClient, SerialPrinterClient, or HubPrinterDispatcher.

flowchart LR
Bld["EscPosBuilder / ZplBuilder"] --> Doc["Immutable IPrintDocument"]
Doc --> Res["ResilientPrinterClient (WithRetry)"]
Res --> Tr["PooledTcpPrinterClient / TcpPrinterClient / SerialPrinterClient / PrinterHub"]

All 8 packages are published at 1.0.0 on NuGet (net8.0;net9.0;net10.0). Local workspace Directory.Build.props sets 2.0.0, with per-package overrides in Zpl (2.1.0) and SignalR (3.0.0). Overall AOT status is Partial (7 Full, 1 Incompatible):

Package NuGet (1.0.0) Local HEAD AOT Status Role
EricksonLopez.Printing Published (258 dl) 2.0.0 Full IPrintDocument, IPrinterClient, TcpPrinterClient, PooledTcpPrinterClient, ResilientPrinterClient, DI
EricksonLopez.Printing.EscPos Published (177 dl) 2.0.0 Full EscPosBuilder, EscPosAlignment, EscPosQrErrorCorrection, EscPosUnderline
EricksonLopez.Printing.EscPos.Imaging Published (143 dl) 2.0.0 Full EscPosImageBuilderExtensions, MonochromeBitmapConverter, EscPosDitherAlgorithm
EricksonLopez.Printing.EscPos.Status Published (141 dl) 2.0.0 Full EscPosStatusCommands, EscPosStatusParser, EscPosPrinterStatus
EricksonLopez.Printing.Serial Published (142 dl) 2.0.0 Full SerialPrinterClient, AddSerialPrinter, AddKeyedSerialPrinter
EricksonLopez.Printing.Zpl Published (152 dl) 2.1.0 Full ZplBuilder, ZplFont, ZplOrientation, ZplPrintDocument, ZplSanitizer
EricksonLopez.Printing.Zpl.Imaging Published (139 dl) 2.0.0 Full ZplImageBuilderExtensions, ZplGraphicFieldConverter, ZplDitherAlgorithm
EricksonLopez.Printing.SignalR Published (145 dl) 3.0.0 Incompatible IsAotCompatible=false, EnableTrimAnalyzer=false (PrinterHub, HubPrinterDispatcher)

benchmarks.json records 0 BenchmarkDotNet rows (hasBenchmarks: false) for printing because no standard BenchmarkDotNet.Artifacts reports exist outside excluded MEGA-AUDIT directories. Unverified README throughput/boot numbers are omitted.