Document Tools
Créer des documents PDF multi-colonnes style journal/magazine
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/api/tools/pdf-multi-column-layout' \
-H 'Content-Type: application/json' \
-d '{"content":"Entrez le texte de votre article ici...","headline":"Titre de l'\''Article","subheadline":"Sous-titre ou résumé de l'\''article","author":"Par Jean Dupont","date":"1 janvier 2025","columnCount":"2","gutterWidth":18,"columnBalance":"auto","textAlign":"justify","headlineFontSize":24,"bodyFontSize":10,"lineHeight":1.2,"showSeparatorLines":false,"showDropCap":false,"dropCapLines":3,"showHeader":false,"headerText":"Document Header","headerAlignment":"center","showFooter":false,"footerText":"Page {page} of {total}","footerAlignment":"center","marginTop":72,"marginBottom":72,"marginLeft":72,"marginRight":72}'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-multi-column-layout| Nom | Type | Requis | Description |
|---|---|---|---|
| content | textarea | Oui | — |
| headline | text | Non | — |
| subheadline | text | Non | — |
| author | text | Non | — |
| date | text | Non | — |
| columnCount | select | Non | — |
| gutterWidth | number | Non | Espace entre les colonnes |
| columnBalance | select | Non | — |
| textAlign | select | Non | — |
| headlineFontSize | number | Non | — |
| bodyFontSize | number | Non | — |
| lineHeight | number | Non | — |
| showSeparatorLines | checkbox | Non | — |
| showDropCap | checkbox | Non | — |
| dropCapLines | number | Non | — |
| showHeader | checkbox | Non | — |
| headerText | text | Non | — |
| headerAlignment | select | Non | — |
| showFooter | checkbox | Non | — |
| footerText | text | Non | — |
| footerAlignment | select | Non | — |
| marginTop | number | Non | — |
| marginBottom | number | Non | — |
| marginLeft | number | Non | — |
| marginRight | number | 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-multi-column-layout": {
"name": "pdf-multi-column-layout",
"description": "Créer des documents PDF multi-colonnes style journal/magazine",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-multi-column-layout",
"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-multi-column-layout",
"arguments": {
"content": "Entrez le texte de votre article ici...",
"headline": "Titre de l'Article",
"subheadline": "Sous-titre ou résumé de l'article",
"author": "Par Jean Dupont",
"date": "1 janvier 2025",
"columnCount": "2",
"gutterWidth": 18,
"columnBalance": "auto",
"textAlign": "justify",
"headlineFontSize": 24,
"bodyFontSize": 10,
"lineHeight": 1.2,
"showSeparatorLines": false,
"showDropCap": false,
"dropCapLines": 3,
"showHeader": false,
"headerText": "Document Header",
"headerAlignment": "center",
"showFooter": false,
"footerText": "Page {page} of {total}",
"footerAlignment": "center",
"marginTop": 72,
"marginBottom": 72,
"marginLeft": 72,
"marginRight": 72
}
}
}Des questions ou un problème ? Contactez [email protected]