Document Tools
Génère un gabarit PDF avec marges, grille, en-tête/pied et colonnes
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/api/tools/pdf-page-master-template' \
-H 'Content-Type: application/json' \
-d '{"title":"Master Page Template","pageSize":"A4","orientation":"portrait","marginTop":72,"marginBottom":72,"marginLeft":72,"marginRight":72,"showBleed":false,"bleedSize":18,"showGrid":true,"gridSize":24,"showBaseline":false,"baselineSpacing":14,"showColumns":true,"columnCount":"2","gutterWidth":18,"showHeaderFooter":true,"headerHeight":36,"footerHeight":36,"safeInset":12,"showRulers":false,"showLabels":true}'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST https://api.elysiatools.com/fr/api/tools/pdf-page-master-template| Nom | Type | Requis | Description |
|---|---|---|---|
| title | text | Non | — |
| pageSize | select | Non | — |
| orientation | select | Non | — |
| marginTop | number | Non | — |
| marginBottom | number | Non | — |
| marginLeft |
| number |
| Non |
| — |
| marginRight | number | Non | — |
| showBleed | checkbox | Non | — |
| bleedSize | number | Non | — |
| showGrid | checkbox | Non | — |
| gridSize | number | Non | — |
| showBaseline | checkbox | Non | — |
| baselineSpacing | number | Non | — |
| showColumns | checkbox | Non | — |
| columnCount | select | Non | — |
| gutterWidth | number | Non | — |
| showHeaderFooter | checkbox | Non | — |
| headerHeight | number | Non | — |
| footerHeight | number | Non | — |
| safeInset | number | Non | — |
| showRulers | checkbox | Non | — |
| showLabels | checkbox | Non | — |
Résultat fichier
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.
Ajoutez ce bloc à la configuration de votre client MCP :
{
"mcpServers": {
"elysiatools-pdf-page-master-template": {
"name": "pdf-page-master-template",
"description": "Génère un gabarit PDF avec marges, grille, en-tête/pied et colonnes",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-page-master-template",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Après connexion au point d'accès SSE, listez les outils exposés :
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pdf-page-master-template",
"arguments": {
"title": "Master Page Template",
"pageSize": "A4",
"orientation": "portrait",
"marginTop": 72,
"marginBottom": 72,
"marginLeft": 72,
"marginRight": 72,
"showBleed": false,
"bleedSize": 18,
"showGrid": true,
"gridSize": 24,
"showBaseline": false,
"baselineSpacing": 14,
"showColumns": true,
"columnCount": "2",
"gutterWidth": 18,
"showHeaderFooter": true,
"headerHeight": 36,
"footerHeight": 36,
"safeInset": 12,
"showRulers": false,
"showLabels": true
}
}
}Des questions ou un problème ? Contactez [email protected]