Class WidgetAnnotationValidator
java.lang.Object
org.apache.pdfbox.preflight.annotation.AnnotationValidator
org.apache.pdfbox.preflight.annotation.WidgetAnnotationValidator
Validation class for the Widget Annotation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PDAnnotationWidget
PDFBox object which wraps the annotation dictionaryFields inherited from class org.apache.pdfbox.preflight.annotation.AnnotationValidator
annotDictionary, ctx, pdAnnot
-
Constructor Summary
ConstructorsConstructorDescriptionWidgetAnnotationValidator
(PreflightContext ctx, COSDictionary annotDictionary) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
The AA field is forbidden for the Widget annotation when the PDF is a PDF/A.boolean
validate()
In addition of the AnnotationValidator.validate() method, this method executes the checkAAField method.Methods inherited from class org.apache.pdfbox.preflight.annotation.AnnotationValidator
checkActions, checkAP, checkCA, checkColors, checkFlags, checkMandatoryFields, checkPopup, checkSpecificMandatoryFields, searchRGBProfile, setFactory
-
Field Details
-
pdWidget
PDFBox object which wraps the annotation dictionary
-
-
Constructor Details
-
WidgetAnnotationValidator
-
-
Method Details
-
validate
In addition of the AnnotationValidator.validate() method, this method executes the checkAAField method.- Overrides:
validate
in classAnnotationValidator
- Returns:
- true if validation succeed, false otherwise.
- Throws:
ValidationException
- See Also:
-
checkAAField
protected boolean checkAAField()The AA field is forbidden for the Widget annotation when the PDF is a PDF/A. This method return false and update the errors list if this key is present. returns true otherwise- Returns:
- false if the forbidden AA field is existing.
-