md-pdf-0.1.2 is not a library.

md-pdf
A fast, lightweight command-line tool that converts Markdown files to professional PDF documents using Typst.
Features
- 🚀 Fast conversion powered by Typst
- 🎨 Professional output with built-in templates
- ⚙️ Zero configuration - works out of the box
- 👀 Watch mode for live preview
- 📂 Auto-open generated PDFs
- 🔗 Link validation checks external URLs
- 📝 Rich metadata support via YAML front matter
Installation
Prerequisites
Typst
Install Typst CLI:
# macOS
# Or download from GitHub releases
# https://github.com/typst/typst/releases
Fonts
The default template simple uses some fonts which are optional.
Install Iosevka
Install md-pdf
# From source
# Or build locally
&&
# from crates.io
Quick Start
# Convert markdown to PDF
# Convert and open PDF automatically
# Watch for changes (live preview)
# Watch for changes and open PDF after each rebuild
# Check links before conversion
# Use specific template
Usage
Convert markdown files to PDF using typst with templating
Usage: md-pdf [OPTIONS] [INPUT]
Arguments:
[INPUT] Path to the input Markdown file
Options:
-o, --output <OUTPUT> Path to the output PDF file
-t, --template <TEMPLATE> Template to use for PDF generation [default: none]
-w, --watch Watch the input file for changes and rebuild automatically
--check-links Check all links in the markdown file and display warnings for unreachable links
--list-templates List all available templates
--create-config Create default configuration file
--show-config Show configuration file locations and settings
--open Open the generated PDF file after creation
--refresh-templates Refresh templates in the config directory with the latest embedded versions
-h, --help Print help
-V, --version Print version
Templates
none- Minimal styling (default)
simple- Professional with headers/footers
playful- colorful inspired by Dieter Rams
brutalist- Raw, bold, stark design with high contrast
darko- May the dark side be with you
- You can add you own templates
Front Matter
Add metadata to your markdown, all elements are optional:
---
title: "My Document"
subtitle: "Subtitle"
logo: "path/to/logo.png"
author: "Your Name"
date: "2026-01-23"
version: "0.0.1"
language: "en"
toc: true
tags:
participants:
template: "simple"
---
# Content starts here
Configuration
Auto-created at ~/.config/md-pdf/config.ron on first run. Customize defaults:
Examples
See examples/comprehensive-guide.md for full documentation and feature demonstrations.
md-pdf example/comprehensive-guide.md
Rustdoc AI generated