md-to-pdf

Convert a Markdown file to a styled PDF using pandoc and weasyprint.

8|1|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/JoeCP17/LLM-Dot-files --skill md-to-pdf-joecp17
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: md-to-pdf
Source: https://github.com/JoeCP17/LLM-Dot-files/tree/main/codex/skills/md-to-pdf
Command: npx skills add https://github.com/JoeCP17/LLM-Dot-files --skill md-to-pdf-joecp17

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandoc, weasyprint, python3, and includes scripts (resource) components.

What problem does it solve?

Exporting Markdown into a shareable, print-ready document is often tedious because it requires a manual conversion pipeline or fragile styling steps.

Core Features & Use Cases

  • Markdown to PDF conversion: Turns a single .md file into a styled PDF using pandoc and weasyprint.
  • Better readability & styling: Produces document-like layout with embedded CSS and sensible typography for headings, code blocks, tables, and links.
  • Markdown/Obsidian image handling: Resolves standard Markdown image paths and Obsidian wikilink-style embeds (e.g., ![[image.png]]) relative to the source note.
  • Safe local export: Keeps the workflow single-file and local, saving output to ~/Downloads without uploading content.

Quick Start

Ask to convert the file /path/to/note.md to a PDF and save it into your Downloads folder.

Frequently Asked Questions about md-to-pdf

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

FAQPage Schema
How do I convert Markdown notes to PDF for sharing and printing?

Converting Markdown to PDF is done locally using pandoc and weasyprint, which transforms a single .md file into a styled, print-ready document. The output is saved directly to your Downloads folder with overwrite protection.

Can I export Obsidian pages with wikilink images to PDF?

Obsidian image handling supports standard Markdown paths and wikilink-style embeds like ![[image.png]]. The conversion process resolves these relative to the source note, ensuring images appear correctly in the final PDF.

Do I need pandoc and weasyprint installed to use this Markdown conversion?

Pandoc, weasyprint, and python3 are required dependencies for this Markdown to PDF conversion. These tools handle the document parsing and CSS styling needed to produce the final PDF layout.

What is the best way to ensure my README exports safely to a local PDF?

For safe local README export, this process operates entirely offline without uploading content. It validates exactly one input path and writes the styled PDF result to ~/Downloads, preventing accidental overwrites.

Does this Markdown to PDF conversion handle code blocks and tables?

The conversion applies embedded CSS and sensible typography for headings, code blocks, tables, and links. This ensures the generated PDF maintains a clean, document-like layout suitable for archiving.

What happens if I try to convert multiple Markdown files at once?

The conversion validates exactly one input path, meaning it is designed for single-file processing. Attempting to batch convert multiple Markdown files simultaneously is not supported by the current workflow.