Skip to content

Refuse the input 2.3.x only reports: the contract changes a patch cannot make #484

Open

Description

@Tim81

Collects the contract changes that a patch release must not make, so that none of them is lost when
the issue that reports the same input closes at 2.3.2 or 2.3.3. Each item below is already detected
and reported by then; what remains here is the refusal, which changes a rendering document into an
exception and therefore belongs to a major.

Filed as one issue because they share a single decision rather than a single code path: where the
library currently accepts input it cannot honour, does it refuse or does it continue and report.
2.3.x answers "continue and report" for all of them. This is where that answer is revisited.

The items

  • Zero and negative numeric properties, reported in Layout: every numeric property except a pie chart's accepts zero and negative and says nothing #482. Eleven measured: font size 0 and -12,
    leading -40, separator line width 0 and -5, list indent -100, band height 0 and -50, element
    margins -20, a column span of 50 on a one-cell row, a row span of 50 on a one-row table, and a
    document margin of -20. Refusing them is the change. Note that the pie chart already refuses all
    six of its own, so this is also the point at which the package stops being inconsistent with
    itself.
  • Ambiguous table input, from Layout: explicit column widths are applied without a clamp, so zero overlaps and negative advances backwards #477 and Layout: four table defects that lose or duplicate content #480. A widths array that does not match the row shape
    is tolerated in both directions today, and 2.3.2 makes the deficit case stop losing cells and the
    surplus case stay ignored. Refusing a mismatch outright, and refusing a negative width rather
    than clamping it to auto, are the contract changes.
  • Non-finite and negative geometry refused at the property rather than at the renderer. 2.3.2
    guards the renderer, where the value has already been accepted. Guarding the property is where a
    caller finds out at the point of the mistake.
  • The two identically-named PdfConformance enumerations. One in VellumPdf.Conformance with
    PdfA2B, PdfA2U, PdfA2A, PdfUA1; one in VellumPdf.Kernel with None, PdfA2b, PdfA2u,
    PdfA2a and more. The values are misaligned by one, so a cast between them compiles and is wrong
    for every member. Unifying them is breaking by construction.
  • TextStyle's default font actually applying to a directly constructed element. Its setter is
    read by one member today despite its comment, so making it apply changes emitted output for every
    caller who set it and got nothing.
  • The Standard 14 accessor on an embedded font reference failing rather than returning a
    plausible wrong answer.
  • The dead context property. RendererContext's content-top property is public, documented as
    used by the renderer, and read by nothing. Every Layout symbol is shipped, so deleting one trips
    the public-API analyzer, which is why 2.3.2 only corrects its documentation.

What each of these must not do before 3.0

Turn a document that renders today into an exception. That is not a hypothesis about callers: the
consuming showcase repository spent a full release cycle removing caps of its own after finding they
narrowed what the library accepts, and it has now recorded "not in a patch" as a planning constraint
on this exact set.

Activity

  1. Tim81 commented on Sep 20, 2026

    @Tim81
    OwnerAuthor

    Two pointers from the v2.3.4 to v2.3.9 hardening triage (2026-09-20):

  2. Tim81 commented on Sep 20, 2026

    @Tim81
    OwnerAuthor

    Same triage: #474 (a Conformance claim stamped on a document that fails preflight) moved to this milestone on 2026-09-20. Its documentation slice is #558 (v2.3.9). Refusing Decorative together with AltText, raised in #474's comment, is a tightening of input that renders valid output today, so it belongs on this list.

  3. Tim81 commented on Nov 29, 2026

    @Tim81
    OwnerAuthor

    One more refusal for this list, found by the forms audit (docs/conformance-v2.4.md, section G6).

    U+001B in a text string. ISO 32000-2 7.9.2.2.2: U+001B opens a language escape sequence (ESC, a language code, optionally a country code, ESC). PdfDocument.AddTextField and PdfSignatureSettings.SignerName, Reason, Location and ContactInfo already say "Do not pass a lone UTF-16 surrogate or U+001B … Version 3.0 will refuse both." The lone surrogate is written as U+FFFD (#641); U+001B is written as it stands.

    Measured on origin/main b2791ba, no claim: AddCheckBox(page, "x\u001By", rect) then Save writes /T as FE FF 00 78 00 1B 00 79. A reader that parses the escape takes y and what follows, up to the next escape, for a language code.

    The escape reaches the file through FromTextString (seven sites, see #778) and FromUnicode; #738 counts thirteen call sites of the two encoders together.

    3.0: refuse U+001B at every public member that takes a text string, naming 7.9.2.2.2.

  4. Tim81 commented on Nov 29, 2026

    @Tim81
    OwnerAuthor

    Two more for this list, from the same audit; 2.4 fixes the appearance without refusing (2.3.3 saved both):

  5. Tim81 commented on Nov 29, 2026

    @Tim81
    OwnerAuthor

    Withdrawn: #783 is not a 3.0 item. ISO 32000-2 12.7.5.2.4 requires the parent's V to equal the AS value, so the file is invalid and #783 refuses the input in 2.4.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions