Document Tools
Create PDF documents with text, paragraphs, headers, footers, and page numbers
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/pdf-basic-text-doc' \
-H 'Content-Type: application/json' \
-d '{"content":"Enter your document content here...\n\nYou can separate paragraphs with blank lines.","title":"My Document","pageSize":"A4","orientation":"portrait","fontSize":12,"lineHeight":1.5,"marginTop":72,"marginBottom":72,"marginLeft":72,"marginRight":72,"showHeader":false,"headerText":"Document Header","headerAlignment":"center","showFooter":false,"footerText":"Page {page} of {total}","footerAlignment":"center","showPageNumbers":true,"pageNumberPosition":"bottom-center"}'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-basic-text-doc| Name | Type | Required | Description |
|---|---|---|---|
| content | textarea | Yes | — |
| title | text | No | — |
| pageSize | select | No | — |
| orientation | select | No | — |
| fontSize | number | No | — |
| lineHeight | number | No | — |
| marginTop | number | No | — |
| marginBottom | number | No | — |
| marginLeft | number | No | — |
| marginRight | number | No | — |
| showHeader | checkbox | No | — |
| headerText | text | No | — |
| headerAlignment | select | No | — |
| showFooter | checkbox | No | — |
| footerText | text | No | — |
| footerAlignment | select | No | — |
| showPageNumbers | checkbox | No | — |
| pageNumberPosition | select | 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-basic-text-doc": {
"name": "pdf-basic-text-doc",
"description": "Create PDF documents with text, paragraphs, headers, footers, and page numbers",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-basic-text-doc",
"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-basic-text-doc",
"arguments": {
"content": "Enter your document content here...\n\nYou can separate paragraphs with blank lines.",
"title": "My Document",
"pageSize": "A4",
"orientation": "portrait",
"fontSize": 12,
"lineHeight": 1.5,
"marginTop": 72,
"marginBottom": 72,
"marginLeft": 72,
"marginRight": 72,
"showHeader": false,
"headerText": "Document Header",
"headerAlignment": "center",
"showFooter": false,
"footerText": "Page {page} of {total}",
"footerAlignment": "center",
"showPageNumbers": true,
"pageNumberPosition": "bottom-center"
}
}
}Questions or issues? Contact [email protected]