Apache PDFBox FromImages

Apache PDFBox FromImages

Certified

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.

yaml
type: io.kestra.plugin.pdfbox.document.FromImages

Turn scanned receipts into one A4 PDF

yaml
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
SubTypestring

The images, as internal storage URIs, one page each in order

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.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset 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.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Default0.0

Margin around the image, in points (1/72 inch)

Ignored for the IMAGE page size. Default 0, at least 0.

Default40000000

Largest 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.

Default500

Maximum number of images, so one page each

Default 500, between 1 and 10,000.

DefaultPORTRAIT
Possible Values
PORTRAITLANDSCAPE

Page orientation, for fixed page sizes

Default PORTRAIT.

DefaultA4
Possible Values
A3A4A5LETTERLEGALIMAGE

Page size

Default A4; IMAGE makes each page the size of its image.

Number of pages

Formaturi

Internal storage URI of the PDF