A simple CLI tool to convert Markdown files to professionally styled PDFs with Mustry branding.
- Converts any
.mdfile to PDF - Mustry Solutions header and footer branding
- Custom Visby font
- GitHub-flavored markdown styling
- Smart page breaks (avoids breaking code blocks, tables, images)
- Works from any directory
# 1. The tool is already installed at ~/.config/mdpdf/
# 2. Install dependencies (one-time)
cd ~/.config/mdpdf && npm install
# 3. Add alias to your shell (~/.zshrc or ~/.bashrc)
echo 'alias pdf="node ~/.config/mdpdf/pdf.js"' >> ~/.zshrc
source ~/.zshrc# 1. Install dependencies (one-time)
cd $env:USERPROFILE\.config\mdpdf
npm install
# 2. Add function to PowerShell profile
Add-Content $PROFILE 'function pdf { node $env:USERPROFILE\.config\mdpdf\pdf.js $args }'
# 3. Reload profile
. $PROFILE# Convert a markdown file (creates PDF in same folder)
pdf myfile.md
# Convert with full path
pdf ~/projects/docs/specification.md
# Windows
pdf C:\docs\specification.mdThe PDF will be created in the same directory as the input file, with the same name but .pdf extension.
myfile.md → myfile.pdf
Edit pdf-config.js to customize:
- CSS styling - Fonts, colors, spacing
- Page format - A4, Letter, margins
- Header/Footer - Branding, contact info
| File | Description |
|---|---|
pdf.js |
CLI script |
pdf-config.js |
PDF styling and options |
OriginalDark.jpg |
Mustry logo for header |
visby.woff2 |
Custom Visby font |
- Node.js v14 or higher
- npm