Skip to content

Symbol Dimensions

Terry Burton edited this page Mar 30, 2026 · 11 revisions

Symbol Dimensions

height

Height of longest bar, in inches.

Example

A 1/2 inch tall EAN-13:

Data:    9520123456788
Options: includetext height=0.5
Encoder: ean13

width

Stretch the symbol to precisely this width, in inches.

Notes

  • This parameter literally stretches the symbol and text to the desired width which may distort the human readable text.
  • For information about resizing symbols read the article on resizing symbols.

Example

A 2 inch wide Code 93 symbol:

Data:    TERRY
Options: width=2
Encoder: code93

gridfit

When enabled, the renderer snaps symbol elements to device pixel boundaries, producing crisp output at the target resolution.

This is most useful for non-vector formats rendered at low resolutions where bar or module stability may adversely affect validity or scanning performance.

Notes

  • Gridfit is automatically disabled for:
    • Symbologies with fractional bar widths (e.g. postal codes, Pharmacode).
    • Linear barcodes with a non-integer barratio.
  • The device resolution is probed Unless gridfit is provided.

Example

Data:    9520123456788
Options: includetext gridfit
Encoder: ean13

griddpi

Specify the target resolution for pixel-aligned rendering, in dots per inch. This can be useful if the target device's resolution cannot be probed.

Setting griddpi automatically enables gridfit.

Example

Data:    TESTING
Options: griddpi=300
Encoder: qrcode

Clone this wiki locally