Skip to content

Commit 1f198bd

Browse files
committed
Investigate a TODO with invalid mapping
DEVSIX-6676
1 parent 8461dbb commit 1f198bd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

layout/src/test/java/com/itextpdf/layout/LayoutTaggingPdf2Test.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,14 +391,16 @@ public void docWithInvalidMapping03() throws IOException {
391391

392392
@Test
393393
public void docWithInvalidMapping04() throws IOException, InterruptedException, ParserConfigurationException, SAXException {
394-
// TODO this test passes, however it seems, that mingling two standard namespaces in the same tag structure tree should be illegal
395-
// May be this should be checked if we would implement conforming PDF/UA docs generations in a way PDF/A docs are generated
396394
PdfDocument pdfDocument = new PdfDocument(new PdfWriter(destinationFolder + "docWithInvalidMapping04.pdf",
397395
new WriterProperties().setPdfVersion(PdfVersion.PDF_2_0)));
398396
pdfDocument.setTagged();
399397

400398
TagStructureContext tagsCntxt = pdfDocument.getTagStructureContext();
401399
PdfNamespace stdNs2 = tagsCntxt.fetchNamespace(StandardNamespaces.PDF_2_0);
400+
// For /P elem a namespace is not explicitly specified, so PDF 1.7 namespace is used (see 14.8.6.1 of ISO 32000-2).
401+
// Mingling two standard namespaces in the same tag structure tree is valid in "core" PDF 2.0, however,
402+
// specifically the interaction between them will be addressed by ISO/TS 32005, which is currently still being drafted
403+
// (see DEVSIX-6676)
402404
stdNs2.addNamespaceRoleMapping(HtmlRoles.p, StandardRoles.P);
403405

404406

0 commit comments

Comments
 (0)