PDFGate HTML to PDF
БесплатноЗапускает вложенные скриптыНе проверенHTML to PDF conversion with the PDFGate PDF API. Generate PDF invoices, reports, receipts and fillable PDF forms from HTML or a web page URL using a…
от pdfgate252 установки в других каталогахОб этом скилле
PDFGate HTML to PDF
Convert an HTML document or a publicly accessible web page URL into a PDF with the PDFGate HTML to PDF API. The skill ships a standalone Node.js script with no third-party dependencies.
When to use
Use this skill when the user wants to:
- Generate a PDF from HTML: an invoice, a report, a receipt, a letter, a certificate.
- Convert a public web page URL to PDF.
- Control the PDF layout: A4 or Letter page size, portrait or landscape, margins, scale, print or screen CSS, header and footer templates, page ranges.
- Create a fillable PDF form from HTML inputs (text, number, date, textarea, select, checkbox, radio).
This skill does not send documents for electronic signature, fill or flatten existing PDF forms, or edit PDFs that already exist. Those are other PDFGate endpoints.
Requirements and privacy
- A PDFGate account and API key from dashboard.pdfgate.com. Keys that start with
test_use the sandbox atapi-sandbox.pdfgate.com; keys that start withlive_use production atapi.pdfgate.com. The script picks the host from the key prefix. - The
PDFGATE_API_KEYenvironment variable must be visible to the process that runs the script. In OpenClaw, set it through the skill'sapiKeyorenventry inopenclaw.jsonor in the host environment. In sandboxed agent mode, host secrets are not injected into the sandbox, so set the variable inside the sandbox as well. - Node.js 18 or later. No
npm install. - The HTML or the URL is sent to PDFGate's servers for rendering. Before submitting sensitive, confidential or third-party content, make sure the user authorizes that upload. Do not describe the PDF as generated locally.
- For URL conversion, render only pages the user intends to submit. The script refuses localhost, internal hostnames and raw IP addresses. Do not attempt to bypass access controls.
- Never print, log, embed in files, or ask the user to paste the API key in chat. The script never prints it.
- Requests count against the account's plan. Sandbox renders are free and watermarked; use a
test_key to experiment.
Workflow
- Confirm the source (HTML in chat, a local HTML file, or a public URL) and the output filename. If the user provides HTML in chat, save it as a UTF-8
.htmlfile first. - Pick an output path in the agent workspace or a location the user names. The script refuses to overwrite an existing file unless
--overwriteis passed; ask before using it. - Run
{baseDir}/scripts/generate-pdf.mjswith separate shell arguments. Never interpolate HTML, user-supplied URLs or paths into a shell command string; if a shell is unavoidable, quote every argument. - On success the script prints one JSON line with
success,path,bytesandenvironment. Report the saved path and hand the file to the user where the host supports it. - On failure the script exits with code 1 and prints
PDFGate skill error: ...on stderr. Relay that message, never claim the PDF was generated, and do not retry blindly on HTTP 401 or 429.
Examples
Generate from a local HTML file:
node {baseDir}/scripts/generate-pdf.mjs \
--html-file ./invoice.html \
--output ./invoice.pdf \
--page-size a4 \
--margin 15mm
Convert a public URL using the page's screen CSS, landscape Letter:
node {baseDir}/scripts/generate-pdf.mjs \
--url https://example.com/report \
--output ./report.pdf \
--page-size letter \
--orientation landscape \
--media screen
Make a PDF with fillable form fields (see {baseDir}/examples/form.html):
node {baseDir}/scripts/generate-pdf.mjs \
--html-file {baseDir}/examples/form.html \
--output ./form.pdf \
--fillable
Wait for dynamic content before rendering a JavaScript-heavy page:
node {baseDir}/scripts/generate-pdf.mjs \
--url https://example.com/dashboard \
--output ./dashboard.pdf \
--wait-for-selector '#report-ready' \
--wait-for-network-idle \
--timeout-seconds 300
Add a header and footer (templates are HTML files; --margin makes room for them):
node {baseDir}/scripts/generate-pdf.mjs \
--html-file ./report.html \
--output ./report.pdf \
--margin 20mm \
--header-file ./header.html \
--footer-file ./footer.html
List every option:
node {baseDir}/scripts/generate-pdf.mjs --help
Option reference
| Option | Meaning |
|---|---|
--html-file PATH |
HTML file to convert. - reads standard input. Max 10 MiB. |
--url URL |
Public http(s) page to convert. Mutually exclusive with --html-file. |
--output PATH |
Destination .pdf path. Parent folders are created. |
--page-size |
a0..a6, letter, legal, tabloid, ledger. Default a4 (the API's own default is ledger). |
--orientation |
portrait (default) or landscape. |
--margin |
One CSS length for all four sides, e.g. 12mm, 0.5in, 20px. |
| `--sca |
Установить PDFGate HTML to PDF в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл PDFGate HTML to PDF?
HTML to PDF conversion with the PDFGate PDF API. Generate PDF invoices, reports, receipts and fillable PDF forms from HTML or a web page URL using a dependency-free Node.js script with page size, margin and orientation options.
Как установить скилл PDFGate HTML to PDF?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл PDFGate HTML to PDF запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic