{
  "schemaVersion": "1.0",
  "item": {
    "slug": "pdf-co",
    "name": "PDF.co",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/byungkyu/pdf-co",
    "canonicalUrl": "https://clawhub.ai/byungkyu/pdf-co",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/pdf-co",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pdf-co",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "LICENSE.txt"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/pdf-co"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/pdf-co",
    "agentPageUrl": "https://openagent3.xyz/skills/pdf-co/agent",
    "manifestUrl": "https://openagent3.xyz/skills/pdf-co/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/pdf-co/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "PDF.co",
        "body": "Access the PDF.co API with managed authentication. Convert, merge, split, and edit PDFs with full document manipulation capabilities."
      },
      {
        "title": "Quick Start",
        "body": "# Get PDF info\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'url': 'https://example.com/sample.pdf'}).encode()\nreq = urllib.request.Request('https://gateway.maton.ai/pdf-co/v1/pdf/info', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Base URL",
        "body": "https://gateway.maton.ai/pdf-co/{native-api-path}\n\nReplace {native-api-path} with the actual PDF.co API endpoint path. The gateway proxies requests to api.pdf.co and automatically injects your API credentials."
      },
      {
        "title": "Authentication",
        "body": "All requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\""
      },
      {
        "title": "Getting Your API Key",
        "body": "Sign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key"
      },
      {
        "title": "Connection Management",
        "body": "Manage your PDF.co connections at https://ctrl.maton.ai."
      },
      {
        "title": "List Connections",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=pdf-co&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Create Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'pdf-co'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Get Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"21fd90f9-5935-43cd-b6c8-bde9d915ca80\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2025-12-08T07:20:53.488460Z\",\n    \"last_updated_time\": \"2026-01-31T20:03:32.593153Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"pdf-co\",\n    \"metadata\": {}\n  }\n}\n\nOpen the returned url in a browser to complete authorization."
      },
      {
        "title": "Delete Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Specifying Connection",
        "body": "If you have multiple PDF.co connections, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'url': 'https://example.com/sample.pdf'}).encode()\nreq = urllib.request.Request('https://gateway.maton.ai/pdf-co/v1/pdf/info', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nreq.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nIf omitted, the gateway uses the default (oldest) active connection."
      },
      {
        "title": "PDF Information",
        "body": "Get metadata and information about a PDF file.\n\nPOST /pdf-co/v1/pdf/info\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\"\n}"
      },
      {
        "title": "Convert PDF to Text",
        "body": "POST /pdf-co/v1/pdf/convert/to/text\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0-\",\n  \"inline\": true\n}\n\nResponse:\n\n{\n  \"body\": \"Extracted text content...\",\n  \"pageCount\": 5,\n  \"error\": false,\n  \"status\": 200,\n  \"name\": \"document.txt\",\n  \"credits\": 10,\n  \"remainingCredits\": 9990\n}"
      },
      {
        "title": "Convert PDF to CSV",
        "body": "POST /pdf-co/v1/pdf/convert/to/csv\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0-\",\n  \"inline\": true,\n  \"lang\": \"eng\"\n}"
      },
      {
        "title": "Convert PDF to JSON",
        "body": "POST /pdf-co/v1/pdf/convert/to/json\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0-\",\n  \"inline\": true\n}"
      },
      {
        "title": "Convert PDF to HTML",
        "body": "POST /pdf-co/v1/pdf/convert/to/html\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0-\",\n  \"name\": \"output.html\"\n}"
      },
      {
        "title": "Convert PDF to XLSX (Excel)",
        "body": "POST /pdf-co/v1/pdf/convert/to/xlsx\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0-\",\n  \"name\": \"output.xlsx\"\n}"
      },
      {
        "title": "Convert PDF to PNG",
        "body": "POST /pdf-co/v1/pdf/convert/to/png\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0\",\n  \"name\": \"page.png\"\n}"
      },
      {
        "title": "Convert PDF to JPG",
        "body": "POST /pdf-co/v1/pdf/convert/to/jpg\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0\",\n  \"name\": \"page.jpg\"\n}"
      },
      {
        "title": "Convert HTML to PDF",
        "body": "POST /pdf-co/v1/pdf/convert/from/html\nContent-Type: application/json\n\n{\n  \"html\": \"<html><body><h1>Hello World</h1></body></html>\",\n  \"name\": \"output.pdf\",\n  \"paperSize\": \"Letter\",\n  \"orientation\": \"Portrait\",\n  \"margins\": \"10 10 10 10\"\n}\n\nResponse:\n\n{\n  \"url\": \"https://pdf-temp-files.s3.amazonaws.com/...\",\n  \"pageCount\": 1,\n  \"error\": false,\n  \"status\": 200,\n  \"name\": \"output.pdf\",\n  \"remainingCredits\": 9980\n}"
      },
      {
        "title": "Convert URL to PDF",
        "body": "POST /pdf-co/v1/pdf/convert/from/url\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com\",\n  \"name\": \"webpage.pdf\",\n  \"paperSize\": \"A4\",\n  \"orientation\": \"Portrait\"\n}"
      },
      {
        "title": "Merge PDFs",
        "body": "Combine multiple PDFs into a single document.\n\nPOST /pdf-co/v1/pdf/merge\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/doc1.pdf,https://example.com/doc2.pdf\",\n  \"name\": \"merged.pdf\"\n}\n\nResponse:\n\n{\n  \"url\": \"https://pdf-temp-files.s3.amazonaws.com/merged.pdf\",\n  \"pageCount\": 10,\n  \"error\": false,\n  \"status\": 200,\n  \"name\": \"merged.pdf\",\n  \"remainingCredits\": 9970,\n  \"duration\": 1500\n}"
      },
      {
        "title": "Split PDF",
        "body": "Split a PDF into multiple files.\n\nPOST /pdf-co/v1/pdf/split\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"1-3,4-6,7-\"\n}\n\nResponse:\n\n{\n  \"urls\": [\n    \"https://pdf-temp-files.s3.amazonaws.com/part1.pdf\",\n    \"https://pdf-temp-files.s3.amazonaws.com/part2.pdf\",\n    \"https://pdf-temp-files.s3.amazonaws.com/part3.pdf\"\n  ],\n  \"pageCount\": 10,\n  \"error\": false,\n  \"status\": 200,\n  \"remainingCredits\": 9960\n}"
      },
      {
        "title": "Delete Pages",
        "body": "POST /pdf-co/v1/pdf/edit/delete-pages\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"2,4,6\"\n}"
      },
      {
        "title": "Add Text and Images",
        "body": "Add text, images, or other content to a PDF.\n\nPOST /pdf-co/v1/pdf/edit/add\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"name\": \"annotated.pdf\",\n  \"annotations\": [\n    {\n      \"text\": \"CONFIDENTIAL\",\n      \"x\": 100,\n      \"y\": 100,\n      \"size\": 24,\n      \"pages\": \"0-\"\n    }\n  ]\n}"
      },
      {
        "title": "Search and Replace Text",
        "body": "POST /pdf-co/v1/pdf/edit/replace-text\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"searchString\": \"old text\",\n  \"replaceString\": \"new text\"\n}"
      },
      {
        "title": "Search and Delete Text",
        "body": "POST /pdf-co/v1/pdf/edit/delete-text\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"searchString\": \"text to remove\"\n}"
      },
      {
        "title": "Add Password",
        "body": "POST /pdf-co/v1/pdf/security/add\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"ownerPassword\": \"owner123\",\n  \"userPassword\": \"user456\"\n}"
      },
      {
        "title": "Remove Password",
        "body": "POST /pdf-co/v1/pdf/security/remove\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"password\": \"currentpassword\"\n}"
      },
      {
        "title": "AI Invoice Parser",
        "body": "Automatically extract structured data from invoices.\n\nPOST /pdf-co/v1/ai-invoice-parser\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/invoice.pdf\"\n}"
      },
      {
        "title": "Document Parser",
        "body": "Extract data using templates.\n\nPOST /pdf-co/v1/pdf/documentparser\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"templateId\": \"your-template-id\"\n}"
      },
      {
        "title": "Generate Barcode",
        "body": "POST /pdf-co/v1/barcode/generate\nContent-Type: application/json\n\n{\n  \"value\": \"1234567890\",\n  \"type\": \"QRCode\",\n  \"name\": \"barcode.png\"\n}"
      },
      {
        "title": "Read Barcode",
        "body": "POST /pdf-co/v1/barcode/read/from/url\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/barcode.png\",\n  \"types\": \"QRCode,Code128,Code39,EAN13,UPCA\"\n}"
      },
      {
        "title": "Check Job Status (Async)",
        "body": "For async operations, check job status.\n\nPOST /pdf-co/v1/job/check\nContent-Type: application/json\n\n{\n  \"jobId\": \"abc123\"\n}"
      },
      {
        "title": "Async Processing",
        "body": "For large files or batch operations, use async processing:\n\nPOST /pdf-co/v1/pdf/merge\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/large1.pdf,https://example.com/large2.pdf\",\n  \"async\": true,\n  \"name\": \"merged.pdf\"\n}\n\nResponse:\n\n{\n  \"jobId\": \"abc123\",\n  \"status\": \"working\",\n  \"error\": false\n}\n\nThen poll the job status:\n\nPOST /pdf-co/v1/job/check\nContent-Type: application/json\n\n{\n  \"jobId\": \"abc123\"\n}"
      },
      {
        "title": "JavaScript",
        "body": "const response = await fetch(\n  'https://gateway.maton.ai/pdf-co/v1/pdf/merge',\n  {\n    method: 'POST',\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`,\n      'Content-Type': 'application/json'\n    },\n    body: JSON.stringify({\n      url: 'https://example.com/doc1.pdf,https://example.com/doc2.pdf',\n      name: 'merged.pdf'\n    })\n  }\n);\nconst result = await response.json();\nconsole.log(result.url);"
      },
      {
        "title": "Python",
        "body": "import os\nimport requests\n\nresponse = requests.post(\n    'https://gateway.maton.ai/pdf-co/v1/pdf/merge',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    json={\n        'url': 'https://example.com/doc1.pdf,https://example.com/doc2.pdf',\n        'name': 'merged.pdf'\n    }\n)\nresult = response.json()\nprint(result['url'])"
      },
      {
        "title": "Notes",
        "body": "All file URLs must be publicly accessible or use PDF.co temporary storage\nMultiple URLs for merge operations should be comma-separated\nPage indices are 0-based (first page is 0)\nPage ranges use format: 0-2 (pages 0,1,2), 3- (page 3 to end), 0,2,4 (specific pages)\nOutput files are stored temporarily and expire after 60 minutes by default\nUse async: true for large files to avoid timeout\nUse inline: true to get content directly in response instead of URL\nIMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments"
      },
      {
        "title": "Error Handling",
        "body": "StatusMeaning400Missing PDF.co connection or invalid request401Invalid or missing Maton API key429Rate limited4xx/5xxPassthrough error from PDF.co API"
      },
      {
        "title": "Troubleshooting: API Key Issues",
        "body": "Check that the MATON_API_KEY environment variable is set:\n\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Troubleshooting: Invalid App Name",
        "body": "Ensure your URL path starts with pdf-co. For example:\n\nCorrect: https://gateway.maton.ai/pdf-co/v1/pdf/merge\nIncorrect: https://gateway.maton.ai/v1/pdf/merge"
      },
      {
        "title": "Resources",
        "body": "PDF.co API Documentation\nPDF.co API Reference\nMaton Community\nMaton Support"
      }
    ],
    "body": "PDF.co\n\nAccess the PDF.co API with managed authentication. Convert, merge, split, and edit PDFs with full document manipulation capabilities.\n\nQuick Start\n# Get PDF info\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'url': 'https://example.com/sample.pdf'}).encode()\nreq = urllib.request.Request('https://gateway.maton.ai/pdf-co/v1/pdf/info', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nBase URL\nhttps://gateway.maton.ai/pdf-co/{native-api-path}\n\n\nReplace {native-api-path} with the actual PDF.co API endpoint path. The gateway proxies requests to api.pdf.co and automatically injects your API credentials.\n\nAuthentication\n\nAll requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n\nGetting Your API Key\nSign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key\nConnection Management\n\nManage your PDF.co connections at https://ctrl.maton.ai.\n\nList Connections\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=pdf-co&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nCreate Connection\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'pdf-co'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nGet Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"21fd90f9-5935-43cd-b6c8-bde9d915ca80\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2025-12-08T07:20:53.488460Z\",\n    \"last_updated_time\": \"2026-01-31T20:03:32.593153Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"pdf-co\",\n    \"metadata\": {}\n  }\n}\n\n\nOpen the returned url in a browser to complete authorization.\n\nDelete Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nSpecifying Connection\n\nIf you have multiple PDF.co connections, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'url': 'https://example.com/sample.pdf'}).encode()\nreq = urllib.request.Request('https://gateway.maton.ai/pdf-co/v1/pdf/info', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nreq.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\nAPI Reference\nPDF Information\n\nGet metadata and information about a PDF file.\n\nPOST /pdf-co/v1/pdf/info\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\"\n}\n\nConvert PDF to Text\nPOST /pdf-co/v1/pdf/convert/to/text\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0-\",\n  \"inline\": true\n}\n\n\nResponse:\n\n{\n  \"body\": \"Extracted text content...\",\n  \"pageCount\": 5,\n  \"error\": false,\n  \"status\": 200,\n  \"name\": \"document.txt\",\n  \"credits\": 10,\n  \"remainingCredits\": 9990\n}\n\nConvert PDF to CSV\nPOST /pdf-co/v1/pdf/convert/to/csv\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0-\",\n  \"inline\": true,\n  \"lang\": \"eng\"\n}\n\nConvert PDF to JSON\nPOST /pdf-co/v1/pdf/convert/to/json\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0-\",\n  \"inline\": true\n}\n\nConvert PDF to HTML\nPOST /pdf-co/v1/pdf/convert/to/html\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0-\",\n  \"name\": \"output.html\"\n}\n\nConvert PDF to XLSX (Excel)\nPOST /pdf-co/v1/pdf/convert/to/xlsx\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0-\",\n  \"name\": \"output.xlsx\"\n}\n\nConvert PDF to PNG\nPOST /pdf-co/v1/pdf/convert/to/png\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0\",\n  \"name\": \"page.png\"\n}\n\nConvert PDF to JPG\nPOST /pdf-co/v1/pdf/convert/to/jpg\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"0\",\n  \"name\": \"page.jpg\"\n}\n\nConvert HTML to PDF\nPOST /pdf-co/v1/pdf/convert/from/html\nContent-Type: application/json\n\n{\n  \"html\": \"<html><body><h1>Hello World</h1></body></html>\",\n  \"name\": \"output.pdf\",\n  \"paperSize\": \"Letter\",\n  \"orientation\": \"Portrait\",\n  \"margins\": \"10 10 10 10\"\n}\n\n\nResponse:\n\n{\n  \"url\": \"https://pdf-temp-files.s3.amazonaws.com/...\",\n  \"pageCount\": 1,\n  \"error\": false,\n  \"status\": 200,\n  \"name\": \"output.pdf\",\n  \"remainingCredits\": 9980\n}\n\nConvert URL to PDF\nPOST /pdf-co/v1/pdf/convert/from/url\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com\",\n  \"name\": \"webpage.pdf\",\n  \"paperSize\": \"A4\",\n  \"orientation\": \"Portrait\"\n}\n\nMerge PDFs\n\nCombine multiple PDFs into a single document.\n\nPOST /pdf-co/v1/pdf/merge\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/doc1.pdf,https://example.com/doc2.pdf\",\n  \"name\": \"merged.pdf\"\n}\n\n\nResponse:\n\n{\n  \"url\": \"https://pdf-temp-files.s3.amazonaws.com/merged.pdf\",\n  \"pageCount\": 10,\n  \"error\": false,\n  \"status\": 200,\n  \"name\": \"merged.pdf\",\n  \"remainingCredits\": 9970,\n  \"duration\": 1500\n}\n\nSplit PDF\n\nSplit a PDF into multiple files.\n\nPOST /pdf-co/v1/pdf/split\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"1-3,4-6,7-\"\n}\n\n\nResponse:\n\n{\n  \"urls\": [\n    \"https://pdf-temp-files.s3.amazonaws.com/part1.pdf\",\n    \"https://pdf-temp-files.s3.amazonaws.com/part2.pdf\",\n    \"https://pdf-temp-files.s3.amazonaws.com/part3.pdf\"\n  ],\n  \"pageCount\": 10,\n  \"error\": false,\n  \"status\": 200,\n  \"remainingCredits\": 9960\n}\n\nDelete Pages\nPOST /pdf-co/v1/pdf/edit/delete-pages\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"pages\": \"2,4,6\"\n}\n\nAdd Text and Images\n\nAdd text, images, or other content to a PDF.\n\nPOST /pdf-co/v1/pdf/edit/add\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"name\": \"annotated.pdf\",\n  \"annotations\": [\n    {\n      \"text\": \"CONFIDENTIAL\",\n      \"x\": 100,\n      \"y\": 100,\n      \"size\": 24,\n      \"pages\": \"0-\"\n    }\n  ]\n}\n\nSearch and Replace Text\nPOST /pdf-co/v1/pdf/edit/replace-text\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"searchString\": \"old text\",\n  \"replaceString\": \"new text\"\n}\n\nSearch and Delete Text\nPOST /pdf-co/v1/pdf/edit/delete-text\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"searchString\": \"text to remove\"\n}\n\nAdd Password\nPOST /pdf-co/v1/pdf/security/add\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"ownerPassword\": \"owner123\",\n  \"userPassword\": \"user456\"\n}\n\nRemove Password\nPOST /pdf-co/v1/pdf/security/remove\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"password\": \"currentpassword\"\n}\n\nAI Invoice Parser\n\nAutomatically extract structured data from invoices.\n\nPOST /pdf-co/v1/ai-invoice-parser\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/invoice.pdf\"\n}\n\nDocument Parser\n\nExtract data using templates.\n\nPOST /pdf-co/v1/pdf/documentparser\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/document.pdf\",\n  \"templateId\": \"your-template-id\"\n}\n\nGenerate Barcode\nPOST /pdf-co/v1/barcode/generate\nContent-Type: application/json\n\n{\n  \"value\": \"1234567890\",\n  \"type\": \"QRCode\",\n  \"name\": \"barcode.png\"\n}\n\nRead Barcode\nPOST /pdf-co/v1/barcode/read/from/url\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/barcode.png\",\n  \"types\": \"QRCode,Code128,Code39,EAN13,UPCA\"\n}\n\nCheck Job Status (Async)\n\nFor async operations, check job status.\n\nPOST /pdf-co/v1/job/check\nContent-Type: application/json\n\n{\n  \"jobId\": \"abc123\"\n}\n\nAsync Processing\n\nFor large files or batch operations, use async processing:\n\nPOST /pdf-co/v1/pdf/merge\nContent-Type: application/json\n\n{\n  \"url\": \"https://example.com/large1.pdf,https://example.com/large2.pdf\",\n  \"async\": true,\n  \"name\": \"merged.pdf\"\n}\n\n\nResponse:\n\n{\n  \"jobId\": \"abc123\",\n  \"status\": \"working\",\n  \"error\": false\n}\n\n\nThen poll the job status:\n\nPOST /pdf-co/v1/job/check\nContent-Type: application/json\n\n{\n  \"jobId\": \"abc123\"\n}\n\nCode Examples\nJavaScript\nconst response = await fetch(\n  'https://gateway.maton.ai/pdf-co/v1/pdf/merge',\n  {\n    method: 'POST',\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`,\n      'Content-Type': 'application/json'\n    },\n    body: JSON.stringify({\n      url: 'https://example.com/doc1.pdf,https://example.com/doc2.pdf',\n      name: 'merged.pdf'\n    })\n  }\n);\nconst result = await response.json();\nconsole.log(result.url);\n\nPython\nimport os\nimport requests\n\nresponse = requests.post(\n    'https://gateway.maton.ai/pdf-co/v1/pdf/merge',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    json={\n        'url': 'https://example.com/doc1.pdf,https://example.com/doc2.pdf',\n        'name': 'merged.pdf'\n    }\n)\nresult = response.json()\nprint(result['url'])\n\nNotes\nAll file URLs must be publicly accessible or use PDF.co temporary storage\nMultiple URLs for merge operations should be comma-separated\nPage indices are 0-based (first page is 0)\nPage ranges use format: 0-2 (pages 0,1,2), 3- (page 3 to end), 0,2,4 (specific pages)\nOutput files are stored temporarily and expire after 60 minutes by default\nUse async: true for large files to avoid timeout\nUse inline: true to get content directly in response instead of URL\nIMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments\nError Handling\nStatus\tMeaning\n400\tMissing PDF.co connection or invalid request\n401\tInvalid or missing Maton API key\n429\tRate limited\n4xx/5xx\tPassthrough error from PDF.co API\nTroubleshooting: API Key Issues\nCheck that the MATON_API_KEY environment variable is set:\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nTroubleshooting: Invalid App Name\nEnsure your URL path starts with pdf-co. For example:\nCorrect: https://gateway.maton.ai/pdf-co/v1/pdf/merge\nIncorrect: https://gateway.maton.ai/v1/pdf/merge\nResources\nPDF.co API Documentation\nPDF.co API Reference\nMaton Community\nMaton Support"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/byungkyu/pdf-co",
    "publisherUrl": "https://clawhub.ai/byungkyu/pdf-co",
    "owner": "byungkyu",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/pdf-co",
    "downloadUrl": "https://openagent3.xyz/downloads/pdf-co",
    "agentUrl": "https://openagent3.xyz/skills/pdf-co/agent",
    "manifestUrl": "https://openagent3.xyz/skills/pdf-co/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/pdf-co/agent.md"
  }
}