Xpersona
G

Generate PDF from HTML

CLAWHUB · Unverified

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

62
Rank
84
Safety
1.2k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17er4205vjg2p2hpn1fxtpqz1850q84:generate-pdf
  1. Install using `clawhub skill install s17er4205vjg2p2hpn1fxtpqz1850q84:generate-pdf` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/rishabhdugar/generate-pdf before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-rishabhdugar-generate-pdf/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

10,304 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: generate-pdf
description: "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."
---

# 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](https://pdfapihub.com). Full API documentation is available at [https://pdfapihub.com/docs](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
| Parameter | Description |
|-----------|-------------|
| `output_format` | `url` (default), `base64`, `file`/`pdf`/`binary` |
| `paper_size` | A4, A3, A5, Letter, Legal, Tabloid |
| `landscape` | `true` for landscape orientation |
| `margin` | Object with `top`, `right`, `bottom`, `left` (e.g. `"10mm"`) |
| `font` | Google Font names, pipe-separated |
| `dynamic_params` | Key-value object for `{{placeholder}}` replacement |
| `wait_till` | Seconds to wait before rendering (for JS-heavy pages) |

## Example Usage
```bash
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

_meta.json

{
  "ownerId": "kn7e2tc4x8t7e64enbs2qz122x85144x",
  "slug": "generate-pdf",
  "version": "1.0.0",
  "publishedAt": 1776438286066
}

skill-card.md

## Description:

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

This skill is ready for commercial/non-commercial use.

## Publisher:

[rishabhdugar](https://clawhub.ai/user/rishabhdugar)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and teams use this skill to convert HTML templates or public web pages into PDFs for invoices, reports, certificates, receipts, and archival snapshots.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: HTML, CSS, dynamic parameters, public URLs, and generated PDFs may be processed by or stored with pdfapihub.com.

Mitigation: Use only data approved for that provider and avoid secrets, internal-only URLs, regulated personal data, contracts, invoices, or customer records unless the provider is approved for that data.

Risk: Generated PDFs may expose sensitive rendered content through returned URLs or downloadable files.

Mitigation: Treat generated PDF links and files as externally hosted outputs and apply appropriate access, sharing, and retention controls.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/rishabhdugar/skills/generate-pdf)
- [PDF API Hub documentation](https://pdfapihub.com/docs)
- [PDF API Hub](https://pdfapihub.com)

## Skill Output:

**Output Type(s):** [text, shell commands, configuration, files]

**Output Format:** [JSON API request guidance and PDF output as a URL, base64 string, or binary file]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Requires a pdfapihub.com API key; output retention and page limits are provider dependent.]

## Skill Version(s):

1.0.0 (source: server release evidence)

## Ethical Considerations:

Users 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.

example.json

{
  "request": {
    "method": "POST",
    "url": "https://pdfapihub.com/api/v1/generatePdf",
    "headers": {
      "CLIENT-API-KEY": "your_api_key",
      "Content-Type": "application/json"
    },
    "body": {
      "html_content": "<html><body><h1>Invoice #{{invoice_id}}</h1><p>Customer: {{customer}}</p><p>Total: {{total}}</p></body></html>",
      "css_content": "body { font-family: Arial, sans-serif; padding: 32px; } h1 { color: #333; }",
      "dynamic_params": {
        "invoice_id": "INV-2026-0042",
        "customer": "Acme Corp",
        "total": "$1,249.00"
      },
      "paper_size": "A4",
      "output_format": "url"
    }
  },
  "response": {
    "status": 200,
    "body": {
      "success": true,
      "pdf_url": "https://cdn.pdfapihub.com/pdf/0ac4a76f-1a4f-4f14-8c63-5190f501e112.pdf",
      "file_size_bytes": 84321,
      "file_deletion_date": "2026-05-17",
      "source_type": "html"
    }
  }
}

skill.json

{
  "name": "Generate PDF",
  "description": "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.",
  "method": "POST",
  "endpoint": "/v1/generatePdf",
  "base_url": "https://pdfapihub.com/api",
  "auth": {
    "type": "apiKey",
    "header": "CLIENT-API-KEY",
    "required": true
  },
  "parameters": {
    "body": {
      "content_type": "application/json",
      "fields": [
        { "name": "url", "type": "string", "required": false, "description": "URL of the webpage to convert to PDF" },
        { "name": "html_content", "type": "string", "required": false, "description": "HTML content to convert to PDF. Either url or html_content must be provided." },
        { "name": "css_content", "type": "string", "required": false, "description": "Optional CSS to apply to the HTML" },
        { "name": "output_format", "type": "string", "required": false, "default": "url", "enum": ["url", "base64", "pdf", "binary", "file"], "description": "Output format for the generated PDF" },
        { "name": "paper_size", "type": "string", "required": false, "default": "A4", "enum": ["A4", "A3", "A5", "Letter", "Legal", "Tabloid"], "description": "Paper size for the PDF" },
        { "name": "landscape", "type": "boolean", "required": false, "default": false, "description": "Set to true for landscape orientation" },
        { "name": "printBackground", "type": "boolean", "required": false, "default": true, "description": "Whether to print background graphics" },
        { "name": "displayHeaderFooter", "type": "boolean", "required": false, "default": false, "description": "Whether to display header and footer" },
        { "name": "preferCSSPageSize", "type": "boolean", "required": false, "default": true, "description": "Whether to prefer CSS-defined page size" },
        { "name": "margin", "type": "object", "required": false, "description": "Custom margins with top, right, bottom, left values (e.g. '10mm')" },
        { "name": "page_size", "type": "integer", "required": false, "description": "Maximum number of pages to generate (tier-dependent)" },
        { "name": "paperWidth", "type": "number", "required": false, "description": "Custom paper width in pixels" },
        { "name": "paperHeight", "type": "number", "required": false, "description": "Custom paper height in pixels" },
        { "name": "viewPortWidth", "type": "integer", "required": false, "default": 1080, "description": "Viewport width for rendering" },
        { "name": "viewPortHeight", "type": "integer", "required": false, "default": 720, "description": "Viewport height for rendering" },
        { "name": "font", "type": "string", "required": false, "description": "Google Font name(s), pipe-separated (e.g. 'Roboto|Open Sans')" },
        { "name": "wait_till", "type": "integer", "required": false, "default": 0, "description": "Time to wait in seconds before gene

Sponsored

Ads related to Generate PDF from HTML and adjacent AI workflows.