Class XObjImageValidator
- java.lang.Object
-
- org.apache.pdfbox.preflight.xobject.AbstractXObjValidator
-
- org.apache.pdfbox.preflight.xobject.XObjImageValidator
-
- All Implemented Interfaces:
XObjectValidator
public class XObjImageValidator extends AbstractXObjValidator
This class validates XObject with the Image subtype.
-
-
Field Summary
Fields Modifier and Type Field Description protected PDImageXObject
xImage
-
Fields inherited from class org.apache.pdfbox.preflight.xobject.AbstractXObjValidator
context, cosDocument, xobject
-
-
Constructor Summary
Constructors Constructor Description XObjImageValidator(PreflightContext context, PDImageXObject xobj)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkAlternates()
protected void
checkColorSpaceAndImageMask()
protected void
checkIntent()
protected void
checkInterpolate()
protected void
checkMandatoryFields()
This method checks if required fields are present.private boolean
isImageMaskTrue()
void
validate()
Process the validation of the XObject.-
Methods inherited from class org.apache.pdfbox.preflight.xobject.AbstractXObjValidator
checkOPI, checkPostscriptXObject, checkReferenceXObject, checkSMask
-
-
-
-
Field Detail
-
xImage
protected PDImageXObject xImage
-
-
Constructor Detail
-
XObjImageValidator
public XObjImageValidator(PreflightContext context, PDImageXObject xobj)
-
-
Method Detail
-
checkMandatoryFields
protected void checkMandatoryFields()
Description copied from class:AbstractXObjValidator
This method checks if required fields are present.- Specified by:
checkMandatoryFields
in classAbstractXObjValidator
-
checkAlternates
protected void checkAlternates() throws ValidationException
- Throws:
ValidationException
-
checkInterpolate
protected void checkInterpolate() throws ValidationException
- Throws:
ValidationException
-
checkIntent
protected void checkIntent() throws ValidationException
- Throws:
ValidationException
-
checkColorSpaceAndImageMask
protected void checkColorSpaceAndImageMask() throws ValidationException
- Throws:
ValidationException
-
isImageMaskTrue
private boolean isImageMaskTrue()
-
validate
public void validate() throws ValidationException
Description copied from interface:XObjectValidator
Process the validation of the XObject.- Specified by:
validate
in interfaceXObjectValidator
- Overrides:
validate
in classAbstractXObjValidator
- Throws:
ValidationException
-
-