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

public Class TrailerValidationProcess

extends AbstractProcess
Class Inheritance
Imports
java.util.List, org.apache.pdfbox.cos.COSArray, .COSBase, .COSDictionary, .COSDocument, .COSInteger, .COSName, .COSObject, .COSString, org.apache.pdfbox.pdmodel.PDDocument, org.apache.pdfbox.preflight.PreflightConstants, .PreflightContext, .ValidationResult.ValidationError, org.apache.pdfbox.preflight.exception.ValidationException

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
checkLinearizedDictionary(PreflightContext
the preflight context.
ctx
,
COSDictionary
the linearization dictionary.
linearizedDict
)

Check if mandatory keys of linearized dictionary are present.

protected void
checkMainTrailer(PreflightContext
the preflight context.
ctx
,
COSDictionary
the trailer dictionary.
trailer
)

check if all keys are authorized in a trailer dictionary and if the type is valid.

protected void
checkTrailersForLinearizedPDF14(PreflightContext
the preflight context.
ctx
)

Extracts and compares first and last trailers for PDF version between 1.1 and 1.4.

protected void
checkTrailersForLinearizedPDF15(PreflightContext
the preflight context.
ctx
)

Accesses and compares First and Last trailers for a PDF version higher than 1.4.

protected boolean

Returns:

true if the IDs of the first and last dictionary are the same.
compareIds
(COSDictionary
the first dictionary for comparison.
first
,
COSDictionary
the last dictionary for comparison.
last
)

Return true if the ID of the first dictionary is the same as the id of the last dictionary Return false otherwise.

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

Constructor Detail

TrailerValidationProcessback to summary
public TrailerValidationProcess()

Method Detail

checkLinearizedDictionaryback to summary
protected void checkLinearizedDictionary(PreflightContext ctx, COSDictionary linearizedDict)

Check if mandatory keys of linearized dictionary are present.

Parameters
ctx:PreflightContext

the preflight context.

linearizedDict:COSDictionary

the linearization dictionary.

checkMainTrailerback to summary
protected void checkMainTrailer(PreflightContext ctx, COSDictionary trailer)

check if all keys are authorized in a trailer dictionary and if the type is valid.

Parameters
ctx:PreflightContext

the preflight context.

trailer:COSDictionary

the trailer dictionary.

checkTrailersForLinearizedPDF14back to summary
protected void checkTrailersForLinearizedPDF14(PreflightContext ctx)

Extracts and compares first and last trailers for PDF version between 1.1 and 1.4.

Parameters
ctx:PreflightContext

the preflight context.

checkTrailersForLinearizedPDF15back to summary
protected void checkTrailersForLinearizedPDF15(PreflightContext ctx)

Accesses and compares First and Last trailers for a PDF version higher than 1.4.

Parameters
ctx:PreflightContext

the preflight context.

compareIdsback to summary
protected boolean compareIds(COSDictionary first, COSDictionary last)

Return true if the ID of the first dictionary is the same as the id of the last dictionary Return false otherwise.

Parameters
first:COSDictionary

the first dictionary for comparison.

last:COSDictionary

the last dictionary for comparison.

Returns:boolean

true if the IDs of the first and last dictionary are the same.

validateback to summary
public void validate(PreflightContext ctx) throws ValidationException

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

Annotations
@Override