Skip to content

Commit 5757673

Browse files
AnhelinaMiText-CI
authored andcommitted
Investigate a TODO with invalid mapping
DEVSIX-6676 Autoported commit. Original commit hash: [1f198bd35]
1 parent 2253f0a commit 5757673

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

itext.tests/itext.layout.tests/itext/layout/LayoutTaggingPdf2Test.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,15 @@ public virtual void DocWithInvalidMapping03() {
285285

286286
[NUnit.Framework.Test]
287287
public virtual void DocWithInvalidMapping04() {
288-
// TODO this test passes, however it seems, that mingling two standard namespaces in the same tag structure tree should be illegal
289-
// May be this should be checked if we would implement conforming PDF/UA docs generations in a way PDF/A docs are generated
290288
PdfDocument pdfDocument = new PdfDocument(new PdfWriter(destinationFolder + "docWithInvalidMapping04.pdf",
291289
new WriterProperties().SetPdfVersion(PdfVersion.PDF_2_0)));
292290
pdfDocument.SetTagged();
293291
TagStructureContext tagsCntxt = pdfDocument.GetTagStructureContext();
294292
PdfNamespace stdNs2 = tagsCntxt.FetchNamespace(StandardNamespaces.PDF_2_0);
293+
// 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).
294+
// Mingling two standard namespaces in the same tag structure tree is valid in "core" PDF 2.0, however,
295+
// specifically the interaction between them will be addressed by ISO/TS 32005, which is currently still being drafted
296+
// (see DEVSIX-6676)
295297
stdNs2.AddNamespaceRoleMapping(LayoutTaggingPdf2Test.HtmlRoles.p, StandardRoles.P);
296298
Document document = new Document(pdfDocument);
297299
Paragraph customRolePara = new Paragraph("Hello world text.");

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8461dbb051f5c07ae35fa2aa683a2ab760c420cd
1+
1f198bd359f569b7f2ea00ccdd66ec4a2d7cde9e

0 commit comments

Comments
 (0)