Files
pdfcraft/crates
mtlcl410andClaude Opus 5.5 dbea0793e8 M6: a radio group's XFA data compares every button's on state before any /PCOn
radio_dataset_value returned the first widget whose on state or /PCOn
equalled the selected state. With states /0 /1 and /PCOn items 1 2,
selecting /1 matched the first widget's /PCOn "1" and wrote 1 instead of
2, and strip_xfa's comparison, which uses the same function, could then
miss a lost value. The selection is an on-state name, so every widget's
state is now compared first and /PCOn only after.

Test (fails with the one-pass match restored, writing "1" for /1): the
static radio fixture with /PCOn 1 2 writes 1 for /0, 2 for /1, 2 for the
item 2, the value itself when nothing matches, and nothing with no
selection.

This changes the XFA data saved for such groups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 19:24:24 +08:00
..
…
…
…
…
…