
Apache PDFBox Split
CertifiedSplit a PDF into several PDFs
Apache PDFBox Split
Split a PDF into several PDFs
Splits by explicit page ranges (ranges) or into chunks of everyNPages pages. Each part is stored in internal storage; the output lists them in order. The parts are not encrypted, so an encrypted input needs its owner password.
type: io.kestra.plugin.pdfbox.document.SplitExamples
Split a PDF into one file per page
id: pdf_split_pages
namespace: company.team
inputs:
- id: file
type: FILE
tasks:
- id: split
type: io.kestra.plugin.pdfbox.document.Split
from: "{{ inputs.file }}"
everyNPages: 1
Keep the cover page and the appendix as separate files
id: pdf_split_ranges
namespace: company.team
inputs:
- id: file
type: FILE
tasks:
- id: split
type: io.kestra.plugin.pdfbox.document.Split
from: "{{ inputs.file }}"
ranges:
- "1"
- "10-14"
Properties
from *string
The PDF to split, as an internal storage URI
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150everyNPages integerstring
Split into chunks of this many pages
The last chunk holds the remaining pages. Set either ranges or everyNPages.
maxParts integerstring
1000Maximum number of parts to write
The task fails instead of writing more parts than this, so a very long document split page by page cannot fill the worker's storage. Default 1,000, between 1 and 100,000.
password string
Owner password of an encrypted PDF
The parts are written unencrypted, so the user password alone is refused.
ranges array
Page ranges to extract, one output PDF per entry
Each entry is a single page (3) or an inclusive range (3-7), pages numbered from 1. Set either ranges or everyNPages.
Outputs
count integer
Number of parts
uris array
Internal storage URIs of the parts, in order