Document Tools
Convert text content to PDF documents with customizable formatting, fonts, and page settings
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/text-to-pdf-converter' \
-H 'Content-Type: application/json' \
-d '{"text":"Enter the text content to convert to PDF...","fontSize":12,"lineHeight":1.2,"pageSize":"A4","orientation":"portrait","title":"Enter optional document title","author":"Elysia Tools","subject":"Converted from text","keywords":"text,pdf,conversion"}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/text-to-pdf-converter| Name | Type | Required | Description |
|---|---|---|---|
| text | textarea | Yes | — |
| fontSize | number | No | — |
| lineHeight | number | No | — |
| pageSize | select | No | — |
| orientation | select | No | — |
| title |
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-text-to-pdf-converter": {
"name": "text-to-pdf-converter",
"description": "Convert text content to PDF documents with customizable formatting, fonts, and page settings",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=text-to-pdf-converter",
"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": "text-to-pdf-converter",
"arguments": {
"text": "Enter the text content to convert to PDF...",
"fontSize": 12,
"lineHeight": 1.2,
"pageSize": "A4",
"orientation": "portrait",
"title": "Enter optional document title",
"author": "Elysia Tools",
"subject": "Converted from text",
"keywords": "text,pdf,conversion"
}
}
}Questions or issues? Contact [email protected]
| text |
| No |
| — |
| author | text | No | — |
| subject | text | No | — |
| keywords | text | 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)"
}