Class PdfUA2AnnotationChecker

java.lang.Object
com.itextpdf.pdfua.checkers.utils.ua2.PdfUA2AnnotationChecker

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

    • markupAnnotationTypes

      private static final Set<PdfName> markupAnnotationTypes
  • Constructor Details

    • PdfUA2AnnotationChecker

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

    • 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 String getRichTextStringValue(PdfObject rv)
    • parseRichText

      private static String parseRichText(Node node)
    • checkAnnotationFlags

      private static void checkAnnotationFlags(PdfDictionary annotation)