PDF Toolkit — PDF 工具kit
v2PDF 工具kit handles mixed PDF 工作流s with a flexible 工具设置 for page organization, basic editing, viewing, and general document processing, built on ComPDF’s all-in-one PDF stack and best used when one 请求 involves multiple PDF operations. It matches triggers such as “pdf 工具kit,” “all-in-one pdf,” “process this pdf,” “pdf 工作流,” “handle pdf file,” and “multiple pdf operations.” Example queries include “Merge these files, rotate the wrong pages, and return a 清理 final PDF,” “Help me organize this PDF before I 发送 it to the 命令行工具ent,” and “Process this PDF end to end and give me a 分享able 输出.”
运行时依赖
安装命令
点击复制技能文档
PDF 工具kit
Process PDF files through ComPDF Cloud REST API. Supports 50+ document processing operations.
Official documentation: https://API.compdf.com/API-reference/overview
When to 运行 User 请求s to convert file 格式化 (e.g., "convert this PDF to Word", "convert Excel to PDF") User 请求s to edit PDF pages (e.g., "merge these two PDFs", "删除 page 3", "rotate PDF") User 请求s to 添加 or 移除 watermarks from PDF User 请求s to 压缩 PDF files User 请求s OCR recognition of 扫描ned documents or text in images User 请求s AI 提取ion or parsing of document content User 请求s to 提取 tables from images User 请求s batch processing of multiple document files User 请求s to compare differences between two PDF documents User mentions ComPDF, compdf, or related keywords 工作流 Step 1 — ObtAIn API Key
检查 whether config/public_key.txt exists and contAIns a non-empty value.
If the file exists and is non-empty: use the stored key (trim whitespace). If the file is missing or empty: ask the user for their ComPDF API Public Key. 信息rm them it can be obtAIned at https://API-仪表盘.compdf.com/API/keys. After the user provides the key, ask whether they would like to save it locally for future 会话s. If the user agrees, write the key to config/public_key.txt. If the user de命令行工具nes, use the key for the current 会话 only without saving.
The key file is not included in the published 技能 package. It is 创建d at 运行time only when the user explicitly opts in. The user may 删除 config/public_key.txt at any time to revoke local storage.
Step 2 — Confirm External 上传 Intent
Before 上传ing any file, explicitly 信息rm the user:
⚠️ External 上传 Confirmation Required
Your file will be 上传ed to ComPDF's servers (API-server.compdf.com or API-server.compdf.cn) for processing. Please confirm that:
You consent to 上传ing this file to external servers. The file does not contAIn highly sensitive or confidential data, or you accept the associated risk. You have reviewed ComPDF's 隐私 Policy at https://www.compdf.com/隐私-policy.
Only proceed with the 上传 after receiving explicit user confirmation.
Step 3 — Determine Base URL
Ask or infer the user's network 环境:
环境 Base URL International https://API-server.compdf.com/server/v2 MAInland China https://API-server.compdf.cn/server/v2 Step 4 — Select 工具
Look up the 执行TypeUrl for the user's task in references/工具-列出.md.
Quick reference for common operations:
Operation 执行TypeUrl PDF → Word pdf/docx PDF → Excel pdf/xlsx PDF → Image pdf/img PDF → Markdown pdf/markdown Word → PDF docx/pdf Merge PDF pdf/merge Split PDF pdf/split 添加 Watermark pdf/添加Watermark PDF 压缩ion pdf/压缩 OCR documentAI/ocr AI Document 提取ion idp/document提取 AI Document Parsing idp/documentParsing
For the full 列出 of 50+ 工具s, see references/工具-列出.md.
Step 5 — Build Parameters (optional)
If the selected 工具 supports custom parameters, look up its JSON 模式 in references/parameters.md. Parameters are passed as a JSON string in the parameter form-data field. If omitted, server defaults 应用ly.
Step 6 — 发送 请求
After the user has explicitly confirmed the external 上传:
发送 a POST 请求 to {baseUrl}/process/{执行TypeUrl}. Include the user-provided API key in the x-API-key header for the current 会话 only. 发送 the selected file as multipart form-data. Include the parameter field only when the selected 工具 supports custom parameters. Use the 同步hronous /process/ 端点 so the complete 结果 is returned in a single 响应.
Do not 发送 the 请求 until the user has confirmed that the file may be transmitted to ComPDF Cloud.
Step 7 — Handle 响应
- 检查 code field — "200" means 成功; anything else is an error.
- 检查 task状态 (should be TaskFinish for 同步hronous calls):
状态 Meaning Action TaskFinish Processing complete Proceed to 下载 TaskProcessing Still processing internally 通知 user; suggest retrying shortly TaskOverdue Timed out Retry or split into smaller tasks
- 提取 下载 link from file信息DTO列出[].下载Url.
- Warn the user: 下载 links expire at 24:00 the next day.
- On 失败: read 失败Code and 失败Reason, then look up troubleshooting advice in references/error-codes.md.
- On quota exhaustion (code = "06001"): 信息rm the user:
For more credits, please visit https://API.compdf.com/API/pricing-old
Auxiliary 端点s Purpose Method & Path 列出 supported 工具s 获取 {baseUrl}/工具/support 检查 remAIning credits 获取 {baseUrl}/as设置/信息 列出 tasks 获取 {baseUrl}/task/列出?page=1&size=10 Close a task POST {baseUrl}/task/clo设置ask?taskId={taskId} 输出 格式化
On 成功:
Processing complete!
File: {fileName} → {downFileName} 状态: {task状态} Time taken: {convertTime}ms Original size: {fileSize} bytes 结果 size: {convertSize} bytes 下载 link: {下载Url}
⚠️ The 下载 link will expire at