Skip to main content

Options & Defaults

Every default on this page comes from the symbology's own standard rather than from a number chosen for the engine: the printed size, the quiet zone and the bar height are each the symbology's. The options below are yours, and they are honoured as written; where a choice costs compliance, the report says so instead of overruling you.

Sizing​

A stated size is the size of the marks — the bars, modules or dots themselves, not the footprint. The quiet zone the symbology's standard requires is added around them, so the space the symbol takes on the page is larger than what you asked for. [barcode, code128, ORD-2026-004471, 200|30] draws 200 × 30 points of bars, with the zone around them. Ask two symbologies for the same width and their bars come out the same width, whatever each one's zone costs.

AuthoredWhat is drawn
200|30marks exactly 200 × 30 points, the required zone added around them
200 (width only)that width of marks; the height follows the symbol's own proportions
|30 (height only)that height of marks; the width follows the same way
nothingthe printed size the symbology's standard states: its module count at the X-dimension listed on Symbologies, quiet zone included. For the GS1 retail family that is magnification 1.0 at X = 0.33 mm

A size is in points, or carries its unit (pt, in, mm, px, as in 40mm|12mm), and may be at most 14,400 points on either side; a size the shortcode cannot read is reported as an error and the symbology's own size is drawn instead.

Inside svg​

A barcode shape inside svg follows the same rule: its width and height are the marks, and the quiet zone is added around them. Given alone, either one sets the other from the symbol's proportions; with neither, the symbol is drawn at its nominal size. Its spec takes quiet too, as a number: "quiet": 20.

A symbol wider than its container​

A symbol whose marks and zone are wider than the column, table cell or page it sits in is scaled down to fit, never drawn over the edge, and the report says by how much:

NOTICE [barcode] hibc-39 needs 587.9pt with the quiet zone its standard requires and has 149pt of column; drawn at 25% of the size asked for

The percentage is the point: a symbol drawn far below the size asked for may be under the X-dimension its standard allows.

A box that breaks a fixed shape​

QR Code, Micro QR, rMQR, Data Matrix, Aztec, MaxiCode, DotCode, Han Xin, Grid Matrix, Ultracode, UPNQR and the HIBC matrix carriers (hibc-dm, hibc-qr, hibc-aztec) each have one shape. A box of another shape is still drawn as given, but the modules are distorted and a scanner may not read it, so it is reported:

WARNING [barcode] qrcode does not meet its standard: QrCode has a fixed aspect ratio of 1 to 1 and is drawn at 40 x 200 (0.2 to 1); the modules are distorted and a scanner may not read it

The ratio the box must match is the whole symbol's, marks plus quiet zone, since that is what the box scales. Give one side only and the other follows the symbol's own shape.

A box that draws the bars too short​

Where the symbology's standard states a bar height — the symbologies marked standard height on Symbologies, the postal codes among them, whose heights are exact — the height your box implies is judged by that standard's rule, and a squat symbol is reported:

WARNING [barcode] codabar does not meet its standard: Height not compliant with standards (too small)

A symbology whose standard sets no height, such as Code 128 or the matrix codes, is not judged by one. The symbol is drawn as authored either way.

ITF-14​

GS1 fixes the ITF-14 label at 142.75 × 32.00 mm at X = 1.016 mm, and the encoder's Interleaved 2 of 5 uses a 3:1 wide-to-narrow ratio rather than GS1's 2.5:1, so the module count cannot reach that figure. An unsized itf14 is drawn at the standard's stated size directly.

Quiet zones​

The quiet zone is the blank margin a scanner needs to find the edges of a symbol. It is applied whether or not a size was given, in modules (multiples of the X-dimension), and each value below is the one the encoder applies for that symbology's standard. Linear symbologies need none above and below.

SymbologiesEach sideAbove and below
qrcode, hibc-qr, upnqr44
gridmatrix66
dotcode, hanxin33
microqr, rmqr, pdf417, hibc-pdf41722
datamatrix, hibc-dm, micropdf417, hibc-micropdf, ultracode, maxicode11
aztec, hibc-aztecnone: the Aztec standard requires nonenone
code128, code39, excode39, code93, code11, codabar, inter25, itf14, gs1-128, hibc, hibc-39, logmars, vin, telepen, telepen-num, dpleitcode, dpidentcode, c25, c25iata, c25logic, c25ind, koreapost, codablockf, hibc-codablockf10none
msi12none
pharmacode, pharma26none
code16k11 across the two sidesnone
channel1 left, 2 rightnone
ean1311 left, 7 rightnone
ean87none
upca9none
upce9 left, 7 rightnone
databar, databar-ltd, databar-exp, databar-omnstk, databar-expstk, flatnone addednone
postnet, planet51.6
uspsimail4.91
royalmail4state, kix3.13.1
japanpost3.33.3
australiapost103.3

On ITF-14 the zone sits inside the bearer bars that frame the symbol.

Overriding the quiet zone​

quiet=N sets the zone to N modules on every side, in place of the standard's zone, not in addition to it. A wider zone is always safe. A narrower one is drawn as asked, down to quiet=0 for none at all, and reported as not meeting the standard:

