pdf_embed_image
Embed PNG or JPEG images into PDF pages with precise positioning and optional scaling while preserving aspect ratios.
Instructions
Embed a PNG or JPEG image into a specific page of a PDF. Supports custom positioning and optional scaling with aspect ratio preservation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the source PDF file | |
| imagePath | Yes | Absolute path to the PNG or JPEG image file | |
| page | Yes | Target page number (1-indexed) | |
| x | Yes | X position in points from the left edge of the page | |
| y | Yes | Y position in points from the bottom edge of the page | |
| width | No | Image width in points. Omit to use original width (or scale proportionally if height is set). | |
| height | No | Image height in points. Omit to use original height (or scale proportionally if width is set). | |
| outputPath | Yes | Absolute path for the output PDF |