name: PDF API Hub slug: pdf-api-hub version: 1.0.0 homepage: https://pdfapihub.com/ description: "Use when: integrating with PDF API Hub REST APIs for document automation — HTML/URL to PDF, merge, split, compress, OCR, watermark, sign, lock/unlock, convert, screenshot, parse, and file management via pdfapihub.com." metadata: {"clawdbot":{"emoji":"📑","requires":{"bins":[]},"os":["linux","darwin","win32"]}}
User needs to call PDF API Hub endpoints (pdfapihub.com/api/v1/...) for document automation: generating PDFs from HTML/URLs, merging, splitting, compressing, OCR, watermarking, signing, encrypting/decrypting, converting between PDF and images, parsing/extracting text and tables, or managing uploaded files.
This skill ONLY: - Provides endpoint reference, request/response contracts, and integration patterns for the PDF API Hub REST API - Shows code examples in multiple languages (cURL, Python, Node.js, etc.) - Explains authentication, error handling, and output format options
This skill NEVER: - Executes API calls or generates files directly - Stores or transmits API keys - Accesses files outside the user's working directory
All code examples are reference patterns for the user to implement.
| Topic | File |
|---|---|
| All endpoints & parameters | endpoints.md |
| Code examples by use case | examples.md |
| Advanced workflows | advanced.md |
Every request requires the CLIENT-API-KEY header.
CLIENT-API-KEY: <your-api-key>
Content-Type: application/json
Get your API key at pdfapihub.com/signup.
https://pdfapihub.com/api/v1/
All endpoints use POST with JSON body.
| # | Category | Endpoint | Path | What it does |
|---|---|---|---|---|
| 1 | Document | Generate PDF | /generatePdf |
Render HTML or capture any webpage as a PDF |
| 2 | Document | Parse PDF | /pdf/parse |
Extract text, tables, or structured layout data |
| 3 | Document | Merge PDFs | /pdf/merge |
Combine multiple PDFs into one |
| 4 | Document | Split PDF | /pdf/split |
Split a PDF into pages, ranges, or chunks |
| 5 | Document | Compress PDF | /compressPdf |
Shrink file size (4 compression levels) |
| 6 | Document | PDF Info | /pdf/info |
Get metadata and page info from a PDF |
| 7 | Document | Watermark | /watermark |
Overlay text/logo watermarks on pages |
| 8 | Document | Sign PDF | /sign-pdf |
Stamp a signature image on PDF pages |
| 9 | Security | Lock PDF | /lockPdf |
AES-256 encryption with granular permissions |
| 10 | Security | Unlock PDF | /unlockPdf |
Remove password protection |
| 11 | Conversion | Generate Image | /generateImage |
Capture URL/HTML as PNG image |
| 12 | Conversion | Compress Image | /compressImage |
Reduce image file size |
| 13 | Conversion | PDF to Image | /pdfToImage |
Render PDF pages as PNG/JPG/WebP |
| 14 | Conversion | Image to PDF | /imageToPdf |
Combine images into a PDF |
| 15 | OCR | PDF OCR | /pdfOcr |
Extract text from scanned PDF documents |
| 16 | OCR | Image OCR | /imageOcr |
Extract text from photos/images |
| 17 | Utility | URL to HTML | /urlToHtml |
Fetch fully-rendered HTML via headless browser |
| 18 | File Mgmt | Upload File | /uploadFile |
Upload a file to cloud storage |
| 19 | File Mgmt | List Files | /listFiles |
List uploaded files |
| 20 | File Mgmt | Delete File | /deleteFile |
Delete an uploaded file |
| 21 | Templates | Create Template | /createTemplate |
Save a reusable HTML template |
| 22 | Templates | List Templates | /listTemplates |
List saved templates |
| 23 | Templates | Delete Template | /deleteTemplate |
Delete a saved template |
Most endpoints support the output_format parameter:
| Value | Description |
|---|---|
url |
Returns a hosted CDN URL (default) |
file |
Returns the file as a download |
base64 |
Returns base64-encoded content |
binary |
Returns raw binary stream |
pdf |
Returns PDF file directly |
| HTTP Code | Meaning | Action |
|---|---|---|
| 400 | Invalid Request | Check JSON body shape and required fields |
| 401 | Unauthorized | Verify CLIENT-API-KEY header |
| 422 | Validation Failed | Check URL/HTML/options for conflicts |
| 429 | Rate Limited | Back off and retry with exponential delay |
| 500 | Internal Error | Retry; contact support if persistent |
{
"success": true,
"pdf_url": "https://cdn.pdfapihub.com/pdf/a1b2c3d4.pdf",
"file_size_bytes": 84321,
"file_deletion_date": "2026-05-04",
"source_type": "html"
}
{ "output_format": "url" }
Don't rely on defaults — be explicit about whether you need a URL, file, or base64.
{
"html_content": "<h1>Invoice #{{number}}</h1>",
"css_content": "h1 { color: #333; }",
"dynamic_params": { "number": "INV-001" }
}
{
"url": "https://example.com/report",
"wait_until": "networkidle",
"paper_size": "A4"
}
For endpoints that operate on existing PDFs (merge, split, compress, etc.), provide files via: - Direct URL to the PDF - Previously uploaded file reference via the Upload File endpoint
Always check success: true in the response before using the result.
| Trap | Consequence | Fix |
|---|---|---|
Missing CLIENT-API-KEY header |
401 error | Always include the header |
Sending both url and html_content |
Undefined behavior | Use one or the other |
Not setting wait_until for SPAs |
Incomplete capture | Use networkidle for JS-heavy pages |
Ignoring file_deletion_date |
Broken links after expiry | Download/store files before deletion |
| Large HTML without pagination | Timeout or huge PDF | Use page_size to limit output |
发现更多技能插件,请访问7w4.net。
pdfapihub.com over HTTPS这是一个文档质量较高的 PDF 处理 API 参考工具,涵盖了生成、合并、压缩、OCR、签名等常用 PDF 操作。文档分类清晰,代码示例丰富,语言通俗易懂,认证和错误处理说明完善,对新手友好。不足之处在于仅有静态文档,没有可运行的代码示例,部分高级参数的说明稍显简略,需要结合官方文档补充阅读。