Skip to content

Kernel forms: a radio group's selected value that names no button is written as the group's value #783

Backlog

Description

@Tim81

Why

Split from #773. ISO 32000-2 12.7.5.2.4: the radio field's V holds the name of the appearance state of whichever child is on, and "the value of the V key shall also be the value of the AS key". ISO 32000-1 12.7.4.2.4 has the description without that sentence. A file written with no conformance claim is PDF 2.0, so the output below breaks a "shall" of the edition it is written to.

Measured on origin/main b2791ba, no claim (%PDF-2.0): AddRadioButtonGroup("rg", [A, B], "Z"), where Z is not an export value, writes the parent with /V /Z and both kids with /AS /Off. AddRadioButtonGroup checks that no export value is Off and that none repeats; it does not check selectedExportValue against them (PdfDocument.cs).

Proposal

Refuse a selectedExportValue that is not one of the group's export values at the call, with ArgumentException (ParamName selectedExportValue), and document it on AddRadioButtonGroup. The file 2.3.3 wrote for it was invalid ISO 32000-2, so the refusal is allowed in 2.x.

Acceptance

  • A skipped test of the outcome (the call is refused, or the parent's V equals the AS of a kid) runs and passes; the pin ConformanceAuditG6Tests.Iso32000_1_12_7_4_2_4_PinsTodayARadioValueThatNamesNoButtonIsWrittenAndNoButtonIsOn is replaced.
  • A selected value that is an export value, and null, write the same bytes as before (the null case is Kernel forms: a radio group with no button on is written with NoToggleToOff #773's).

Activity

  1. added
    bug
    on Nov 29, 2026
  2. Tim81 commented on Nov 29, 2026

    @Tim81
    OwnerAuthor

    The ISO audit (docs/conformance-v2.4.md) has a skipped test that waits on this issue; the fix removes its skip and makes it pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions