Class PdfUA2AnnotationChecker


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

      • markupAnnotationTypes

        private static final java.util.Set<PdfName> markupAnnotationTypes
    • Constructor Detail

      • PdfUA2AnnotationChecker

        private PdfUA2AnnotationChecker()
        Creates a new instance of the PdfUA2AnnotationChecker.
    • Method Detail

      • checkAnnotations

        public static void checkAnnotations​(PdfDocument pdfDocument)
        Checks PDF/UA-2 compliance of the annotations.
        Parameters:
        pdfDocument - PdfDocument to check annotations for
      • checkAnnotation

        public static void checkAnnotation​(PdfDictionary annotation,
                                           PdfUAValidationContext context)
        Checks PDF/UA-2 compliance of the annotation.
        Parameters:
        annotation - the annotation dictionary to check
        context - PdfUAValidationContext used to find the structure node enclosing the annotation using its StructParent value
      • checkAnnotation

        static void checkAnnotation​(PdfDictionary annotation,
                                    PdfStructElem parent)
        Checks PDF/UA-2 compliance of the annotation.
        Parameters:
        annotation - the annotation dictionary to check
        parent - the parent structure element
      • checkMarkupAnnotations

        private static void checkMarkupAnnotations​(PdfDictionary annotation,
                                                   PdfName parentRole)
        Checks the PDF/UA-2 8.9.2.3 Markup annotations requirements.
        Parameters:
        annotation - the markup annotations
        parentRole - the parent role
      • getRichTextStringValue

        static java.lang.String getRichTextStringValue​(PdfObject rv)
      • parseRichText

        private static java.lang.String parseRichText​(org.w3c.dom.Node node)
      • checkAnnotationFlags

        private static void checkAnnotationFlags​(PdfDictionary annotation)