
Apache PDFBox Merge
CertifiedMerge several PDFs into one
Apache PDFBox Merge
Merge several PDFs into one
Appends the pages of each input PDF, in the order given, into a single PDF stored in internal storage. Inputs must not be encrypted; decrypt them first with security.Decrypt.
type: io.kestra.plugin.pdfbox.document.MergeExamples
Merge two PDFs and password protect the result
id: pdf_merge_encrypt
namespace: company.team
inputs:
- id: first
type: FILE
- id: second
type: FILE
tasks:
- id: merge
type: io.kestra.plugin.pdfbox.document.Merge
files:
- "{{ inputs.first }}"
- "{{ inputs.second }}"
- id: encrypt
type: io.kestra.plugin.pdfbox.security.Encrypt
from: "{{ outputs.merge.uri }}"
userPassword: "{{ secret('PDF_USER_PASSWORD') }}"
ownerPassword: "{{ secret('PDF_OWNER_PASSWORD') }}"
Properties
files *array
The PDFs to merge, as internal storage URIs, in page order
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
{}1150maxFiles integerstring
100Maximum number of PDFs to merge
Default 100, between 2 and 10,000.
maxPages integerstring
10000Maximum number of pages in the merged PDF
Checked from each input before merging, so the task fails early instead of building a huge document. Default 10,000, between 1 and 100,000.
Outputs
pageCount integer
Number of pages in the merged PDF
uri string
uriInternal storage URI of the merged PDF