pdf-tools-compdf
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePDF Toolkit
PDF Toolkit
Process PDF files through ComPDF Cloud REST API. Supports 50+ document processing operations.
通过ComPDF Cloud REST API处理PDF文件。支持50余种文档处理操作。
When to Run
运行场景
- User requests to convert file format (e.g., "convert this PDF to Word", "convert Excel to PDF")
- User requests to edit PDF pages (e.g., "merge these two PDFs", "delete page 3", "rotate PDF")
- User requests to add or remove watermarks from PDF
- User requests to compress PDF files
- User requests OCR recognition of scanned documents or text in images
- User requests AI extraction or parsing of document content
- User requests to extract tables from images
- User requests batch processing of multiple document files
- User requests to compare differences between two PDF documents
- User mentions ComPDF, compdf, or related keywords
- 用户请求转换文件格式(例如:“将这份PDF转换成Word”、“将Excel转换成PDF”)
- 用户请求编辑PDF页面(例如:“合并这两份PDF”、“删除第3页”、“旋转PDF”)
- 用户请求为PDF添加或移除水印
- 用户请求压缩PDF文件
- 用户请求对扫描文档或图片中的文本进行OCR识别
- 用户请求对文档内容进行AI提取或解析
- 用户请求从图片中提取表格
- 用户请求批量处理多个文档文件
- 用户请求对比两份PDF文档的差异
- 用户提及ComPDF、compdf或相关关键词
Workflow
工作流程
Step 1 — Obtain API Key
步骤1 — 获取API密钥
Check whether exists and contains a non-empty value.
config/public_key.txt- 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. Inform them it can be obtained at https://www.compdf.com/compdf-portal/signin?utm_source=clawhub&utm_medium=skillhub&utm_campaign=pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills. After the user provides the key, ask whether they would like to save it locally for future sessions.
- If the user agrees, write the key to .
config/public_key.txt - If the user declines, use the key for the current session only without saving.
- If the user agrees, write the key to
The key file is not included in the published skill package. It is created at runtime only when the user explicitly opts in. The user may deleteat any time to revoke local storage.config/public_key.txt
检查是否存在且包含非空值。
config/public_key.txt- 若文件存在且非空:使用存储的密钥(去除空格)。
- 若文件缺失或为空:向用户索要其ComPDF API公钥。告知用户可通过https://www.compdf.com/compdf-portal/signin?utm_source=clawhub&utm_medium=skillhub&utm_campaign=pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills获取。用户提供密钥后,询问是否希望将其本地保存以便后续会话使用。
- 若用户同意,将密钥写入。
config/public_key.txt - 若用户拒绝,仅在当前会话使用该密钥,不进行保存。
- 若用户同意,将密钥写入
密钥文件不包含在已发布的技能包中,仅当用户明确选择启用时才会在运行时创建。用户可随时删除以撤销本地存储。config/public_key.txt
Step 2 — Confirm External Upload Intent
步骤2 — 确认外部上传意向
Before uploading any file, explicitly inform the user:
⚠️ External Upload Confirmation RequiredYour file will be uploaded to ComPDF's servers (api-server.compdf.com or api-server.compdf.cn) for processing. Please confirm that:
- You consent to uploading 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 Privacy Policy at https://www.compdf.com/privacy-policy/?utm_source=clawhub&utm_medium=skillhub&utm_campaign=compdf_pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills.
Only proceed with the upload after receiving explicit user confirmation.
在上传任何文件之前,明确告知用户:
⚠️ 需确认外部上传您的文件将被上传至ComPDF的服务器(api-server.compdf.com或api-server.compdf.cn)进行处理。请确认:
- 您同意将此文件上传至外部服务器。
- 该文件不包含高度敏感或机密数据,或您愿意承担相关风险。
- 您已查看ComPDF的隐私政策:https://www.compdf.com/privacy-policy/?utm_source=clawhub&utm_medium=skillhub&utm_campaign=compdf_pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills。
仅在收到用户明确确认后,方可继续上传。
Step 3 — Determine Base URL
步骤3 — 确定基础URL
Ask or infer the user's network environment:
| Environment | Base URL |
|---|---|
| International | |
| Mainland China | |
询问或推断用户的网络环境:
| 环境 | 基础URL |
|---|---|
| 国际版 | |
| 中国大陆版 | |
Step 4 — Select Tool
步骤4 — 选择工具
Look up the for the user's task in .
executeTypeUrlreferences/tool-list.mdQuick reference for common operations:
| Operation | executeTypeUrl |
|---|---|
| PDF → Word | |
| PDF → Excel | |
| PDF → Image | |
| PDF → Markdown | |
| Word → PDF | |
| Merge PDF | |
| Split PDF | |
| Add Watermark | |
| PDF Compression | |
| OCR | |
| AI Document Extraction | |
| AI Document Parsing | |
For the full list of 50+ tools, see .
references/tool-list.md在中查找用户任务对应的。
references/tool-list.mdexecuteTypeUrl常见操作快速参考:
| 操作 | executeTypeUrl |
|---|---|
| PDF → Word | |
| PDF → Excel | |
| PDF → 图片 | |
| PDF → Markdown | |
| Word → PDF | |
| 合并PDF | |
| 拆分PDF | |
| 添加水印 | |
| PDF压缩 | |
| OCR识别 | |
| AI文档提取 | |
| AI文档解析 | |
如需查看50余种工具的完整列表,请参阅。
references/tool-list.mdStep 5 — Build Parameters (optional)
步骤5 — 构建参数(可选)
If the selected tool supports custom parameters, look up its JSON schema in . Parameters are passed as a JSON string in the form-data field. If omitted, server defaults apply.
references/parameters.mdparameter若所选工具支持自定义参数,请在中查找其JSON schema。参数需以JSON字符串的形式在表单数据字段中传递。若省略,将使用服务器默认值。
references/parameters.mdparameterStep 6 — Send Request
步骤6 — 发送请求
After the user has explicitly confirmed the external upload:
- Send a request to
POST.{baseUrl}/process/{executeTypeUrl} - Include the user-provided API key in the header for the current session only.
x-api-key - Send the selected file as multipart form-data.
- Include the field only when the selected tool supports custom parameters.
parameter - Use the synchronous endpoint so the complete result is returned in a single response.
/process/
Do not send the request until the user has confirmed that the file may be transmitted to ComPDF Cloud.
在用户明确确认外部上传后:
- 向发送
{baseUrl}/process/{executeTypeUrl}请求。POST - 在请求头中包含用户提供的API密钥,仅当前会话有效。
x-api-key - 以多部分表单数据形式发送所选文件。
- 仅当所选工具支持自定义参数时,才包含字段。
parameter - 使用同步端点,以便在单个响应中返回完整结果。
/process/
在用户确认可将文件传输至ComPDF Cloud之前,请勿发送请求。
Step 7 — Handle Response
步骤7 — 处理响应
1. Check field — means success; anything else is an error.
code"200"2. Check (should be for synchronous calls):
taskStatusTaskFinish| Status | Meaning | Action |
|---|---|---|
| Processing complete | Proceed to download |
| Still processing internally | Notify user; suggest retrying shortly |
| Timed out | Retry or split into smaller tasks |
3. Extract download link from .
fileInfoDTOList[].downloadUrl4. Warn the user: download links expire at 24:00 the next day.
5. On failure: read and , then look up troubleshooting advice in .
failureCodefailureReasonreferences/error-codes.md6. On quota exhaustion ( = ): inform the user:
code"06001"1. 检查字段 — 表示成功;其他值均为错误。
code"200"2. 检查(同步调用时应为):
taskStatusTaskFinish| 状态 | 含义 | 操作 |
|---|---|---|
| 处理完成 | 继续下载 |
| 内部仍在处理 | 通知用户,建议稍后重试 |
| 超时 | 重试或拆分为更小的任务 |
3. 从中提取下载链接。
fileInfoDTOList[].downloadUrl4. 提醒用户:下载链接将于次日24:00过期。
5. 处理失败情况:读取和,然后在中查找故障排除建议。
failureCodefailureReasonreferences/error-codes.md6. 配额耗尽时( = ):告知用户:
code"06001"Auxiliary Endpoints
辅助端点
| Purpose | Method & Path |
|---|---|
| List supported tools | |
| Check remaining credits | |
| List tasks | |
| Close a task | |
| 用途 | 方法与路径 |
|---|---|
| 列出支持的工具 | |
| 检查剩余额度 | |
| 列出任务 | |
| 关闭任务 | |
Output Format
输出格式
On success:
Processing complete!
File: {fileName} → {downFileName}
Status: {taskStatus}
Time taken: {convertTime}ms
Original size: {fileSize} bytes
Result size: {convertSize} bytes
Download link: {downloadUrl}
⚠️ The download link will expire at 24:00 tomorrow, please save it promptly.On failure:
Processing failed.
Error code: {failureCode}
Reason: {failureReason}
Suggestion: {troubleshooting suggestion from references/error-codes.md}成功时:
处理完成!
文件:{fileName} → {downFileName}
状态:{taskStatus}
耗时:{convertTime}ms
原大小:{fileSize} 字节
结果大小:{convertSize} 字节
下载链接:{downloadUrl}
⚠️ 下载链接将于次日24:00过期,请及时保存。失败时:
处理失败。
错误代码:{failureCode}
原因:{failureReason}
建议:{来自references/error-codes.md的故障排除建议}Critical Rules
重要规则
- HTTP 200 ≠ success — always check and
codein the JSON body.taskStatus - Max 5 files per task — split into multiple tasks if more files are needed.
- Free tier limit — 200 files within 30 days.
- File type auto-detection — the API detects uploaded file types; no need to rename extensions.
- Encrypted PDFs — provide the password in the form-data field (separate from
password).parameter - China domain — mainland China users must replace with
compdf.com.compdf.cn - User-controlled API Key storage — the key file () is never shipped with the skill package. It is created at runtime only when the user explicitly opts in. The user may delete it at any time.
config/public_key.txt - External upload confirmation — always obtain explicit user consent before uploading files to ComPDF servers.
- HTTP 200 ≠ 成功 — 务必检查JSON响应体中的和
code。taskStatus - 每个任务最多5个文件 — 若需要处理更多文件,请拆分为多个任务。
- 免费层限制 — 30天内最多处理200个文件。
- 文件类型自动检测 — API会自动检测上传文件的类型,无需重命名文件扩展名。
- 加密PDF — 在表单数据字段中提供密码(与
password字段分开)。parameter - 中国域名 — 中国大陆用户必须将替换为
compdf.com。compdf.cn - 用户可控的API密钥存储 — 密钥文件()绝不会随技能包一同发布。仅当用户明确选择启用时才会在运行时创建,用户可随时删除该文件。
config/public_key.txt - 外部上传确认 — 在将文件上传至ComPDF服务器之前,务必获得用户的明确同意。
License & Copyright
许可与版权
Copyright © 2014-2026 PDF Technologies, Inc., a KDAN Company. All Rights Reserved.
ComPDF and ComPDFKit are trademarks of PDF Technologies, Inc., a KDAN Company.
This skill package is licensed under the Apache License 2.0. See for the full license text.
LICENSE.txtThe ComPDF Cloud API is a commercial service provided by PDF Technologies, Inc. Use of the API is subject to the ComPDF Terms of Service and Privacy Policy.
Copyright © 2014-2026 PDF Technologies, Inc., a KDAN Company. All Rights Reserved.
ComPDF和ComPDFKit是PDF Technologies, Inc.(KDAN旗下公司)的商标。
本技能包采用Apache License 2.0许可。完整许可文本请参阅。
LICENSE.txtComPDF Cloud API是PDF Technologies, Inc.提供的商业服务。使用该API需遵守ComPDF服务条款和隐私政策。",