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 org.apache.pdfbox.pdmodel.graphics.image.PDImageXObjectxImage-
Fields inherited from class org.apache.pdfbox.preflight.xobject.AbstractXObjValidator
context, xobject
-
-
Constructor Summary
Constructors Constructor Description XObjImageValidator(PreflightContext context, org.apache.pdfbox.pdmodel.graphics.image.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.voidvalidate()Process the validation of the XObject.-
Methods inherited from class org.apache.pdfbox.preflight.xobject.AbstractXObjValidator
checkOPI, checkPostscriptXObject, checkReferenceXObject, checkSMask
-
-
-
-
Constructor Detail
-
XObjImageValidator
public XObjImageValidator(PreflightContext context, org.apache.pdfbox.pdmodel.graphics.image.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
-
validate
public void validate() throws ValidationExceptionDescription copied from interface:XObjectValidatorProcess the validation of the XObject.- Specified by:
validatein interfaceXObjectValidator- Overrides:
validatein classAbstractXObjValidator- Throws:
ValidationException
-
-