generate-pdf

Generate a PDF document from HTML content or a public URL. Supports custom page sizes, fonts, margins, viewport dimensions, dynamic parameter substitution, and multiple output formats.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "generate-pdf" with this command: npx skills add rishabhdugar/generate-pdf

Generate PDF

What It Does

Generates a PDF document from either raw HTML content or a public URL using a headless Chromium browser. The API renders the page and returns the result as a downloadable URL, base64 string, or raw PDF file.

When to Use

  • Convert an HTML template (invoice, report, certificate) into a PDF
  • Take a PDF snapshot of a live webpage
  • Generate PDFs with dynamic data via placeholder substitution
  • Create PDFs with custom fonts, margins, and page sizes

Required Inputs

You must provide one of:

  • html_content — raw HTML string to render
  • url — a public URL to convert

Authentication

Send your API key in the CLIENT-API-KEY header.

Get your free API key at https://pdfapihub.com. Full API documentation is available at https://pdfapihub.com/docs.

Use Cases

  • Invoice Generation — Generate branded PDF invoices from HTML templates with dynamic customer data
  • Report Export — Convert dashboard or analytics HTML pages into downloadable PDF reports
  • Certificate Creation — Produce personalized certificates or diplomas with dynamic name/date substitution
  • Contract Generation — Create contracts from templates with client-specific details filled in
  • Resume/CV Export — Convert styled HTML resumes to PDF for download
  • Receipt Generation — Auto-generate PDF receipts for e-commerce transactions
  • Webpage Archival — Save a snapshot of any public webpage as a PDF for records

Key Options

ParameterDescription
output_formaturl (default), base64, file/pdf/binary
paper_sizeA4, A3, A5, Letter, Legal, Tabloid
landscapetrue for landscape orientation
marginObject with top, right, bottom, left (e.g. "10mm")
fontGoogle Font names, pipe-separated
dynamic_paramsKey-value object for {{placeholder}} replacement
wait_tillSeconds to wait before rendering (for JS-heavy pages)

Example Usage

curl -X POST https://pdfapihub.com/api/v1/generatePdf \
  -H "CLIENT-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "html_content": "<html><body><h1>Invoice #{{invoice_id}}</h1><p>Total: {{total}}</p></body></html>",
    "css_content": "body { font-family: Arial; }",
    "dynamic_params": { "invoice_id": "INV-001", "total": "$1,249.00" },
    "paper_size": "A4",
    "output_format": "url"
  }'

Notes

  • Boolean fields accept string values: "true", "1", "yes", "on"
  • Files are automatically deleted after 30 days
  • Page count limits are tier-dependent

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Gigo Lobster Resume

🦞 GIGO · gigo-lobster-resume: 续跑入口:v2 stable 当前会清理旧 checkpoint 并从头重跑;保留此 slug 作为旧 checkpoint 兼容入口。 Triggers: 继续试吃 / 恢复评测 / resume tasting / continue lobster...

Registry SourceRecently Updated
General

YiHui CONTEXT MODE

context-mode is an MCP server that saves 98% of your context window by sandboxing tool outputs. It routes large file reads, shell outputs, and web fetches th...

Registry SourceRecently Updated
General

xinyi-drink

Use when users ask about 新一好喝/新一咖啡 drinks, stores, menu, activities, Skill用户大礼包, today drink recommendations, afternoon tea, feeling sleepy, or personalized...

Registry SourceRecently Updated
General

vedic-destiny

吠陀命盘分析中文入口。用于完整命盘研判、命主盘 Rashi chart 与九分盘 Navamsha chart 联读、既往事件回看、出生时间稳定度判断、事业主题、婚姻主题、时空盘专题,以及基于 Jagannatha Hora PDF、星盘截图或文本命盘数据的系统拆盘。当用户提到完整星盘、事业方向、婚姻问题、关系窗...

Registry SourceRecently Updated