Skip to content

Text Positioning

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

Text Positioning

textxalign

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

Example: textxalign=offleft

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=offleft
Encoder: azteccode

Example: textxalign=left

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=left
Encoder: azteccode

Example: textxalign=center

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=center
Encoder: azteccode

Example: textxalign=right

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=right
Encoder: azteccode

Example: textxalign=offright

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=offright
Encoder: azteccode

textyalign

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

Example: textyalign=below

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=offright textyalign=below
Encoder: azteccode

Example: textyalign=bottom

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=offright textyalign=bottom
Encoder: azteccode

Example: textyalign=center

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=offright textyalign=center
Encoder: azteccode

Example: textyalign=top

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=offright textyalign=top
Encoder: azteccode

Example: textyalign=above

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=offright textyalign=above
Encoder: azteccode

textdirection

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

Example: textdirection=forward

Data:    Test
Options: includetext alttext=Test layers=8 textdirection=forward
Encoder: azteccode

Example: textdirection=backward

Data:    Test
Options: includetext alttext=Test layers=8 textdirection=backward
Encoder: azteccode

Example: textdirection=upward

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=offright
         textyalign=center textdirection=upward
Encoder: azteccode

Example: textdirection=downward

Data:    Test
Options: includetext alttext=Test layers=8 textxalign=offright
         textyalign=center textdirection=downward
Encoder: azteccode

textxoffset

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

Example

Data:    TEST
Options: includetext textxalign=center textxoffset=-40
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=-20
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