Top Constructors Methods
org.apache.pdfbox.preflight.process.reflect

public Class ExtGStateValidationProcess

extends AbstractProcess
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .List, org.apache.pdfbox.cos.COSArray, .COSBase, .COSDictionary, .COSFloat, .COSInteger, .COSName, .COSNumber, .COSObject, org.apache.pdfbox.pdmodel.font.PDFont, .PDFontFactory, org.apache.pdfbox.preflight.PreflightConstants, .PreflightContext, .PreflightPath, .ValidationResult.ValidationError, org.apache.pdfbox.preflight.exception.ValidationException, org.apache.pdfbox.preflight.process.AbstractProcess, org.apache.pdfbox.preflight.utils.ContextHelper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
checkBlendMode(PreflightContext
the preflight context * @param egs the graphic state to check
context
,
COSDictionary egs)

This method checks the BM value of the ExtGState dictionary.

private void
checkFont(PreflightContext
the preflight context.
context
,
COSDictionary
the Graphic state to check
egs
)

This method checks a Font array in the ExtGState dictionary.

private void
checkLowerCA(PreflightContext
the preflight context.
context
,
COSDictionary
the graphic state to check
egs
)

This method checks the "ca" value of the ExtGState dictionary.

private void
checkSoftMask(PreflightContext
the preflight context.
context
,
COSDictionary
the Graphic state to check
egs
)

This method checks the SMask value of the ExtGState dictionary.

protected void
checkTR2Key(PreflightContext
the preflight context
context
,
COSDictionary
the graphic state to check
egs
)

Check the TR2 entry.

protected void
checkTRKey(PreflightContext
the preflight context
context
,
COSDictionary
the graphic state to check
egs
)

Check the TR entry.

private void
checkUpperCA(PreflightContext
the preflight context.
context
,
COSDictionary
the graphic state to check
egs
)

This method checks the "CA" value of the ExtGState dictionary.

public List<COSDictionary>

Returns:

the list of ExtGState dictionaries.
extractExtGStateDictionaries
(COSDictionary
a resource COSDictionary.
extGStates
)

Create a list of ExtGState dictionaries using the given Resource dictionary and the COSDocument.

public void
validate(PreflightContext
the context which contains the Resource dictionary.
context
)

Implements org.apache.pdfbox.preflight.process.ValidationProcess.validate.

Validate the ExtGState dictionaries.

protected void
validateFonts(PreflightContext
the preflight context.
context
,
List<COSDictionary>
a list of ExtGState COSDictionaries.
listOfExtGState
)

Validate fonts in all ExtGState dictionaries of this container.

protected void
validateTransparencyRules(PreflightContext
the preflight context.
context
,
List<COSDictionary>
a list of ExtGState COSDictionaries.
listOfExtGState
)

Validate transparency rules in all ExtGState dictionaries of this container.

Inherited from org.apache.pdfbox.preflight.process.AbstractProcess:
addFontErroraddValidationErroraddValidationErrors

Constructor Detail

ExtGStateValidationProcessback to summary
public ExtGStateValidationProcess()

Method Detail

checkBlendModeback to summary
private void checkBlendMode(PreflightContext context, COSDictionary egs)

This method checks the BM value of the ExtGState dictionary. The Blend Mode is optional but must be "Normal" or "Compatible" if it is present.

Parameters
context:PreflightContext

the preflight context * @param egs the graphic state to check

checkFontback to summary
private void checkFont(PreflightContext context, COSDictionary egs) throws ValidationException

This method checks a Font array in the ExtGState dictionary.

Parameters
context:PreflightContext

the preflight context.

egs:COSDictionary

the Graphic state to check

checkLowerCAback to summary
private void checkLowerCA(PreflightContext context, COSDictionary egs)

This method checks the "ca" value of the ExtGState dictionary. It is optional but must be 1.0 if present.

Parameters
context:PreflightContext

the preflight context.

egs:COSDictionary

the graphic state to check

checkSoftMaskback to summary
private void checkSoftMask(PreflightContext context, COSDictionary egs)

This method checks the SMask value of the ExtGState dictionary. The Soft Mask is optional but must be "None" if it is present.

Parameters
context:PreflightContext

the preflight context.

egs:COSDictionary

the Graphic state to check

checkTR2Keyback to summary
protected void checkTR2Key(PreflightContext context, COSDictionary egs)

Check the TR2 entry. A valid ExtGState hasn't TR2 entry or a TR2 entry equals to "default".

Parameters
context:PreflightContext

the preflight context

egs:COSDictionary

the graphic state to check

checkTRKeyback to summary
protected void checkTRKey(PreflightContext context, COSDictionary egs)

Check the TR entry. A valid ExtGState hasn't TR entry.

Parameters
context:PreflightContext

the preflight context

egs:COSDictionary

the graphic state to check

checkUpperCAback to summary
private void checkUpperCA(PreflightContext context, COSDictionary egs)

This method checks the "CA" value of the ExtGState dictionary. It is optional but must be 1.0 if present.

Parameters
context:PreflightContext

the preflight context.

egs:COSDictionary

the graphic state to check

extractExtGStateDictionariesback to summary
public List<COSDictionary> extractExtGStateDictionaries(COSDictionary extGStates) throws ValidationException

Create a list of ExtGState dictionaries using the given Resource dictionary and the COSDocument.

Parameters
extGStates:COSDictionary

a resource COSDictionary.

Returns:List<COSDictionary>

the list of ExtGState dictionaries.

Exceptions
ValidationException:
thrown if an Extended Graphic State isn't valid.
validateback to summary
public void validate(PreflightContext context) throws ValidationException

Implements org.apache.pdfbox.preflight.process.ValidationProcess.validate.

Validate the ExtGState dictionaries.

Parameters
context:PreflightContext

the context which contains the Resource dictionary.

Annotations
@Override
Exceptions
ValidationException:
thrown if an Extended Graphic State isn't valid.
validateFontsback to summary
protected void validateFonts(PreflightContext context, List<COSDictionary> listOfExtGState) throws ValidationException

Validate fonts in all ExtGState dictionaries of this container.

Parameters
context:PreflightContext

the preflight context.

listOfExtGState:List<COSDictionary>

a list of ExtGState COSDictionaries.

validateTransparencyRulesback to summary
protected void validateTransparencyRules(PreflightContext context, List<COSDictionary> listOfExtGState)

Validate transparency rules in all ExtGState dictionaries of this container.

Parameters
context:PreflightContext

the preflight context.

listOfExtGState:List<COSDictionary>

a list of ExtGState COSDictionaries.