分类

富文本JSON转PDF

将TipTap/Quill/Slate导出的JSON转换为PDF

将富文本编辑器JSON导出转换为PDF。

支持编辑器: TipTap、Quill、Slate
输入: 粘贴JSON或上传文件
输出: 排版友好的PDF

示例结果

1 个示例

示例:Richtext JSON

自动生成的PDF样例:TipTap JSON rendered to PDF

richtext-json-to-pdf-example1.pdf 查看文件
查看输入参数
{ "jsonContent": "{\"type\":\"doc\",\"content\":[{\"type\":\"heading\",\"attrs\":{\"level\":2},\"content\":[{\"type\":\"text\",\"text\":\"Release Update\"}]},{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"Generated sample.\"}]}]}", "editorType": "tiptap", "documentTitle": "TipTap Sample" }

Click to upload file or drag and drop file here

Maximum file size: 5MB Supported formats: application/json, text/plain

关键信息

分类
Document Tools
输入类型
textarea, file, select, text, number, checkbox
输出类型
file
样本覆盖
4
支持 API
Yes

概览

将富文本编辑器JSON导出转换为PDF。 **支持编辑器:** TipTap、Quill、Slate **输入:** 粘贴JSON或上传文件 **输出:** 排版友好的PDF

适用场景

  • 当你需要在浏览器中快速 process json, pdf 内容时,可以使用它。
  • 适合需要可重复输入和快速结果的 document tools 工作流。
  • 如果你想先用真实文件验证流程,再迁移到代码或 API 调用,这个工具很合适。

工作原理

  • 先输入 富文本JSON, JSON文件, 编辑器类型, 文档标题。
  • 工具会处理请求并返回 file 类型的结果。
  • 针对文件类流程,建议先使用具有代表性的 json, pdf 测试文件验证边界情况和输出质量。

使用场景

在调试或 QA 场景下处理 json, pdf 数据。
在接入 API 或自动化流程前先验证输出结果。
使用代表性样本文件和边界案例测试整个流程。

用 Samples 测试

json, pdf, text

相关专题

常见问题

富文本JSON转PDF 是做什么的?

富文本JSON转PDF 可帮助你在线 process json, pdf 内容,无需单独编写本地脚本或应用。

什么时候适合用这个工具?

当你需要快速完成 process 流程、验证输出结果,或需要一个浏览器内的 document tools 工具时,就适合使用它。

可以用样本数据测试这个工具吗?

可以。页面会推荐相关样本文件,方便你立即开始测试。

富文本JSON转PDF 支持哪些输入?

富文本JSON转PDF 支持 富文本JSON, JSON文件, 编辑器类型, 文档标题 and supports file uploads for 1 field.

富文本JSON转PDF 有 API 吗?

有。工具页包含可供脚本调用的 API 端点,方便你从手动测试过渡到自动化使用。

API 文档

请求端点

POST /zh/api/tools/richtext-json-to-pdf

请求参数

参数名 类型 必填 描述
jsonContent textarea -
jsonFile file (需要先上传) -
editorType select -
documentTitle text -
baseFontSize number -
pageSize select -
landscape checkbox -
printBackground checkbox -
marginTop number -
marginBottom number -
marginLeft number -
marginRight number -
waitUntil select -
waitTime number -

文件类型参数需要先通过 POST /upload/richtext-json-to-pdf 上传获取 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)"
}
文件: 文件

AI MCP 文档

将此工具添加到您的 MCP 服务器配置中:

{
  "mcpServers": {
    "elysiatools-richtext-json-to-pdf": {
      "name": "richtext-json-to-pdf",
      "description": "将TipTap/Quill/Slate导出的JSON转换为PDF",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=richtext-json-to-pdf",
      "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]