Class ResourcesValidationProcess
- java.lang.Object
-
- org.apache.pdfbox.preflight.process.AbstractProcess
-
- org.apache.pdfbox.preflight.process.reflect.ResourcesValidationProcess
-
- All Implemented Interfaces:
ValidationProcess
public class ResourcesValidationProcess extends AbstractProcess
-
-
Constructor Summary
Constructors Constructor Description ResourcesValidationProcess()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.Map<java.lang.String,PDFont>
getFonts(COSDictionary resources, PreflightContext context)
This will get the map of fonts.void
validate(PreflightContext ctx)
protected void
validateExtGStates(PreflightContext context, PDResources resources)
protected void
validateFonts(PreflightContext context, PDResources resources)
Check that fonts present in the Resources dictionary match with PDF/A-1 rulesprotected void
validateShadingPattern(PreflightContext context, PDResources resources)
This method check the Shading entry of the resource dictionary if exists.protected void
validateTilingPattern(PreflightContext context, PDResources resources)
This method check the Shading entry of the resource dictionary if exists.protected void
validateXObjects(PreflightContext context, PDResources resources)
-
Methods inherited from class org.apache.pdfbox.preflight.process.AbstractProcess
addFontError, addValidationError, addValidationErrors
-
-
-
-
Method Detail
-
validate
public void validate(PreflightContext ctx) throws ValidationException
- Throws:
ValidationException
-
validateFonts
protected void validateFonts(PreflightContext context, PDResources resources) throws ValidationException
Check that fonts present in the Resources dictionary match with PDF/A-1 rules- Parameters:
context
-resources
-- Throws:
ValidationException
-
getFonts
private java.util.Map<java.lang.String,PDFont> getFonts(COSDictionary resources, PreflightContext context)
This will get the map of fonts. This will never return null.- Returns:
- The map of fonts.
-
validateExtGStates
protected void validateExtGStates(PreflightContext context, PDResources resources) throws ValidationException
- Parameters:
context
-resources
-- Throws:
ValidationException
-
validateShadingPattern
protected void validateShadingPattern(PreflightContext context, PDResources resources) throws ValidationException
This method check the Shading entry of the resource dictionary if exists.- Parameters:
context
-resources
-- Throws:
ValidationException
-
validateTilingPattern
protected void validateTilingPattern(PreflightContext context, PDResources resources) throws ValidationException
This method check the Shading entry of the resource dictionary if exists.- Parameters:
context
-resources
-- Throws:
ValidationException
-
validateXObjects
protected void validateXObjects(PreflightContext context, PDResources resources) throws ValidationException
- Throws:
ValidationException
-
-