XFA Code39 Fields

Version 2.1179.0 generates vector bars for XFA fields with case-insensitive UI type code3Of9 or code3Of9extended, through native headless, fresh component and loaded-document flattening workflows

<field name="Inventory" x="20pt" y="20pt" w="300pt" h="60pt">
  <bind match="none"/>
  <ui><barcode type="code3Of9" moduleWidth="1pt"
    wideNarrowRatio="5:2" checksum="auto" printCheckDigit="1"
    textLocation="below"/></ui>
  <value><text>PART-123</text></value>
</field>

Data and checksum

Basic Code39 accepts uppercase ASCII letters, decimal digits, spaces and - . $ / + %; a literal asterisk is reserved for framing, and invalid characters are rejected rather than silently changed or discarded

Extended Code39 serializes all ASCII byte values 0 through 127 through the Code39 shift alphabet, including lowercase letters, punctuation and control bytes; selected encodings that yield a byte above 127 are rejected

The existing character-encoding selection runs before barcode generation, while the field's DOM value remains unchanged

checksum="none" is the default; checksum="auto" appends the Code39 Mod43 check character computed from the actual encoded symbol sequence

printCheckDigit="1" also appends that character to the human-readable legend when a checksum is enabled; the check character can itself be a space, which remains part of the caption

The legend keeps the original field value and applies the check suffix computed from the selected encoded bytes; control characters require textLocation="none"

Geometry and refresh

wideNarrowRatio accepts a positive decimal or wide:narrow ratio between 2.2 and 3 inclusive, defaulting to 3:1; 2.5, 2.5:1 and 5:2 are equivalent

Supply a positive absolute moduleWidth or a positive dataLength sizing hint; explicit width takes precedence, and the length-derived Extended profile reserves up to two wire symbols per expected input byte

Two framing characters, optional checksum, inter-character gaps and ten-module quiet zones at each side participate in sizing; real wide bars and spaces use the selected ratio

Longer values retain module widths and extend the visual appearance and widget bounds while following fields keep their layout positions; empty values do not fabricate an empty barcode symbol

Module height, supplied-font legends and above/below text placement follow the existing barcode appearance contract

TXFAWidgetRuntime exposes these fields as editable xwkBarcode widgets; use the ordinary edit and commit APIs, save with SaveToBytes, then regenerate output from the saved XDP to refresh bars

Shared bounded helpers

HPDFXFABarcodeRuns takes encoded bytes, symbology, checksum selection, byte limit and cancellation token; the original HPDFXFACode128Runs remains available with its existing contract

For Code39, run values 1 and 2 identify narrow and wide elements, not fixed physical widths; use HPDFXFABarcodeRatio and HPDFXFABarcodeRunWidth to convert them to module units

HPDFXFABarcodeExpectedUnits includes framing, gaps, checksum and quiet zones for length-derived sizing; the Code128 profile keeps its existing sizing formula

HPDFXFABarcodeLegend accepts the same encoded byte payload and returns it with the optional printable check suffix; custom Unicode consumers keep their original text and append only that suffix

HPDFXFAIsSoftwareBarcodeType recognizes the implemented Code128 and Code39 families; resource limits, cancellation and prepared-output atomicity remain part of the existing headless workflow

Compression, encrypted barcode payloads and optional authored start/end characters remain outside this field profile; the separate static draw/barcode path retains its own supported symbologies

Widget runtime · Headless PDF creation