Skip to content
LpdfDocsv0.24-r1004.10

Lpdf is pre-release. The XML schema and SDK APIs can change between releases.

Barcode

Renders a QR code, Code 128 barcode, or EAN-13 barcode inline in the flow layout.

Attribute Type Default Description
type string — Required. qr, code128, or ean13
data string — Required. Payload string to encode
size token/pt — Uniform size (width and height) for QR codes
width token/pt — Width constraint
height pt — Height constraint
ec string M QR error correction: L M Q H
hrt boolean false Show human-readable text below Code128/EAN-13
color color #000000 Barcode foreground color
background color — Background color
<barcode type="qr" data="https://lpdf.io" size="80pt"/>
<barcode type="qr" data="https://lpdf.io/docs" size="100pt" ec="H"/>
<barcode type="code128" data="INV-2026-001" width="160pt" height="48pt" hrt="true"/>
<barcode type="ean13" data="5901234123457" width="120pt" height="48pt" hrt="true"/>

The payload is fixed in the XML: data-value does not change data.