import_svg
Convert SVG markup or a local .svg file into a path slot body for Odoo PDF/HTML templates, returning viewBox, paths, dimensions, and warnings for dropped content.
Instructions
Turn an SVG (a logo, an illustration, a shape drawn elsewhere)
into a path slot body: returns {viewBox, paths, warnings, box,
keepAspect}. Pass the markup as svg, or path to a local .svg file
(max 1 MB). Create the slot as {"kind": "path", "x", "y", "w": box.w,
"h": box.h, "viewBox", "keepAspect", "paths"}, or pass w/h for the
size you will place it at (stroke widths are in pt for that size).
Text, images, filters and masks are dropped and listed in warnings.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "import_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | No | ||
| w | No | ||
| svg | No | ||
| path | No |