{"id":"e2fe3bc9-b21b-4988-bcf0-f4d63c1314b2","entityType":"agent","slug":"clawhub-compdf-youna-pdf-tools-compdf","name":"PDF Toolkit","canonicalUrl":"https://www.xpersona.co/agent/clawhub-compdf-youna-pdf-tools-compdf","canonicalPath":"/agent/clawhub-compdf-youna-pdf-tools-compdf","generatedAt":"2026-10-10T08:44:17.767Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T03:59:06.633Z","emptyReason":null},"description":"PDF Toolkit handles mixed PDF workflows with a flexible toolset for page organization, basic editing, viewing, and general document processing, built on ComP...","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.7K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s178t897hzzp9pvkwbav4e2kfs83g980:pdf-tools-compdf","sourceUrl":"https://clawhub.ai/compdf-youna/pdf-tools-compdf","homepage":"https://clawhub.ai/compdf-youna/skills/pdf-tools-compdf","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/compdf-youna/pdf-tools-compdf","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/compdf-youna/skills/pdf-tools-compdf","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":65,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"PDF Toolkit technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T03:59:06.633Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T03:59:06.633Z","emptyReason":null},"stars":null,"forks":null,"downloads":1708,"packageName":null,"latestVersion":"1.2.0","tractionLabel":"1.7K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T03:59:06.156Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T03:59:06.633Z","lastCrawledAt":"2026-10-10T03:59:06.156Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T03:59:06.156Z","lastVerifiedAt":null,"highlights":[{"version":"1.2.0","createdAt":"2026-06-24T05:29:45.899Z","changelog":"- Updated links throughout documentation to use UTM tracking and new portal addresses for API documentation, privacy policy, and pricing pages. - Removed the redundant skill-card.md file from the package. - No changes were made to functionality or workflow; documentation was updated for improved clarity and accuracy.","fileCount":7,"zipByteSize":15901},{"version":"1.1.0","createdAt":"2026-04-29T11:34:07.497Z","changelog":"- Expanded skill description to clarify multi-step, mixed-operation PDF workflows and new trigger phrases such as \"pdf toolkit,\" \"all-in-one pdf,\" and \"multiple pdf operations.\" - Updated usage examples to reflect broader, end-to-end PDF processing scenarios (e.g., merging, rotating, and organizing PDFs in a single request). - No functional or file changes; documentation now better communicates the use case for handling complex PDF workflows with a single toolset.","fileCount":7,"zipByteSize":15563},{"version":"1.0.1","createdAt":"2026-03-20T09:36:45.083Z","changelog":"- Reworked the pdf-tools-compdf skill to reduce ClawHub security risk signals. - Updated the skill description to focus on explicit ComPDF Cloud API use on user-selected files. - Reframed the skill as a cloud-processing tool that requires user acceptance of remote upload for the current run.","fileCount":6,"zipByteSize":14178},{"version":"1.0.0","createdAt":"2026-03-20T06:27:45.991Z","changelog":"- Initial release of the pdf-tools-compdf skill. - Provides PDF processing via ComPDF Cloud API: convert, edit, extract data, add watermarks, OCR, and more (50+ operations). - Uses user-provided API key and auto-selects international or China endpoint. - Clearly documents workflows for handling all supported PDF operations and error handling. - Details output format for both successful and failed tasks, including download link and expiry notices. - Enforces essential usage rules (API quotas, file limits, endpoint selection, handling encrypted PDFs).","fileCount":7,"zipByteSize":13801}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s178t897hzzp9pvkwbav4e2kfs83g980:pdf-tools-compdf","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s178t897hzzp9pvkwbav4e2kfs83g980:pdf-tools-compdf` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/compdf-youna/pdf-tools-compdf before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-compdf-youna-pdf-tools-compdf/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-compdf-youna-pdf-tools-compdf/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-compdf-youna-pdf-tools-compdf/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-compdf-youna-pdf-tools-compdf/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-compdf-youna-pdf-tools-compdf/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-compdf-youna-pdf-tools-compdf/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T08:44:17.763Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-compdf-youna-pdf-tools-compdf/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-compdf-youna-pdf-tools-compdf/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-compdf-youna-pdf-tools-compdf/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-compdf-youna-pdf-tools-compdf/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T03:59:06.633Z","emptyReason":null},"readme":"Skill: PDF Toolkit\n\nOwner: compdf-youna\n\nSummary: PDF Toolkit handles mixed PDF workflows with a flexible toolset for page organization, basic editing, viewing, and general document processing, built on ComP...\n\nTags: latest:1.2.0\n\nVersion history:\n\nv1.2.0 | 2026-06-24T05:29:45.899Z | user\n\n- Updated links throughout documentation to use UTM tracking and new portal addresses for API documentation, privacy policy, and pricing pages.\n- Removed the redundant skill-card.md file from the package.\n- No changes were made to functionality or workflow; documentation was updated for improved clarity and accuracy.\n\nv1.1.0 | 2026-04-29T11:34:07.497Z | user\n\n- Expanded skill description to clarify multi-step, mixed-operation PDF workflows and new trigger phrases such as \"pdf toolkit,\" \"all-in-one pdf,\" and \"multiple pdf operations.\"\n- Updated usage examples to reflect broader, end-to-end PDF processing scenarios (e.g., merging, rotating, and organizing PDFs in a single request).\n- No functional or file changes; documentation now better communicates the use case for handling complex PDF workflows with a single toolset.\n\nv1.0.1 | 2026-03-20T09:36:45.083Z | user\n\n- Reworked the pdf-tools-compdf skill to reduce ClawHub security risk signals.\n\n- Updated the skill description to focus on explicit ComPDF Cloud API use on user-selected files.\n\n- Reframed the skill as a cloud-processing tool that requires user acceptance of remote upload for the current run.\n\nv1.0.0 | 2026-03-20T06:27:45.991Z | user\n\n- Initial release of the pdf-tools-compdf skill.\n- Provides PDF processing via ComPDF Cloud API: convert, edit, extract data, add watermarks, OCR, and more (50+ operations).\n- Uses user-provided API key and auto-selects international or China endpoint.\n- Clearly documents workflows for handling all supported PDF operations and error handling.\n- Details output format for both successful and failed tasks, including download link and expiry notices.\n- Enforces essential usage rules (API quotas, file limits, endpoint selection, handling encrypted PDFs).\n\nArchive index:\n\nArchive v1.2.0: 7 files, 15901 bytes\n\nFiles: LICENSE.txt (10583b), references/error-codes.md (4444b), references/parameters.md (9305b), references/tool-list.md (4097b), skill-card.md (2534b), SKILL.md (8675b), _meta.json (135b)\n\nFile v1.2.0:SKILL.md\n\n---\nname: pdf-tools-compdf\ndescription: >\n  PDF Toolkit handles mixed PDF workflows with a flexible toolset for page organization, basic editing, viewing, and general document processing, built on ComPDF’s all-in-one PDF stack and best used when one request involves multiple PDF operations. It matches triggers such as “pdf toolkit,” “all-in-one pdf,” “process this pdf,” “pdf workflow,” “handle pdf file,” and “multiple pdf operations.” Example queries include “Merge these files, rotate the wrong pages, and return a clean final PDF,” “Help me organize this PDF before I send it to the client,” and “Process this PDF end to end and give me a shareable output.”\n---\n\n# PDF Toolkit\n\nProcess PDF files through ComPDF Cloud REST API. Supports 50+ document processing operations.\n\nOfficial documentation: <https://www.compdf.com/guides/api-reference/v2/overview?utm_source=clawhub&utm_medium=skillhub&utm_campaign=pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills>\n\n## When to Run\n\n- User requests to convert file format (e.g., \"convert this PDF to Word\", \"convert Excel to PDF\")\n- User requests to edit PDF pages (e.g., \"merge these two PDFs\", \"delete page 3\", \"rotate PDF\")\n- User requests to add or remove watermarks from PDF\n- User requests to compress PDF files\n- User requests OCR recognition of scanned documents or text in images\n- User requests AI extraction or parsing of document content\n- User requests to extract tables from images\n- User requests batch processing of multiple document files\n- User requests to compare differences between two PDF documents\n- User mentions ComPDF, compdf, or related keywords\n\n## Workflow\n\n### Step 1 — Obtain API Key\n\nCheck whether `config/public_key.txt` exists and contains a non-empty value.\n\n- **If the file exists and is non-empty**: use the stored key (trim whitespace).\n- **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.\n  - If the user agrees, write the key to `config/public_key.txt`.\n  - If the user declines, use the key for the current session only without saving.\n\n> 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 delete `config/public_key.txt` at any time to revoke local storage.\n\n### Step 2 — Confirm External Upload Intent\n\n**Before uploading any file**, explicitly inform the user:\n\n> ⚠️ **External Upload Confirmation Required**\n>\n> Your file will be uploaded to ComPDF's servers (api-server.compdf.com or api-server.compdf.cn) for processing. Please confirm that:\n> 1. You consent to uploading this file to external servers.\n> 2. The file does not contain highly sensitive or confidential data, or you accept the associated risk.\n> 3. 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>.\n\n**Only proceed with the upload after receiving explicit user confirmation.**\n\n### Step 3 — Determine Base URL\n\nAsk or infer the user's network environment:\n\n| Environment | Base URL |\n|---|---|\n| International | `https://api-server.compdf.com/server/v2` |\n| Mainland China | `https://api-server.compdf.cn/server/v2` |\n\n### Step 4 — Select Tool\n\nLook up the `executeTypeUrl` for the user's task in `references/tool-list.md`.\n\nQuick reference for common operations:\n\n| Operation | executeTypeUrl |\n|---|---|\n| PDF → Word | `pdf/docx` |\n| PDF → Excel | `pdf/xlsx` |\n| PDF → Image | `pdf/img` |\n| PDF → Markdown | `pdf/markdown` |\n| Word → PDF | `docx/pdf` |\n| Merge PDF | `pdf/merge` |\n| Split PDF | `pdf/split` |\n| Add Watermark | `pdf/addWatermark` |\n| PDF Compression | `pdf/compress` |\n| OCR | `documentAI/ocr` |\n| AI Document Extraction | `idp/documentExtract` |\n| AI Document Parsing | `idp/documentParsing` |\n\nFor the full list of 50+ tools, see `references/tool-list.md`.\n\n### Step 5 — Build Parameters (optional)\n\nIf the selected tool supports custom parameters, look up its JSON schema in `references/parameters.md`. Parameters are passed as a **JSON string** in the `parameter` form-data field. If omitted, server defaults apply.\n\n### Step 6 — Send Request\n\nAfter the user has explicitly confirmed the external upload:\n\n1. Send a `POST` request to `{baseUrl}/process/{executeTypeUrl}`.\n2. Include the user-provided API key in the `x-api-key` header for the current session only.\n3. Send the selected file as multipart form-data.\n4. Include the `parameter` field only when the selected tool supports custom parameters.\n5. Use the synchronous `/process/` endpoint so the complete result is returned in a single response.\n\nDo not send the request until the user has confirmed that the file may be transmitted to ComPDF Cloud.\n\n### Step 7 — Handle Response\n\n**1. Check `code` field** — `\"200\"` means success; anything else is an error.\n\n**2. Check `taskStatus`** (should be `TaskFinish` for synchronous calls):\n\n| Status | Meaning | Action |\n|---|---|---|\n| `TaskFinish` | Processing complete | Proceed to download |\n| `TaskProcessing` | Still processing internally | Notify user; suggest retrying shortly |\n| `TaskOverdue` | Timed out | Retry or split into smaller tasks |\n\n**3. Extract download link** from `fileInfoDTOList[].downloadUrl`.\n\n**4. Warn the user**: download links expire at **24:00 the next day**.\n\n**5. On failure**: read `failureCode` and `failureReason`, then look up troubleshooting advice in `references/error-codes.md`.\n\n**6. On quota exhaustion** (`code` = `\"06001\"`): inform the user:\n\n> For more credits, please visit <https://api.compdf.com/api/pricing-old/?utm_source=clawhub&utm_medium=skillhub&utm_campaign=compdf_pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills>\n\n### Auxiliary Endpoints\n\n| Purpose | Method & Path |\n|---|---|\n| List supported tools | `GET {baseUrl}/tool/support` |\n| Check remaining credits | `GET {baseUrl}/asset/info` |\n| List tasks | `GET {baseUrl}/task/list?page=1&size=10` |\n| Close a task | `POST {baseUrl}/task/closeTask?taskId={taskId}` |\n\n## Output Format\n\n**On success:**\n\n```\nProcessing complete!\n\nFile: {fileName} → {downFileName}\nStatus: {taskStatus}\nTime taken: {convertTime}ms\nOriginal size: {fileSize} bytes\nResult size: {convertSize} bytes\nDownload link: {downloadUrl}\n\n⚠️ The download link will expire at 24:00 tomorrow, please save it promptly.\n```\n\n**On failure:**\n\n```\nProcessing failed.\n\nError code: {failureCode}\nReason: {failureReason}\nSuggestion: {troubleshooting suggestion from references/error-codes.md}\n```\n\n## Critical Rules\n\n1. **HTTP 200 ≠ success** — always check `code` and `taskStatus` in the JSON body.\n2. **Max 5 files per task** — split into multiple tasks if more files are needed.\n3. **Free tier limit** — 200 files within 30 days.\n4. **File type auto-detection** — the API detects uploaded file types; no need to rename extensions.\n5. **Encrypted PDFs** — provide the password in the `password` form-data field (separate from `parameter`).\n6. **China domain** — mainland China users must replace `compdf.com` with `compdf.cn`.\n7. **User-controlled API Key storage** — the key file (`config/public_key.txt`) 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.\n8. **External upload confirmation** — always obtain explicit user consent before uploading files to ComPDF servers.\n\n## License & Copyright\n\nCopyright © 2014-2026 PDF Technologies, Inc., a KDAN Company. All Rights Reserved.\n\nComPDF and ComPDFKit are trademarks of [PDF Technologies, Inc.](https://www.compdf.com/?utm_source=clawhub&utm_medium=skillhub&utm_campaign=compdf_pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills), a KDAN Company.\n\nThis skill package is licensed under the Apache License 2.0. See `LICENSE.txt` for the full license text.\n\nThe ComPDF Cloud API is a commercial service provided by PDF Technologies, Inc. Use of the API is subject to the [ComPDF Terms of Service](https://www.compdf.com/terms-of-service/?utm_source=clawhub&utm_medium=skillhub&utm_campaign=compdf_pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills) and [Privacy Policy](https://www.compdf.com/privacy-policy/?utm_source=clawhub&utm_medium=skillhub&utm_campaign=compdf_pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills).\n\nFile v1.2.0:_meta.json\n\n{\n  \"ownerId\": \"kn75g40xmv3tgkb21e079d055n82v5h8\",\n  \"slug\": \"pdf-tools-compdf\",\n  \"version\": \"1.2.0\",\n  \"publishedAt\": 1782278985899\n}\n\nFile v1.2.0:references/error-codes.md\n\n# ComPDF API Error Code Reference\n\n## HTTP Status Codes\n\n| Status Code | Description |\n|---|---|\n| 200 | HTTP request successful (does not indicate file processing success—check `code` and `taskStatus` in JSON) |\n| 401 | API Key missing or invalid |\n| 413 | Request body exceeds size limit |\n\n## Business Error Codes\n\n### 01xxx - System Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 01001 | System internal error | Retry later; if issue persists, contact support@compdf.com |\n| 01002 | Failed to upload processed file to server | Retry the task |\n| 01003 | File upload failed | Check network connection and file size |\n| 01004 | File download failed | Check if download link has expired |\n| 01005 | File cannot be empty | Verify the uploaded file is not empty |\n| 01006 | File parameter exception | Check JSON format in `parameter` field is correct |\n| 01201 | System memory issue | File may be too large; try batch processing |\n| 01202 | Unknown error | Contact technical support |\n| 01203 | File not found or cannot be opened | Verify file path and format are correct |\n| 01204 | Unsupported security mechanism | File uses unsupported encryption method |\n| 01206 | CSV file not found | Confirm valid CSV file was uploaded |\n| 01207 | DocumentAI API call failed | AI service temporarily unavailable; retry later |\n| 01208 | Failed to write recognition results to file | Retry the task |\n\n### 02xxx - File Format Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 02001 | File format error | Verify file format matches executeTypeUrl |\n| 02002 | Unsupported conversion format | Check `references/tool-list.md` for supported conversion types |\n| 02201 | File is encrypted | Provide correct password in `password` field |\n| 02203 | PDF file exception | File may be corrupted; try repairing with another tool before re-uploading |\n| 02204 | Unsupported file format (PDF only) | This tool accepts PDF input only |\n| 02206 | File content invalid or page does not exist | Check specified page number does not exceed total pages |\n| 02207 | Cannot open file: unsupported format or file is encrypted | Verify format is correct and provide password if encrypted |\n| 02208 | ExcelXml initialization failed | Excel file may be corrupted |\n| 02209 | Conversion timeout—file too large | Use async mode or split file and batch process |\n| 02210 | File conversion failed | Check if file is corrupted; try re-uploading |\n| 02211 | Converted file size abnormal | Source file may have issues; check and retry |\n\n### 03xxx - Parameter Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 03000 | Parameter validation error | Check field names and values in `parameter` JSON match documentation |\n\n### 04xxx - File Operation Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 04001 | fileKey not found | Task may have expired; resubmit the task |\n| 04002 | File size is zero | File is empty; upload valid file |\n| 04003 | File not found or cannot be opened | Verify file path and upload success |\n| 04004 | Comparison file compression failed | Retry document comparison task |\n| 04005 | Document comparison requires exactly two files | Ensure exactly 2 files were uploaded |\n\n### 05xxx - Task Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 05001 | Invalid task | taskId is incorrect or task has been cleaned up |\n| 05002 | Task status exception | Recreate the task |\n| 05003 | Single task file limit reached (5 files) | Split into multiple tasks |\n| 05004 | Task expired without execution | Resubmit the task |\n| 05005 | Task requires at least one file | Ensure file was uploaded |\n\n### 06xxx - Quota Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 06001 | File processing quota exhausted | Purchase quota or wait for quota reset; visit https://api.compdf.com/api/pricing-old/?utm_source=clawhub&utm_medium=skillhub&utm_campaign=compdf_pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills for more credits |\n\n### 07xxx - Feature Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 07001 | Unsupported feature | Verify the feature is available in current plan |\n\n## Task Status (taskStatus)\n\n| Status Value | Description |\n|---|---|\n| `TaskStart` | Task created successfully |\n| `TaskWaiting` | Task waiting for processing |\n| `TaskProcessing` | Task is processing |\n| `TaskFinish` | Task processing complete |\n| `TaskOverdue` | Task waiting timed out |\n\nFile v1.2.0:references/parameters.md\n\n# ComPDF API Tool Parameter Details\n\nParameters are passed as JSON strings in the `parameter` field of the request. If not passed, default values are used.\n\n---\n\n## Format Conversion\n\n### PDF to Word (`pdf/docx`)\n\n```json\n{\n  \"enableAiLayout\": 1,\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"enableOcr\": 0,\n  \"ocrRecognitionLang\": \"AUTO\",\n  \"pageRanges\": \"\",\n  \"pageLayoutMode\": \"e_Flow\",\n  \"formulaToImage\": 0,\n  \"ocrOption\": \"ALL\",\n  \"isOutputDocumentPerPage\": 0,\n  \"containPageBackgroundImage\": 1\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `enableAiLayout` | Enable AI layout analysis (0=off, 1=on) | 1 |\n| `isContainImg` | Include images during conversion (0=off, 1=on) | 1 |\n| `isContainAnnot` | Include annotations during conversion (0=off, 1=on) | 1 |\n| `enableOcr` | Enable OCR (0=off, 1=on) | 0 |\n| `ocrRecognitionLang` | OCR recognition language (see language list below) | AUTO |\n| `pageRanges` | Page range, e.g., `\"1,2,3-5\"`, empty=all pages | \"\" |\n| `pageLayoutMode` | Layout mode: `e_Box`=fixed layout, `e_Flow`=flow layout | e_Flow |\n| `formulaToImage` | Convert formulas to images (0=off, 1=on), recommend on for complex formulas | 0 |\n| `ocrOption` | OCR recognition scope (see options below) | ALL |\n| `isOutputDocumentPerPage` | Output one document per page (0=off, 1=on) | 0 |\n| `containPageBackgroundImage` | Include page background images during OCR (0=off, 1=on) | 1 |\n\n**OCR Recognition Language (ocrRecognitionLang):**\nAUTO, CHINESE (Simplified Chinese), CHINESE_TRAD (Traditional Chinese), ENGLISH, KOREAN, JAPANESE, LATIN, DEVANAGARI, CYRILLIC, ARABIC, TAMIL, TELUGU, KANNADA, THAI, GREEK, ESLAV (Slavic)\n\n**OCR Recognition Scope (ocrOption):**\n- `INVALID_CHARACTER` - Recognize invalid characters in PDF\n- `SCAN_PAGE` - Recognize scanned pages in PDF\n- `INVALID_CHARACTERAND_SCAN_PAGE` - Recognize invalid characters and scanned pages\n- `ALL` - Recognize all characters on all pages\n\n**Layout Mode Differences:**\n- `e_Flow` (Flow layout): Suitable for editing, content can be dynamically adjusted. However, display may vary across different software versions.\n- `e_Box` (Fixed layout): Maintain original PDF layout unchanged, but less convenient for editing.\n\n---\n\n### PDF to Image (`pdf/img`)\n\n```json\n{\n  \"imageType\": \"jpg\",\n  \"imgDpi\": \"300\",\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `imageType` | Output image format: `jpg`, `png` | jpg |\n| `imgDpi` | Output image DPI | 300 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to Excel (`pdf/xlsx`)\n\n```json\n{\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `isContainImg` | Include images (0/1) | 1 |\n| `isContainAnnot` | Include annotations (0/1) | 1 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to HTML (`pdf/html`)\n\n```json\n{\n  \"isContainImg\": 1,\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `isContainImg` | Include images (0/1) | 1 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to TXT (`pdf/txt`)\n\n```json\n{\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF Standard Conversion (`pdf/convertType`)\n\n```json\n{\n  \"convertType\": \"pdfa1a\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `convertType` | Target PDF standard: `pdfa1a`, `pdfa1b`, `pdfa2a`, `pdfa2b`, `pdfa3a`, `pdfa3b` |\n\n---\n\n## Page Editing\n\n### PDF Merge (`pdf/merge`)\n\nUpload 2-5 files in a single task.\n\n```json\n{\n  \"pageOptions\": \"['1,2']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying page ranges for each uploaded file. Each array element (in single quotes) corresponds to one file in upload order. Format: `\"['pages_for_file1','pages_for_file2']\"`. Page numbers start from 1, use commas for individual pages and hyphens for ranges (e.g., `1,2,4,6,9-11`). Not passing = merge all pages of all files. |\n\n**Examples:**\n- 2 files, all pages from both: omit `pageOptions`\n- 2 files, pages 1-3 from file 1, pages 2,5 from file 2: `\"['1-3','2,5']\"`\n- 1 file, pages 1 and 2 only: `\"['1,2']\"`\n\n---\n\n### PDF Split (`pdf/split`)\n\n```json\n{\n  \"pageOptions\": \"['1-3','4','5-6']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying how to split the PDF. Each array element (in single quotes) defines the page range for one output PDF file. Format: `\"['range1','range2','range3']\"`. Page numbers start from 1. Use hyphens for ranges and commas for individual pages within each element. |\n\n**Examples:**\n- Split into 3 files (pages 1-3, page 4, pages 5-6): `\"['1-3','4','5-6']\"`\n- Split into 2 files (pages 1-5, pages 6-10): `\"['1-5','6-10']\"`\n\n---\n\n### PDF Extract Pages (`pdf/extract`)\n\n```json\n{\n  \"pageOptions\": \"['1,3,5-8']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to extract. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n\n**Examples:**\n- Extract page 1 only: `\"['1']\"`\n- Extract pages 1, 3, and 5-8: `\"['1,3,5-8']\"`\n\n---\n\n### PDF Delete Pages (`pdf/delete`)\n\n```json\n{\n  \"pageOptions\": \"['2,4,6']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to delete. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n\n**Examples:**\n- Delete page 1 only: `\"['1']\"`\n- Delete pages 2, 4, and 6: `\"['2,4,6']\"`\n\n---\n\n### PDF Rotate Pages (`pdf/rotation`)\n\n```json\n{\n  \"pageOptions\": \"['1-5']\",\n  \"rotation\": \"90\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to rotate. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n| `rotation` | Rotation angle: `90`, `180`, `270` |\n\n**Examples:**\n- Rotate page 1 by 90°: `\"pageOptions\": \"['1']\"`, `\"rotation\": \"90\"`\n- Rotate pages 1-5 by 180°: `\"pageOptions\": \"['1-5']\"`, `\"rotation\": \"180\"`\n\n---\n\n### PDF Insert Pages (`pdf/insert`)\n\nUpload 2 files: the main PDF and the PDF to insert. No additional parameters required.\n\n---\n\n## Advanced Features\n\n### Add Watermark (`pdf/addWatermark`)\n\n```json\n{\n  \"type\": \"text\",\n  \"scale\": \"1\",\n  \"opacity\": \"0.5\",\n  \"rotation\": \"0.785\",\n  \"targetPages\": \"1-2\",\n  \"vertalign\": \"center\",\n  \"horizalign\": \"left\",\n  \"xoffset\": \"100\",\n  \"yoffset\": \"100\",\n  \"content\": \"CONFIDENTIAL\",\n  \"textColor\": \"#FF0000\",\n  \"front\": \"\",\n  \"fullScreen\": \"111\",\n  \"horizontalSpace\": \"10\",\n  \"verticalSpace\": \"10\",\n  \"extension\": \"\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `type` | Watermark type: `text`=text watermark, `image`=image watermark |\n| `scale` | Scale ratio (image watermark property) |\n| `opacity` | Opacity: 0 (fully transparent) ~ 1 (fully opaque) |\n| `rotation` | Rotation angle (radians), positive=counter-clockwise rotation. 0.785 ≈ 45° |\n| `targetPages` | Target page range, e.g., `\"1,2,4,6,9-11\"`, page numbers start from 1 |\n| `vertalign` | Vertical alignment: `top`, `center`, `bottom` |\n| `horizalign` | Horizontal alignment: `left`, `center`, `right` |\n| `xoffset` | Horizontal offset |\n| `yoffset` | Vertical offset |\n| `content` | Text content (required for text watermark) |\n| `textColor` | Text color, hexadecimal format like `\"#FF0000\"` |\n| `front` | Place watermark in foreground layer |\n| `fullScreen` | Watermark fills entire page |\n| `horizontalSpace` | Horizontal spacing (effective in full-screen mode, default 50) |\n| `verticalSpace` | Vertical spacing (effective in full-screen mode, default 50) |\n| `extension` | Extension information, base64 encoded |\n\n**Note:** Image watermarks require uploading watermark image file in the `image` field of the request.\n\n---\n\n### Remove Watermark (`pdf/delWatermark`)\n\nNo additional parameters required. Simply upload the PDF file directly.\n\n---\n\n### PDF Compression (`pdf/compress`)\n\n```json\n{\n  \"quality\": \"50\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `quality` | Compression quality, integer 1-100 |\n\n**Compression Quality Reference:**\n\n| Range | Effect |\n|---|---|\n| 90-100 | Minimal compression, close to original quality |\n| 70-85 | Medium compression, high visual quality |\n| 50-69 | High compression, acceptable quality |\n| 30-49 | Very high compression, obvious quality loss |\n| 0-29 | Extreme compression, poor quality |\n\n---\n\n### Document Comparison\n\n#### Cover Comparison (`pdf/coverCompare`) / Content Comparison (`pdf/contentCompare`)\n\nUpload exactly 2 PDF files, no additional parameters required.\n\n---\n\n## General Notes\n\n- All parameters are passed as JSON strings in the `parameter` field\n- Page numbers start from 1\n- When the `parameter` field is not passed, default values are used\n- The `password` field is independent of `parameter`, passed directly as form-data\n- For more parameter details on specific tools, please refer to the official documentation: <https://www.compdf.com/guides/api-reference/v2/overview?utm_source=clawhub&utm_medium=skillhub&utm_campaign=pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills>\n\nFile v1.2.0:references/tool-list.md\n\n# ComPDF API Complete Tool Type Reference (executeTypeUrl)\n\n## ComPDF AI API\n\n### Intelligent Applications\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Intelligent Document Extraction | `idp/documentExtract` | Intelligently extract structured data from documents |\n| Intelligent Document Parsing | `idp/documentParsing` | Parse document content and structure |\n\n### Intelligent Tools\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Text Recognition (OCR) | `documentAI/ocr` | Recognize text in images/scanned documents |\n| Table Extraction | `documentAI/tableRec` | Extract table data from images |\n| Stamp Detection | `documentAI/detectionStamp` | Detect stamps in documents |\n| Image Distortion Correction | `documentAI/dewarp` | Correct distortion in photographed/scanned images |\n| Image Enhancement | `documentAI/magicColor` | Enhance image quality |\n\nSupported image formats: JPG, PNG, JPEG, TIFF, BMP\n\n---\n\n## Format Conversion API\n\n### PDF to Other Formats\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| PDF → Word | `pdf/docx` | Convert PDF to Word document |\n| PDF → Excel | `pdf/xlsx` | Convert PDF to Excel spreadsheet |\n| PDF → PPT | `pdf/pptx` | Convert PDF to PowerPoint presentation |\n| PDF → HTML | `pdf/html` | Convert PDF to HTML page |\n| PDF → RTF | `pdf/rtf` | Convert PDF to Rich Text Format |\n| PDF → Image | `pdf/img` | Convert PDF pages to images |\n| PDF → CSV | `pdf/csv` | Convert PDF tables to CSV |\n| PDF → TXT | `pdf/txt` | Extract plain text from PDF |\n| PDF → JSON | `pdf/json` | Convert PDF content to JSON |\n| PDF → Markdown | `pdf/markdown` | Convert PDF to Markdown |\n\n### Other Formats to PDF\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Word → PDF | `doc/pdf` or `docx/pdf` | Convert Word document to PDF |\n| Excel → PDF | `xls/pdf` or `xlsx/pdf` | Convert Excel spreadsheet to PDF |\n| PPT → PDF | `ppt/pdf` or `pptx/pdf` | Convert PowerPoint to PDF |\n| TXT → PDF | `txt/pdf` | Convert plain text to PDF |\n| HTML → PDF | `html/pdf` | Convert HTML page to PDF |\n| RTF → PDF | `rtf/pdf` | Convert Rich Text Format to PDF |\n| PNG → PDF | `png/pdf` | Convert PNG image to PDF |\n| CSV → PDF | `csv/pdf` | Convert CSV file to PDF |\n\n### Image to Other Formats\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Image → Word | `img/docx` | Convert image to Word document |\n| Image → Excel | `img/xlsx` | Convert image to Excel spreadsheet |\n| Image → PPT | `img/pptx` | Convert image to PowerPoint |\n| Image → JSON | `img/json` | Convert image content to JSON |\n| Image → TXT | `img/txt` | Extract text from image |\n| Image → HTML | `img/html` | Convert image to HTML |\n| Image → RTF | `img/rtf` | Convert image to Rich Text Format |\n| Image → CSV | `img/csv` | Convert image tables to CSV |\n| Image → PDF | `img/pdf` | Convert image to PDF |\n\nSupported image formats: JPG, PNG, JPEG, TIFF, BMP\n\n---\n\n## PDF Page Editing API\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Merge PDF | `pdf/merge` | Combine multiple PDFs into one |\n| Split PDF | `pdf/split` | Split PDF into multiple files |\n| Extract Pages | `pdf/extract` | Extract specific pages from PDF |\n| Insert Pages | `pdf/insert` | Insert pages into PDF |\n| Delete Pages | `pdf/delete` | Remove specific pages from PDF |\n| Rotate Pages | `pdf/rotation` | Rotate PDF pages by angle |\n\n---\n\n## PDF Advanced Features API\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Add Watermark | `pdf/addWatermark` | Add text or image watermark to PDF |\n| Remove Watermark | `pdf/delWatermark` | Remove watermark from PDF |\n| PDF to Editable PDF | `pdf/editable` | Convert scanned PDF to editable PDF |\n| PDF Compression | `pdf/compress` | Reduce PDF file size |\n| Cover Comparison | `pdf/coverCompare` | Compare visual appearance of two PDFs |\n| Content Comparison | `pdf/contentCompare` | Compare text content of two PDFs |\n| PDF Standard Conversion | `pdf/convertType` | Convert PDF to PDF/A standard |\n| PDF Generation | `pdf/generate` | Generate PDF from structured data |\n\nFile v1.2.0:skill-card.md\n\n## Description:\n\nPDF Toolkit helps agents process PDF and document workflows through the ComPDF Cloud REST API, including conversion, page editing, compression, OCR, comparison, and document extraction tasks.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[compdf-youna](https://clawhub.ai/user/compdf-youna)\n\n### License/Terms of Use:\n\nApache 2.0\n\n## Use Case:\n\nExternal users, developers, and document operations teams use this skill to route mixed PDF requests to ComPDF Cloud, choose the correct operation, build supported parameters, and return processing status, download links, or troubleshooting guidance.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Selected documents are uploaded to ComPDF cloud servers for processing.\n\nMitigation: Proceed only after explicit user confirmation and avoid highly sensitive files unless the user's policy allows that service.\n\nRisk: The ComPDF API key may be stored locally in plaintext when the user opts in.\n\nMitigation: Store the key only with user consent, keep it local, and delete config/public_key.txt when local credential storage is no longer acceptable.\n\nRisk: A successful HTTP status does not guarantee successful document processing.\n\nMitigation: Check the response code and taskStatus fields, then use the documented error-code guidance before returning a result.\n\n## Reference(s):\n\n- [ComPDF API Reference](https://www.compdf.com/guides/api-reference/v2/overview?utm_source=clawhub&utm_medium=skillhub&utm_campaign=pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills)\n- [Tool List](references/tool-list.md)\n- [Parameter Details](references/parameters.md)\n- [Error Code Reference](references/error-codes.md)\n- [ClawHub Skill Page](https://clawhub.ai/compdf-youna/skills/pdf-tools-compdf)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Files, Guidance]\n\n**Output Format:** [Markdown status messages with file metadata, expiring download URLs, and troubleshooting guidance.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May reference processed document files hosted by ComPDF Cloud; download links expire at 24:00 the next day.]\n\n## Skill Version(s):\n\n1.2.0 (source: evidence.release.version and target metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.2.0:LICENSE.txt\n\nApache License\nVersion 2.0, January 2004\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n   \"License\" shall mean the terms and conditions for use, reproduction,\n   and distribution as defined in Sections 1 through 9 of this document.\n\n   \"Licensor\" shall mean the copyright owner or entity authorized by\n   the copyright owner that is granting the License.\n\n   \"Legal Entity\" shall mean the union of the acting entity and all\n   other entities that control, are controlled by, or are under common\n   control with that entity. For the purposes of this definition,\n   \"control\" means (i) the power, direct or indirect, to cause the\n   direction or management of such entity, whether by contract or\n   otherwise, or (ii) ownership of fifty percent (50%) or more of the\n   outstanding shares, or (iii) beneficial ownership of such entity.\n\n   \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising\n   permissions granted by this License.\n\n   \"Source\" form shall mean the preferred form for making modifications,\n   including but not limited to software source code, documentation\n   source, and configuration files.\n\n   \"Object\" form shall mean any form resulting from mechanical\n   transformation or translation of a Source form, including but\n   not limited to compiled object code, generated documentation,\n   and conversions to other media types.\n\n   \"Work\" shall mean the work of authorship, whether in Source or Object\n   form, made available under the License, as indicated by a copyright\n   notice that is included in or attached to the work (an example is\n   provided in the Appendix below).\n\n   \"Derivative Works\" shall mean any work, whether in Source or Object\n   form, that is based on (or derived from) the Work and for which the\n   editorial revisions, annotations, elaborations, or other modifications\n   represent, as a whole, an original work of authorship. For the purposes\n   of this License, Derivative Works shall not include works that remain\n   separable from, or merely link (or bind by name) to the interfaces of,\n   the Work and Derivative Works thereof.\n\n   \"Contribution\" shall mean any work of authorship, including\n   the original Work and any and all modifications thereof or Derivative\n   Works thereof, and any and all modifications thereof. If the Work is\n   a software module, then a Contribution includes, but is not limited\n   to, any source code, object code, patch, and documentation related\n   to the Work; and, for purposes of this definition, Contribution means\n   any work of authorship submitted to, or already incorporated in, the\n   Work (with \"incorporation\" meaning any submission to, or already\n   incorporated in, the Work).\n\n   \"Contributor\" shall mean Licensor and any Legal Entity on behalf of\n   whom a Contribution has been received by Licensor and subsequently\n   incorporated within the Work.\n\n   \"Licensed Patents\" shall mean the patent claims of a Contributor\n   that are necessarily infringed by the use or sale of its Contribution\n   either in its unmodified form or when combined with the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   copyright license to reproduce, prepare Derivative Works of,\n   publicly display, publicly perform, sublicense, and distribute the\n   Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   (except as stated in this section) patent license to make, have made,\n   use, offer to sell, sell, import, and otherwise transfer the Work,\n   where such license applies only to those patent claims licensable\n   by such Contributor that are necessarily infringed by their\n   Contribution(s) alone or by combination of their Contribution(s)\n   with the Work to which such Contribution(s) was submitted. If You\n   institute patent litigation against any entity (including a\n   cross-claim or counterclaim in a lawsuit) alleging that the Work\n   or a Contribution incorporated within the Work constitutes direct\n   or contributory patent infringement, then any patent licenses\n   granted to You under this License for that Work shall terminate\n   as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n   Work or Derivative Works thereof in any medium, with or without\n   modifications, and in Source or Object form, provided that You\n   meet the following conditions:\n\n   (a) You must give any other recipients of the Work or\n       Derivative Works a copy of this License; and\n\n   (b) You must cause any modified files to carry prominent notices\n       stating that You changed the files; and\n\n   (c) You must retain, in the Source form of any Derivative Works\n       that You distribute, all copyright, patent, trademark, and\n       attribution notices from the Source form of the Work,\n       excluding those notices that do not pertain to any part of\n       the Derivative Works; and\n\n   (d) If the Work includes a \"NOTICE\" text file, then any\n       Derivative Works that You distribute must include a readable\n       copy of the attribution notices contained\n       within such NOTICE file, excluding those notices that do not\n       pertain to any part of the Derivative Works, in at least one\n       of the following places: within a NOTICE text file distributed\n       as part of the Derivative Works; within the Source form or\n       documentation, if provided along with the Derivative Works; or,\n       within a display generated by the Derivative Works, if and\n       wherever such third-party notices normally appear. The contents\n       of the NOTICE file are for informational purposes only and\n       do not modify the License. You may add Your own attribution\n       notices within Derivative Works that You distribute, alongside\n       or as an addendum to the NOTICE from the Work, provided that\n       such additional attribution notices cannot be construed\n       as modifying the License.\n\n   You may add Your own copyright statement to Your modifications and\n   may provide additional or different license terms and conditions\n   for use, reproduction, or distribution of Your modifications, or\n   for any such Derivative Works as a whole, provided Your use,\n   reproduction, and distribution of the Work otherwise complies with\n   the conditions of this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n   any Contribution intentionally submitted for inclusion in the Work\n   by You to Licensor shall be under the terms and conditions of\n   this License, without any additional terms or conditions.\n   Notwithstanding the above, nothing herein shall supersede or modify\n   the terms of any separate license agreement you may have executed\n   with Licensor regarding such Contribution.\n\n6. Trademarks. This License does not grant permission to use the trade\n   names, trademarks, service marks, or product names of the Licensor,\n   except as required for reasonable and customary use in describing the\n   origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n   agreed to in writing, Licensor provides the Work (and each\n   Contributor provides its Contributions) on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n   implied, including, without limitation, any warranties or conditions\n   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n   PARTICULAR PURPOSE. You are solely responsible for determining the\n   appropriateness of using or redistributing the Work and assume any\n   risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n   whether in tort (including negligence), contract, or otherwise,\n   unless required by applicable law (such as deliberate and grossly\n   negligent acts) or agreed to in writing, shall any Contributor be\n   liable to You for damages, including any direct, indirect, special,\n   incidental, or consequential damages of any character arising as a\n   result of this License or out of the use or inability to use the\n   Work (including but not limited to damages for loss of goodwill,\n   work stoppage, computer failure or malfunction, or any and all\n   other commercial damages or losses), even if such Contributor\n   has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n   the Work or Derivative Works thereof, You may choose to offer,\n   and charge a fee for, acceptance of support, warranty, indemnity,\n   or other liability obligations and/or rights consistent with this\n   License. However, in accepting such obligations, You may act only\n   on Your own behalf and on Your sole responsibility, not on behalf\n   of any other Contributor, and only if You agree to indemnify,\n   defend, and hold each Contributor harmless for any liability\n   incurred by, or claims asserted against, such Contributor by reason\n   of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n   To apply the Apache License to your work, attach the following\n   boilerplate notice, with the fields enclosed by brackets \"[]\"\n   replaced with your own identifying information. (Don't include\n   the brackets!)  The text should be enclosed in the appropriate\n   comment syntax for the file format.  We also recommend that a\n   file or class name and description of purpose be included on the\n   same \"printed page\" as the copyright notice for easier\n   identification within third-party archives.\n\nCopyright 2014-2026 PDF Technologies, Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nArchive v1.1.0: 7 files, 15563 bytes\n\nFiles: LICENSE.txt (10583b), references/error-codes.md (4331b), references/parameters.md (9190b), references/tool-list.md (4097b), skill-card.md (2532b), SKILL.md (7889b), _meta.json (135b)\n\nFile v1.1.0:SKILL.md\n\n---\nname: pdf-tools-compdf\ndescription: >\n  PDF Toolkit handles mixed PDF workflows with a flexible toolset for page organization, basic editing, viewing, and general document processing, built on ComPDF’s all-in-one PDF stack and best used when one request involves multiple PDF operations. It matches triggers such as “pdf toolkit,” “all-in-one pdf,” “process this pdf,” “pdf workflow,” “handle pdf file,” and “multiple pdf operations.” Example queries include “Merge these files, rotate the wrong pages, and return a clean final PDF,” “Help me organize this PDF before I send it to the client,” and “Process this PDF end to end and give me a shareable output.”\n---\n\n# PDF Toolkit\n\nProcess PDF files through ComPDF Cloud REST API. Supports 50+ document processing operations.\n\nOfficial documentation: <https://api.compdf.com/api-reference/overview>\n\n## When to Run\n\n- User requests to convert file format (e.g., \"convert this PDF to Word\", \"convert Excel to PDF\")\n- User requests to edit PDF pages (e.g., \"merge these two PDFs\", \"delete page 3\", \"rotate PDF\")\n- User requests to add or remove watermarks from PDF\n- User requests to compress PDF files\n- User requests OCR recognition of scanned documents or text in images\n- User requests AI extraction or parsing of document content\n- User requests to extract tables from images\n- User requests batch processing of multiple document files\n- User requests to compare differences between two PDF documents\n- User mentions ComPDF, compdf, or related keywords\n\n## Workflow\n\n### Step 1 — Obtain API Key\n\nCheck whether `config/public_key.txt` exists and contains a non-empty value.\n\n- **If the file exists and is non-empty**: use the stored key (trim whitespace).\n- **If the file is missing or empty**: ask the user for their ComPDF API Public Key. Inform them it can be obtained at <https://api-dashboard.compdf.com/api/keys>. After the user provides the key, ask whether they would like to save it locally for future sessions.\n  - If the user agrees, write the key to `config/public_key.txt`.\n  - If the user declines, use the key for the current session only without saving.\n\n> 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 delete `config/public_key.txt` at any time to revoke local storage.\n\n### Step 2 — Confirm External Upload Intent\n\n**Before uploading any file**, explicitly inform the user:\n\n> ⚠️ **External Upload Confirmation Required**\n>\n> Your file will be uploaded to ComPDF's servers (api-server.compdf.com or api-server.compdf.cn) for processing. Please confirm that:\n> 1. You consent to uploading this file to external servers.\n> 2. The file does not contain highly sensitive or confidential data, or you accept the associated risk.\n> 3. You have reviewed ComPDF's Privacy Policy at <https://www.compdf.com/privacy-policy>.\n\n**Only proceed with the upload after receiving explicit user confirmation.**\n\n### Step 3 — Determine Base URL\n\nAsk or infer the user's network environment:\n\n| Environment | Base URL |\n|---|---|\n| International | `https://api-server.compdf.com/server/v2` |\n| Mainland China | `https://api-server.compdf.cn/server/v2` |\n\n### Step 4 — Select Tool\n\nLook up the `executeTypeUrl` for the user's task in `references/tool-list.md`.\n\nQuick reference for common operations:\n\n| Operation | executeTypeUrl |\n|---|---|\n| PDF → Word | `pdf/docx` |\n| PDF → Excel | `pdf/xlsx` |\n| PDF → Image | `pdf/img` |\n| PDF → Markdown | `pdf/markdown` |\n| Word → PDF | `docx/pdf` |\n| Merge PDF | `pdf/merge` |\n| Split PDF | `pdf/split` |\n| Add Watermark | `pdf/addWatermark` |\n| PDF Compression | `pdf/compress` |\n| OCR | `documentAI/ocr` |\n| AI Document Extraction | `idp/documentExtract` |\n| AI Document Parsing | `idp/documentParsing` |\n\nFor the full list of 50+ tools, see `references/tool-list.md`.\n\n### Step 5 — Build Parameters (optional)\n\nIf the selected tool supports custom parameters, look up its JSON schema in `references/parameters.md`. Parameters are passed as a **JSON string** in the `parameter` form-data field. If omitted, server defaults apply.\n\n### Step 6 — Send Request\n\nAfter the user has explicitly confirmed the external upload:\n\n1. Send a `POST` request to `{baseUrl}/process/{executeTypeUrl}`.\n2. Include the user-provided API key in the `x-api-key` header for the current session only.\n3. Send the selected file as multipart form-data.\n4. Include the `parameter` field only when the selected tool supports custom parameters.\n5. Use the synchronous `/process/` endpoint so the complete result is returned in a single response.\n\nDo not send the request until the user has confirmed that the file may be transmitted to ComPDF Cloud.\n\n### Step 7 — Handle Response\n\n**1. Check `code` field** — `\"200\"` means success; anything else is an error.\n\n**2. Check `taskStatus`** (should be `TaskFinish` for synchronous calls):\n\n| Status | Meaning | Action |\n|---|---|---|\n| `TaskFinish` | Processing complete | Proceed to download |\n| `TaskProcessing` | Still processing internally | Notify user; suggest retrying shortly |\n| `TaskOverdue` | Timed out | Retry or split into smaller tasks |\n\n**3. Extract download link** from `fileInfoDTOList[].downloadUrl`.\n\n**4. Warn the user**: download links expire at **24:00 the next day**.\n\n**5. On failure**: read `failureCode` and `failureReason`, then look up troubleshooting advice in `references/error-codes.md`.\n\n**6. On quota exhaustion** (`code` = `\"06001\"`): inform the user:\n\n> For more credits, please visit <https://api.compdf.com/api/pricing-old>\n\n### Auxiliary Endpoints\n\n| Purpose | Method & Path |\n|---|---|\n| List supported tools | `GET {baseUrl}/tool/support` |\n| Check remaining credits | `GET {baseUrl}/asset/info` |\n| List tasks | `GET {baseUrl}/task/list?page=1&size=10` |\n| Close a task | `POST {baseUrl}/task/closeTask?taskId={taskId}` |\n\n## Output Format\n\n**On success:**\n\n```\nProcessing complete!\n\nFile: {fileName} → {downFileName}\nStatus: {taskStatus}\nTime taken: {convertTime}ms\nOriginal size: {fileSize} bytes\nResult size: {convertSize} bytes\nDownload link: {downloadUrl}\n\n⚠️ The download link will expire at 24:00 tomorrow, please save it promptly.\n```\n\n**On failure:**\n\n```\nProcessing failed.\n\nError code: {failureCode}\nReason: {failureReason}\nSuggestion: {troubleshooting suggestion from references/error-codes.md}\n```\n\n## Critical Rules\n\n1. **HTTP 200 ≠ success** — always check `code` and `taskStatus` in the JSON body.\n2. **Max 5 files per task** — split into multiple tasks if more files are needed.\n3. **Free tier limit** — 200 files within 30 days.\n4. **File type auto-detection** — the API detects uploaded file types; no need to rename extensions.\n5. **Encrypted PDFs** — provide the password in the `password` form-data field (separate from `parameter`).\n6. **China domain** — mainland China users must replace `compdf.com` with `compdf.cn`.\n7. **User-controlled API Key storage** — the key file (`config/public_key.txt`) 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.\n8. **External upload confirmation** — always obtain explicit user consent before uploading files to ComPDF servers.\n\n## License & Copyright\n\nCopyright © 2014-2026 PDF Technologies, Inc., a KDAN Company. All Rights Reserved.\n\nComPDF and ComPDFKit are trademarks of [PDF Technologies, Inc.](https://www.compdf.com/), a KDAN Company.\n\nThis skill package is licensed under the Apache License 2.0. See `LICENSE.txt` for the full license text.\n\nThe ComPDF Cloud API is a commercial service provided by PDF Technologies, Inc. Use of the API is subject to the [ComPDF Terms of Service](https://www.compdf.com/terms-of-service) and [Privacy Policy](https://www.compdf.com/privacy-policy).\n\nFile v1.1.0:_meta.json\n\n{\n  \"ownerId\": \"kn75g40xmv3tgkb21e079d055n82v5h8\",\n  \"slug\": \"pdf-tools-compdf\",\n  \"version\": \"1.1.0\",\n  \"publishedAt\": 1777462447497\n}\n\nFile v1.1.0:references/error-codes.md\n\n# ComPDF API Error Code Reference\n\n## HTTP Status Codes\n\n| Status Code | Description |\n|---|---|\n| 200 | HTTP request successful (does not indicate file processing success—check `code` and `taskStatus` in JSON) |\n| 401 | API Key missing or invalid |\n| 413 | Request body exceeds size limit |\n\n## Business Error Codes\n\n### 01xxx - System Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 01001 | System internal error | Retry later; if issue persists, contact support@compdf.com |\n| 01002 | Failed to upload processed file to server | Retry the task |\n| 01003 | File upload failed | Check network connection and file size |\n| 01004 | File download failed | Check if download link has expired |\n| 01005 | File cannot be empty | Verify the uploaded file is not empty |\n| 01006 | File parameter exception | Check JSON format in `parameter` field is correct |\n| 01201 | System memory issue | File may be too large; try batch processing |\n| 01202 | Unknown error | Contact technical support |\n| 01203 | File not found or cannot be opened | Verify file path and format are correct |\n| 01204 | Unsupported security mechanism | File uses unsupported encryption method |\n| 01206 | CSV file not found | Confirm valid CSV file was uploaded |\n| 01207 | DocumentAI API call failed | AI service temporarily unavailable; retry later |\n| 01208 | Failed to write recognition results to file | Retry the task |\n\n### 02xxx - File Format Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 02001 | File format error | Verify file format matches executeTypeUrl |\n| 02002 | Unsupported conversion format | Check `references/tool-list.md` for supported conversion types |\n| 02201 | File is encrypted | Provide correct password in `password` field |\n| 02203 | PDF file exception | File may be corrupted; try repairing with another tool before re-uploading |\n| 02204 | Unsupported file format (PDF only) | This tool accepts PDF input only |\n| 02206 | File content invalid or page does not exist | Check specified page number does not exceed total pages |\n| 02207 | Cannot open file: unsupported format or file is encrypted | Verify format is correct and provide password if encrypted |\n| 02208 | ExcelXml initialization failed | Excel file may be corrupted |\n| 02209 | Conversion timeout—file too large | Use async mode or split file and batch process |\n| 02210 | File conversion failed | Check if file is corrupted; try re-uploading |\n| 02211 | Converted file size abnormal | Source file may have issues; check and retry |\n\n### 03xxx - Parameter Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 03000 | Parameter validation error | Check field names and values in `parameter` JSON match documentation |\n\n### 04xxx - File Operation Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 04001 | fileKey not found | Task may have expired; resubmit the task |\n| 04002 | File size is zero | File is empty; upload valid file |\n| 04003 | File not found or cannot be opened | Verify file path and upload success |\n| 04004 | Comparison file compression failed | Retry document comparison task |\n| 04005 | Document comparison requires exactly two files | Ensure exactly 2 files were uploaded |\n\n### 05xxx - Task Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 05001 | Invalid task | taskId is incorrect or task has been cleaned up |\n| 05002 | Task status exception | Recreate the task |\n| 05003 | Single task file limit reached (5 files) | Split into multiple tasks |\n| 05004 | Task expired without execution | Resubmit the task |\n| 05005 | Task requires at least one file | Ensure file was uploaded |\n\n### 06xxx - Quota Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 06001 | File processing quota exhausted | Purchase quota or wait for quota reset; visit https://api.compdf.com/api/pricing-old for more credits |\n\n### 07xxx - Feature Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 07001 | Unsupported feature | Verify the feature is available in current plan |\n\n## Task Status (taskStatus)\n\n| Status Value | Description |\n|---|---|\n| `TaskStart` | Task created successfully |\n| `TaskWaiting` | Task waiting for processing |\n| `TaskProcessing` | Task is processing |\n| `TaskFinish` | Task processing complete |\n| `TaskOverdue` | Task waiting timed out |\n\nFile v1.1.0:references/parameters.md\n\n# ComPDF API Tool Parameter Details\n\nParameters are passed as JSON strings in the `parameter` field of the request. If not passed, default values are used.\n\n---\n\n## Format Conversion\n\n### PDF to Word (`pdf/docx`)\n\n```json\n{\n  \"enableAiLayout\": 1,\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"enableOcr\": 0,\n  \"ocrRecognitionLang\": \"AUTO\",\n  \"pageRanges\": \"\",\n  \"pageLayoutMode\": \"e_Flow\",\n  \"formulaToImage\": 0,\n  \"ocrOption\": \"ALL\",\n  \"isOutputDocumentPerPage\": 0,\n  \"containPageBackgroundImage\": 1\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `enableAiLayout` | Enable AI layout analysis (0=off, 1=on) | 1 |\n| `isContainImg` | Include images during conversion (0=off, 1=on) | 1 |\n| `isContainAnnot` | Include annotations during conversion (0=off, 1=on) | 1 |\n| `enableOcr` | Enable OCR (0=off, 1=on) | 0 |\n| `ocrRecognitionLang` | OCR recognition language (see language list below) | AUTO |\n| `pageRanges` | Page range, e.g., `\"1,2,3-5\"`, empty=all pages | \"\" |\n| `pageLayoutMode` | Layout mode: `e_Box`=fixed layout, `e_Flow`=flow layout | e_Flow |\n| `formulaToImage` | Convert formulas to images (0=off, 1=on), recommend on for complex formulas | 0 |\n| `ocrOption` | OCR recognition scope (see options below) | ALL |\n| `isOutputDocumentPerPage` | Output one document per page (0=off, 1=on) | 0 |\n| `containPageBackgroundImage` | Include page background images during OCR (0=off, 1=on) | 1 |\n\n**OCR Recognition Language (ocrRecognitionLang):**\nAUTO, CHINESE (Simplified Chinese), CHINESE_TRAD (Traditional Chinese), ENGLISH, KOREAN, JAPANESE, LATIN, DEVANAGARI, CYRILLIC, ARABIC, TAMIL, TELUGU, KANNADA, THAI, GREEK, ESLAV (Slavic)\n\n**OCR Recognition Scope (ocrOption):**\n- `INVALID_CHARACTER` - Recognize invalid characters in PDF\n- `SCAN_PAGE` - Recognize scanned pages in PDF\n- `INVALID_CHARACTERAND_SCAN_PAGE` - Recognize invalid characters and scanned pages\n- `ALL` - Recognize all characters on all pages\n\n**Layout Mode Differences:**\n- `e_Flow` (Flow layout): Suitable for editing, content can be dynamically adjusted. However, display may vary across different software versions.\n- `e_Box` (Fixed layout): Maintain original PDF layout unchanged, but less convenient for editing.\n\n---\n\n### PDF to Image (`pdf/img`)\n\n```json\n{\n  \"imageType\": \"jpg\",\n  \"imgDpi\": \"300\",\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `imageType` | Output image format: `jpg`, `png` | jpg |\n| `imgDpi` | Output image DPI | 300 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to Excel (`pdf/xlsx`)\n\n```json\n{\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `isContainImg` | Include images (0/1) | 1 |\n| `isContainAnnot` | Include annotations (0/1) | 1 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to HTML (`pdf/html`)\n\n```json\n{\n  \"isContainImg\": 1,\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `isContainImg` | Include images (0/1) | 1 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to TXT (`pdf/txt`)\n\n```json\n{\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF Standard Conversion (`pdf/convertType`)\n\n```json\n{\n  \"convertType\": \"pdfa1a\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `convertType` | Target PDF standard: `pdfa1a`, `pdfa1b`, `pdfa2a`, `pdfa2b`, `pdfa3a`, `pdfa3b` |\n\n---\n\n## Page Editing\n\n### PDF Merge (`pdf/merge`)\n\nUpload 2-5 files in a single task.\n\n```json\n{\n  \"pageOptions\": \"['1,2']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying page ranges for each uploaded file. Each array element (in single quotes) corresponds to one file in upload order. Format: `\"['pages_for_file1','pages_for_file2']\"`. Page numbers start from 1, use commas for individual pages and hyphens for ranges (e.g., `1,2,4,6,9-11`). Not passing = merge all pages of all files. |\n\n**Examples:**\n- 2 files, all pages from both: omit `pageOptions`\n- 2 files, pages 1-3 from file 1, pages 2,5 from file 2: `\"['1-3','2,5']\"`\n- 1 file, pages 1 and 2 only: `\"['1,2']\"`\n\n---\n\n### PDF Split (`pdf/split`)\n\n```json\n{\n  \"pageOptions\": \"['1-3','4','5-6']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying how to split the PDF. Each array element (in single quotes) defines the page range for one output PDF file. Format: `\"['range1','range2','range3']\"`. Page numbers start from 1. Use hyphens for ranges and commas for individual pages within each element. |\n\n**Examples:**\n- Split into 3 files (pages 1-3, page 4, pages 5-6): `\"['1-3','4','5-6']\"`\n- Split into 2 files (pages 1-5, pages 6-10): `\"['1-5','6-10']\"`\n\n---\n\n### PDF Extract Pages (`pdf/extract`)\n\n```json\n{\n  \"pageOptions\": \"['1,3,5-8']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to extract. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n\n**Examples:**\n- Extract page 1 only: `\"['1']\"`\n- Extract pages 1, 3, and 5-8: `\"['1,3,5-8']\"`\n\n---\n\n### PDF Delete Pages (`pdf/delete`)\n\n```json\n{\n  \"pageOptions\": \"['2,4,6']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to delete. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n\n**Examples:**\n- Delete page 1 only: `\"['1']\"`\n- Delete pages 2, 4, and 6: `\"['2,4,6']\"`\n\n---\n\n### PDF Rotate Pages (`pdf/rotation`)\n\n```json\n{\n  \"pageOptions\": \"['1-5']\",\n  \"rotation\": \"90\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to rotate. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n| `rotation` | Rotation angle: `90`, `180`, `270` |\n\n**Examples:**\n- Rotate page 1 by 90°: `\"pageOptions\": \"['1']\"`, `\"rotation\": \"90\"`\n- Rotate pages 1-5 by 180°: `\"pageOptions\": \"['1-5']\"`, `\"rotation\": \"180\"`\n\n---\n\n### PDF Insert Pages (`pdf/insert`)\n\nUpload 2 files: the main PDF and the PDF to insert. No additional parameters required.\n\n---\n\n## Advanced Features\n\n### Add Watermark (`pdf/addWatermark`)\n\n```json\n{\n  \"type\": \"text\",\n  \"scale\": \"1\",\n  \"opacity\": \"0.5\",\n  \"rotation\": \"0.785\",\n  \"targetPages\": \"1-2\",\n  \"vertalign\": \"center\",\n  \"horizalign\": \"left\",\n  \"xoffset\": \"100\",\n  \"yoffset\": \"100\",\n  \"content\": \"CONFIDENTIAL\",\n  \"textColor\": \"#FF0000\",\n  \"front\": \"\",\n  \"fullScreen\": \"111\",\n  \"horizontalSpace\": \"10\",\n  \"verticalSpace\": \"10\",\n  \"extension\": \"\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `type` | Watermark type: `text`=text watermark, `image`=image watermark |\n| `scale` | Scale ratio (image watermark property) |\n| `opacity` | Opacity: 0 (fully transparent) ~ 1 (fully opaque) |\n| `rotation` | Rotation angle (radians), positive=counter-clockwise rotation. 0.785 ≈ 45° |\n| `targetPages` | Target page range, e.g., `\"1,2,4,6,9-11\"`, page numbers start from 1 |\n| `vertalign` | Vertical alignment: `top`, `center`, `bottom` |\n| `horizalign` | Horizontal alignment: `left`, `center`, `right` |\n| `xoffset` | Horizontal offset |\n| `yoffset` | Vertical offset |\n| `content` | Text content (required for text watermark) |\n| `textColor` | Text color, hexadecimal format like `\"#FF0000\"` |\n| `front` | Place watermark in foreground layer |\n| `fullScreen` | Watermark fills entire page |\n| `horizontalSpace` | Horizontal spacing (effective in full-screen mode, default 50) |\n| `verticalSpace` | Vertical spacing (effective in full-screen mode, default 50) |\n| `extension` | Extension information, base64 encoded |\n\n**Note:** Image watermarks require uploading watermark image file in the `image` field of the request.\n\n---\n\n### Remove Watermark (`pdf/delWatermark`)\n\nNo additional parameters required. Simply upload the PDF file directly.\n\n---\n\n### PDF Compression (`pdf/compress`)\n\n```json\n{\n  \"quality\": \"50\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `quality` | Compression quality, integer 1-100 |\n\n**Compression Quality Reference:**\n\n| Range | Effect |\n|---|---|\n| 90-100 | Minimal compression, close to original quality |\n| 70-85 | Medium compression, high visual quality |\n| 50-69 | High compression, acceptable quality |\n| 30-49 | Very high compression, obvious quality loss |\n| 0-29 | Extreme compression, poor quality |\n\n---\n\n### Document Comparison\n\n#### Cover Comparison (`pdf/coverCompare`) / Content Comparison (`pdf/contentCompare`)\n\nUpload exactly 2 PDF files, no additional parameters required.\n\n---\n\n## General Notes\n\n- All parameters are passed as JSON strings in the `parameter` field\n- Page numbers start from 1\n- When the `parameter` field is not passed, default values are used\n- The `password` field is independent of `parameter`, passed directly as form-data\n- For more parameter details on specific tools, please refer to the official documentation: <https://api.compdf.com/api-reference/overview>\n\nFile v1.1.0:references/tool-list.md\n\n# ComPDF API Complete Tool Type Reference (executeTypeUrl)\n\n## ComPDF AI API\n\n### Intelligent Applications\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Intelligent Document Extraction | `idp/documentExtract` | Intelligently extract structured data from documents |\n| Intelligent Document Parsing | `idp/documentParsing` | Parse document content and structure |\n\n### Intelligent Tools\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Text Recognition (OCR) | `documentAI/ocr` | Recognize text in images/scanned documents |\n| Table Extraction | `documentAI/tableRec` | Extract table data from images |\n| Stamp Detection | `documentAI/detectionStamp` | Detect stamps in documents |\n| Image Distortion Correction | `documentAI/dewarp` | Correct distortion in photographed/scanned images |\n| Image Enhancement | `documentAI/magicColor` | Enhance image quality |\n\nSupported image formats: JPG, PNG, JPEG, TIFF, BMP\n\n---\n\n## Format Conversion API\n\n### PDF to Other Formats\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| PDF → Word | `pdf/docx` | Convert PDF to Word document |\n| PDF → Excel | `pdf/xlsx` | Convert PDF to Excel spreadsheet |\n| PDF → PPT | `pdf/pptx` | Convert PDF to PowerPoint presentation |\n| PDF → HTML | `pdf/html` | Convert PDF to HTML page |\n| PDF → RTF | `pdf/rtf` | Convert PDF to Rich Text Format |\n| PDF → Image | `pdf/img` | Convert PDF pages to images |\n| PDF → CSV | `pdf/csv` | Convert PDF tables to CSV |\n| PDF → TXT | `pdf/txt` | Extract plain text from PDF |\n| PDF → JSON | `pdf/json` | Convert PDF content to JSON |\n| PDF → Markdown | `pdf/markdown` | Convert PDF to Markdown |\n\n### Other Formats to PDF\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Word → PDF | `doc/pdf` or `docx/pdf` | Convert Word document to PDF |\n| Excel → PDF | `xls/pdf` or `xlsx/pdf` | Convert Excel spreadsheet to PDF |\n| PPT → PDF | `ppt/pdf` or `pptx/pdf` | Convert PowerPoint to PDF |\n| TXT → PDF | `txt/pdf` | Convert plain text to PDF |\n| HTML → PDF | `html/pdf` | Convert HTML page to PDF |\n| RTF → PDF | `rtf/pdf` | Convert Rich Text Format to PDF |\n| PNG → PDF | `png/pdf` | Convert PNG image to PDF |\n| CSV → PDF | `csv/pdf` | Convert CSV file to PDF |\n\n### Image to Other Formats\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Image → Word | `img/docx` | Convert image to Word document |\n| Image → Excel | `img/xlsx` | Convert image to Excel spreadsheet |\n| Image → PPT | `img/pptx` | Convert image to PowerPoint |\n| Image → JSON | `img/json` | Convert image content to JSON |\n| Image → TXT | `img/txt` | Extract text from image |\n| Image → HTML | `img/html` | Convert image to HTML |\n| Image → RTF | `img/rtf` | Convert image to Rich Text Format |\n| Image → CSV | `img/csv` | Convert image tables to CSV |\n| Image → PDF | `img/pdf` | Convert image to PDF |\n\nSupported image formats: JPG, PNG, JPEG, TIFF, BMP\n\n---\n\n## PDF Page Editing API\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Merge PDF | `pdf/merge` | Combine multiple PDFs into one |\n| Split PDF | `pdf/split` | Split PDF into multiple files |\n| Extract Pages | `pdf/extract` | Extract specific pages from PDF |\n| Insert Pages | `pdf/insert` | Insert pages into PDF |\n| Delete Pages | `pdf/delete` | Remove specific pages from PDF |\n| Rotate Pages | `pdf/rotation` | Rotate PDF pages by angle |\n\n---\n\n## PDF Advanced Features API\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Add Watermark | `pdf/addWatermark` | Add text or image watermark to PDF |\n| Remove Watermark | `pdf/delWatermark` | Remove watermark from PDF |\n| PDF to Editable PDF | `pdf/editable` | Convert scanned PDF to editable PDF |\n| PDF Compression | `pdf/compress` | Reduce PDF file size |\n| Cover Comparison | `pdf/coverCompare` | Compare visual appearance of two PDFs |\n| Content Comparison | `pdf/contentCompare` | Compare text content of two PDFs |\n| PDF Standard Conversion | `pdf/convertType` | Convert PDF to PDF/A standard |\n| PDF Generation | `pdf/generate` | Generate PDF from structured data |\n\nFile v1.1.0:skill-card.md\n\n## Description: <br>\nPDF Toolkit processes PDF files through the ComPDF Cloud REST API for conversion, page organization, basic editing, OCR, compression, comparison, extraction, and other document workflows. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[compdf-youna](https://clawhub.ai/user/compdf-youna) <br>\n\n### License/Terms of Use: <br>\nApache 2.0 <br>\n\n\n## Use Case: <br>\nExternal users, developers, and document workflow operators use this skill to run multi-step PDF processing tasks through ComPDF Cloud, including conversion, page edits, OCR, compression, comparison, and structured extraction. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Uploaded documents are sent to ComPDF Cloud for processing. <br>\nMitigation: Require explicit user confirmation before upload and avoid uploading highly sensitive documents unless the user accepts ComPDF handling. <br>\nRisk: A ComPDF API public key may be stored locally if the user opts in. <br>\nMitigation: Save the key only on trusted devices after user consent and allow deletion of config/public_key.txt to revoke local storage. <br>\nRisk: ComPDF processing may consume quota or require paid credits. <br>\nMitigation: Surface quota exhaustion clearly and direct users to review ComPDF pricing before obtaining more credits. <br>\n\n\n## Reference(s): <br>\n- [ComPDF API overview](https://api.compdf.com/api-reference/overview) <br>\n- [ComPDF API tool type reference](references/tool-list.md) <br>\n- [ComPDF API tool parameter details](references/parameters.md) <br>\n- [ComPDF API error code reference](references/error-codes.md) <br>\n- [PDF Toolkit on ClawHub](https://clawhub.ai/compdf-youna/pdf-tools-compdf) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, files, configuration, guidance] <br>\n**Output Format:** [Markdown status summaries with download links, error guidance, and optional local API key configuration.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Successful processing returns ComPDF download URLs for generated files; links expire at 24:00 the next day.] <br>\n\n## Skill Version(s): <br>\n1.1.0 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.1.0:LICENSE.txt\n\nApache License\nVersion 2.0, January 2004\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n   \"License\" shall mean the terms and conditions for use, reproduction,\n   and distribution as defined in Sections 1 through 9 of this document.\n\n   \"Licensor\" shall mean the copyright owner or entity authorized by\n   the copyright owner that is granting the License.\n\n   \"Legal Entity\" shall mean the union of the acting entity and all\n   other entities that control, are controlled by, or are under common\n   control with that entity. For the purposes of this definition,\n   \"control\" means (i) the power, direct or indirect, to cause the\n   direction or management of such entity, whether by contract or\n   otherwise, or (ii) ownership of fifty percent (50%) or more of the\n   outstanding shares, or (iii) beneficial ownership of such entity.\n\n   \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising\n   permissions granted by this License.\n\n   \"Source\" form shall mean the preferred form for making modifications,\n   including but not limited to software source code, documentation\n   source, and configuration files.\n\n   \"Object\" form shall mean any form resulting from mechanical\n   transformation or translation of a Source form, including but\n   not limited to compiled object code, generated documentation,\n   and conversions to other media types.\n\n   \"Work\" shall mean the work of authorship, whether in Source or Object\n   form, made available under the License, as indicated by a copyright\n   notice that is included in or attached to the work (an example is\n   provided in the Appendix below).\n\n   \"Derivative Works\" shall mean any work, whether in Source or Object\n   form, that is based on (or derived from) the Work and for which the\n   editorial revisions, annotations, elaborations, or other modifications\n   represent, as a whole, an original work of authorship. For the purposes\n   of this License, Derivative Works shall not include works that remain\n   separable from, or merely link (or bind by name) to the interfaces of,\n   the Work and Derivative Works thereof.\n\n   \"Contribution\" shall mean any work of authorship, including\n   the original Work and any and all modifications thereof or Derivative\n   Works thereof, and any and all modifications thereof. If the Work is\n   a software module, then a Contribution includes, but is not limited\n   to, any source code, object code, patch, and documentation related\n   to the Work; and, for purposes of this definition, Contribution means\n   any work of authorship submitted to, or already incorporated in, the\n   Work (with \"incorporation\" meaning any submission to, or already\n   incorporated in, the Work).\n\n   \"Contributor\" shall mean Licensor and any Legal Entity on behalf of\n   whom a Contribution has been received by Licensor and subsequently\n   incorporated within the Work.\n\n   \"Licensed Patents\" shall mean the patent claims of a Contributor\n   that are necessarily infringed by the use or sale of its Contribution\n   either in its unmodified form or when combined with the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   copyright license to reproduce, prepare Derivative Works of,\n   publicly display, publicly perform, sublicense, and distribute the\n   Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   (except as stated in this section) patent license to make, have made,\n   use, offer to sell, sell, import, and otherwise transfer the Work,\n   where such license applies only to those patent claims licensable\n   by such Contributor that are necessarily infringed by their\n   Contribution(s) alone or by combination of their Contribution(s)\n   with the Work to which such Contribution(s) was submitted. If You\n   institute patent litigation against any entity (including a\n   cross-claim or counterclaim in a lawsuit) alleging that the Work\n   or a Contribution incorporated within the Work constitutes direct\n   or contributory patent infringement, then any patent licenses\n   granted to You under this License for that Work shall terminate\n   as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n   Work or Derivative Works thereof in any medium, with or without\n   modifications, and in Source or Object form, provided that You\n   meet the following conditions:\n\n   (a) You must give any other recipients of the Work or\n       Derivative Works a copy of this License; and\n\n   (b) You must cause any modified files to carry prominent notices\n       stating that You changed the files; and\n\n   (c) You must retain, in the Source form of any Derivative Works\n       that You distribute, all copyright, patent, trademark, and\n       attribution notices from the Source form of the Work,\n       excluding those notices that do not pertain to any part of\n       the Derivative Works; and\n\n   (d) If the Work includes a \"NOTICE\" text file, then any\n       Derivative Works that You distribute must include a readable\n       copy of the attribution notices contained\n       within such NOTICE file, excluding those notices that do not\n       pertain to any part of the Derivative Works, in at least one\n       of the following places: within a NOTICE text file distributed\n       as part of the Derivative Works; within the Source form or\n       documentation, if provided along with the Derivative Works; or,\n       within a display generated by the Derivative Works, if and\n       wherever such third-party notices normally appear. The contents\n       of the NOTICE file are for informational purposes only and\n       do not modify the License. You may add Your own attribution\n       notices within Derivative Works that You distribute, alongside\n       or as an addendum to the NOTICE from the Work, provided that\n       such additional attribution notices cannot be construed\n       as modifying the License.\n\n   You may add Your own copyright statement to Your modifications and\n   may provide additional or different license terms and conditions\n   for use, reproduction, or distribution of Your modifications, or\n   for any such Derivative Works as a whole, provided Your use,\n   reproduction, and distribution of the Work otherwise complies with\n   the conditions of this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n   any Contribution intentionally submitted for inclusion in the Work\n   by You to Licensor shall be under the terms and conditions of\n   this License, without any additional terms or conditions.\n   Notwithstanding the above, nothing herein shall supersede or modify\n   the terms of any separate license agreement you may have executed\n   with Licensor regarding such Contribution.\n\n6. Trademarks. This License does not grant permission to use the trade\n   names, trademarks, service marks, or product names of the Licensor,\n   except as required for reasonable and customary use in describing the\n   origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n   agreed to in writing, Licensor provides the Work (and each\n   Contributor provides its Contributions) on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n   implied, including, without limitation, any warranties or conditions\n   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n   PARTICULAR PURPOSE. You are solely responsible for determining the\n   appropriateness of using or redistributing the Work and assume any\n   risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n   whether in tort (including negligence), contract, or otherwise,\n   unless required by applicable law (such as deliberate and grossly\n   negligent acts) or agreed to in writing, shall any Contributor be\n   liable to You for damages, including any direct, indirect, special,\n   incidental, or consequential damages of any character arising as a\n   result of this License or out of the use or inability to use the\n   Work (including but not limited to damages for loss of goodwill,\n   work stoppage, computer failure or malfunction, or any and all\n   other commercial damages or losses), even if such Contributor\n   has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n   the Work or Derivative Works thereof, You may choose to offer,\n   and charge a fee for, acceptance of support, warranty, indemnity,\n   or other liability obligations and/or rights consistent with this\n   License. However, in accepting such obligations, You may act only\n   on Your own behalf and on Your sole responsibility, not on behalf\n   of any other Contributor, and only if You agree to indemnify,\n   defend, and hold each Contributor harmless for any liability\n   incurred by, or claims asserted against, such Contributor by reason\n   of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n   To apply the Apache License to your work, attach the following\n   boilerplate notice, with the fields enclosed by brackets \"[]\"\n   replaced with your own identifying information. (Don't include\n   the brackets!)  The text should be enclosed in the appropriate\n   comment syntax for the file format.  We also recommend that a\n   file or class name and description of purpose be included on the\n   same \"printed page\" as the copyright notice for easier\n   identification within third-party archives.\n\nCopyright 2014-2026 PDF Technologies, Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nArchive v1.0.1: 6 files, 14178 bytes\n\nFiles: LICENSE.txt (10583b), references/error-codes.md (4331b), references/parameters.md (9190b), references/tool-list.md (4097b), SKILL.md (7726b), _meta.json (135b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: pdf-tools-compdf\ndescription: >\n  Process, convert, edit, and extract data from PDF files using the ComPDF Cloud API. Supports format conversion (Word, Excel, Image), page manipulation (merge, split, compress), watermarking, and OCR text recognition. Use when converting PDF formats, reorganizing pages, adding watermarks, or extracting document content and tables into a structured format for LLM processing or text analysis.\n  keywords: PDF to Word, compress PDF, OCR, merge PDF, extract text, powered by the ComPDF Cloud API.\n---\n\n# PDF Toolkit\n\nProcess PDF files through ComPDF Cloud REST API. Supports 50+ document processing operations.\n\nOfficial documentation: <https://api.compdf.com/api-reference/overview>\n\n## When to Run\n\n- User requests to convert file format (e.g., \"convert this PDF to Word\", \"convert Excel to PDF\")\n- User requests to edit PDF pages (e.g., \"merge these two PDFs\", \"delete page 3\", \"rotate PDF\")\n- User requests to add or remove watermarks from PDF\n- User requests to compress PDF files\n- User requests OCR recognition of scanned documents or text in images\n- User requests AI extraction or parsing of document content\n- User requests to extract tables from images\n- User requests batch processing of multiple document files\n- User requests to compare differences between two PDF documents\n- User mentions ComPDF, compdf, or related keywords\n\n## Workflow\n\n### Step 1 — Obtain API Key\n\nCheck whether `config/public_key.txt` exists and contains a non-empty value.\n\n- **If the file exists and is non-empty**: use the stored key (trim whitespace).\n- **If the file is missing or empty**: ask the user for their ComPDF API Public Key. Inform them it can be obtained at <https://api-dashboard.compdf.com/api/keys>. After the user provides the key, ask whether they would like to save it locally for future sessions.\n  - If the user agrees, write the key to `config/public_key.txt`.\n  - If the user declines, use the key for the current session only without saving.\n\n> 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 delete `config/public_key.txt` at any time to revoke local storage.\n\n### Step 2 — Confirm External Upload Intent\n\n**Before uploading any file**, explicitly inform the user:\n\n> ⚠️ **External Upload Confirmation Required**\n>\n> Your file will be uploaded to ComPDF's servers (api-server.compdf.com or api-server.compdf.cn) for processing. Please confirm that:\n> 1. You consent to uploading this file to external servers.\n> 2. The file does not contain highly sensitive or confidential data, or you accept the associated risk.\n> 3. You have reviewed ComPDF's Privacy Policy at <https://www.compdf.com/privacy-policy>.\n\n**Only proceed with the upload after receiving explicit user confirmation.**\n\n### Step 3 — Determine Base URL\n\nAsk or infer the user's network environment:\n\n| Environment | Base URL |\n|---|---|\n| International | `https://api-server.compdf.com/server/v2` |\n| Mainland China | `https://api-server.compdf.cn/server/v2` |\n\n### Step 4 — Select Tool\n\nLook up the `executeTypeUrl` for the user's task in `references/tool-list.md`.\n\nQuick reference for common operations:\n\n| Operation | executeTypeUrl |\n|---|---|\n| PDF → Word | `pdf/docx` |\n| PDF → Excel | `pdf/xlsx` |\n| PDF → Image | `pdf/img` |\n| PDF → Markdown | `pdf/markdown` |\n| Word → PDF | `docx/pdf` |\n| Merge PDF | `pdf/merge` |\n| Split PDF | `pdf/split` |\n| Add Watermark | `pdf/addWatermark` |\n| PDF Compression | `pdf/compress` |\n| OCR | `documentAI/ocr` |\n| AI Document Extraction | `idp/documentExtract` |\n| AI Document Parsing | `idp/documentParsing` |\n\nFor the full list of 50+ tools, see `references/tool-list.md`.\n\n### Step 5 — Build Parameters (optional)\n\nIf the selected tool supports custom parameters, look up its JSON schema in `references/parameters.md`. Parameters are passed as a **JSON string** in the `parameter` form-data field. If omitted, server defaults apply.\n\n### Step 6 — Send Request\n\nAfter the user has explicitly confirmed the external upload:\n\n1. Send a `POST` request to `{baseUrl}/process/{executeTypeUrl}`.\n2. Include the user-provided API key in the `x-api-key` header for the current session only.\n3. Send the selected file as multipart form-data.\n4. Include the `parameter` field only when the selected tool supports custom parameters.\n5. Use the synchronous `/process/` endpoint so the complete result is returned in a single response.\n\nDo not send the request until the user has confirmed that the file may be transmitted to ComPDF Cloud.\n\n### Step 7 — Handle Response\n\n**1. Check `code` field** — `\"200\"` means success; anything else is an error.\n\n**2. Check `taskStatus`** (should be `TaskFinish` for synchronous calls):\n\n| Status | Meaning | Action |\n|---|---|---|\n| `TaskFinish` | Processing complete | Proceed to download |\n| `TaskProcessing` | Still processing internally | Notify user; suggest retrying shortly |\n| `TaskOverdue` | Timed out | Retry or split into smaller tasks |\n\n**3. Extract download link** from `fileInfoDTOList[].downloadUrl`.\n\n**4. Warn the user**: download links expire at **24:00 the next day**.\n\n**5. On failure**: read `failureCode` and `failureReason`, then look up troubleshooting advice in `references/error-codes.md`.\n\n**6. On quota exhaustion** (`code` = `\"06001\"`): inform the user:\n\n> For more credits, please visit <https://api.compdf.com/api/pricing-old>\n\n### Auxiliary Endpoints\n\n| Purpose | Method & Path |\n|---|---|\n| List supported tools | `GET {baseUrl}/tool/support` |\n| Check remaining credits | `GET {baseUrl}/asset/info` |\n| List tasks | `GET {baseUrl}/task/list?page=1&size=10` |\n| Close a task | `POST {baseUrl}/task/closeTask?taskId={taskId}` |\n\n## Output Format\n\n**On success:**\n\n```\nProcessing complete!\n\nFile: {fileName} → {downFileName}\nStatus: {taskStatus}\nTime taken: {convertTime}ms\nOriginal size: {fileSize} bytes\nResult size: {convertSize} bytes\nDownload link: {downloadUrl}\n\n⚠️ The download link will expire at 24:00 tomorrow, please save it promptly.\n```\n\n**On failure:**\n\n```\nProcessing failed.\n\nError code: {failureCode}\nReason: {failureReason}\nSuggestion: {troubleshooting suggestion from references/error-codes.md}\n```\n\n## Critical Rules\n\n1. **HTTP 200 ≠ success** — always check `code` and `taskStatus` in the JSON body.\n2. **Max 5 files per task** — split into multiple tasks if more files are needed.\n3. **Free tier limit** — 200 files within 30 days.\n4. **File type auto-detection** — the API detects uploaded file types; no need to rename extensions.\n5. **Encrypted PDFs** — provide the password in the `password` form-data field (separate from `parameter`).\n6. **China domain** — mainland China users must replace `compdf.com` with `compdf.cn`.\n7. **User-controlled API Key storage** — the key file (`config/public_key.txt`) 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.\n8. **External upload confirmation** — always obtain explicit user consent before uploading files to ComPDF servers.\n\n## License & Copyright\n\nCopyright © 2014-2026 PDF Technologies, Inc., a KDAN Company. All Rights Reserved.\n\nComPDF and ComPDFKit are trademarks of [PDF Technologies, Inc.](https://www.compdf.com/), a KDAN Company.\n\nThis skill package is licensed under the Apache License 2.0. See `LICENSE.txt` for the full license text.\n\nThe ComPDF Cloud API is a commercial service provided by PDF Technologies, Inc. Use of the API is subject to the [ComPDF Terms of Service](https://www.compdf.com/terms-of-service) and [Privacy Policy](https://www.compdf.com/privacy-policy).\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn75g40xmv3tgkb21e079d055n82v5h8\",\n  \"slug\": \"pdf-tools-compdf\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1773999405083\n}\n\nFile v1.0.1:references/error-codes.md\n\n# ComPDF API Error Code Reference\n\n## HTTP Status Codes\n\n| Status Code | Description |\n|---|---|\n| 200 | HTTP request successful (does not indicate file processing success—check `code` and `taskStatus` in JSON) |\n| 401 | API Key missing or invalid |\n| 413 | Request body exceeds size limit |\n\n## Business Error Codes\n\n### 01xxx - System Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 01001 | System internal error | Retry later; if issue persists, contact support@compdf.com |\n| 01002 | Failed to upload processed file to server | Retry the task |\n| 01003 | File upload failed | Check network connection and file size |\n| 01004 | File download failed | Check if download link has expired |\n| 01005 | File cannot be empty | Verify the uploaded file is not empty |\n| 01006 | File parameter exception | Check JSON format in `parameter` field is correct |\n| 01201 | System memory issue | File may be too large; try batch processing |\n| 01202 | Unknown error | Contact technical support |\n| 01203 | File not found or cannot be opened | Verify file path and format are correct |\n| 01204 | Unsupported security mechanism | File uses unsupported encryption method |\n| 01206 | CSV file not found | Confirm valid CSV file was uploaded |\n| 01207 | DocumentAI API call failed | AI service temporarily unavailable; retry later |\n| 01208 | Failed to write recognition results to file | Retry the task |\n\n### 02xxx - File Format Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 02001 | File format error | Verify file format matches executeTypeUrl |\n| 02002 | Unsupported conversion format | Check `references/tool-list.md` for supported conversion types |\n| 02201 | File is encrypted | Provide correct password in `password` field |\n| 02203 | PDF file exception | File may be corrupted; try repairing with another tool before re-uploading |\n| 02204 | Unsupported file format (PDF only) | This tool accepts PDF input only |\n| 02206 | File content invalid or page does not exist | Check specified page number does not exceed total pages |\n| 02207 | Cannot open file: unsupported format or file is encrypted | Verify format is correct and provide password if encrypted |\n| 02208 | ExcelXml initialization failed | Excel file may be corrupted |\n| 02209 | Conversion timeout—file too large | Use async mode or split file and batch process |\n| 02210 | File conversion failed | Check if file is corrupted; try re-uploading |\n| 02211 | Converted file size abnormal | Source file may have issues; check and retry |\n\n### 03xxx - Parameter Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 03000 | Parameter validation error | Check field names and values in `parameter` JSON match documentation |\n\n### 04xxx - File Operation Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 04001 | fileKey not found | Task may have expired; resubmit the task |\n| 04002 | File size is zero | File is empty; upload valid file |\n| 04003 | File not found or cannot be opened | Verify file path and upload success |\n| 04004 | Comparison file compression failed | Retry document comparison task |\n| 04005 | Document comparison requires exactly two files | Ensure exactly 2 files were uploaded |\n\n### 05xxx - Task Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 05001 | Invalid task | taskId is incorrect or task has been cleaned up |\n| 05002 | Task status exception | Recreate the task |\n| 05003 | Single task file limit reached (5 files) | Split into multiple tasks |\n| 05004 | Task expired without execution | Resubmit the task |\n| 05005 | Task requires at least one file | Ensure file was uploaded |\n\n### 06xxx - Quota Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 06001 | File processing quota exhausted | Purchase quota or wait for quota reset; visit https://api.compdf.com/api/pricing-old for more credits |\n\n### 07xxx - Feature Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 07001 | Unsupported feature | Verify the feature is available in current plan |\n\n## Task Status (taskStatus)\n\n| Status Value | Description |\n|---|---|\n| `TaskStart` | Task created successfully |\n| `TaskWaiting` | Task waiting for processing |\n| `TaskProcessing` | Task is processing |\n| `TaskFinish` | Task processing complete |\n| `TaskOverdue` | Task waiting timed out |\n\nFile v1.0.1:references/parameters.md\n\n# ComPDF API Tool Parameter Details\n\nParameters are passed as JSON strings in the `parameter` field of the request. If not passed, default values are used.\n\n---\n\n## Format Conversion\n\n### PDF to Word (`pdf/docx`)\n\n```json\n{\n  \"enableAiLayout\": 1,\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"enableOcr\": 0,\n  \"ocrRecognitionLang\": \"AUTO\",\n  \"pageRanges\": \"\",\n  \"pageLayoutMode\": \"e_Flow\",\n  \"formulaToImage\": 0,\n  \"ocrOption\": \"ALL\",\n  \"isOutputDocumentPerPage\": 0,\n  \"containPageBackgroundImage\": 1\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `enableAiLayout` | Enable AI layout analysis (0=off, 1=on) | 1 |\n| `isContainImg` | Include images during conversion (0=off, 1=on) | 1 |\n| `isContainAnnot` | Include annotations during conversion (0=off, 1=on) | 1 |\n| `enableOcr` | Enable OCR (0=off, 1=on) | 0 |\n| `ocrRecognitionLang` | OCR recognition language (see language list below) | AUTO |\n| `pageRanges` | Page range, e.g., `\"1,2,3-5\"`, empty=all pages | \"\" |\n| `pageLayoutMode` | Layout mode: `e_Box`=fixed layout, `e_Flow`=flow layout | e_Flow |\n| `formulaToImage` | Convert formulas to images (0=off, 1=on), recommend on for complex formulas | 0 |\n| `ocrOption` | OCR recognition scope (see options below) | ALL |\n| `isOutputDocumentPerPage` | Output one document per page (0=off, 1=on) | 0 |\n| `containPageBackgroundImage` | Include page background images during OCR (0=off, 1=on) | 1 |\n\n**OCR Recognition Language (ocrRecognitionLang):**\nAUTO, CHINESE (Simplified Chinese), CHINESE_TRAD (Traditional Chinese), ENGLISH, KOREAN, JAPANESE, LATIN, DEVANAGARI, CYRILLIC, ARABIC, TAMIL, TELUGU, KANNADA, THAI, GREEK, ESLAV (Slavic)\n\n**OCR Recognition Scope (ocrOption):**\n- `INVALID_CHARACTER` - Recognize invalid characters in PDF\n- `SCAN_PAGE` - Recognize scanned pages in PDF\n- `INVALID_CHARACTERAND_SCAN_PAGE` - Recognize invalid characters and scanned pages\n- `ALL` - Recognize all characters on all pages\n\n**Layout Mode Differences:**\n- `e_Flow` (Flow layout): Suitable for editing, content can be dynamically adjusted. However, display may vary across different software versions.\n- `e_Box` (Fixed layout): Maintain original PDF layout unchanged, but less convenient for editing.\n\n---\n\n### PDF to Image (`pdf/img`)\n\n```json\n{\n  \"imageType\": \"jpg\",\n  \"imgDpi\": \"300\",\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `imageType` | Output image format: `jpg`, `png` | jpg |\n| `imgDpi` | Output image DPI | 300 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to Excel (`pdf/xlsx`)\n\n```json\n{\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `isContainImg` | Include images (0/1) | 1 |\n| `isContainAnnot` | Include annotations (0/1) | 1 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to HTML (`pdf/html`)\n\n```json\n{\n  \"isContainImg\": 1,\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `isContainImg` | Include images (0/1) | 1 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to TXT (`pdf/txt`)\n\n```json\n{\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF Standard Conversion (`pdf/convertType`)\n\n```json\n{\n  \"convertType\": \"pdfa1a\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `convertType` | Target PDF standard: `pdfa1a`, `pdfa1b`, `pdfa2a`, `pdfa2b`, `pdfa3a`, `pdfa3b` |\n\n---\n\n## Page Editing\n\n### PDF Merge (`pdf/merge`)\n\nUpload 2-5 files in a single task.\n\n```json\n{\n  \"pageOptions\": \"['1,2']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying page ranges for each uploaded file. Each array element (in single quotes) corresponds to one file in upload order. Format: `\"['pages_for_file1','pages_for_file2']\"`. Page numbers start from 1, use commas for individual pages and hyphens for ranges (e.g., `1,2,4,6,9-11`). Not passing = merge all pages of all files. |\n\n**Examples:**\n- 2 files, all pages from both: omit `pageOptions`\n- 2 files, pages 1-3 from file 1, pages 2,5 from file 2: `\"['1-3','2,5']\"`\n- 1 file, pages 1 and 2 only: `\"['1,2']\"`\n\n---\n\n### PDF Split (`pdf/split`)\n\n```json\n{\n  \"pageOptions\": \"['1-3','4','5-6']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying how to split the PDF. Each array element (in single quotes) defines the page range for one output PDF file. Format: `\"['range1','range2','range3']\"`. Page numbers start from 1. Use hyphens for ranges and commas for individual pages within each element. |\n\n**Examples:**\n- Split into 3 files (pages 1-3, page 4, pages 5-6): `\"['1-3','4','5-6']\"`\n- Split into 2 files (pages 1-5, pages 6-10): `\"['1-5','6-10']\"`\n\n---\n\n### PDF Extract Pages (`pdf/extract`)\n\n```json\n{\n  \"pageOptions\": \"['1,3,5-8']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to extract. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n\n**Examples:**\n- Extract page 1 only: `\"['1']\"`\n- Extract pages 1, 3, and 5-8: `\"['1,3,5-8']\"`\n\n---\n\n### PDF Delete Pages (`pdf/delete`)\n\n```json\n{\n  \"pageOptions\": \"['2,4,6']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to delete. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n\n**Examples:**\n- Delete page 1 only: `\"['1']\"`\n- Delete pages 2, 4, and 6: `\"['2,4,6']\"`\n\n---\n\n### PDF Rotate Pages (`pdf/rotation`)\n\n```json\n{\n  \"pageOptions\": \"['1-5']\",\n  \"rotation\": \"90\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to rotate. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n| `rotation` | Rotation angle: `90`, `180`, `270` |\n\n**Examples:**\n- Rotate page 1 by 90°: `\"pageOptions\": \"['1']\"`, `\"rotation\": \"90\"`\n- Rotate pages 1-5 by 180°: `\"pageOptions\": \"['1-5']\"`, `\"rotation\": \"180\"`\n\n---\n\n### PDF Insert Pages (`pdf/insert`)\n\nUpload 2 files: the main PDF and the PDF to insert. No additional parameters required.\n\n---\n\n## Advanced Features\n\n### Add Watermark (`pdf/addWatermark`)\n\n```json\n{\n  \"type\": \"text\",\n  \"scale\": \"1\",\n  \"opacity\": \"0.5\",\n  \"rotation\": \"0.785\",\n  \"targetPages\": \"1-2\",\n  \"vertalign\": \"center\",\n  \"horizalign\": \"left\",\n  \"xoffset\": \"100\",\n  \"yoffset\": \"100\",\n  \"content\": \"CONFIDENTIAL\",\n  \"textColor\": \"#FF0000\",\n  \"front\": \"\",\n  \"fullScreen\": \"111\",\n  \"horizontalSpace\": \"10\",\n  \"verticalSpace\": \"10\",\n  \"extension\": \"\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `type` | Watermark type: `text`=text watermark, `image`=image watermark |\n| `scale` | Scale ratio (image watermark property) |\n| `opacity` | Opacity: 0 (fully transparent) ~ 1 (fully opaque) |\n| `rotation` | Rotation angle (radians), positive=counter-clockwise rotation. 0.785 ≈ 45° |\n| `targetPages` | Target page range, e.g., `\"1,2,4,6,9-11\"`, page numbers start from 1 |\n| `vertalign` | Vertical alignment: `top`, `center`, `bottom` |\n| `horizalign` | Horizontal alignment: `left`, `center`, `right` |\n| `xoffset` | Horizontal offset |\n| `yoffset` | Vertical offset |\n| `content` | Text content (required for text watermark) |\n| `textColor` | Text color, hexadecimal format like `\"#FF0000\"` |\n| `front` | Place watermark in foreground layer |\n| `fullScreen` | Watermark fills entire page |\n| `horizontalSpace` | Horizontal spacing (effective in full-screen mode, default 50) |\n| `verticalSpace` | Vertical spacing (effective in full-screen mode, default 50) |\n| `extension` | Extension information, base64 encoded |\n\n**Note:** Image watermarks require uploading watermark image file in the `image` field of the request.\n\n---\n\n### Remove Watermark (`pdf/delWatermark`)\n\nNo additional parameters required. Simply upload the PDF file directly.\n\n---\n\n### PDF Compression (`pdf/compress`)\n\n```json\n{\n  \"quality\": \"50\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `quality` | Compression quality, integer 1-100 |\n\n**Compression Quality Reference:**\n\n| Range | Effect |\n|---|---|\n| 90-100 | Minimal compression, close to original quality |\n| 70-85 | Medium compression, high visual quality |\n| 50-69 | High compression, acceptable quality |\n| 30-49 | Very high compression, obvious quality loss |\n| 0-29 | Extreme compression, poor quality |\n\n---\n\n### Document Comparison\n\n#### Cover Comparison (`pdf/coverCompare`) / Content Comparison (`pdf/contentCompare`)\n\nUpload exactly 2 PDF files, no additional parameters required.\n\n---\n\n## General Notes\n\n- All parameters are passed as JSON strings in the `parameter` field\n- Page numbers start from 1\n- When the `parameter` field is not passed, default values are used\n- The `password` field is independent of `parameter`, passed directly as form-data\n- For more parameter details on specific tools, please refer to the official documentation: <https://api.compdf.com/api-reference/overview>\n\nFile v1.0.1:references/tool-list.md\n\n# ComPDF API Complete Tool Type Reference (executeTypeUrl)\n\n## ComPDF AI API\n\n### Intelligent Applications\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Intelligent Document Extraction | `idp/documentExtract` | Intelligently extract structured data from documents |\n| Intelligent Document Parsing | `idp/documentParsing` | Parse document content and structure |\n\n### Intelligent Tools\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Text Recognition (OCR) | `documentAI/ocr` | Recognize text in images/scanned documents |\n| Table Extraction | `documentAI/tableRec` | Extract table data from images |\n| Stamp Detection | `documentAI/detectionStamp` | Detect stamps in documents |\n| Image Distortion Correction | `documentAI/dewarp` | Correct distortion in photographed/scanned images |\n| Image Enhancement | `documentAI/magicColor` | Enhance image quality |\n\nSupported image formats: JPG, PNG, JPEG, TIFF, BMP\n\n---\n\n## Format Conversion API\n\n### PDF to Other Formats\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| PDF → Word | `pdf/docx` | Convert PDF to Word document |\n| PDF → Excel | `pdf/xlsx` | Convert PDF to Excel spreadsheet |\n| PDF → PPT | `pdf/pptx` | Convert PDF to PowerPoint presentation |\n| PDF → HTML | `pdf/html` | Convert PDF to HTML page |\n| PDF → RTF | `pdf/rtf` | Convert PDF to Rich Text Format |\n| PDF → Image | `pdf/img` | Convert PDF pages to images |\n| PDF → CSV | `pdf/csv` | Convert PDF tables to CSV |\n| PDF → TXT | `pdf/txt` | Extract plain text from PDF |\n| PDF → JSON | `pdf/json` | Convert PDF content to JSON |\n| PDF → Markdown | `pdf/markdown` | Convert PDF to Markdown |\n\n### Other Formats to PDF\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Word → PDF | `doc/pdf` or `docx/pdf` | Convert Word document to PDF |\n| Excel → PDF | `xls/pdf` or `xlsx/pdf` | Convert Excel spreadsheet to PDF |\n| PPT → PDF | `ppt/pdf` or `pptx/pdf` | Convert PowerPoint to PDF |\n| TXT → PDF | `txt/pdf` | Convert plain text to PDF |\n| HTML → PDF | `html/pdf` | Convert HTML page to PDF |\n| RTF → PDF | `rtf/pdf` | Convert Rich Text Format to PDF |\n| PNG → PDF | `png/pdf` | Convert PNG image to PDF |\n| CSV → PDF | `csv/pdf` | Convert CSV file to PDF |\n\n### Image to Other Formats\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Image → Word | `img/docx` | Convert image to Word document |\n| Image → Excel | `img/xlsx` | Convert image to Excel spreadsheet |\n| Image → PPT | `img/pptx` | Convert image to PowerPoint |\n| Image → JSON | `img/json` | Convert image content to JSON |\n| Image → TXT | `img/txt` | Extract text from image |\n| Image → HTML | `img/html` | Convert image to HTML |\n| Image → RTF | `img/rtf` | Convert image to Rich Text Format |\n| Image → CSV | `img/csv` | Convert image tables to CSV |\n| Image → PDF | `img/pdf` | Convert image to PDF |\n\nSupported image formats: JPG, PNG, JPEG, TIFF, BMP\n\n---\n\n## PDF Page Editing API\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Merge PDF | `pdf/merge` | Combine multiple PDFs into one |\n| Split PDF | `pdf/split` | Split PDF into multiple files |\n| Extract Pages | `pdf/extract` | Extract specific pages from PDF |\n| Insert Pages | `pdf/insert` | Insert pages into PDF |\n| Delete Pages | `pdf/delete` | Remove specific pages from PDF |\n| Rotate Pages | `pdf/rotation` | Rotate PDF pages by angle |\n\n---\n\n## PDF Advanced Features API\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Add Watermark | `pdf/addWatermark` | Add text or image watermark to PDF |\n| Remove Watermark | `pdf/delWatermark` | Remove watermark from PDF |\n| PDF to Editable PDF | `pdf/editable` | Convert scanned PDF to editable PDF |\n| PDF Compression | `pdf/compress` | Reduce PDF file size |\n| Cover Comparison | `pdf/coverCompare` | Compare visual appearance of two PDFs |\n| Content Comparison | `pdf/contentCompare` | Compare text content of two PDFs |\n| PDF Standard Conversion | `pdf/convertType` | Convert PDF to PDF/A standard |\n| PDF Generation | `pdf/generate` | Generate PDF from structured data |\n\nFile v1.0.1:LICENSE.txt\n\nApache License\nVersion 2.0, January 2004\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n   \"License\" shall mean the terms and conditions for use, reproduction,\n   and distribution as defined in Sections 1 through 9 of this document.\n\n   \"Licensor\" shall mean the copyright owner or entity authorized by\n   the copyright owner that is granting the License.\n\n   \"Legal Entity\" shall mean the union of the acting entity and all\n   other entities that control, are controlled by, or are under common\n   control with that entity. For the purposes of this definition,\n   \"control\" means (i) the power, direct or indirect, to cause the\n   direction or management of such entity, whether by contract or\n   otherwise, or (ii) ownership of fifty percent (50%) or more of the\n   outstanding shares, or (iii) beneficial ownership of such entity.\n\n   \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising\n   permissions granted by this License.\n\n   \"Source\" form shall mean the preferred form for making modifications,\n   including but not limited to software source code, documentation\n   source, and configuration files.\n\n   \"Object\" form shall mean any form resulting from mechanical\n   transformation or translation of a Source form, including but\n   not limited to compiled object code, generated documentation,\n   and conversions to other media types.\n\n   \"Work\" shall mean the work of authorship, whether in Source or Object\n   form, made available under the License, as indicated by a copyright\n   notice that is included in or attached to the work (an example is\n   provided in the Appendix below).\n\n   \"Derivative Works\" shall mean any work, whether in Source or Object\n   form, that is based on (or derived from) the Work and for which the\n   editorial revisions, annotations, elaborations, or other modifications\n   represent, as a whole, an original work of authorship. For the purposes\n   of this License, Derivative Works shall not include works that remain\n   separable from, or merely link (or bind by name) to the interfaces of,\n   the Work and Derivative Works thereof.\n\n   \"Contribution\" shall mean any work of authorship, including\n   the original Work and any and all modifications thereof or Derivative\n   Works thereof, and any and all modifications thereof. If the Work is\n   a software module, then a Contribution includes, but is not limited\n   to, any source code, object code, patch, and documentation related\n   to the Work; and, for purposes of this definition, Contribution means\n   any work of authorship submitted to, or already incorporated in, the\n   Work (with \"incorporation\" meaning any submission to, or already\n   incorporated in, the Work).\n\n   \"Contributor\" shall mean Licensor and any Legal Entity on behalf of\n   whom a Contribution has been received by Licensor and subsequently\n   incorporated within the Work.\n\n   \"Licensed Patents\" shall mean the patent claims of a Contributor\n   that are necessarily infringed by the use or sale of its Contribution\n   either in its unmodified form or when combined with the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   copyright license to reproduce, prepare Derivative Works of,\n   publicly display, publicly perform, sublicense, and distribute the\n   Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   (except as stated in this section) patent license to make, have made,\n   use, offer to sell, sell, import, and otherwise transfer the Work,\n   where such license applies only to those patent claims licensable\n   by such Contributor that are necessarily infringed by their\n   Contribution(s) alone or by combination of their Contribution(s)\n   with the Work to which such Contribution(s) was submitted. If You\n   institute patent litigation against any entity (including a\n   cross-claim or counterclaim in a lawsuit) alleging that the Work\n   or a Contribution incorporated within the Work constitutes direct\n   or contributory patent infringement, then any patent licenses\n   granted to You under this License for that Work shall terminate\n   as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n   Work or Derivative Works thereof in any medium, with or without\n   modifications, and in Source or Object form, provided that You\n   meet the following conditions:\n\n   (a) You must give any other recipients of the Work or\n       Derivative Works a copy of this License; and\n\n   (b) You must cause any modified files to carry prominent notices\n       stating that You changed the files; and\n\n   (c) You must retain, in the Source form of any Derivative Works\n       that You distribute, all copyright, patent, trademark, and\n       attribution notices from the Source form of the Work,\n       excluding those notices that do not pertain to any part of\n       the Derivative Works; and\n\n   (d) If the Work includes a \"NOTICE\" text file, then any\n       Derivative Works that You distribute must include a readable\n       copy of the attribution notices contained\n       within such NOTICE file, excluding those notices that do not\n       pertain to any part of the Derivative Works, in at least one\n       of the following places: within a NOTICE text file distributed\n       as part of the Derivative Works; within the Source form or\n       documentation, if provided along with the Derivative Works; or,\n       within a display generated by the Derivative Works, if and\n       wherever such third-party notices normally appear. The contents\n       of the NOTICE file are for informational purposes only and\n       do not modify the License. You may add Your own attribution\n       notices within Derivative Works that You distribute, alongside\n       or as an addendum to the NOTICE from the Work, provided that\n       such additional attribution notices cannot be construed\n       as modifying the License.\n\n   You may add Your own copyright statement to Your modifications and\n   may provide additional or different license terms and conditions\n   for use, reproduction, or distribution of Your modifications, or\n   for any such Derivative Works as a whole, provided Your use,\n   reproduction, and distribution of the Work otherwise complies with\n   the conditions of this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n   any Contribution intentionally submitted for inclusion in the Work\n   by You to Licensor shall be under the terms and conditions of\n   this License, without any additional terms or conditions.\n   Notwithstanding the above, nothing herein shall supersede or modify\n   the terms of any separate license agreement you may have executed\n   with Licensor regarding such Contribution.\n\n6. Trademarks. This License does not grant permission to use the trade\n   names, trademarks, service marks, or product names of the Licensor,\n   except as required for reasonable and customary use in describing the\n   origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n   agreed to in writing, Licensor provides the Work (and each\n   Contributor provides its Contributions) on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n   implied, including, without limitation, any warranties or conditions\n   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n   PARTICULAR PURPOSE. You are solely responsible for determining the\n   appropriateness of using or redistributing the Work and assume any\n   risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n   whether in tort (including negligence), contract, or otherwise,\n   unless required by applicable law (such as deliberate and grossly\n   negligent acts) or agreed to in writing, shall any Contributor be\n   liable to You for damages, including any direct, indirect, special,\n   incidental, or consequential damages of any character arising as a\n   result of this License or out of the use or inability to use the\n   Work (including but not limited to damages for loss of goodwill,\n   work stoppage, computer failure or malfunction, or any and all\n   other commercial damages or losses), even if such Contributor\n   has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n   the Work or Derivative Works thereof, You may choose to offer,\n   and charge a fee for, acceptance of support, warranty, indemnity,\n   or other liability obligations and/or rights consistent with this\n   License. However, in accepting such obligations, You may act only\n   on Your own behalf and on Your sole responsibility, not on behalf\n   of any other Contributor, and only if You agree to indemnify,\n   defend, and hold each Contributor harmless for any liability\n   incurred by, or claims asserted against, such Contributor by reason\n   of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n   To apply the Apache License to your work, attach the following\n   boilerplate notice, with the fields enclosed by brackets \"[]\"\n   replaced with your own identifying information. (Don't include\n   the brackets!)  The text should be enclosed in the appropriate\n   comment syntax for the file format.  We also recommend that a\n   file or class name and description of purpose be included on the\n   same \"printed page\" as the copyright notice for easier\n   identification within third-party archives.\n\nCopyright 2014-2026 PDF Technologies, Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nArchive v1.0.0: 7 files, 13801 bytes\n\nFiles: config/public_key.txt (0b), LICENSE.txt (10583b), references/error-codes.md (4331b), references/parameters.md (9190b), references/tool-list.md (4097b), SKILL.md (6290b), _meta.json (135b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: pdf-tools-compdf\ndescription: >\n  Process, convert, edit, and extract data from PDF files using the ComPDF Cloud API. Supports format conversion (Word, Excel, Image), page manipulation (merge, split, compress), watermarking, and OCR text recognition. Use when converting PDF formats, reorganizing pages, adding watermarks, or extracting document content and tables into a structured format for LLM processing or text analysis.\n  keywords: PDF to Word, compress PDF, OCR, merge PDF, extract text powered by the ComPDF Cloud API.\n---\n\n# PDF Toolkit\n\nProcess PDF files through ComPDF Cloud REST API. Supports 50+ document processing operations.\n\nOfficial documentation: <https://api.compdf.com/api-reference/overview>\n\n## When to Run\n\n- User requests to convert file format (e.g., \"convert this PDF to Word\", \"convert Excel to PDF\")\n- User requests to edit PDF pages (e.g., \"merge these two PDFs\", \"delete page 3\", \"rotate PDF\")\n- User requests to add or remove watermarks from PDF\n- User requests to compress PDF files\n- User requests OCR recognition of scanned documents or text in images\n- User requests AI extraction or parsing of document content\n- User requests to extract tables from images\n- User requests batch processing of multiple document files\n- User requests to compare differences between two PDF documents\n- User mentions ComPDF, compdf, or related keywords\n\n## Workflow\n\n### Step 1 — Obtain API Key\n\nRead `config/public_key.txt` to obtain the user's Public Key.\n\n- **If the file is empty or missing**: ask the user for their ComPDF API Public Key and inform them it can be obtained at <https://api-dashboard.compdf.com/api/keys>. After the user provides it, write the key to `config/public_key.txt`.\n- **If the file has content**: read the key value (trim whitespace) and use it for all subsequent requests.\n\n### Step 2 — Determine Base URL\n\nAsk or infer the user's network environment:\n\n| Environment | Base URL |\n|---|---|\n| International | `https://api-server.compdf.com/server/v2` |\n| Mainland China | `https://api-server.compdf.cn/server/v2` |\n\n### Step 3 — Select Tool\n\nLook up the `executeTypeUrl` for the user's task in `references/tool-list.md`.\n\nQuick reference for common operations:\n\n| Operation | executeTypeUrl |\n|---|---|\n| PDF → Word | `pdf/docx` |\n| PDF → Excel | `pdf/xlsx` |\n| PDF → Image | `pdf/img` |\n| PDF → Markdown | `pdf/markdown` |\n| Word → PDF | `docx/pdf` |\n| Merge PDF | `pdf/merge` |\n| Split PDF | `pdf/split` |\n| Add Watermark | `pdf/addWatermark` |\n| PDF Compression | `pdf/compress` |\n| OCR | `documentAI/ocr` |\n| AI Document Extraction | `idp/documentExtract` |\n| AI Document Parsing | `idp/documentParsing` |\n\nFor the full list of 50+ tools, see `references/tool-list.md`.\n\n### Step 4 — Build Parameters (optional)\n\nIf the selected tool supports custom parameters, look up its JSON schema in `references/parameters.md`. Parameters are passed as a **JSON string** in the `parameter` form-data field. If omitted, server defaults apply.\n\n### Step 5 — Send Request\n\n```bash\ncurl -X POST '{baseUrl}/process/{executeTypeUrl}' \\\n  -H 'x-api-key: {PUBLIC_KEY}' \\\n  -H 'Content-Type: multipart/form-data' \\\n  -F 'file=@\"/path/to/file.pdf\"' \\\n  -F 'parameter=\"{JSON parameter string}\"' \\\n  -F 'language=\"1\"'\n```\n\n> The synchronous `/process/` endpoint waits for processing to finish and returns the complete result in one response.\n\n### Step 6 — Handle Response\n\n**1. Check `code` field** — `\"200\"` means success; anything else is an error.\n\n**2. Check `taskStatus`** (should be `TaskFinish` for synchronous calls):\n\n| Status | Meaning | Action |\n|---|---|---|\n| `TaskFinish` | Processing complete | Proceed to download |\n| `TaskProcessing` | Still processing internally | Notify user; suggest retrying shortly |\n| `TaskOverdue` | Timed out | Retry or split into smaller tasks |\n\n**3. Extract download link** from `fileInfoDTOList[].downloadUrl`.\n\n**4. Warn the user**: download links expire at **24:00 the next day**.\n\n**5. On failure**: read `failureCode` and `failureReason`, then look up troubleshooting advice in `references/error-codes.md`.\n\n**6. On quota exhaustion** (`code` = `\"06001\"`): inform the user:\n\n> For more credits, please visit <https://api.compdf.com/api/pricing-old>\n\n### Auxiliary Endpoints\n\n| Purpose | Method & Path |\n|---|---|\n| List supported tools | `GET {baseUrl}/tool/support` |\n| Check remaining credits | `GET {baseUrl}/asset/info` |\n| List tasks | `GET {baseUrl}/task/list?page=1&size=10` |\n| Close a task | `POST {baseUrl}/task/closeTask?taskId={taskId}` |\n\n## Output Format\n\n**On success:**\n\n```\nProcessing complete!\n\nFile: {fileName} → {downFileName}\nStatus: {taskStatus}\nTime taken: {convertTime}ms\nOriginal size: {fileSize} bytes\nResult size: {convertSize} bytes\nDownload link: {downloadUrl}\n\n⚠️ The download link will expire at 24:00 tomorrow, please save it promptly.\n```\n\n**On failure:**\n\n```\nProcessing failed.\n\nError code: {failureCode}\nReason: {failureReason}\nSuggestion: {troubleshooting suggestion from references/error-codes.md}\n```\n\n## Critical Rules\n\n1. **HTTP 200 ≠ success** — always check `code` and `taskStatus` in the JSON body.\n2. **Max 5 files per task** — split into multiple tasks if more files are needed.\n3. **Free tier limit** — 200 files within 30 days.\n4. **File type auto-detection** — the API detects uploaded file types; no need to rename extensions.\n5. **Encrypted PDFs** — provide the password in the `password` form-data field (separate from `parameter`).\n6. **China domain** — mainland China users must replace `compdf.com` with `compdf.cn`.\n7. **API Key** — always read `config/public_key.txt` before each execution; if empty or missing, ask the user first.\n\n## License & Copyright\n\nCopyright © 2014-2026 PDF Technologies, Inc., a KDAN Company. All Rights Reserved.\n\nComPDF and ComPDFKit are trademarks of [PDF Technologies, Inc.](https://www.compdf.com/), a KDAN Company.\n\nThis skill package is licensed under the Apache License 2.0. See `LICENSE.txt` for the full license text.\n\nThe ComPDF Cloud API is a commercial service provided by PDF Technologies, Inc. Use of the API is subject to the [ComPDF Terms of Service](https://www.compdf.com/terms-of-service) and [Privacy Policy](https://www.compdf.com/privacy-policy).\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn75g40xmv3tgkb21e079d055n82v5h8\",\n  \"slug\": \"pdf-tools-compdf\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1773988065991\n}\n\nFile v1.0.0:references/error-codes.md\n\n# ComPDF API Error Code Reference\n\n## HTTP Status Codes\n\n| Status Code | Description |\n|---|---|\n| 200 | HTTP request successful (does not indicate file processing success—check `code` and `taskStatus` in JSON) |\n| 401 | API Key missing or invalid |\n| 413 | Request body exceeds size limit |\n\n## Business Error Codes\n\n### 01xxx - System Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 01001 | System internal error | Retry later; if issue persists, contact support@compdf.com |\n| 01002 | Failed to upload processed file to server | Retry the task |\n| 01003 | File upload failed | Check network connection and file size |\n| 01004 | File download failed | Check if download link has expired |\n| 01005 | File cannot be empty | Verify the uploaded file is not empty |\n| 01006 | File parameter exception | Check JSON format in `parameter` field is correct |\n| 01201 | System memory issue | File may be too large; try batch processing |\n| 01202 | Unknown error | Contact technical support |\n| 01203 | File not found or cannot be opened | Verify file path and format are correct |\n| 01204 | Unsupported security mechanism | File uses unsupported encryption method |\n| 01206 | CSV file not found | Confirm valid CSV file was uploaded |\n| 01207 | DocumentAI API call failed | AI service temporarily unavailable; retry later |\n| 01208 | Failed to write recognition results to file | Retry the task |\n\n### 02xxx - File Format Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 02001 | File format error | Verify file format matches executeTypeUrl |\n| 02002 | Unsupported conversion format | Check `references/tool-list.md` for supported conversion types |\n| 02201 | File is encrypted | Provide correct password in `password` field |\n| 02203 | PDF file exception | File may be corrupted; try repairing with another tool before re-uploading |\n| 02204 | Unsupported file format (PDF only) | This tool accepts PDF input only |\n| 02206 | File content invalid or page does not exist | Check specified page number does not exceed total pages |\n| 02207 | Cannot open file: unsupported format or file is encrypted | Verify format is correct and provide password if encrypted |\n| 02208 | ExcelXml initialization failed | Excel file may be corrupted |\n| 02209 | Conversion timeout—file too large | Use async mode or split file and batch process |\n| 02210 | File conversion failed | Check if file is corrupted; try re-uploading |\n| 02211 | Converted file size abnormal | Source file may have issues; check and retry |\n\n### 03xxx - Parameter Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 03000 | Parameter validation error | Check field names and values in `parameter` JSON match documentation |\n\n### 04xxx - File Operation Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 04001 | fileKey not found | Task may have expired; resubmit the task |\n| 04002 | File size is zero | File is empty; upload valid file |\n| 04003 | File not found or cannot be opened | Verify file path and upload success |\n| 04004 | Comparison file compression failed | Retry document comparison task |\n| 04005 | Document comparison requires exactly two files | Ensure exactly 2 files were uploaded |\n\n### 05xxx - Task Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 05001 | Invalid task | taskId is incorrect or task has been cleaned up |\n| 05002 | Task status exception | Recreate the task |\n| 05003 | Single task file limit reached (5 files) | Split into multiple tasks |\n| 05004 | Task expired without execution | Resubmit the task |\n| 05005 | Task requires at least one file | Ensure file was uploaded |\n\n### 06xxx - Quota Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 06001 | File processing quota exhausted | Purchase quota or wait for quota reset; visit https://api.compdf.com/api/pricing-old for more credits |\n\n### 07xxx - Feature Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 07001 | Unsupported feature | Verify the feature is available in current plan |\n\n## Task Status (taskStatus)\n\n| Status Value | Description |\n|---|---|\n| `TaskStart` | Task created successfully |\n| `TaskWaiting` | Task waiting for processing |\n| `TaskProcessing` | Task is processing |\n| `TaskFinish` | Task processing complete |\n| `TaskOverdue` | Task waiting timed out |\n\nFile v1.0.0:references/parameters.md\n\n# ComPDF API Tool Parameter Details\n\nParameters are passed as JSON strings in the `parameter` field of the request. If not passed, default values are used.\n\n---\n\n## Format Conversion\n\n### PDF to Word (`pdf/docx`)\n\n```json\n{\n  \"enableAiLayout\": 1,\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"enableOcr\": 0,\n  \"ocrRecognitionLang\": \"AUTO\",\n  \"pageRanges\": \"\",\n  \"pageLayoutMode\": \"e_Flow\",\n  \"formulaToImage\": 0,\n  \"ocrOption\": \"ALL\",\n  \"isOutputDocumentPerPage\": 0,\n  \"containPageBackgroundImage\": 1\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `enableAiLayout` | Enable AI layout analysis (0=off, 1=on) | 1 |\n| `isContainImg` | Include images during conversion (0=off, 1=on) | 1 |\n| `isContainAnnot` | Include annotations during conversion (0=off, 1=on) | 1 |\n| `enableOcr` | Enable OCR (0=off, 1=on) | 0 |\n| `ocrRecognitionLang` | OCR recognition language (see language list below) | AUTO |\n| `pageRanges` | Page range, e.g., `\"1,2,3-5\"`, empty=all pages | \"\" |\n| `pageLayoutMode` | Layout mode: `e_Box`=fixed layout, `e_Flow`=flow layout | e_Flow |\n| `formulaToImage` | Convert formulas to images (0=off, 1=on), recommend on for complex formulas | 0 |\n| `ocrOption` | OCR recognition scope (see options below) | ALL |\n| `isOutputDocumentPerPage` | Output one document per page (0=off, 1=on) | 0 |\n| `containPageBackgroundImage` | Include page background images during OCR (0=off, 1=on) | 1 |\n\n**OCR Recognition Language (ocrRecognitionLang):**\nAUTO, CHINESE (Simplified Chinese), CHINESE_TRAD (Traditional Chinese), ENGLISH, KOREAN, JAPANESE, LATIN, DEVANAGARI, CYRILLIC, ARABIC, TAMIL, TELUGU, KANNADA, THAI, GREEK, ESLAV (Slavic)\n\n**OCR Recognition Scope (ocrOption):**\n- `INVALID_CHARACTER` - Recognize invalid characters in PDF\n- `SCAN_PAGE` - Recognize scanned pages in PDF\n- `INVALID_CHARACTERAND_SCAN_PAGE` - Recognize invalid characters and scanned pages\n- `ALL` - Recognize all characters on all pages\n\n**Layout Mode Differences:**\n- `e_Flow` (Flow layout): Suitable for editing, content can be dynamically adjusted. However, display may vary across different software versions.\n- `e_Box` (Fixed layout): Maintain original PDF layout unchanged, but less convenient for editing.\n\n---\n\n### PDF to Image (`pdf/img`)\n\n```json\n{\n  \"imageType\": \"jpg\",\n  \"imgDpi\": \"300\",\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `imageType` | Output image format: `jpg`, `png` | jpg |\n| `imgDpi` | Output image DPI | 300 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to Excel (`pdf/xlsx`)\n\n```json\n{\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `isContainImg` | Include images (0/1) | 1 |\n| `isContainAnnot` | Include annotations (0/1) | 1 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to HTML (`pdf/html`)\n\n```json\n{\n  \"isContainImg\": 1,\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `isContainImg` | Include images (0/1) | 1 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to TXT (`pdf/txt`)\n\n```json\n{\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF Standard Conversion (`pdf/convertType`)\n\n```json\n{\n  \"convertType\": \"pdfa1a\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `convertType` | Target PDF standard: `pdfa1a`, `pdfa1b`, `pdfa2a`, `pdfa2b`, `pdfa3a`, `pdfa3b` |\n\n---\n\n## Page Editing\n\n### PDF Merge (`pdf/merge`)\n\nUpload 2-5 files in a single task.\n\n```json\n{\n  \"pageOptions\": \"['1,2']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying page ranges for each uploaded file. Each array element (in single quotes) corresponds to one file in upload order. Format: `\"['pages_for_file1','pages_for_file2']\"`. Page numbers start from 1, use commas for individual pages and hyphens for ranges (e.g., `1,2,4,6,9-11`). Not passing = merge all pages of all files. |\n\n**Examples:**\n- 2 files, all pages from both: omit `pageOptions`\n- 2 files, pages 1-3 from file 1, pages 2,5 from file 2: `\"['1-3','2,5']\"`\n- 1 file, pages 1 and 2 only: `\"['1,2']\"`\n\n---\n\n### PDF Split (`pdf/split`)\n\n```json\n{\n  \"pageOptions\": \"['1-3','4','5-6']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying how to split the PDF. Each array element (in single quotes) defines the page range for one output PDF file. Format: `\"['range1','range2','range3']\"`. Page numbers start from 1. Use hyphens for ranges and commas for individual pages within each element. |\n\n**Examples:**\n- Split into 3 files (pages 1-3, page 4, pages 5-6): `\"['1-3','4','5-6']\"`\n- Split into 2 files (pages 1-5, pages 6-10): `\"['1-5','6-10']\"`\n\n---\n\n### PDF Extract Pages (`pdf/extract`)\n\n```json\n{\n  \"pageOptions\": \"['1,3,5-8']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to extract. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n\n**Examples:**\n- Extract page 1 only: `\"['1']\"`\n- Extract pages 1, 3, and 5-8: `\"['1,3,5-8']\"`\n\n---\n\n### PDF Delete Pages (`pdf/delete`)\n\n```json\n{\n  \"pageOptions\": \"['2,4,6']\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to delete. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n\n**Examples:**\n- Delete page 1 only: `\"['1']\"`\n- Delete pages 2, 4, and 6: `\"['2,4,6']\"`\n\n---\n\n### PDF Rotate Pages (`pdf/rotation`)\n\n```json\n{\n  \"pageOptions\": \"['1-5']\",\n  \"rotation\": \"90\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `pageOptions` | String-encoded array specifying pages to rotate. Format: `\"['page_range']\"`. Page numbers start from 1. Use commas for individual pages and hyphens for ranges inside the single-quoted element. |\n| `rotation` | Rotation angle: `90`, `180`, `270` |\n\n**Examples:**\n- Rotate page 1 by 90°: `\"pageOptions\": \"['1']\"`, `\"rotation\": \"90\"`\n- Rotate pages 1-5 by 180°: `\"pageOptions\": \"['1-5']\"`, `\"rotation\": \"180\"`\n\n---\n\n### PDF Insert Pages (`pdf/insert`)\n\nUpload 2 files: the main PDF and the PDF to insert. No additional parameters required.\n\n---\n\n## Advanced Features\n\n### Add Watermark (`pdf/addWatermark`)\n\n```json\n{\n  \"type\": \"text\",\n  \"scale\": \"1\",\n  \"opacity\": \"0.5\",\n  \"rotation\": \"0.785\",\n  \"targetPages\": \"1-2\",\n  \"vertalign\": \"center\",\n  \"horizalign\": \"left\",\n  \"xoffset\": \"100\",\n  \"yoffset\": \"100\",\n  \"content\": \"CONFIDENTIAL\",\n  \"textColor\": \"#FF0000\",\n  \"front\": \"\",\n  \"fullScreen\": \"111\",\n  \"horizontalSpace\": \"10\",\n  \"verticalSpace\": \"10\",\n  \"extension\": \"\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `type` | Watermark type: `text`=text watermark, `image`=image watermark |\n| `scale` | Scale ratio (image watermark property) |\n| `opacity` | Opacity: 0 (fully transparent) ~ 1 (fully opaque) |\n| `rotation` | Rotation angle (radians), positive=counter-clockwise rotation. 0.785 ≈ 45° |\n| `targetPages` | Target page range, e.g., `\"1,2,4,6,9-11\"`, page numbers start from 1 |\n| `vertalign` | Vertical alignment: `top`, `center`, `bottom` |\n| `horizalign` | Horizontal alignment: `left`, `center`, `right` |\n| `xoffset` | Horizontal offset |\n| `yoffset` | Vertical offset |\n| `content` | Text content (required for text watermark) |\n| `textColor` | Text color, hexadecimal format like `\"#FF0000\"` |\n| `front` | Place watermark in foreground layer |\n| `fullScreen` | Watermark fills entire page |\n| `horizontalSpace` | Horizontal spacing (effective in full-screen mode, default 50) |\n| `verticalSpace` | Vertical spacing (effective in full-screen mode, default 50) |\n| `extension` | Extension information, base64 encoded |\n\n**Note:** Image watermarks require uploading watermark image file in the `image` field of the request.\n\n---\n\n### Remove Watermark (`pdf/delWatermark`)\n\nNo additional parameters required. Simply upload the PDF file directly.\n\n---\n\n### PDF Compression (`pdf/compress`)\n\n```json\n{\n  \"quality\": \"50\"\n}\n```\n\n| Parameter | Description |\n|---|---|\n| `quality` | Compression quality, integer 1-100 |\n\n**Compression Quality Reference:**\n\n| Range | Effect |\n|---|---|\n| 90-100 | Minimal compression, close to original quality |\n| 70-85 | Medium compression, high visual quality |\n| 50-69 | High compression, acceptable quality |\n| 30-49 | Very high compression, obvious quality loss |\n| 0-29 | Extreme compression, poor quality |\n\n---\n\n### Document Comparison\n\n#### Cover Comparison (`pdf/coverCompare`) / Content Comparison (`pdf/contentCompare`)\n\nUpload exactly 2 PDF files, no additional parameters required.\n\n---\n\n## General Notes\n\n- All parameters are passed as JSON strings in the `parameter` field\n- Page numbers start from 1\n- When the `parameter` field is not passed, default values are used\n- The `password` field is independent of `parameter`, passed directly as form-data\n- For more parameter details on specific tools, please refer to the official documentation: <https://api.compdf.com/api-reference/overview>\n\nFile v1.0.0:references/tool-list.md\n\n# ComPDF API Complete Tool Type Reference (executeTypeUrl)\n\n## ComPDF AI API\n\n### Intelligent Applications\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Intelligent Document Extraction | `idp/documentExtract` | Intelligently extract structured data from documents |\n| Intelligent Document Parsing | `idp/documentParsing` | Parse document content and structure |\n\n### Intelligent Tools\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Text Recognition (OCR) | `documentAI/ocr` | Recognize text in images/scanned documents |\n| Table Extraction | `documentAI/tableRec` | Extract table data from images |\n| Stamp Detection | `documentAI/detectionStamp` | Detect stamps in documents |\n| Image Distortion Correction | `documentAI/dewarp` | Correct distortion in photographed/scanned images |\n| Image Enhancement | `documentAI/magicColor` | Enhance image quality |\n\nSupported image formats: JPG, PNG, JPEG, TIFF, BMP\n\n---\n\n## Format Conversion API\n\n### PDF to Other Formats\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| PDF → Word | `pdf/docx` | Convert PDF to Word document |\n| PDF → Excel | `pdf/xlsx` | Convert PDF to Excel spreadsheet |\n| PDF → PPT | `pdf/pptx` | Convert PDF to PowerPoint presentation |\n| PDF → HTML | `pdf/html` | Convert PDF to HTML page |\n| PDF → RTF | `pdf/rtf` | Convert PDF to Rich Text Format |\n| PDF → Image | `pdf/img` | Convert PDF pages to images |\n| PDF → CSV | `pdf/csv` | Convert PDF tables to CSV |\n| PDF → TXT | `pdf/txt` | Extract plain text from PDF |\n| PDF → JSON | `pdf/json` | Convert PDF content to JSON |\n| PDF → Markdown | `pdf/markdown` | Convert PDF to Markdown |\n\n### Other Formats to PDF\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Word → PDF | `doc/pdf` or `docx/pdf` | Convert Word document to PDF |\n| Excel → PDF | `xls/pdf` or `xlsx/pdf` | Convert Excel spreadsheet to PDF |\n| PPT → PDF | `ppt/pdf` or `pptx/pdf` | Convert PowerPoint to PDF |\n| TXT → PDF | `txt/pdf` | Convert plain text to PDF |\n| HTML → PDF | `html/pdf` | Convert HTML page to PDF |\n| RTF → PDF | `rtf/pdf` | Convert Rich Text Format to PDF |\n| PNG → PDF | `png/pdf` | Convert PNG image to PDF |\n| CSV → PDF | `csv/pdf` | Convert CSV file to PDF |\n\n### Image to Other Formats\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Image → Word | `img/docx` | Convert image to Word document |\n| Image → Excel | `img/xlsx` | Convert image to Excel spreadsheet |\n| Image → PPT | `img/pptx` | Convert image to PowerPoint |\n| Image → JSON | `img/json` | Convert image content to JSON |\n| Image → TXT | `img/txt` | Extract text from image |\n| Image → HTML | `img/html` | Convert image to HTML |\n| Image → RTF | `img/rtf` | Convert image to Rich Text Format |\n| Image → CSV | `img/csv` | Convert image tables to CSV |\n| Image → PDF | `img/pdf` | Convert image to PDF |\n\nSupported image formats: JPG, PNG, JPEG, TIFF, BMP\n\n---\n\n## PDF Page Editing API\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Merge PDF | `pdf/merge` | Combine multiple PDFs into one |\n| Split PDF | `pdf/split` | Split PDF into multiple files |\n| Extract Pages | `pdf/extract` | Extract specific pages from PDF |\n| Insert Pages | `pdf/insert` | Insert pages into PDF |\n| Delete Pages | `pdf/delete` | Remove specific pages from PDF |\n| Rotate Pages | `pdf/rotation` | Rotate PDF pages by angle |\n\n---\n\n## PDF Advanced Features API\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Add Watermark | `pdf/addWatermark` | Add text or image watermark to PDF |\n| Remove Watermark | `pdf/delWatermark` | Remove watermark from PDF |\n| PDF to Editable PDF | `pdf/editable` | Convert scanned PDF to editable PDF |\n| PDF Compression | `pdf/compress` | Reduce PDF file size |\n| Cover Comparison | `pdf/coverCompare` | Compare visual appearance of two PDFs |\n| Content Comparison | `pdf/contentCompare` | Compare text content of two PDFs |\n| PDF Standard Conversion | `pdf/convertType` | Convert PDF to PDF/A standard |\n| PDF Generation | `pdf/generate` | Generate PDF from structured data |\n\nFile v1.0.0:LICENSE.txt\n\nApache License\nVersion 2.0, January 2004\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n   \"License\" shall mean the terms and conditions for use, reproduction,\n   and distribution as defined in Sections 1 through 9 of this document.\n\n   \"Licensor\" shall mean the copyright owner or entity authorized by\n   the copyright owner that is granting the License.\n\n   \"Legal Entity\" shall mean the union of the acting entity and all\n   other entities that control, are controlled by, or are under common\n   control with that entity. For the purposes of this definition,\n   \"control\" means (i) the power, direct or indirect, to cause the\n   direction or management of such entity, whether by contract or\n   otherwise, or (ii) ownership of fifty percent (50%) or more of the\n   outstanding shares, or (iii) beneficial ownership of such entity.\n\n   \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising\n   permissions granted by this License.\n\n   \"Source\" form shall mean the preferred form for making modifications,\n   including but not limited to software source code, documentation\n   source, and configuration files.\n\n   \"Object\" form shall mean any form resulting from mechanical\n   transformation or translation of a Source form, including but\n   not limited to compiled object code, generated documentation,\n   and conversions to other media types.\n\n   \"Work\" shall mean the work of authorship, whether in Source or Object\n   form, made available under the License, as indicated by a copyright\n   notice that is included in or attached to the work (an example is\n   provided in the Appendix below).\n\n   \"Derivative Works\" shall mean any work, whether in Source or Object\n   form, that is based on (or derived from) the Work and for which the\n   editorial revisions, annotations, elaborations, or other modifications\n   represent, as a whole, an original work of authorship. For the","readmeExcerpt":"Skill: PDF Toolkit Owner: compdf-youna Summary: PDF Toolkit handles mixed PDF workflows with a flexible toolset for page organization, basic editing, viewing, and general document processing, built on ComP... Tags: latest:1.2.0 Version history: v1.2.0 | 2026-06-24T05:29:45.899Z | user - Updated links throughout documentation to use UTM tracking and new portal addresses for API documentation, privacy policy, and prici","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"Processing complete!\n\nFile: {fileName} → {downFileName}\nStatus: {taskStatus}\nTime taken: {convertTime}ms\nOriginal size: {fileSize} bytes\nResult size: {convertSize} bytes\nDownload link: {downloadUrl}\n\n⚠️ The download link will expire at 24:00 tomorrow, please save it promptly."},{"language":"text","snippet":"Processing failed.\n\nError code: {failureCode}\nReason: {failureReason}\nSuggestion: {troubleshooting suggestion from references/error-codes.md}"},{"language":"json","snippet":"{\n  \"enableAiLayout\": 1,\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"enableOcr\": 0,\n  \"ocrRecognitionLang\": \"AUTO\",\n  \"pageRanges\": \"\",\n  \"pageLayoutMode\": \"e_Flow\",\n  \"formulaToImage\": 0,\n  \"ocrOption\": \"ALL\",\n  \"isOutputDocumentPerPage\": 0,\n  \"containPageBackgroundImage\": 1\n}"},{"language":"json","snippet":"{\n  \"imageType\": \"jpg\",\n  \"imgDpi\": \"300\",\n  \"pageRanges\": \"\"\n}"},{"language":"json","snippet":"{\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"pageRanges\": \"\"\n}"},{"language":"json","snippet":"{\n  \"isContainImg\": 1,\n  \"pageRanges\": \"\"\n}"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: pdf-tools-compdf\ndescription: >\n  PDF Toolkit handles mixed PDF workflows with a flexible toolset for page organization, basic editing, viewing, and general document processing, built on ComPDF’s all-in-one PDF stack and best used when one request involves multiple PDF operations. It matches triggers such as “pdf toolkit,” “all-in-one pdf,” “process this pdf,” “pdf workflow,” “handle pdf file,” and “multiple pdf operations.” Example queries include “Merge these files, rotate the wrong pages, and return a clean final PDF,” “Help me organize this PDF before I send it to the client,” and “Process this PDF end to end and give me a shareable output.”\n---\n\n# PDF Toolkit\n\nProcess PDF files through ComPDF Cloud REST API. Supports 50+ document processing operations.\n\nOfficial documentation: <https://www.compdf.com/guides/api-reference/v2/overview?utm_source=clawhub&utm_medium=skillhub&utm_campaign=pdf_skill_pdf_toolkit&ref_platform_id=clawhub_skills>\n\n## When to Run\n\n- User requests to convert file format (e.g., \"convert this PDF to Word\", \"convert Excel to PDF\")\n- User requests to edit PDF pages (e.g., \"merge these two PDFs\", \"delete page 3\", \"rotate PDF\")\n- User requests to add or remove watermarks from PDF\n- User requests to compress PDF files\n- User requests OCR recognition of scanned documents or text in images\n- User requests AI extraction or parsing of document content\n- User requests to extract tables from images\n- User requests batch processing of multiple document files\n- User requests to compare differences between two PDF documents\n- User mentions ComPDF, compdf, or related keywords\n\n## Workflow\n\n### Step 1 — Obtain API Key\n\nCheck whether `config/public_key.txt` exists and contains a non-empty value.\n\n- **If the file exists and is non-empty**: use the stored key (trim whitespace).\n- **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.\n  - If the user agrees, write the key to `config/public_key.txt`.\n  - If the user declines, use the key for the current session only without saving.\n\n> 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 delete `config/public_key.txt` at any time to revoke local storage.\n\n### Step 2 — Confirm External Upload Intent\n\n**Before uploading any file**, explicitly inform the user:\n\n> ⚠️ **External Upload Confirmation Required**\n>\n> Your file will be uploaded to ComPDF's servers (api-server.compdf.com or api-server.compdf.cn) for processing. Please confirm that:\n> 1. You consent to uploading this file to external servers.\n> 2. The file does not contain highly sensitive or confidential data, or you accept the ass"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn75g40xmv3tgkb21e079d055n82v5h8\",\n  \"slug\": \"pdf-tools-compdf\",\n  \"version\": \"1.2.0\",\n  \"publishedAt\": 1782278985899\n}"},{"path":"references/error-codes.md","content":"# ComPDF API Error Code Reference\n\n## HTTP Status Codes\n\n| Status Code | Description |\n|---|---|\n| 200 | HTTP request successful (does not indicate file processing success—check `code` and `taskStatus` in JSON) |\n| 401 | API Key missing or invalid |\n| 413 | Request body exceeds size limit |\n\n## Business Error Codes\n\n### 01xxx - System Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 01001 | System internal error | Retry later; if issue persists, contact support@compdf.com |\n| 01002 | Failed to upload processed file to server | Retry the task |\n| 01003 | File upload failed | Check network connection and file size |\n| 01004 | File download failed | Check if download link has expired |\n| 01005 | File cannot be empty | Verify the uploaded file is not empty |\n| 01006 | File parameter exception | Check JSON format in `parameter` field is correct |\n| 01201 | System memory issue | File may be too large; try batch processing |\n| 01202 | Unknown error | Contact technical support |\n| 01203 | File not found or cannot be opened | Verify file path and format are correct |\n| 01204 | Unsupported security mechanism | File uses unsupported encryption method |\n| 01206 | CSV file not found | Confirm valid CSV file was uploaded |\n| 01207 | DocumentAI API call failed | AI service temporarily unavailable; retry later |\n| 01208 | Failed to write recognition results to file | Retry the task |\n\n### 02xxx - File Format Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 02001 | File format error | Verify file format matches executeTypeUrl |\n| 02002 | Unsupported conversion format | Check `references/tool-list.md` for supported conversion types |\n| 02201 | File is encrypted | Provide correct password in `password` field |\n| 02203 | PDF file exception | File may be corrupted; try repairing with another tool before re-uploading |\n| 02204 | Unsupported file format (PDF only) | This tool accepts PDF input only |\n| 02206 | File content invalid or page does not exist | Check specified page number does not exceed total pages |\n| 02207 | Cannot open file: unsupported format or file is encrypted | Verify format is correct and provide password if encrypted |\n| 02208 | ExcelXml initialization failed | Excel file may be corrupted |\n| 02209 | Conversion timeout—file too large | Use async mode or split file and batch process |\n| 02210 | File conversion failed | Check if file is corrupted; try re-uploading |\n| 02211 | Converted file size abnormal | Source file may have issues; check and retry |\n\n### 03xxx - Parameter Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 03000 | Parameter validation error | Check field names and values in `parameter` JSON match documentation |\n\n### 04xxx - File Operation Errors\n\n| Code | Description | Troubleshooting |\n|---|---|---|\n| 04001 | fileKey not found | Task may have expired; resubmit the task |\n| 04002 | File size is zero | File is empty; upload valid file |\n| 04003 | File not found or cannot be opened | Ve"},{"path":"references/parameters.md","content":"# ComPDF API Tool Parameter Details\n\nParameters are passed as JSON strings in the `parameter` field of the request. If not passed, default values are used.\n\n---\n\n## Format Conversion\n\n### PDF to Word (`pdf/docx`)\n\n```json\n{\n  \"enableAiLayout\": 1,\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"enableOcr\": 0,\n  \"ocrRecognitionLang\": \"AUTO\",\n  \"pageRanges\": \"\",\n  \"pageLayoutMode\": \"e_Flow\",\n  \"formulaToImage\": 0,\n  \"ocrOption\": \"ALL\",\n  \"isOutputDocumentPerPage\": 0,\n  \"containPageBackgroundImage\": 1\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `enableAiLayout` | Enable AI layout analysis (0=off, 1=on) | 1 |\n| `isContainImg` | Include images during conversion (0=off, 1=on) | 1 |\n| `isContainAnnot` | Include annotations during conversion (0=off, 1=on) | 1 |\n| `enableOcr` | Enable OCR (0=off, 1=on) | 0 |\n| `ocrRecognitionLang` | OCR recognition language (see language list below) | AUTO |\n| `pageRanges` | Page range, e.g., `\"1,2,3-5\"`, empty=all pages | \"\" |\n| `pageLayoutMode` | Layout mode: `e_Box`=fixed layout, `e_Flow`=flow layout | e_Flow |\n| `formulaToImage` | Convert formulas to images (0=off, 1=on), recommend on for complex formulas | 0 |\n| `ocrOption` | OCR recognition scope (see options below) | ALL |\n| `isOutputDocumentPerPage` | Output one document per page (0=off, 1=on) | 0 |\n| `containPageBackgroundImage` | Include page background images during OCR (0=off, 1=on) | 1 |\n\n**OCR Recognition Language (ocrRecognitionLang):**\nAUTO, CHINESE (Simplified Chinese), CHINESE_TRAD (Traditional Chinese), ENGLISH, KOREAN, JAPANESE, LATIN, DEVANAGARI, CYRILLIC, ARABIC, TAMIL, TELUGU, KANNADA, THAI, GREEK, ESLAV (Slavic)\n\n**OCR Recognition Scope (ocrOption):**\n- `INVALID_CHARACTER` - Recognize invalid characters in PDF\n- `SCAN_PAGE` - Recognize scanned pages in PDF\n- `INVALID_CHARACTERAND_SCAN_PAGE` - Recognize invalid characters and scanned pages\n- `ALL` - Recognize all characters on all pages\n\n**Layout Mode Differences:**\n- `e_Flow` (Flow layout): Suitable for editing, content can be dynamically adjusted. However, display may vary across different software versions.\n- `e_Box` (Fixed layout): Maintain original PDF layout unchanged, but less convenient for editing.\n\n---\n\n### PDF to Image (`pdf/img`)\n\n```json\n{\n  \"imageType\": \"jpg\",\n  \"imgDpi\": \"300\",\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `imageType` | Output image format: `jpg`, `png` | jpg |\n| `imgDpi` | Output image DPI | 300 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to Excel (`pdf/xlsx`)\n\n```json\n{\n  \"isContainImg\": 1,\n  \"isContainAnnot\": 1,\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `isContainImg` | Include images (0/1) | 1 |\n| `isContainAnnot` | Include annotations (0/1) | 1 |\n| `pageRanges` | Page range, empty=all pages | \"\" |\n\n---\n\n### PDF to HTML (`pdf/html`)\n\n```json\n{\n  \"isContainImg\": 1,\n  \"pageRanges\": \"\"\n}\n```\n\n| Parameter | Description | Default |\n|---|---|---|\n| `isContainIm"},{"path":"references/tool-list.md","content":"# ComPDF API Complete Tool Type Reference (executeTypeUrl)\n\n## ComPDF AI API\n\n### Intelligent Applications\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Intelligent Document Extraction | `idp/documentExtract` | Intelligently extract structured data from documents |\n| Intelligent Document Parsing | `idp/documentParsing` | Parse document content and structure |\n\n### Intelligent Tools\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Text Recognition (OCR) | `documentAI/ocr` | Recognize text in images/scanned documents |\n| Table Extraction | `documentAI/tableRec` | Extract table data from images |\n| Stamp Detection | `documentAI/detectionStamp` | Detect stamps in documents |\n| Image Distortion Correction | `documentAI/dewarp` | Correct distortion in photographed/scanned images |\n| Image Enhancement | `documentAI/magicColor` | Enhance image quality |\n\nSupported image formats: JPG, PNG, JPEG, TIFF, BMP\n\n---\n\n## Format Conversion API\n\n### PDF to Other Formats\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| PDF → Word | `pdf/docx` | Convert PDF to Word document |\n| PDF → Excel | `pdf/xlsx` | Convert PDF to Excel spreadsheet |\n| PDF → PPT | `pdf/pptx` | Convert PDF to PowerPoint presentation |\n| PDF → HTML | `pdf/html` | Convert PDF to HTML page |\n| PDF → RTF | `pdf/rtf` | Convert PDF to Rich Text Format |\n| PDF → Image | `pdf/img` | Convert PDF pages to images |\n| PDF → CSV | `pdf/csv` | Convert PDF tables to CSV |\n| PDF → TXT | `pdf/txt` | Extract plain text from PDF |\n| PDF → JSON | `pdf/json` | Convert PDF content to JSON |\n| PDF → Markdown | `pdf/markdown` | Convert PDF to Markdown |\n\n### Other Formats to PDF\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Word → PDF | `doc/pdf` or `docx/pdf` | Convert Word document to PDF |\n| Excel → PDF | `xls/pdf` or `xlsx/pdf` | Convert Excel spreadsheet to PDF |\n| PPT → PDF | `ppt/pdf` or `pptx/pdf` | Convert PowerPoint to PDF |\n| TXT → PDF | `txt/pdf` | Convert plain text to PDF |\n| HTML → PDF | `html/pdf` | Convert HTML page to PDF |\n| RTF → PDF | `rtf/pdf` | Convert Rich Text Format to PDF |\n| PNG → PDF | `png/pdf` | Convert PNG image to PDF |\n| CSV → PDF | `csv/pdf` | Convert CSV file to PDF |\n\n### Image to Other Formats\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Image → Word | `img/docx` | Convert image to Word document |\n| Image → Excel | `img/xlsx` | Convert image to Excel spreadsheet |\n| Image → PPT | `img/pptx` | Convert image to PowerPoint |\n| Image → JSON | `img/json` | Convert image content to JSON |\n| Image → TXT | `img/txt` | Extract text from image |\n| Image → HTML | `img/html` | Convert image to HTML |\n| Image → RTF | `img/rtf` | Convert image to Rich Text Format |\n| Image → CSV | `img/csv` | Convert image tables to CSV |\n| Image → PDF | `img/pdf` | Convert image to PDF |\n\nSupported image formats: JPG, PNG, JPEG, TIFF, BMP\n\n---\n\n## PDF Page Editing API\n\n| Feature | executeTypeUrl | Description |\n|---|---|---|\n| Merge PDF | `pdf/mer"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":2162,"uniquenessScore":39,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T03:59:06.633Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T03:59:06.633Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T08:44:17.767Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}