Document Tools
Создание многоколоночных PDF документов в стиле газеты/журнала
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/pdf-multi-column-layout' \
-H 'Content-Type: application/json' \
-d '{"content":"Введите текст вашей статьи здесь...","headline":"Заголовок Статьи","subheadline":"Подзаголовок или резюме статьи","author":"Иван Иванов","date":"1 января 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}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/pdf-multi-column-layout| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| content | textarea | Да | — |
| headline | text | Нет | — |
| subheadline | text | Нет | — |
| author | text | Нет | — |
| date | text | Нет | — |
| columnCount | select | Нет | — |
| gutterWidth | number | Нет | Пространство между колонками |
| columnBalance | select | Нет | — |
| textAlign | select | Нет | — |
| headlineFontSize | number | Нет | — |
| bodyFontSize | number | Нет | — |
| lineHeight | number | Нет | — |
| showSeparatorLines | checkbox | Нет | — |
| showDropCap | checkbox | Нет | — |
| dropCapLines | number | Нет | — |
| showHeader | checkbox | Нет | — |
| headerText | text | Нет | — |
| headerAlignment | select | Нет | — |
| showFooter | checkbox | Нет | — |
| footerText | text | Нет | — |
| footerAlignment | select | Нет | — |
| marginTop | number | Нет | — |
| marginBottom | number | Нет | — |
| marginLeft | number | Нет | — |
| marginRight | number | Нет | — |
Файловый результат
{
"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)"
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-pdf-multi-column-layout": {
"name": "pdf-multi-column-layout",
"description": "Создание многоколоночных PDF документов в стиле газеты/журнала",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-multi-column-layout",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pdf-multi-column-layout",
"arguments": {
"content": "Введите текст вашей статьи здесь...",
"headline": "Заголовок Статьи",
"subheadline": "Подзаголовок или резюме статьи",
"author": "Иван Иванов",
"date": "1 января 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
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]