Skip to content

Replace Image in PDF Node

Document/PDF

Replace Image in PDF

Replaces an image XObject in a PDF by name. Any image format is accepted and automatically converted to JPEG.

pdf_replace_imagemedia
Inputs6
Outputs2
Security exposure4/10
Packagemedia

Ratings

Scores range from 0 to 10. Higher values mean more impact, exposure, or operational weight.

SecurityAttack surface and exposure impact.
4/10Medium
PrivacyPotential sensitivity of processed data.
2/10High
PerformanceRuntime or resource pressure.
4/10Medium
GovernancePolicy, audit, or compliance impact.
3/10High
ReliabilityOperational stability considerations.
4/10Medium
CostExternal or compute cost impact.
0/10High

Input Pins

6

Input

Execution
exec_in

Trigger execution

Template

Struct
template

PDF file containing the image to replace

FlowPathFlowPath3 fields
pathstringrequired
store_refstringrequired
cache_store_refstring | null
Schema enforced

Image Name

String
image_name

XObject image name (e.g. "Im0", "Image1")

Image

Struct
image

Replacement image file (any format — auto-converted to JPEG)

FlowPathFlowPath3 fields
pathstringrequired
store_refstringrequired
cache_store_refstring | null
Schema enforced

Scale Mode

String
scale_mode

How to handle dimensions: KeepWidth (proportional), KeepHeight (proportional), Stretch (force both, may distort), or None (use new image size)

ImageScaleModeImageScaleMode4 fields
variant 1constvariant

Don't preserve original dimensions — use the new image's native size

const "None"
variant 2constvariant

Keep the original width, scale height proportionally

const "KeepWidth"
variant 3constvariant

Keep the original height, scale width proportionally

const "KeepHeight"
variant 4constvariant

Force both original width and height (may distort the image)

const "Stretch"
Default KeepWidth
NoneKeepWidthKeepHeightStretch

Output Path

Struct
output

Path to save the modified PDF

FlowPathFlowPath3 fields
pathstringrequired
store_refstringrequired
cache_store_refstring | null
Schema enforced

Output Pins

2

Output

Execution
exec_out

Execution continues after image replacement

Result

Struct
result

Output file path

FlowPathFlowPath3 fields
pathstringrequired
store_refstringrequired
cache_store_refstring | null
Schema enforced

Node Info

Internal name
pdf_replace_image
Category
Document/PDF