
Apache PDFBox Render
CertifiedRender PDF pages to images
Apache PDFBox Render
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.
type: io.kestra.plugin.pdfbox.image.RenderExamples
Render the first page of an invoice to a PNG at 200 DPI
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
from *string
The PDF to render, 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
{}1150dpi integerstring
150Resolution in dots per inch
Default 150, between 36 and 600.
endPage integerstring
Last page to render, inclusive
Defaults to the last page.
format string
PNGPNGJPEGImage format
Default PNG.
grayscale booleanstring
falseRender the pages in grayscale instead of color
Default false.
maxPagePixels integerstring
40000000Largest 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.
maxPages integerstring
100Maximum 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 string
Password of an encrypted PDF
startPage integerstring
1First page to render, starting at 1
Default 1.
Outputs
count integer
Number of rendered pages
uris array
Internal storage URIs of the page images, in page order