Generate PDF from HTML

v1.0.0

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

0· 82·1 current·1 all-time
byRishabh Dugar@rishabhdugar

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for rishabhdugar/generate-pdf.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Generate PDF from HTML" (rishabhdugar/generate-pdf) from ClawHub.
Skill page: https://clawhub.ai/rishabhdugar/generate-pdf
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install generate-pdf

ClawHub CLI

Package manager switcher

npx clawhub@latest install generate-pdf
Security Scan
Capability signals
Requires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the actual behavior: SKILL.md and skill.json both describe sending HTML or a public URL to pdfapihub.com for rendering. The required functionality (an external PDF API and an API key) is appropriate for the stated purpose.
Instruction Scope
Runtime instructions are narrowly scoped: they describe forming an HTTP POST to https://pdfapihub.com/api/v1/generatePdf with either html_content or url and an API key in the CLIENT-API-KEY header. The instructions do not ask the agent to read unrelated files, system config, or other environment variables.
Install Mechanism
No install spec or code is included (instruction-only). Nothing will be downloaded or written to disk by the skill itself, which lowers risk.
Credentials
The only auth artifact required by the skill is an API key for the external service (passed in the CLIENT-API-KEY header, and declared as apiKey in skill.json). The skill does not request unrelated secrets, environment variables, or config paths.
Persistence & Privilege
The skill is not marked always:true and does not request system-wide privileges or modify other skills. Autonomous invocation is allowed (default) but that is expected for skills of this type.
Assessment
This skill forwards your HTML or a public URL to a third‑party service (pdfapihub.com) and requires an API key. Before installing, confirm you trust that service and its privacy/retention policy (the docs mention files are deleted after 30 days). Do not send sensitive secrets or personal data in HTML_content or dynamic_params unless you accept third‑party processing. Also check pricing, page limits, and whether you prefer a local renderer (headless Chromium) if you need to keep data on‑prem.

Like a lobster shell, security has layers — review code before you run it.

latestvk9708een6m15x60d8ahry82be98509b8
82downloads
0stars
1versions
Updated 1w ago
v1.0.0
MIT-0

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

Comments

Loading comments...