
Apache PDFBox Extract
CertifiedExtract the embedded images of a PDF
Apache PDFBox Extract
Extract the embedded images of a PDF
Saves every image embedded in the pages of a range, including images inside form XObjects, as PNG files in internal storage. An image reused on several pages is saved once. To bound memory, extraction stops with an error after maxImages images and skips images larger than maxImagePixels.
type: io.kestra.plugin.pdfbox.image.ExtractExamples
Extract the product photos embedded in a catalog
id: pdf_extract_images
namespace: company.team
inputs:
- id: file
type: FILE
tasks:
- id: images
type: io.kestra.plugin.pdfbox.image.Extract
from: "{{ inputs.file }}"
- id: log
type: io.kestra.plugin.core.log.Log
message: "Found {{ outputs.images.count }} images"
Properties
from *string
The PDF to read, 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
{}1150endPage integerstring
Last page to read, inclusive
Defaults to the last page.
maxImagePixels integerstring
40000000Largest image to extract, in pixels (width times height)
Bigger images are skipped with a warning. 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 to extract before failing
Default 500, between 1 and 10,000.
password string
Password of an encrypted PDF
startPage integerstring
1First page to read, starting at 1
Default 1.
Outputs
count integer
Number of extracted images
uris array
Internal storage URIs of the extracted PNG images