Nested PDF Merger
Use this skill when the task is to merge PDFs from a nested directory tree into a single PDF with hierarchical bookmarks by invoking the external `nestedpdfm...
Latest: v1.0.0
Initial release of nested-pdf-merger skill.
- Wraps the external nestedpdfmerger CLI for merging PDFs from nested directories into a single PDF with hierarchical bookmarks.
- Requires the nestedpdfmerger binary to be installed and available on PATH.
- Supports CLI features such as previewing merge order, excluding directories, sorting, disabling bookmarks, and more.
- Provides guidance on installation and usage; errors if the required binary is missing.
Full description
Use this skill when the task is to merge PDFs from a nested directory tree into a single PDF with hierarchical bookmarks by invoking the external nestedpdfmerger CLI. This skill depends on the nestedpdfmerger binary being installed and available on PATH.
Nested PDF Merger
This repository wraps the external nestedpdfmerger CLI.
Do not implement PDF merging logic in this repository.
Do not modify anything under reference/.
Requirements
This skill requires the nestedpdfmerger command to be installed and available on PATH.
Expected installation command:
pip install nestedpdfmerger
Expected CLI entrypoint:
nestedpdfmerger INPUT_DIR -o OUTPUT.pdf [options]
Alternative module invocation:
python -m nestedpdfmerger INPUT_DIR -o OUTPUT.pdf [options]
When to use
Use this skill when the user wants to:
- Merge PDF files from a folder tree into one output PDF.
- Preserve the folder hierarchy as PDF bookmarks.
- Preview merge order with
--dry-run. - Exclude directories, change sort order, or disable bookmarks.
Workflow
- Confirm the input directory and desired output path.
- Prefer
--dry-runfirst when the user wants to validate merge order. - Run the CLI with the smallest set of flags needed.
- If the command fails because the binary is missing, tell the user to install it with
pip install nestedpdfmerger.
Supported flags
-o, --output PATH--sort {natural,alpha,mtime}--reverse--exclude NAME [NAME ...]--exclude-hidden--no-bookmarks--dry-run--strict--verbose--quiet--version
Examples
Preview merge order:
nestedpdfmerger ./reports --dry-run
Merge with explicit output:
nestedpdfmerger ./reports --output merged.pdf
Merge while excluding folders:
nestedpdfmerger ./reports --output merged.pdf --exclude Backup Data
