Skip to main content

Media Tags

Embed images and barcodes directly within text in any text element (p, th, td, li, h1–h6).

An image or a barcode stands on the text's baseline, as a picture does in a web page: its bottom edge, or its border's when its style frames it, lines up with the bottom of the letters beside it. One taller than the text makes its line taller above the text, so the line keeps its words where they were and gains room over them.

Inline images​

Place an image within flowing text.

{ "p": "[img, assets/flag-ca.png, 20|14] Toronto, ON" }

Long form: [image, path, W|H, alt=…, style=…]

ParameterDescription
PathAsset path (resolved via tenant asset storage)
W|HOptional. Omitted, the image's own size; a width alone (150), the height from its proportions; or width and height separated by |. Each a number in points or a length with its unit (pt, in, mm, px)
alt=Optional. The picture's description, as on a block image; quoted when it holds a comma (alt="Logo, blue")
style=Optional. A named style whose objectFit, opacity, padding, border, borderRadius and backgroundColor the picture takes, as a block image does. The padding and border add to the tag's size

Example: logo before company name​

{ "p": "[img, assets/logo.png, 30|30] Meridian Financial Group" }

Example: signature in a paragraph​

{ "p": "Approved by: [img, assets/signature.png, 120|30]" }

Example: flags in a table​

{
"table": {
"widths": [1, 3],
"rows": [
[{ "p": "[img, flags/ca.png, 20|14]", "style": "td" }, { "p": "Canada", "style": "td" }],
[{ "p": "[img, flags/us.png, 20|14]", "style": "td" }, { "p": "United States", "style": "td" }],
[{ "p": "[img, flags/gb.png, 20|14]", "style": "td" }, { "p": "United Kingdom", "style": "td" }]
]
}
}

Supported formats​

PNG, JPEG (baseline or progressive), GIF and uncompressed BMP. Any other file is refused and reported; draw vector art with an svg block.

Inline barcodes​

Embed a barcode within text. 64 symbologies are supported (QR, Micro QR, rMQR, DataMatrix, PDF417, Aztec, MaxiCode, DotCode, Code 128, Code 39, EAN/UPC, GS1-128, HIBC family, postal across major regions, and more). See Barcodes for the full list, sizing, quiet zones, colours and encoder options.

{ "p": "Scan to verify: [barcode, qrcode, https://verify.example.com, 60|60]" }
SlotDescription
typeSymbology name, exactly as the schema spells it (e.g. qrcode, code128, gs1-128, hibc-dm). There are no aliases.
payloadThe value to encode. A value holding a comma is written in quotes ("A,B" or 'A,B'); unquoted, the part after the comma is read as the next slot, and a WARNING names it when it is no size, colour or option.
width|heightOptional size of the marks in points. When omitted, the printed size the symbology's standard states.
#hex or #fg|#bgOptional foreground (and background) color override.
key=valueOptional encoder option: hrt, gs1, ec, square, or quiet=N for a quiet zone of N modules in place of the standard's.
{ "p": "Track your shipment: [barcode, qrcode, https://track.docpayload.example/DOC-2026-04521, 50|50]" }

Example: document reference with Code 128​

{ "p": "Ref: [barcode, code128, INV-2026-0042, 180|30]" }

Example: GS1-128 with bracketed Application Identifiers​

{ "p": "Pharmacy lot: [barcode, gs1-128, [01]04150123456789[17]270630[10]A4521, 220|45]" }

Example: brand-tinted QR​

{ "p": "[barcode, qrcode, https://docpayload.example, 80|80, #1A1A2E]" }

Sizing​

Barcode dimensions are specified as width|height in points and describe the marks; the quiet zone the symbology requires is added around them. Both are honored:

{ "p": "Small: [barcode, qrcode, A, 30|30] Large: [barcode, qrcode, A, 80|80]" }

If dimensions are omitted, the symbol is drawn at the printed size its standard states — see Barcodes / Sizing.

Errors​

A bad payload (e.g. letters in an EAN-13) is reported as an error, and the reason is drawn in red where the symbol would have been, rather than failing the whole document:

[Barcode not drawn - ean13 cannot encode "ABC": Invalid character at position 1 in input (digits and "+" or space only)]