{ "p": "[barcode, code128, DOC-2026-04521, 200|50, quiet=4]" }
WARNING [barcode] code128 does not meet its standard: quiet=4 gives 8 modules of quiet zone across both sides and Code128's standard requires 20; a scanner may not read it

N is a whole number from 0 to 100; anything else is reported and the standard's zone is kept. Inside svg the same option is "quiet": N on the shape's spec.

The human-readable line​

hrt=true draws the payload as text under the symbol. It is off by default: a document usually prints the value in its own type. Only symbologies that have such a line honour it (see Symbologies); asking it of one that has none, such as a QR Code, is reported.

Where GS1 states a printed height for the digits — EAN-13, EAN-8, UPC-A and UPC-E — they are drawn at the 2.75 mm of the GS1 General Specifications, as a proportion of the symbol so they scale with the box. Every other symbology uses the encoder's own text band, since no other standard states one. A stated height covers the bars; the human-readable line is drawn under them.

Colours​

SlotEffect
#RRGGBBthe colour the bars are drawn in (e.g. #1A1A2E)
#RRGGBB|#RRGGBBthe ink, then the background behind the symbol (e.g. #1A1A2E|#FFFFFF); with no background the symbol is transparent and is read against the page
{ "p": "Brand QR: [barcode, qrcode, https://docpayload.example, 80|80, #1A1A2E]" }

A barcode shape inside svg takes its ink from its style's fill and has no background of its own: draw a light shape under it in the svg when the symbol needs one.

A colour pair a scanner is unlikely to read is drawn and reported. Symbol contrast is judged against the 40% floor of grade C in ISO/IEC 15416, and light bars on a dark background are reported separately, since most scanners expect dark bars on a light background:

WARNING [barcode] qrcode may not scan: the bars are lighter than their background (100% against 1%); scanners expect dark bars on a light background

Encoder options​

OptionValuesWhat it does
hrttrue / falsedraw the human-readable line (above). Off by default
gs1true / falseread the payload as GS1 element strings, application identifiers in brackets ([01]09501101530003), and validate them: a payload that breaks a GS1 rule is refused or reported rather than printed silently. Only where the symbology carries GS1 data
ecL, M, Q, Hthe error-correction level. qrcode, microqr, rmqr and hibc-qr only; UPNQR fixes its own level
squaretrue / falseforce a square Data Matrix (datamatrix, hibc-dm). Inferred when the box is square or absent
quieta whole number, 0 to 100the quiet zone in modules on every side, replacing the standard's (above)

The same options are keys of a barcode shape's spec inside svg, with the same names and the same effect: true and false as JSON booleans, quiet a number and ec one of the four letters.

{ "barcode": { "x": 10, "y": 8, "width": 68, "spec": { "type": "ean13", "code": "977251777100", "hrt": true } } }

In the shortcode, an option the tag does not take, or a value its option cannot hold (hrt=maybe, ec=Z, quiet=500), is reported as a warning and ignored; the symbol is still drawn. Inside svg the schema refuses both.

An option the symbology has no way to honour — a human-readable line on a QR Code, GS1 data in a Code 128, square on anything but Data Matrix — is reported as a notice rather than silently ignored. Symbologies lists what each one honours.

What gets reported​

Every message is one line in the render report. When the render is run strict — a setting of the host that renders the document, not a key of the document — a WARNING fails the render, and a symbol the encoder itself finds outside its standard (a GS1 rule broken, say) is not drawn at all; a box shape, a bar height or a quiet zone you chose is still drawn as authored.

LineMeans
ERROR [barcode] TYPE: "TYPE" is not a barcode type the schema declares [UNKNOWN_VALUE]the name is not one the schema publishes; the document is refused. Written in another letter case, the line adds the right spelling: ; the schema spells it "code128"
ERROR [Barcode not drawn - TYPE cannot encode "PAYLOAD": reason]the payload was refused, with the encoder's own reason. The same sentence is drawn in red on the page where the symbol would have been, so one bad payload never takes down the document
WARNING [barcode] TYPE does not meet its standard: reasona symbol was produced and does not meet its standard: a bar height, a quiet zone, a shape, a GS1 rule
WARNING [barcode] TYPE may not scan: reasonthe colours fall under the contrast floor, or the bars are lighter than their background
NOTICE [barcode] TYPE: reasonthe payload was accepted with a reservation, or an option was not honoured
NOTICE [barcode] TYPE needs Wpt … drawn at N% of the size asked forthe symbol did not fit its container and was scaled

In a strict render, the sentence drawn in place of a refused symbol reads [Barcode not drawn - TYPE "PAYLOAD" does not meet its standard and --strict refuses it: reason]. A barcode inside an svg is named svg <barcode> (TYPE) in place of [barcode] TYPE.

Accessibility​

A barcode is non-text content, so in a tagged document it is a Figure, and its alternate description is written for you as Barcode (TYPE): PAYLOAD: the payload is what a listener needs. A barcode therefore never blocks a PDF/UA claim for want of an alternate. A barcode inside an svg is covered by the title or description the svg itself carries.