Ir al contenido

Importing ZPL

Esta página aún no está disponible en tu idioma.

Existing ZPL files are a first-class source, not a one-way import. Use File menu → Import ZPL to paste ZPL directly or open a .zpl file.

ZPLab imports text, barcodes, shapes, images (including printer-stored and compressed graphics), label-header settings, and template fields (^FN slots land in the Variables tab). Anything the parser does not recognize is listed in the import report. It will not appear on the canvas, but it survives in the exported ZPL.

When you edit an imported label and export it again:

  • Preserved: everything you did not touch comes back byte-for-byte, including fields, label settings, comments, whitespace, and commands the editor does not model. A zero-edit import/export cycle reproduces the file exactly.
  • Regenerated: the editor emits ZPL for the objects you add, change, or delete and splices the rest of the source back unchanged. Some edits reach further: changing a label setting regenerates every page if it changes the emitted ZPL, as does changing a variable’s ^FN slot number or default value. Renaming a variable does not.
  • Full-regeneration fallback: some commands affect other fields or must be rewritten on export, which makes per-object patching unsafe. On those labels the first object edit regenerates the whole page. Examples include ^MU unit scaling, non-default ^CC/^CT prefixes or a ^CD delimiter, non-UTF-8 ^CI encoding, an ^FN without a field, ^JM density switches, ^LR, and barcodes relying on an earlier ^BY. Reordering objects also regenerates the label. With no edits, the export stays byte-for-byte.

The ZPL panel is a code editor with syntax highlighting. Selecting an object on the canvas highlights the lines it emits, and a notice above the code flags printer-persistent setup commands and device actions.

The first change starts an edit session: the canvas previews the parsed buffer live. An invalid buffer (for example unbalanced ^XA/^XZ or code that is too large) shows the refusal reason and is never applied. Leaving the panel applies the edit; a dialog asks first when the reparse reports findings or would drop designer-only state such as groups, custom names, hidden or locked objects, export exclusions, or variable bindings. An applied edit counts as a new import, so the round-trip guarantees apply to the result.