Apache PDFBox Render

Apache PDFBox Render

Certified

Render PDF pages to images

Renders each page of a range to a PNG or JPEG image in internal storage, for example as input to OCR or an AI vision task. To bound memory on large or hostile files, at most maxPages pages are rendered and the resolution is capped at 600 DPI.

yaml
type: io.kestra.plugin.pdfbox.image.Render

Render the first page of an invoice to a PNG at 200 DPI

yaml
id: pdf_render_page
namespace: company.team

inputs:
  - id: file
    type: FILE

tasks:
  - id: render
    type: io.kestra.plugin.pdfbox.image.Render
    from: "{{ inputs.file }}"
    endPage: 1
    dpi: 200
Properties

The PDF to render, as an internal storage URI

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
Default150

Resolution in dots per inch

Default 150, between 36 and 600.

Last page to render, inclusive

Defaults to the last page.

DefaultPNG
Possible Values
PNGJPEG

Image format

Default PNG.

Defaultfalse

Render the pages in grayscale instead of color

Default false.

Default40000000

Largest page image to render, in pixels (width times height)

Checked from the page size and the DPI before rendering, so a page with a huge media box cannot exhaust the worker's memory. Default 40,000,000, which fits an A4 page at 600 DPI; between 1 and 400,000,000.

Default100

Maximum number of pages to render

The task fails instead of rendering more pages than this, so a very long document cannot fill the worker's memory and storage. Default 100, between 1 and 10,000.

Password of an encrypted PDF

Default1

First page to render, starting at 1

Default 1.

Number of rendered pages

SubTypestring

Internal storage URIs of the page images, in page order