Class PdfUA2TableOfContentsChecker
- java.lang.Object
-
- com.itextpdf.pdfua.checkers.utils.ua2.PdfUA2TableOfContentsChecker
-
public final class PdfUA2TableOfContentsChecker extends java.lang.Object
Utility class which performs table of contents check according to PDF/UA-2 specification.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PdfUA2TableOfContentsChecker.PdfUA2TableOfContentsHandler
Handler class that checksTOCI
tags while traversing the tag tree.
-
Field Summary
Fields Modifier and Type Field Description private PdfUAValidationContext
context
-
Constructor Summary
Constructors Constructor Description PdfUA2TableOfContentsChecker(PdfUAValidationContext context)
Creates a new instance ofPdfUA2TableOfContentsChecker
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkRefInTociStructElement(IStructureNode structNode)
Checks that table of contents item identifies the target of the reference according to PDF/UA-2 specification.private static boolean
isRefPresent(PdfStructElem toci)
-
-
-
Field Detail
-
context
private final PdfUAValidationContext context
-
-
Constructor Detail
-
PdfUA2TableOfContentsChecker
public PdfUA2TableOfContentsChecker(PdfUAValidationContext context)
Creates a new instance ofPdfUA2TableOfContentsChecker
.- Parameters:
context
- the validation context
-
-
Method Detail
-
checkRefInTociStructElement
public void checkRefInTociStructElement(IStructureNode structNode)
Checks that table of contents item identifies the target of the reference according to PDF/UA-2 specification.Each
TOCI
in the table of contents shall identify the target of the reference using theRef
entry, either directly on theTOCI
structure element itself or on a child structure element contained within, such as aReference
structure element.- Parameters:
structNode
-TOCI
structure element to check- Throws:
PdfUAConformanceException
- if document has incorrect table of contents item
-
isRefPresent
private static boolean isRefPresent(PdfStructElem toci)
-
-