pdf-generator

Generate PDF documents from HTML, Markdown, or plain text with Python.

84|15|Updated Dec 31, 2025
One-click install
npx skills add https://github.com/AIDotNet/MoYuCode --skill pdf-generator-aidotnet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf-generator
Source: https://github.com/AIDotNet/MoYuCode/tree/main/skills/tools/pdf-generator
Command: npx skills add https://github.com/AIDotNet/MoYuCode --skill pdf-generator-aidotnet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires markdown, weasyprint, reportlab, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the creation of PDF documents from various input formats like HTML, Markdown, and plain text, simplifying document generation workflows.

Core Features & Use Cases

  • Multi-format input: Accepts HTML, Markdown, and plain text files.
  • Customizable output: Supports various page sizes and allows for custom CSS styling.
  • Use Case: Quickly generate a professional-looking PDF report from a Markdown file or an HTML webpage.

Quick Start

Generate a PDF document from the markdown file named 'report.md' and save it as 'report.pdf'.

Frequently Asked Questions about pdf-generator

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

FAQPage Schema
How do I generate a PDF document from a Markdown file?

To generate a PDF document from Markdown, provide your Markdown file as input and execute the Python script to automatically convert and save the text content as a formatted PDF file. This simplifies document generation workflows by directly processing the Markdown syntax.

Can I convert HTML to PDF with custom CSS styling?

Yes, you can convert HTML to PDF with custom CSS styling. The generation process supports applying custom CSS rules and page configurations to the HTML content, ensuring the exported PDF document matches your required professional output format.

Does WeasyPrint work with Python scripts for PDF export?

WeasyPrint is used as a dependency to enable PDF export within the Python scripts. It works alongside ReportLab and Markdown libraries to process HTML or plain text inputs and apply customizable page sizes during document generation.

What is the best way to export plain text to a PDF file?

The best way to export plain text to a PDF file is using a Python script that applies customizable templates and page configurations. This approach automates the creation of professional-looking PDF documents directly from basic plain text inputs.

What are the limitations of generating PDFs from Markdown?

Generating PDFs from Markdown relies on Python dependencies like WeasyPrint and ReportLab, meaning processing occurs within a Python environment. Complex layouts might require custom CSS styling, as standard Markdown syntax supports only basic document formatting.