pdf_add_image
Embed a PNG or JPG at specific coordinates on a PDF page, with optional width/height scaling and opacity adjustment.
Instructions
Add an image (PNG/JPG) at a position on a page. Aspect ratio is preserved when only width or height is given.
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>",
"outputPath": "<outputPath>",
"imagePath": "<imagePath>",
"page": "<page>",
"x": "<x>",
"y": "<y>"
},
"name": "pdf_add_image"
}
}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 |