Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdpdf - Markdown to PDF Converter

A simple CLI tool to convert Markdown files to professionally styled PDFs with Mustry branding.

Features

  • Converts any .md file 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

Installation

macOS / Linux

# 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

Windows (PowerShell)

# 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

Usage

# 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.md

Output

The PDF will be created in the same directory as the input file, with the same name but .pdf extension.

myfile.md  →  myfile.pdf

Customization

Edit pdf-config.js to customize:

  • CSS styling - Fonts, colors, spacing
  • Page format - A4, Letter, margins
  • Header/Footer - Branding, contact info

Files

File Description
pdf.js CLI script
pdf-config.js PDF styling and options
OriginalDark.jpg Mustry logo for header
visby.woff2 Custom Visby font

Requirements

  • Node.js v14 or higher
  • npm

About

Markdown to PDF converter with Mustry branding

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages