You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Layout: under a PDF/UA-1 claim a first heading below H1, or a skipped heading level, saves a file veraPDF refuses #767
ISO 14289-1, 7.4.2: in a document that is not strongly structured, "H1 shall be the first" heading, and a descending
sequence "shall not skip an intervening heading level". Layout writes Heading.Level as given (level 0 is H1, and so
on), so the caller's levels decide whether the file conforms.
Measured at 850a8e9 (origin/main b2791ba plus test-only commits), PDF/UA-1, DejaVu Sans from the tree, veraPDF 1.30.4 --flavour ua1:
Save does not report either failing file. veraPDF's PDFA-2A profile has no heading rule (its 6.7 rules are 6.7.2.2-1,
6.7.3.3-1, 6.7.3.4-1 to -3 and 6.7.4-1), so the case is UA-1 only; the 2a files were not run.
Sweep: Layout is the one package that writes Hn (ParagraphRenderer through Heading); git grep -n 'PdfStructElem("' -- src at 850a8e9 shows no other heading writer. A Kernel caller who builds H3 by hand under UA-1 gets the same file,
which is #474's general case and stays there.
Proposal
Under a PDF/UA-1 claim, Document.Save reports a heading through the diagnostics channel (#607) when it is the
first heading of the document and its level is not 0, or when it is more than one level below the heading before it.
The report names the heading text, its level and ISO 14289-1 7.4.2; strict mode refuses the save. Without the claim,
and under PDF/A, nothing is reported. The headings are written as today in every case. Document the report on Heading.Level and on the diagnostic code.
Acceptance
The skipped test Iso14289_1_7_4_2_AFirstHeadingBelowLevelOneIsRefusedOrReportedUnderThePdfUa1Claim runs and passes
(reported, and refused under strict mode), and a second case covers H1 then H3.
Without strict mode the file keeps its bytes; the pin Iso14289_1_7_4_2_AFirstHeadingBelowLevelOneIsWrittenAsGivenAndVeraPdfRefusesTheFile
additionally asserts the report.
H1, H2, H3, H3, H2 still saves under PDF/UA-1, and veraPDF ua1 passes it.
Activity
test: answer the review of the structure and artifact audit
test: fix the second review of the structure and artifact audit
test: pin structure and artifact output to its ISO clauses (#761)
Tim81 commentedon Nov 29, 2026
The ISO audit (
docs/conformance-v2.4.md) has skipped tests that wait on this issue; the fix removes their skip and makes them pass.Iso14289_1_7_4_2_AFirstHeadingBelowLevelOneOrASkippedLevelIsReportedUnderThePdfUa1Claim(group G3)