https://github.com/tcd/md2pdf
📜 Generate PDFs from Markdown files
https://github.com/tcd/md2pdf
ghfm golang markdown md2pdf pdf
Last synced: 16 days ago
JSON representation
📜 Generate PDFs from Markdown files
- Host: GitHub
- URL: https://github.com/tcd/md2pdf
- Owner: tcd
- License: mit
- Created: 2019-08-02T18:18:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T22:55:11.000Z (about 2 years ago)
- Last Synced: 2025-04-19T10:27:39.452Z (about 1 month ago)
- Topics: ghfm, golang, markdown, md2pdf, pdf
- Language: Go
- Homepage:
- Size: 51.6 MB
- Stars: 7
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# md2pdf
[](https://travis-ci.org/tcd/md2pdf)
[](https://coveralls.io/github/tcd/md2pdf)
[](https://github.com/tcd/md2pdf/issues)
[](https://app.fossa.io/projects/git%2Bgithub.com%2Ftcd%2Fmd2pdf?ref=badge_shield)
[](https://github.com/tcd/md2pdf/blob/master/LICENSE)
## About
Parse markdown files and output PDFs that resemble GitHub's markdown rendering.
### What's Supported?
- Paragraphs
- Blockquotes
- Codeblocks
- Syntax highlighting provided by [Chroma](https://github.com/alecthomas/chroma)
- All kinds of emphasis:
- **Bold**
- *Italic*
- `Code`
- ~~Strike~~
- [Links](https://github.com/tcd/md2pdf)
- Images
- jpeg, png, and gif\*
- Only the first frame of a gif is drawn to the pdf :pensive:
- Headers
- Horizontal Rules
- Links
- Links on images
- External Links
- Tables### What Isn't Supported?
- [No Emoji 😔](https://github.com/jung-kurt/gofpdf/issues/255)
- No SVG
- No Inline HTML## Installation
### Homebrew
```sh
brew tap tcd/taps
brew install tcd/taps/md2pdf
```### Building from Source
```bash
go get -u github.com/tcd/md2pdf
cd $GOPATH/github.com/tcd/md2pdf
make install # GO111MODULE=on go install
```## Usage
```sh
# will generate markdown-file.pdf in your current directory.
md2pdf path/to/markdown-file.md
```## Related Projects
- [mandolyte/mdtopdf](https://github.com/mandolyte/mdtopdf) - Markdown to PDF
- [ajstarks/deck](https://github.com/ajstarks/deck) - Slide Decks
- [johnfercher/maroto](https://github.com/johnfercher/maroto) - A maroto way to create PDFs.## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2Ftcd%2Fmd2pdf?ref=badge_large)