Native XFA Draw and Caption Values

The flatten and AcroForm consumers read materialised per-instance scalar values for draws and push-button captions, including values created when the template contains no value container

Creating and changing content

const row = xfa.form.resolveNode("main.row[1]");
row.label.value.text.value = "Visible draw";
row.button.caption.value.text.value = "Visible caption";
row.label.value.text.value = "";

The supported scalar classes are boolean, date, dateTime, decimal, float, integer, text and time; draw content retains its supplied text without numeric coercion or new picture formatting

Existing template scalar values can receive native form overrides, whilst absent values are created in the selected native form occurrence

Repeated first occurrences keep their original content, and newly added repeated instances receive independent draw and caption values that survive native XDP reload

Explicit empty values

An explicit empty draw override suppresses the template text instead of restoring it

An explicit empty caption remains blank; a button without scalar caption content keeps the field-name fallback

A saved blank caption may omit the native PDF caption entry, and its actual appearance carries no label text

Persistence and rollback

Scalar creation and content writes persist actual native form nodes; the saved PDF producer reloads native XDP before generating its PDF

The focused acceptance checks native XDP leaves, actual PDF captions and appearance operators and visible MuPDF text for initial creation, explicit clearing and a newly added repeated instance

Script failures and native content-budget failures restore the exact native XDP bytes, including a caption mutation already applied before a later draw mutation fails

Related APIs

Native Scalar Value Properties, Absent Property Creation and Interactive XFA Runtime