use of org.apache.pdfbox.preflight.content.PreflightContentStream in project pdfbox by apache.
the class TilingPatternValidationProcess method parsePatternContent.
/**
* Validate the Pattern content like Color and Show Text Operators using an instance of ContentStreamWrapper.
*/
protected void parsePatternContent(PreflightContext context, PDPage page, PDTilingPattern pattern) throws ValidationException {
PreflightContentStream csWrapper = new PreflightContentStream(context, page);
csWrapper.validatePatternContentStream(pattern);
}
use of org.apache.pdfbox.preflight.content.PreflightContentStream in project pdfbox by apache.
the class SinglePageValidationProcess method validateContent.
/**
* @param context the preflight context.
* @param page the page to check.
* @throws ValidationException
*/
protected void validateContent(PreflightContext context, PDPage page) throws ValidationException {
// TODO add this wrapper in the config object ?
try {
PreflightContentStream csWrapper = new PreflightContentStream(context, page);
csWrapper.validatePageContentStream();
} catch (IOException e) {
LOGGER.debug("Unable to read page contet stream", e);
context.addValidationError(new ValidationError(ERROR_UNKOWN_ERROR, e.getMessage(), e));
}
}
use of org.apache.pdfbox.preflight.content.PreflightContentStream in project pdfbox by apache.
the class XObjFormValidator method validateXObjectContent.
/**
* An Form XObject is a ContentStream. This method method uses an instance of ContentStreamWrapper to check the
* Stream of this Form XObject.
*/
protected void validateXObjectContent() throws ValidationException {
PreflightPath vPath = context.getValidationPath();
PreflightContentStream csWrapper = new PreflightContentStream(context, vPath.getClosestPathElement(PDPage.class));
csWrapper.validateXObjContentStream(pdXObj);
}
Aggregations