Skip to content

Text Positioning

Terry Burton edited this page Jan 31, 2026 · 29 revisions

Text Positioning

textxalign

The textxalign option is used to specify where to horizontally position the text.

  • textxalign=offleft
  • textxalign=left
  • textxalign=center
  • textxalign=right
  • textxalign=offright
  • textxalign=justify

Example

Data:    Test123
Options: includetext textxalign=center
Encoder: code128

textyalign

The textyalign option is used to specify where to vertically position the text.

  • textyalign=below
  • textyalign=bottom
  • textyalign=center
  • textyalign=top
  • textyalign=above

Example

Data:    Test
Options: includetext alttext=Test textyalign=above
Encoder: qrcode

textdirection

The textdirection option is used to specify in which direction to orient text.

  • textdirection=forward
  • textdirection=backward
  • textdirection=upward
  • textdirection=downward

Example

Data:    Test
Options: includetext alttext=Test textxalign=offright textdirection=upward
Encoder: datamatrix

textxoffset

The horizontal position of the text in points relative to the leftmost bar or modules.

Example

Data:    TEST
Options: includetext textxoffset=-20
Encoder: code39

textyoffset

The vertical position of the text in points relative to the base of the bars or modules.

Example

Data:    TEST
Options: includetext textyoffset=-10
Encoder: code39

Notes

  • By default (in the absence of textxalign or textyalign), each character of text is placed immediately below the corresponding modules where this is possible.
  • Where there isn't such a direct relationship then the default is to position the text centrally beneath the symbol.

extratextxalign, extratextyalign, extratextdirection, extratextxoffset, extratextyoffset

Any extra text can be positioned using the extratextxalign, extratextyalign, extratextdirection, extratextxoffset and extratextyoffset options that function the same as their textxalign, textyalign, textdirection, textxoffset and textyoffset analogues.

Clone this wiki locally