Feat: Implement hierarchical split functionality for PDF bookmarks #799
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for hierarchical splitting of PDF files by bookmarks, enabling the creation of directory structures based on bookmark levels. The main changes include the addition of a new task and parameters to handle hierarchical output, enhancements to the task execution controller to route hierarchical split requests, and updates to module dependencies.
Demo

In Settings.
Exported PDF Destination Folders.

Tested on macOS.
Hierarchical Split Functionality
HierarchicalSplitByBookmarksTask, which splits PDFs by bookmarks and creates directories for parent bookmarks, placing child splits within them. It supports overlap and auto-detection of overlapping pages for more accurate splits.HierarchicalSplitByOutlineLevelParameters, an extension ofSplitByOutlineLevelParameters, to configure hierarchical output, overlap pages, and auto-detect overlap options.SplitByOutlineLevelParametersBuilderto include options for hierarchical output, overlap pages, and auto-detect overlap.Task Execution Routing
TaskExecutionControllerto detect and route hierarchical split requests to the new task using reflection, avoiding direct dependencies and circular references. [1] [2]Dependency and Module Configuration
sejda-core,sejda-commons,sejda-sambox) topdfsam-split-by-bookmarksand updated the module descriptor to require these modules, ensuring the new functionality can access required PDF processing features. [1] [2]