ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified productivity Safety 4/5

Pdf Generation

Skill by bartok9

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/bartok9/pdf-generation
Or

What This Skill Does

The Pdf Generation skill, developed by bartok9, provides a systematic framework for creating professional-grade PDFs from HTML/CSS inputs within the OpenClaw environment. It solves the common 'orphan whitespace' problem encountered when standard layout engines force page breaks within large, non-divisible blocks. By shifting from fixed-height page containers to a flow-based layout model and leveraging precise CSS break controls, this skill ensures documents maintain structural integrity, professional typography, and optimal page utilization.

Installation

To integrate this functionality into your OpenClaw environment, execute the following command in your terminal: clawhub install openclaw/skills/skills/bartok9/pdf-generation Ensure you have the necessary rendering engines installed on your host system. For optimal results, WeasyPrint is recommended due to its superior CSS support. You can install it via pip install weasyprint or your system package manager.

Use Cases

This skill is ideal for generating clean, automated business documentation. Typical use cases include:

  • Converting internal reports and data summaries into polished A4 documents.
  • Generating invoices where table rows must not be split across page boundaries.
  • Creating technical manuals where headers must remain attached to their descriptive content.
  • Producing curriculum or timeline-based materials that require distinct visual 'cards' to remain intact.

Example Prompts

  1. "Generate a PDF report from the monthly_stats.html file using the PDF Generation skill; ensure the table rows don't break across pages."
  2. "I need to export the latest project documentation to PDF. Use the provided CSS template to make sure my step-by-step instructions stay together and headers don't dangle at the bottom of pages."
  3. "Convert my data summary dashboard into a print-ready PDF using WeasyPrint, applying the recommended break-inside avoidance for my summary cards."

Tips & Limitations

  • Avoid Fixed Containers: Never use fixed-height divs (e.g., min-height: 297mm) as they interfere with the natural flow of PDF rendering.
  • Selectivity is Key: Use break-inside: avoid sparingly. Applying it to large containers will actually create more whitespace issues; reserve it for small, cohesive blocks like table rows, cards, or specific highlight boxes.
  • Print Media Queries: Always wrap print-specific color adjustments in @media print to ensure exact color rendering.
  • CSS Hierarchy: Remember that legacy properties like page-break-inside are still required for cross-tool compatibility alongside modern break-inside properties.

Metadata

Author@bartok9
Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-bartok9-pdf-generation": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#pdf-generation#html-to-pdf#web-automation#css#printing
Safety Score: 4/5

Flags: file-write, file-read, code-execution