pdf-official
Skill by sabahattink
Guides an AI assistant through generating PDF documents in Node.js with PDFKit or Puppeteer. It is for building reports, invoices, certificates, and other printable documents from data or HTML templates.
Install pdf-official
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sabahattink/antigravity-fullstack-hq /tmp/antigravity-fullstack-hq && mkdir -p ~/.claude/skills && cp -r /tmp/antigravity-fullstack-hq/skills/pdf-official ~/.claude/skills/pdf-officialRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sabahattink/antigravity-fullstack-hq /tmp/antigravity-fullstack-hq && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/antigravity-fullstack-hq/skills/pdf-official ~/.gemini/antigravity-cli/skills/pdf-officialAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
PDF Generation is a skill that guides an AI assistant through creating PDF files in Node.js. It covers two approaches. PDFKit builds documents programmatically and suits invoices and receipts with precise control. Puppeteer converts HTML and CSS into PDF and suits complex layouts, charts, and styled reports. The skill includes sample code for an invoice generator, an HTML-to-PDF helper, and a NestJS service and controller that return PDFs as downloads.
The guide also covers running Puppeteer in Docker with Chromium on Alpine. It lists forbidden patterns, such as launching a browser per request, passing unsanitized user input into HTML templates, and loading external resources on the server. It is aimed at developers who need to produce printable documents from data or HTML templates.
Written from the project's SKILL.md and checked against it.
What it can do
- Invoice PDF with PDFKitBuilds an A4 invoice with a header, bill-to block, item table, and total.
- HTML to PDF with PuppeteerRenders an HTML string to a PDF buffer with format, orientation, and margin options.
- Report HTML templateBuilds a styled HTML report with a title, table columns, rows, and a total.
- NestJS PDF download endpointShows a guarded controller route that returns an invoice PDF as an attachment.
- Streamed PDF responseShows how to pipe a PDFKit document directly into an HTTP response.
- Puppeteer Docker setupProvides an Alpine Dockerfile that installs Chromium and sets Puppeteer environment variables.
What you need
- Node.js
- npm packages pdfkit or puppeteer
- Docker, for the container setup example
- Chromium, for the Docker setup example
Try asking
- Create a PDF invoice from this order data using PDFKit
- Turn this HTML report template into an A4 PDF with Puppeteer
- Add a NestJS endpoint that streams a PDF report as a download
Good to know
- The source advises against launching Puppeteer per request in high-traffic scenarios.
- Unsanitized user input must not be passed into HTML templates.
- External resources should not be loaded in Puppeteer on a server.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/pdf-official/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to pdf-official
All alternatives →Creates importable JSON templates for the Obsidian Web Clipper. It is for users who want to clip a site, understand the available variables, or format clipped content.
Harness Creator builds, audits, and improves the instruction and state files that help AI coding agents stay reliable across sessions. It is for developers whose agents forget context, drift out of scope, or claim work is done too early.
Guides an assistant through extracting text from scanned PDFs, photographed pages, and images with OCR. Covers backends, language packs, force-OCR, and performance tuning.
Edits a named local file in place to remove AI-writing patterns, using minimal targeted changes and post-edit verification. Built for users who explicitly ask to clean, rewrite, or humanize that specific file.
Polishes, translates, or tightens existing academic manuscript prose while preserving facts, terminology, and evidence boundaries. Made for researchers revising drafts, including Chinese-to-English translation and LaTeX layout fixes.
Adds PDF form analysis and filling, table extraction, OCR, validation and batch processing to an AI assistant. Aimed at developers who run complex or high-volume PDF workflows.
Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr
pdf-official: common questions
Which library should I use for PDFs in Node.js?
The source suggests PDFKit for programmatic documents like invoices and receipts. It suggests Puppeteer for HTML to PDF with complex layouts or charts.
Can Puppeteer PDF generation run in Docker?
The source includes an Alpine Dockerfile that installs chromium and sets PUPPETEER_SKIP_CHROMIUM_DOWNLOAD and PUPPETEER_EXECUTABLE_PATH.
Does the guide cover security for PDF templates?
It lists forbidden patterns, including not passing unsanitized user input into HTML templates and not loading external resources in Puppeteer on a server.
How do I install pdf-official?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is pdf-official free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is pdf-official safe to use?
It scores 48 of 100. Grades: maintenance B, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to pdf-official?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
