Document Tools
Preview left-to-right and right-to-left text flow in PDF with bidi reordering
Call this tool from your code in three languages.
# 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/en/api/tools/pdf-rtl-ltr-support' \
-F 'ltrText=Enter left-to-right text...' \
-F 'rtlText=أدخل نصًا من اليمين إلى اليسار...' \
-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'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/pdf-rtl-ltr-support| Name | Type | Required | Description |
|---|---|---|---|
| ltrText | textarea | Yes | — |
| rtlText | textarea | Yes | — |
| baseDirection | select | No | — |
| alignment | select | No | — |
| fontSize | number | No | — |
| lineHeight | number | No | — |
| pageSize | select | No | — |
| marginTop | number | No | — |
| marginBottom | number | No | — |
| marginLeft | number | No | — |
| marginRight | number | No | — |
| showGuides | checkbox | No | — |
| includeMixedSample | checkbox | No | — |
| fontFile | fileupload required | No | — |
File result
{
"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)"
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-pdf-rtl-ltr-support": {
"name": "pdf-rtl-ltr-support",
"description": "Preview left-to-right and right-to-left text flow in PDF with bidi reordering",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-rtl-ltr-support",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pdf-rtl-ltr-support",
"arguments": {
"ltrText": "Enter left-to-right text...",
"rtlText": "أدخل نصًا من اليمين إلى اليسار...",
"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"
}
}
}Questions or issues? Contact [email protected]