transform.crop-regions rasterizes a PDF or image, crops each normalized
bounding box you supply, and stores every crop as a JPEG run output file. Use it
when downstream steps need image artifacts — figure chips, table snippets, or
any layout-driven region — without baking figure semantics into the step itself.
Regions are plain data: { id?, pageIndex, bbox } with bbox as normalized
[x0, y0, x1, y1] on the rendered page (origin top-left). Build the list with
transform.script from ai.parse
layout output, or pass any workflow-authored array.
Typical preprocessing chain for parsed figures:
steps.crop-figures.output.regions[] includes fileId, filename,
and pixel dimensions. Caption crops with ai.extract inside
control.parallel_map, or inspect full pages with ai.vision.
Configuration
Configuration goes inside the step’swith: block.
string
required
File input, template expression e.g. {{ input.document }} resolving to a PDF or image
string | array<object>
required
Regions to crop, pageIndex + normalized bbox per entry
number
default:"1"
Scale factor when rasterizing PDF pages before cropping
integer
default:"85"
JPEG quality for cropped outputs
number
default:"0.02"
Padding around each bbox as a fraction of the shorter page edge
integer
default:"8"
Minimum crop width/height in pixels; smaller crops fall back to the full page
integer
default:"100"
Maximum regions processed per invocation
Output
Successfully cropped regions
Regions skipped (invalid bbox or missing page)