pdf_add_image
Add a PNG or JPG image to a specific page at defined coordinates, with options to scale by width or height while preserving aspect ratio and set opacity.
Instructions
Add an image (PNG/JPG) at a position on a page. Aspect ratio is preserved when only width or height is given.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | X from left edge (points) | |
| y | Yes | Y from bottom edge (points) | |
| page | Yes | Page number (1-indexed) | |
| width | No | Width in points (scales proportionally if height omitted) | |
| height | No | Height in points (scales proportionally if width omitted) | |
| opacity | No | Opacity 0-1 (default: 1) | |
| filePath | Yes | PDF file path | |
| imagePath | Yes | Image file (PNG or JPG) | |
| outputPath | Yes | Output path |