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 private static org.apache.commons.logging.LogLOGGERprotected PDImageXObjectxImage-
Fields inherited from class org.apache.pdfbox.preflight.xobject.AbstractXObjValidator
context, 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 voidcheckAlternates()protected voidcheckBPC()Valid values are 1, 2, 4 and 8, not 16, see here.protected voidcheckColorSpaceAndImageMask()protected voidcheckIntent()protected voidcheckInterpolate()protected voidcheckMandatoryFields()This method checks if required fields are present.private booleanisImageMaskTrue()voidvalidate()Process the validation of the XObject.-
Methods inherited from class org.apache.pdfbox.preflight.xobject.AbstractXObjValidator
checkOPI, checkPostscriptXObject, checkReferenceXObject, checkSMask
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.commons.logging.Log LOGGER
-
xImage
protected PDImageXObject xImage
-
-
Constructor Detail
-
XObjImageValidator
public XObjImageValidator(PreflightContext context, PDImageXObject xobj)
-
-
Method Detail
-
checkMandatoryFields
protected void checkMandatoryFields()
Description copied from class:AbstractXObjValidatorThis method checks if required fields are present.- Specified by:
checkMandatoryFieldsin classAbstractXObjValidator
-
checkAlternates
protected void checkAlternates() throws ValidationException- Throws:
ValidationException
-
checkInterpolate
protected void checkInterpolate()
-
checkIntent
protected void checkIntent()
-
checkBPC
protected void checkBPC()
Valid values are 1, 2, 4 and 8, not 16, see here.
-
checkColorSpaceAndImageMask
protected void checkColorSpaceAndImageMask() throws ValidationException- Throws:
ValidationException
-
isImageMaskTrue
private boolean isImageMaskTrue()
-
validate
public void validate() throws ValidationExceptionDescription copied from interface:XObjectValidatorProcess the validation of the XObject.- Specified by:
validatein interfaceXObjectValidator- Overrides:
validatein classAbstractXObjValidator- Throws:
ValidationException
-
-