org.apache.pdfbox.preflight.annotation

## Class TextAnnotationValidator

- java.lang.Object
- - org.apache.pdfbox.preflight.annotation.AnnotationValidator
  - - org.apache.pdfbox.preflight.annotation.TextAnnotationValidator

    public class TextAnnotationValidator
    extends AnnotationValidator

Validation class for Text Annotation

### Field Summary

Fields
`protected org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationText` `pdText` PDFBox object which wraps the annotation dictionary

### Fields inherited from class org.apache.pdfbox.preflight.annotation.AnnotationValidator

`annotDictionary, ctx, pdAnnot`

### Constructor Summary

Constructors
Constructor and Description
`TextAnnotationValidator(PreflightContext ctx, org.apache.pdfbox.cos.COSDictionary annotDictionary)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected boolean` `checkFlags()` Checks if flags of the annotation are authorized.

### Methods inherited from class org.apache.pdfbox.preflight.annotation.AnnotationValidator

`checkActions, checkAP, checkCA, checkColors, checkMandatoryFields, checkPopup, checkSpecificMandatoryFields, searchRGBProfile, setFactory, validate`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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.