Class TextAnnotationValidator


  • public class TextAnnotationValidator
    extends AnnotationValidator
    Validation class for Text Annotation
    • Field Detail

      • pdText

        protected org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationText pdText
        PDFBox object which wraps the annotation dictionary
    • Constructor Detail

      • TextAnnotationValidator

        public TextAnnotationValidator​(PreflightContext ctx,
                                       org.apache.pdfbox.cos.COSDictionary annotDictionary)
    • Method Detail

      • checkFlags

        protected boolean checkFlags()
        Description copied from class: AnnotationValidator
        Checks if flags of the annotation are authorized.
        • Print flag must be 1
        • NoView flag must be 0
        • Hidden flag must be 0
        • Invisible flag must be 0
        If one of these flags is invalid, the errors list is updated with the ERROR_ANNOT_FORBIDDEN_FLAG ValidationError code.
        Overrides:
        checkFlags in class AnnotationValidator
        Returns:
        false if a flag is invalid, true otherwise.