Class PdfUA2TableOfContentsChecker
- java.lang.Object
-
- com.itextpdf.pdfua.checkers.utils.ua2.PdfUA2TableOfContentsChecker
-
public final class PdfUA2TableOfContentsChecker extends java.lang.ObjectUtility class which performs table of contents check according to PDF/UA-2 specification.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPdfUA2TableOfContentsChecker.PdfUA2TableOfContentsHandlerHandler class that checksTOCItags while traversing the tag tree.
-
Field Summary
Fields Modifier and Type Field Description private PdfUAValidationContextcontext
-
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 voidcheckRefInTociStructElement(IStructureNode structNode)Checks that table of contents item identifies the target of the reference according to PDF/UA-2 specification.private static booleanisRefPresent(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
TOCIin the table of contents shall identify the target of the reference using theRefentry, either directly on theTOCIstructure element itself or on a child structure element contained within, such as aReferencestructure element.- Parameters:
structNode-TOCIstructure element to check- Throws:
PdfUAConformanceException- if document has incorrect table of contents item
-
isRefPresent
private static boolean isRefPresent(PdfStructElem toci)
-
-