zplCore.comzplCore.com
38 types

ZplCore.Printing

Printer transports (TCP 9100, USB, Serial, Windows Spooler, CUPS), printer discovery, host status (~HS/~HI), and the stateful/chaos virtual printer (ZplVirtualPrinter).

TypeKindSummary
CommunicationTypeenumHow the printer is attached.
CupsPrinterConnectionclassSends raw data to a CUPS queue on macOS/Linux via lp -d <queue> -o raw. Write-only.
DiscoveredPrinterrecordA locally attached printer found by PrinterDiscovery.
DryRunPrinterConnectionclassDry-run connection (PrinterSettings.EnablePrinting = false): records everything that would be sent, prints nothing. Queries ret…
IPrinterConnectioninterfaceA bidirectional (where supported) raw connection to a label printer.
JobOrientationenumJob orientation: rotates all fields without explicit orientation (^FW) or the whole format (^PO).
MediaTrackingenumMedia sensing / tracking (^MN).
MediaTypeenumMedia type (^MT).
ParallelPrinterConnectionclassParallel (Centronics/IEEE 1284) port. Writes to the port device: "LPT1".."LPT9" on Windows (or a spooler pr…
PrintModeenumPost-print action (^MM).
PrinterConnectionExtensionsclassConvenience extensions for IPrinterConnection.
PrinterConnectionFactoryclassCreates the IPrinterConnection for a PrinterSettings.
PrinterDiscoveryclassBest-effort enumeration of USB-attached printers (no extra dependencies, no raw USB access).
PrinterSettingsclassConnection settings; only the members relevant to PrinterSettings.CommunicationType are used.
RawFilePrinterConnectionclassWrites to a device path or file: /dev/usb/lp0, LPT1, \\.\USB001, a share, or a plain file. Write-only.
SerialPrinterConnectionclassRS-232 / virtual COM port connection (System.IO.Ports). Opens the port per call.
StreamPrinterConnectionclassWrites to (and reads from) any caller-owned stream.
TcpPrinterConnectionclassRaw TCP (port 9100) connection. Opens one socket per call, like ZplPrinterClient.
VirtualCutEventArgsclassThe cutter of ZplVirtualPrinter cut after a label.
VirtualJobEventArgsclassRaw data received by ZplVirtualPrinter (one processed segment).
VirtualLabelEventArgsclassA label rendered by ZplVirtualPrinter.
WindowsSpoolerPrinterConnectionclassRaw printing through the Windows spooler (winspool.drv, datatype RAW) to an installed printer/driver. Write-only.
ZplChaosScriptclassA chaos script: printer options and faults as JSON, e.g. for zplcore serve --chaos script.json.
ZplExtendedStatusrecordParsed ~HQES (host query, extended status) response.
ZplFaultEventArgsclassRaised when a fault becomes active or is cleared.
ZplFaultKindenumPrinter conditions and communication faults simulated by ZplVirtualPrinter (ZplVirtualPrinter.Faults).
ZplFaultRulerecordA scheduled fault: what (ZplFaultRule.Kind), when (ZplFaultRule.Trigger) and how long.
ZplFaultTriggerrecordTrigger of a ZplFaultRule; counts start when the rule is scheduled.
ZplFaultTriggerKindenumWhen a scheduled fault fires.
ZplHostQueryExtensionsclass~HQ host query extensions.
ZplJobSettingsclassPrinter job settings injected at the start of each label format: print mode, media tracking, media type, orientation, darkness …
ZplPrinterClientclassSends ZPL to a network printer (raw TCP, port 9100) or any stream (USB/serial adapters).
ZplPrinterErrorsenumError flags of the ~HQES response (nibbles 8-1), ZPL II Programming Guide P1134473-11EN, ~HQ Table 8 "Error Flags". V…
ZplPrinterFaultsclassScriptable faults and printer conditions of a ZplVirtualPrinter: set conditions now (ZplPrinterFaults.Raise), schedule them det…
ZplPrinterStatusrecordParsed ~HS host status response (ZPL II Programming Guide, "~HS Host Status Return"): String 1 aaa,b,c,dddd,eee,f,g,h…
ZplPrinterWarningsenumWarning flags of the ~HQES response (nibbles 8-1), ~HQ Table 9 "Warning Flags" (sensor flags: KR403).
ZplVirtualPrinterclassVirtual network label printer: a TCP listener (raw port 9100 protocol) that accepts ZPL or EPL jobs, renders them with ZplRende…
ZplVirtualPrinterStatusrecordSnapshot of the simulated printer (ZplVirtualPrinter.GetStatus).