# Mdpdf a 2k line C CLI to convert Markdown to tiny PDFs

I have always searched for a simple tool which can convert a MD document to a well styled small PDF, just like a GitHub Readme. This was inspired by TinyPDF https://news.ycombinator.com/item?id=46316968 I also used this project to get familiar with agentic coding, which I had dreaded before. mdpdf…

- **Page:** https://magpie.gallery/i/mdpdf-a-2k-line-c-cli-to-convert-markdown-to-tiny-wasf
- **Type:** Link to an idea elsewhere
- **Category:** Utilities
- **Runs on:** windows, macos, linux
- **Tags:** markdown, pdf, cli, converter, c

## Source

Web · bastscho: Mdpdf a 2k line C CLI to convert Markdown to tiny PDFs

- **Original:** https://news.ycombinator.com/item?id=47705802

> I have always searched for a simple tool which can convert a MD document to a well styled small PDF, just like a GitHub Readme. This was inspired by TinyPDF https://news.ycombinator.com/item?id=46316968 I also used this project to get familiar with agentic coding, which I had dreaded before. mdpdf supports: - using the included PDF fonts to generate tiny valid PDFs - outputs as A4 or Letter depending on your locale - plenty of common MD syntax: code blocks, inline code, lists, tables, and jpg and png images That's it. It covers probably most of the use cases and can help to simply convert a Markdown write-up to a PDF to share. GitHub: https://github.com/schicho/mdpdf A simple make call should build it for you. https://github.com/schicho/mdpdf

## GitHub projects

- https://github.com/schicho/mdpdf

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
