Категории

HTML в PDF

Рендерит ограниченный HTML в PDF

Конвертирует HTML в PDF детерминированным рендерером. **Поддерживаемые теги:** - p, h1-h6, ul/ol, table, img, code **Режимы:** - Подмножество (PDFKit) - Браузерный (Puppeteer)

Click to upload file or drag and drop file here

Maximum file size: 10MB Supported formats: text/html, application/xhtml+xml, text/plain

Документация API

Конечная точка запроса

POST /ru/api/tools/html-to-pdf-renderer

Параметры запроса

Имя параметра Тип Обязательно Описание
htmlContent textarea Нет -
htmlFile file (Требуется загрузка) Нет -
url text Нет -
baseUrl text Нет -
cssContent textarea Нет -
renderMode select Нет -
pageSize select Нет -
landscape checkbox Нет -
printBackground checkbox Нет -
scale number Нет -
marginTop number Нет -
marginBottom number Нет -
marginLeft number Нет -
marginRight number Нет -
fontSize number Нет -
lineHeight number Нет -
mediaType select Нет -
waitUntil select Нет -
waitTime number Нет -

Параметры типа файл должны быть загружены сначала через POST /upload/html-to-pdf-renderer для получения filePath, затем filePath должен быть передан в соответствующее поле файла.

Формат ответа

{
  "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)"
}
Файл: Файл

Документация MCP

Добавьте этот инструмент к конфигурации сервера MCP:

{
  "mcpServers": {
    "elysiatools-html-to-pdf-renderer": {
      "name": "html-to-pdf-renderer",
      "description": "Рендерит ограниченный HTML в PDF",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=html-to-pdf-renderer",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

Вы можете объединять несколько инструментов, например: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, максимум 20 инструментов.

Поддерживает ссылки на файлы URL или кодирование Base64 для параметров файла.

Если вы столкнулись с проблемами, пожалуйста, свяжитесь с нами по адресу [email protected]