Interface ILabelPrintDefinition
- Namespace
- Acuit.Pinpoint.Workstation.LabelPrinting
- Assembly
- Acuit.Pinpoint.Workstation.Interfaces.dll
A label print definition.
public interface ILabelPrintDefinition
Remarks
Implementations can optionally use LabelPrintDefinitionBase to provide some basic common logic.
Methods
PrintLabelAsync(IDictionary<string, string>, CancellationToken)
Prints a label.
Task PrintLabelAsync(IDictionary<string, string> placeholders, CancellationToken cancellationToken = default)
Parameters
placeholders
IDictionary<string, string>The optional placeholders to replace, as a dictionary of items where each key is the placeholder name (without '{' and '}') and each value is the replacement value. This can be null. UnitPlaceholdersDictionary can be used to generate the default set of placeholders for a unit.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task
A task that represents the asynchronous operation.
Remarks
How values from placeholders
are used depends on the specific label print definition implementation.
Within Zebra ZPL label templates and within Loftware variable values, placeholders should be specified as named items surrounded by '{' and '}'. Each placeholder may occur zero, once, or multiple times.
Exceptions
- Exception
The label could not be printed. Actual exception types vary depending on the label definition type.