Edit images inside PDFs with a single line of code
PDFs are notoriously difficult to modify. Text editing is hard enough, but images? Most tools force you to extract the image, edit it externally, remove the old one, and carefully re-insert the new version - hoping the positioning doesn't break.
We think there's a better way.
Today we're releasing Image Transforms - a suite of in-place image manipulation capabilities that let you scale, rotate, crop, and transform images directly inside your PDFs. No extraction. No re-insertion headaches. Just clean, simple API calls.
What's included
The new Image Transform API includes seven operations, all designed to modify images in-place while preserving their position and context within the document:
Scale
Resize images by a factor or to specific dimensions. Optionally preserve aspect ratio to prevent distortion.
Rotate
Rotate images by any angle. Perfect for fixing orientation issues or adjusting logos and signatures.
Crop
Trim pixels from any edge. Useful for removing unwanted borders or focusing on specific parts of an image.
Opacity
Adjust transparency from fully opaque (1.0) to fully transparent (0.0). Ideal for creating watermarks or subtle background images.
Flip
Mirror images horizontally, vertically, or both. Useful for right-to-left layouts or creative effects.
Replace
Swap an image with new content while keeping its position and bounding box. Perfect for template systems where placeholder images need to be replaced with real content.
Move
Reposition images to new coordinates on the page.
All three SDKs, same capabilities
Image Transforms are available in Python, TypeScript, and Java with consistent APIs across all three:
Real-world use cases
Document templates
Create PDF templates with placeholder images that get replaced dynamically. A contract template might have a placeholder for a signature that gets swapped with the real thing at signing time.
Watermarking
Add your logo to a PDF and set its opacity to 20-30% for a professional watermark that doesn't obscure the content.
Batch processing
Process hundreds of PDFs at once - resize all logos to consistent dimensions, rotate scanned documents to the correct orientation, or crop whitespace from images.
Privacy and redaction
Crop sensitive areas from images or reduce their opacity before sharing documents externally.
Getting started
Update to the latest SDK version to access Image Transforms:
Check out the full documentation for detailed API references and more examples.