Top Description Fields Constructors Methods
org.apache.pdfbox.preflight.annotation

public Class TextAnnotationValidator

extends AnnotationValidator
Class Inheritance
Static Imports
org.apache.pdfbox.preflight.PreflightConstants.ERROR_ANNOT_NOT_RECOMMENDED_FLAG

Validation class for Text Annotation

Field Summary

Modifier and TypeField and Description
protected PDAnnotationText
pdText

PDFBox object which wraps the annotation dictionary

Inherited from org.apache.pdfbox.preflight.annotation.AnnotationValidator:
annotDictionaryctxpdAnnot

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected boolean
checkFlags()

Overrides org.apache.pdfbox.preflight.annotation.AnnotationValidator.checkFlags.

Checks if flags of the annotation are authorized.

Inherited from org.apache.pdfbox.preflight.annotation.AnnotationValidator:
checkActionscheckAPcheckCAcheckColorscheckMandatoryFieldscheckPopupcheckSpecificMandatoryFieldssearchRGBProfilesetFactoryvalidate

Field Detail

pdTextback to summary
protected PDAnnotationText pdText

PDFBox object which wraps the annotation dictionary

Constructor Detail

TextAnnotationValidatorback to summary
public TextAnnotationValidator(PreflightContext ctx, COSDictionary annotDictionary)

Method Detail

checkFlagsback to summary
protected boolean checkFlags()

Overrides org.apache.pdfbox.preflight.annotation.AnnotationValidator.checkFlags.

Doc from org.apache.pdfbox.preflight.annotation.AnnotationValidator.checkFlags.

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.
Returns:boolean

false if a flag is invalid, true otherwise.

Annotations
@Override