Document Tools
Prévisualise les flux LTR/RTL en PDF avec réordonnancement bidi
Appelez cet outil depuis votre code en trois langages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/pdf-rtl-ltr-support' \
-F 'file=@/path/to/fontFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/fr/api/tools/pdf-rtl-ltr-support' \
-F 'ltrText=Saisissez du texte LTR...' \
-F 'rtlText=Saisissez du texte RTL...' \
-F 'baseDirection=auto' \
-F 'alignment=auto' \
-F 'fontSize=14' \
-F 'lineHeight=1.5' \
-F 'pageSize=A4' \
-F 'marginTop=72' \
-F 'marginBottom=72' \
-F 'marginLeft=72' \
-F 'marginRight=72' \
-F 'showGuides=true' \
-F 'includeMixedSample=true' \
-F 'fontFile=/path/to/file.ext'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-rtl-ltr-support| Nom | Type | Requis | Description |
|---|---|---|---|
| ltrText | textarea | Oui | — |
| rtlText | textarea | Oui | — |
| baseDirection | select | Non | — |
| alignment | select | Non | — |
| fontSize | number | Non | — |
| lineHeight | number | Non | — |
| pageSize | select | Non | — |
| marginTop | number | Non | — |
| marginBottom | number | Non | — |
| marginLeft | number | Non | — |
| marginRight | number | Non | — |
| showGuides | checkbox | Non | — |
| includeMixedSample | checkbox | Non | — |
| fontFile | fileupload requis | 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-rtl-ltr-support": {
"name": "pdf-rtl-ltr-support",
"description": "Prévisualise les flux LTR/RTL en PDF avec réordonnancement bidi",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-rtl-ltr-support",
"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-rtl-ltr-support",
"arguments": {
"ltrText": "Saisissez du texte LTR...",
"rtlText": "Saisissez du texte RTL...",
"baseDirection": "auto",
"alignment": "auto",
"fontSize": 14,
"lineHeight": 1.5,
"pageSize": "A4",
"marginTop": 72,
"marginBottom": 72,
"marginLeft": 72,
"marginRight": 72,
"showGuides": true,
"includeMixedSample": true,
"fontFile": "https://example.com/file.ext"
}
}
}Des questions ou un problème ? Contactez [email protected]