Class BookmarkValidationProcess
- java.lang.Object
-
- org.apache.pdfbox.preflight.process.AbstractProcess
-
- org.apache.pdfbox.preflight.process.BookmarkValidationProcess
-
- All Implemented Interfaces:
ValidationProcess
public class BookmarkValidationProcess extends AbstractProcess
-
-
Constructor Summary
Constructors Constructor Description BookmarkValidationProcess()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanexploreOutlineLevel(PreflightContext ctx, org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem inputItem, org.apache.pdfbox.cos.COSObject firstObj, org.apache.pdfbox.cos.COSObject lastObj)This method explores the Outline Item Level and calls a validation method on each Outline Item.voidvalidate(PreflightContext ctx)protected booleanvalidateItem(PreflightContext ctx, org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem inputItem)This method checks the inputItem dictionary and call the exploreOutlineLevel method on the first child if it is not null.-
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
-
exploreOutlineLevel
protected boolean exploreOutlineLevel(PreflightContext ctx, org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem inputItem, org.apache.pdfbox.cos.COSObject firstObj, org.apache.pdfbox.cos.COSObject lastObj) throws ValidationException
This method explores the Outline Item Level and calls a validation method on each Outline Item. If an invalid outline item is found, the result list is updated.- Parameters:
ctx- the preflight context.inputItem- The first outline item of the level.firstObj- The first PDF object of the level.lastObj- The last PDF object of the level.- Returns:
- true if all items are valid in this level.
- Throws:
ValidationException
-
validateItem
protected boolean validateItem(PreflightContext ctx, org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem inputItem) throws ValidationException
This method checks the inputItem dictionary and call the exploreOutlineLevel method on the first child if it is not null.- Parameters:
ctx- the preflight context.inputItem- outline item to validate- Returns:
- the validation result.
- Throws:
ValidationException
-
-