pdf_embed_image
Embed a PNG or JPEG image into a specific page of a PDF with custom positioning and optional scaling while preserving aspect ratio.
Instructions
Embed a PNG or JPEG image into a specific page of a PDF. Supports custom positioning and optional scaling with aspect ratio preservation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filePath": "<filePath>",
"imagePath": "<imagePath>",
"page": "<page>",
"x": "<x>",
"y": "<y>",
"outputPath": "<outputPath>"
},
"name": "pdf_embed_image"
}
}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 |