Methodname | Description |
---|---|
Print(Text; Code[20]) | Prints the zpl code in text format to the selected printer. |
Methodname | Description |
---|---|
Convert(var ImageInStr: InStream; Size: Integer): Text; | Converts an image from stream to zpl code. |
Convert(var ImageInStr: InStream; Size: Integer; Rotation: Enum "Rotate Flip Type"): Text | Converts and rotates an image from stream to zpl code |
procedure PrintLayout(LayoutCode: Code[20]; NoOfCopies: Integer)
var
ZPLLayout: Record ZPLLayoutNVX;
ZPLPrinter: Record ZPLPrinterNVX;
ZPLPrinterMgt: Codeunit ZPLPrinterMgtNVX;
PrinterCode: Code[20];
IZebraConnector: Interface ZPLIPrinterConnectorNVX;
Placeholders: List of [Text];
LabelLayout: Text;
begin
ZPLLayout.Get(LayoutCode);
ZPLPrinterMgt.GetPrinter(ZPLLayout.Code, PrinterCode); //determines the printer according to the ZPL printer selection
ZPLPrinter.Get(PrinterCode);
IZebraConnector := ZPLPrinter."Connection Type"; //connection to the printer must be implemented in subapps
Placeholders.Add('Test');
Placeholders.Add('Test2'); //Definition of the values that replace the placeholders. The placeholder %1 is being replaced with 'Test' and placeholder %2 is being replaced with 'Test2'.
LabelLayout := ZPLLayout.GetLayoutAsText();
ZPLLayout.SetNoOfCopiesForLayout(NoOfCopies, LabelLayout);
LabelLayout := ZPLLayout.ReplacePlaceholders(LabelLayout, Placeholders);
IZebraConnector.Print(LabelLayout, PrinterCode);
end;
Finmatics Autonomous Accounting Interface for AI-driven document processing tool by Finmatics. More information AppSource |