Class PdfUA2LinkChecker


  • public final class PdfUA2LinkChecker
    extends java.lang.Object
    Class that provides methods for checking PDF/UA-2 compliance of link annotations.
    • Method Detail

      • checkLinkAnnotations

        public static void checkLinkAnnotations​(PdfDocument document)
        Verifies that each link annotation present in the document is tagged.
        Parameters:
        document - the PdfDocument to check links for
      • checkLinkAnnotationStructureParent

        private void checkLinkAnnotationStructureParent​(IStructureNode elem)
        Checks that link annotation is enclosed in either a Link or Reference structure element.

        Also checks that link annotations that target different locations are in separate Link or Reference structure elements, and multiple link annotations targeting the same location are included in a single Link or Reference structure element.

        Parameters:
        elem - link annotation object reference in the structure tree
      • checkStructDestinationsInLinkAndReference

        private void checkStructDestinationsInLinkAndReference​(PdfObjRef objRef)
        Checks that link annotations that target different locations (destinations) are in separate Link or Reference structure elements, and multiple link annotations targeting the same location are included in a single Link or Reference structure element.
        Parameters:
        objRef - link annotation object reference in the structure tree