zplCore.comzplCore.com

WindowsSpoolerPrinterConnection

public sealed class WindowsSpoolerPrinterConnection : IPrinterConnection, IAsyncDisposable

Raw printing through the Windows spooler (winspool.drv, datatype RAW) to an installed printer/driver. Write-only.

Constructors

SignatureDescription
# WindowsSpoolerPrinterConnection(string printerName, string documentName = "ZPL")

Properties

PropertyTypeDescription
DocumentName { get; }string
PrinterName { get; }string

Methods

Method SignatureReturnsDescription
# DisposeAsync()ValueTask
static # EnumeratePrinters()IReadOnlyList<(string, string)>Installed printers with their port names (e.g. "USB001", "LPT1:", "IP_10.0.0.5").
static # GetDefaultPrinterName()stringName of the Windows default printer, or null when none is set.
# QueryAsync(string command, TimeSpan timeout, CancellationToken ct = default)Task<string>Write-only transport: returns null without sending anything (a query must not end up as a print job).
# SendAsync(byte[] data, CancellationToken ct = default)Task