pdf-toolkit

Extract, generate, redact, sign, and OCR PDF documents with task-appropriate tools.

Updated May 29, 2026
One-click install
npx skills add https://github.com/RatnaAtika/Indonesian-ASR-11-Class-Dataset --skill pdf-toolkit-ratnaatika
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf-toolkit
Source: https://github.com/RatnaAtika/Indonesian-ASR-11-Class-Dataset/tree/main/.agents/skills/pdf-toolkit
Command: npx skills add https://github.com/RatnaAtika/Indonesian-ASR-11-Class-Dataset --skill pdf-toolkit-ratnaatika

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with PDFs fails when one library is forced to do everything: text extraction breaks on scanned files, redaction leaves hidden text behind, and HTML-to-PDF output looks wrong. This Skill routes each PDF task to the right tool for the file type and project stack. ## Core Features & Use Cases - Extraction & OCR: Pull text and tables with pdfplumber, pdfminer, or pymupdf4llm, and fall back to ocrmypdf/tesseract for scanned documents. - Generation: Build PDFs from HTML (weasyprint, prince), Markdown/typst, or programmatically with reportlab and react-pdf. - Redaction, Signing & Forms: Remove content streams safely with pikepdf, apply PAdES signatures via pyhanko, and fill AcroForm templates. - Use Case: A vendor invoice arrives as a scanned PDF. Triage it with qpdf, OCR it with ocrmypdf, extract the line items with pdfplumber, and redact sensitive fields before sharing — verifying with pdftotext that no redacted text remains. ## Quick Start Use the pdf-toolkit skill to extract all text and tables from the attached invoice PDF and redact the bank account number before saving a shareable copy.

Frequently Asked Questions about pdf-toolkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract text and tables from a PDF in Python?

Use pdfplumber to extract text and tables page by page; it detects cell boundaries and returns structured rows. For quick checks, run pdftotext -layout, and for RAG-friendly markdown output use pymupdf4llm or marker.

What tool should I use to convert HTML to PDF?

Use weasyprint for open-source server-side HTML to PDF conversion, or prince for the best commercial CSS fidelity. For Chromium-based rendering use gotenberg as a service, and typst for fast Markdown-to-PDF reports.

How do I redact a PDF so the text is really gone?

Redact by removing the underlying content stream with pikepdf plus image masking, not by drawing a black rectangle over text. Re-save with qpdf --linearize and verify with pdftotext that the sensitive strings no longer appear.

Can I extract text from a scanned PDF?

Scanned PDFs have no text layer, so run OCR first with ocrmypdf using tesseract, which also handles rotation and deskewing. For high-value financial fields, cross-check OCR output with regex or services like Azure Document Intelligence.

How do I digitally sign a PDF with PAdES?

Sign PDFs with pyhanko using a hardware token or HSM-backed key for PAdES compliance. Add a visible signature appearance only after the cryptographic signature verifies, and never embed a private key in the document.

Which PDF tools work in Node.js or serverless environments?

For Node-only projects use pdfjs-dist, pdf-lib, and puppeteer for HTML-to-PDF. For serverless, prefer stateless tools like weasyprint or a gotenberg sidecar so cold starts avoid loading large binaries.