
Apache PDFBox FromImages
CertifiedBuild a PDF from images
Apache PDFBox FromImages
Build a PDF from images
Creates one page per image (PNG, JPEG, GIF, BMP or TIFF) from internal storage, in the order given. With a fixed page size, each image is scaled to fit inside the margins without distortion and centered; with IMAGE, each page takes the size of its image.
type: io.kestra.plugin.pdfbox.document.FromImagesExamples
Turn scanned receipts into one A4 PDF
id: pdf_from_images
namespace: company.team
inputs:
- id: first
type: FILE
- id: second
type: FILE
tasks:
- id: pdf
type: io.kestra.plugin.pdfbox.document.FromImages
images:
- "{{ inputs.first }}"
- "{{ inputs.second }}"
pageSize: A4
margin: 36
Properties
images *array
The images, as internal storage URIs, one page each in 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
{}1150margin numberstring
0.0Margin around the image, in points (1/72 inch)
Ignored for the IMAGE page size. Default 0, at least 0.
maxImagePixels integerstring
40000000Largest image accepted, in pixels (width times height)
Read from the image header before decoding, so an oversized image fails without exhausting the worker's memory. Default 40,000,000, which fits an A4 page scanned at 600 DPI; between 1 and 400,000,000.
maxImages integerstring
500Maximum number of images, so one page each
Default 500, between 1 and 10,000.
orientation string
PORTRAITPORTRAITLANDSCAPEPage orientation, for fixed page sizes
Default PORTRAIT.
pageSize string
A4A3A4A5LETTERLEGALIMAGEPage size
Default A4; IMAGE makes each page the size of its image.
Outputs
pageCount integer
Number of pages
uri string
uriInternal storage URI of the PDF