Skip to main content

Barcode

The barcode building block lets you embed barcodes in your template.

Adding a barcode

Drag the Barcode icon from the toolbar and drop it onto the canvas.

Properties

When you select a barcode element, the properties panel opens on the side with the following options:

  • Margins — Set the left (L), top (T), right (R), and bottom (B) margins around the barcode element.
  • Alignment — Align the barcode to the left, center, or right.
  • Value — The content encoded in the barcode. Supports dynamic data placeholders.
  • Format — The barcode format. Available formats: CODE128 (auto, A, B, C), EAN13, EAN8, UPC, CODE39, ITF14, ITF, MSI (MSI, MSI10, MSI11, MSI1010, MSI1110), and Pharmacode.
  • Display value — Whether to show the text value below the barcode bars.
  • Styles
    • Bar width — The width of individual bars.
    • Height — The height of the barcode.
  • Paddings — Set the left (L), top (T), right (R), and bottom (B) inner paddings.
  • Background — The background color of the barcode.
  • Foreground — The color of the bars.
  • Visible when — An expression that controls whether this element appears in the generated PDF. See Conditional visibility.
  • Delete — Removes the element from the template.

Dynamic data

The value property supports dynamic data placeholders. You can mix static text with placeholders:

PKG-{{data.trackingNumber}}-2024

Or use a placeholder for the entire value:

{{data.trackingNumber}}

To learn more about dynamic data, see the Dynamic data page.