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 Details

    • BookmarkValidationProcess

      public BookmarkValidationProcess()
  • Method Details

    • 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