public final class PdfUA2HeadingsChecker extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PdfUA2HeadingsChecker.PdfUA2HeadingHandler
Handler class that checks heading tags while traversing the tag tree.
|
| Constructor and Description |
|---|
PdfUA2HeadingsChecker(PdfUAValidationContext context)
Creates a new instance of
PdfUA2HeadingsChecker. |
| Modifier and Type | Method and Description |
|---|---|
void |
checkLayoutElement(IRenderer renderer)
Checks if layout element has correct heading according to PDF/UA-2 specification.
|
void |
checkStructElement(IStructureNode structNode)
Checks if layout element has correct heading according to PDF/UA-2 specification.
|
public PdfUA2HeadingsChecker(PdfUAValidationContext context)
PdfUA2HeadingsChecker.context - the validation contextpublic void checkLayoutElement(IRenderer renderer)
Conforming files shall use the explicitly numbered heading structure types (H1-Hn) and shall not use the H structure type.
Note, that PDF/UA-2 specification does not include requirements on the use of sequential heading levels. But where a heading’s level is evident, the heading level of the structure element enclosing it shall match that heading level, e.g. a heading with the real content “5.1.6.4 Some header” is evidently at heading level 4. This requirement is not checked.
renderer - layout element to checkPdfUAConformanceException - if document uses the H structure typepublic void checkStructElement(IStructureNode structNode)
Conforming files shall use the explicitly numbered heading structure types (H1-Hn) and shall not use the H structure type.
Note, that PDF/UA-2 specification does not include requirements on the use of sequential heading levels. But where a heading’s level is evident, the heading level of the structure element enclosing it shall match that heading level, e.g. a heading with the real content “5.1.6.4 Some header” is evidently at heading level 4. This requirement is not checked.
structNode - structure element to checkPdfUAConformanceException - if document uses the H structure typeCopyright © 1998–2025 Apryse Group NV. All rights reserved.