Barcode

Code 128, Code 39 and EAN-13 barcodes from data. Components in the DocStudio designer user guide.

What it is

A barcode element draws a one-dimensional barcode from a value.

When to use it

Order numbers, tracking codes, patient or asset identifiers that are scanned by a reader.

Insert

Click Barcode in the toolbox.

Configure

In the Data section (the value) and the Barcode section (the format):

Setting Meaning
format code128 (any ASCII text, the safest choice), code39 (capital letters, digits and a few symbols) or ean13 (12 or 13 digits with a valid check digit)
value A fixed value or a data path. Edit it with the expression editor
height The height of the bars

Resize in a fixed region by dragging handles: the bars scale with the frame. In a flow container the default size is 50 mm wide and 15 mm high.

Data binding

Bind Value to a path, for example order.number. The preview shows the barcode for your sample data.

Limits

  • The value can be at most 80 characters.
  • Code 39 accepts only its alphabet; EAN-13 needs digits with a correct check digit.
  • A value that cannot be encoded draws nothing and adds a warning. See QR code or barcode does not display.
  • The text under the bars is not drawn.

Example workflow

Insert a barcode, set Format to code128, set Value to the path id, put { "id": "CERT-0042" } in the sample data and resize the frame until the bars are about 15 mm high.