Class TrailerValidationProcess
java.lang.Object
org.apache.pdfbox.preflight.process.AbstractProcess
org.apache.pdfbox.preflight.process.TrailerValidationProcess
- All Implemented Interfaces:
ValidationProcess
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckLinearizedDictionary(PreflightContext ctx, COSDictionary linearizedDict) Check if mandatory keys of linearized dictionary are present.protected voidcheckMainTrailer(PreflightContext ctx, COSDictionary trailer) check if all keys are authorized in a trailer dictionary and if the type is valid.protected voidExtracts and compares first and last trailers for PDF version between 1.1 and 1.4.protected voidAccesses and compares First and Last trailers for a PDF version higher than 1.4.protected booleancompareIds(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.voidvalidate(PreflightContext ctx) Methods inherited from class org.apache.pdfbox.preflight.process.AbstractProcess
addFontError, addValidationError, addValidationErrors
-
Constructor Details
-
TrailerValidationProcess
public TrailerValidationProcess()
-
-
Method Details
-
validate
- Throws:
ValidationException
-
checkTrailersForLinearizedPDF14
Extracts and compares first and last trailers for PDF version between 1.1 and 1.4.- Parameters:
ctx- the preflight context.
-
checkTrailersForLinearizedPDF15
Accesses and compares First and Last trailers for a PDF version higher than 1.4.- Parameters:
ctx- the preflight context.
-
compareIds
Return true if the ID of the first dictionary is the same as the id of the last dictionary Return false otherwise.- Parameters:
first- the first dictionary for comparison.last- the last dictionary for comparison.- Returns:
- true if the IDs of the first and last dictionary are the same.
-
checkMainTrailer
check if all keys are authorized in a trailer dictionary and if the type is valid.- Parameters:
ctx- the preflight context.trailer- the trailer dictionary.
-
checkLinearizedDictionary
Check if mandatory keys of linearized dictionary are present.- Parameters:
ctx- the preflight context.linearizedDict- the linearization dictionary.
-