Class PdfUA2HeadingsChecker


  • public final class PdfUA2HeadingsChecker
    extends java.lang.Object
    Utility class which performs headings check according to PDF/UA-2 specification.
    • Method Detail

      • checkLayoutElement

        public void checkLayoutElement​(IRenderer renderer)
        Checks if layout element has correct heading according to PDF/UA-2 specification.

        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.

        Parameters:
        renderer - layout element to check
        Throws:
        PdfUAConformanceException - if document uses the H structure type
      • checkStructElement

        public void checkStructElement​(IStructureNode structNode)
        Checks if layout element has correct heading according to PDF/UA-2 specification.

        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.

        Parameters:
        structNode - structure element to check
        Throws:
        PdfUAConformanceException - if document uses the H structure type