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: a LinkUri link makes a PDF/UA-1 file fail ISO 14289-1 7.18.5 and 7.18.1 #550
A link written by Layout makes a PDF/UA-1 document non-conformant, and nothing reports it.
TextStyle.LinkUri and DrawContext.AddUriLinkAnnotation write a /Link annotation with a URI action and nothing else. The annotation has no /Contents and no /StructParent, and the structure tree has no Link element for it.
ISO 14289-1:2014, 7.18.5 says links "shall be tagged according to ISO 32000-1:2008, 14.8.4.4.2, Link Element" and "shall contain an alternate description via their Contents key". 7.18.1 says annotations "shall be represented in the structure tree in correct reading order".
Measured on docs/layout-xml-complete at f720527 with veraPDF 1.30.2 (--flavour ua1). The document has Conformance = PdfConformance.PdfUA1, Language = "en" and a title, and holds one paragraph in an embedded TrueType font:
without a link: PASS
with LinkUri = "https://a.example" on that paragraph: FAIL, rules 7.18.5-1, 7.18.5-2 and 7.18.1-2
A review lens also reported that the same link passes under PDF/A-2a and PDF/A-2b; I reproduced only the UA-1 result.
Document.Conformance already says that setting a level does not run the rules (#474), and #474 covers unembedded fonts. This is a second instance of that class. PR #542 documents it on TextStyle.LinkUri and DrawContext.AddUriLinkAnnotation; this issue is for the behaviour.
A fix would tag each link as a Link structure element holding an OBJR to the annotation, give the annotation a /StructParent, and write a /Contents alternate description. For LinkUri the linked text is an obvious default for /Contents, but choosing it is a design decision.
Acceptance for the pair, from the handbook research and the planning checks. Order: #569 first (it is the Kernel
half), then #550. They are in different milestones today (#569 v2.4, #550 v2.3.9); both move to the v2.4 milestone. #569's work is #604 (mixed kids, OBJR, MCR, annotation ParentTree entries).
Current behaviour (origin/main 1c61fa6): ParagraphRenderer.cs:307-311 and :358-363 call ctx.AddUriLinkAnnotation once per fragment, per line; DrawContext.cs:201-210 builds the annotation with Rect
and Uri only; PdfLinkAnnotation.BuildDictionary (PdfLinkAnnotation.cs:41-81) writes Type, Subtype, Rect, Border, F and the action, with no Contents, no StructParent and no QuadPoints.
Measured in the 2026-11-16 handbook research on VellumPdf 2.3.3: the link annotation had exactly those keys, the
link text stayed inside the paragraph's single P marked-content sequence, and there was no Link element and no OBJR; veraPDF and the preflight both failed 7.18.5-1, 7.18.5-2 and 7.18.1-2.
Acceptance:
A paragraph text <link>text</link> text gives P > [MCID, Link > [MCID, OBJR], MCID]; the annotation has /StructParent n and the ParentTree maps n to the Link; /Contents is non-empty (the link text by default,
overridable).
A link that wraps within one page is one annotation with /QuadPoints and one OBJR: ISO 32000-1 14.8.4.4.2
deprecates several annotations in one Link from PDF 1.7 (the planning session's reading).
A link that crosses a page break needs one annotation per page; their OBJR kids sit next to each other in one Link (Tagged PDF Best Practice Guide 4.2.12.2, planning-session reading).
/Contents on every link: ISO 14289-1 7.18.5. In PDF/A-2 this is harmless: ISO 19005-2 6.3.4 requires readers to
show /Contents of annotations, and the /F Print flag the writer already sets (PdfLinkAnnotation.cs:54)
satisfies 6.3.2.
A requirement this issue's fix must meet, found in the v2.4 conformance audit (#739): when a tagged link's text wraps over several lines on one page, ISO 32000-1 14.8.4.4.2 (and ISO 32000-2 14.8.4.7.3 with its errata) asks for one Link annotation with /QuadPoints covering the pieces, not one annotation per line. Today Layout writes one annotation per line (the audit's 2a fixture has a long link as 27 annotations). That is harmless while no Link element is written, but tagging each of those annotations as it stands would break the clause. Across a page break one annotation per page is unavoidable, with their OBJRs kept in one Link element (Tagged PDF Best Practice Guide).
Activity
docs(layout): apply review round 5 to the boundary documentation
docs(layout): apply review round 16; scope paths, links and overprint
Tim81 commentedon Nov 18, 2026
Acceptance for the pair, from the handbook research and the planning checks. Order: #569 first (it is the Kernel
half), then #550. They are in different milestones today (#569 v2.4, #550 v2.3.9); both move to the v2.4 milestone.
#569's work is #604 (mixed kids, OBJR, MCR, annotation ParentTree entries).
Current behaviour (origin/main 1c61fa6):
ParagraphRenderer.cs:307-311and:358-363callctx.AddUriLinkAnnotationonce per fragment, per line;DrawContext.cs:201-210builds the annotation withRectand
Urionly;PdfLinkAnnotation.BuildDictionary(PdfLinkAnnotation.cs:41-81) writesType,Subtype,Rect,Border,Fand the action, with noContents, noStructParentand noQuadPoints.Measured in the 2026-11-16 handbook research on VellumPdf 2.3.3: the link annotation had exactly those keys, the
link text stayed inside the paragraph's single
Pmarked-content sequence, and there was noLinkelement and noOBJR; veraPDF and the preflight both failed 7.18.5-1, 7.18.5-2 and 7.18.1-2.Acceptance:
text <link>text</link> textgivesP > [MCID, Link > [MCID, OBJR], MCID]; the annotation has/StructParent nand the ParentTree maps n to theLink;/Contentsis non-empty (the link text by default,overridable).
/QuadPointsand oneOBJR: ISO 32000-1 14.8.4.4.2deprecates several annotations in one
Linkfrom PDF 1.7 (the planning session's reading).OBJRkids sit next to each other in oneLink(Tagged PDF Best Practice Guide 4.2.12.2, planning-session reading)./Contentson every link: ISO 14289-1 7.18.5. In PDF/A-2 this is harmless: ISO 19005-2 6.3.4 requires readers toshow
/Contentsof annotations, and the/FPrint flag the writer already sets (PdfLinkAnnotation.cs:54)satisfies 6.3.2.
ua1passes 7.18.1 and 7.18.5; a test asserts the ParentTree round trip withVellumPdf.Reader.Tim81 commentedon Nov 27, 2026
A requirement this issue's fix must meet, found in the v2.4 conformance audit (#739): when a tagged link's text wraps over several lines on one page, ISO 32000-1 14.8.4.4.2 (and ISO 32000-2 14.8.4.7.3 with its errata) asks for one Link annotation with
/QuadPointscovering the pieces, not one annotation per line. Today Layout writes one annotation per line (the audit's 2a fixture has a long link as 27 annotations). That is harmless while noLinkelement is written, but tagging each of those annotations as it stands would break the clause. Across a page break one annotation per page is unavoidable, with their OBJRs kept in oneLinkelement (Tagged PDF Best Practice Guide).test: pin navigation output to its ISO clauses (#739)
docs: drop milestone names from the G1 link rows
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.Iso19005_2_6_7_6_AnnotationsThatShowNoTextCarryContents(group G1)Iso14289_1_7_18_5_LinksAreTaggedAsLinkElementsAndCarryContents(group G1)Iso14289_1_7_18_5_ARunThatLinksIsATaggedLinkWithContents(group G3)