分类

聊天记录转PDF

将多角色聊天记录排版为对话式PDF

将聊天记录JSON排版为对话式PDF。 **输入:** JSON数组,或包含 messages 的对象 **输出:** 气泡样式对话PDF **示例:** ```json { "messages": [ { "role": "system", "content": "简洁友好回复。" }, { "role": "user", "content": "请总结我的账单。" }, { "role": "assistant", "content": "账单$420,截止 2026-02-20。" } ] } ```

示例结果

1 个示例

示例:Chat Transcript

自动生成的PDF样例:Chat JSON transcript exported to PDF

chat-transcript-to-pdf-example1.pdf 查看文件
查看输入参数
{ "transcriptJson": "{\"messages\":[{\"role\":\"user\",\"content\":\"Status update?\"},{\"role\":\"assistant\",\"content\":\"Deployment complete.\"}]}", "title": "Ops Chat", "showTimestamps": false }

Click to upload file or drag and drop file here

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

API 文档

请求端点

POST /zh/api/tools/chat-transcript-to-pdf

请求参数

参数名 类型 必填 描述
transcriptJson textarea -
transcriptFile file (需要先上传) -
title text -
showTimestamps checkbox -
accentColor color -
userBubbleColor color -
assistantBubbleColor color -
systemBubbleColor color -
baseFontSize number -
pageSize select -
landscape checkbox -
printBackground checkbox -
marginTop number -
marginBottom number -
marginLeft number -
marginRight number -
waitUntil select -
waitTime number -

文件类型参数需要先通过 POST /upload/chat-transcript-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-chat-transcript-to-pdf": {
      "name": "chat-transcript-to-pdf",
      "description": "将多角色聊天记录排版为对话式PDF",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=chat-transcript-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]