← 返回 Skills 市场
rishabhdugar

Generate PDF from HTML

作者 Rishabh Dugar · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
75
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install generate-pdf
功能描述
Generate a PDF document from HTML content or a public URL. Supports custom page sizes, fonts, margins, viewport dimensions, dynamic parameter substitution, a...
使用说明 (SKILL.md)

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

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

curl -X POST https://pdfapihub.com/api/v1/generatePdf \
  -H "CLIENT-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "html_content": "\x3Chtml>\x3Cbody>\x3Ch1>Invoice #{{invoice_id}}\x3C/h1>\x3Cp>Total: {{total}}\x3C/p>\x3C/body>\x3C/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
安全使用建议
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.
功能分析
Type: OpenClaw Skill Name: generate-pdf Version: 1.0.0 The 'generate-pdf' skill is a standard integration for the PDFApiHub service (pdfapihub.com), allowing users to convert HTML or URLs into PDF documents. The code and documentation in SKILL.md and skill.json accurately reflect this purpose without any signs of malicious intent, data exfiltration, or prompt injection. It uses a standard API key authentication mechanism and provides clear, legitimate parameters for document customization.
能力标签
requires-sensitive-credentials
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install generate-pdf
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /generate-pdf 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of generate-pdf skill: - Generate PDF documents from either raw HTML content or public URLs. - Supports custom page sizes, fonts, margins, and viewport options. - Offers multiple output formats: downloadable URL, base64, or raw PDF. - Allows dynamic parameter substitution for template rendering. - Includes features for invoicing, reporting, certification, and more.
元数据
Slug generate-pdf
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Generate PDF from HTML 是什么?

Generate a PDF document from HTML content or a public URL. Supports custom page sizes, fonts, margins, viewport dimensions, dynamic parameter substitution, a... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 75 次。

如何安装 Generate PDF from HTML?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install generate-pdf」即可一键安装,无需额外配置。

Generate PDF from HTML 是免费的吗?

是的,Generate PDF from HTML 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Generate PDF from HTML 支持哪些平台?

Generate PDF from HTML 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Generate PDF from HTML?

由 Rishabh Dugar(@rishabhdugar)开发并维护,当前版本 v1.0.0。

💬 留言讨论