pdfify
Generates Octocat-friendly PDFs from Markdown.
Installation
brew cask install wkhtmltopdf # see note below
brew tap swinton/brews
brew install pdfify
wkhtmltopdf
bug, until this gets fixed, you may want to manually install an earlier version of wkhtmltopdf
.
Usage
pdfify /path/to/some/markdown/file.md
This will generate a PDF, /path/to/some/markdown/file.pdf
.
Advanced usage
Page breaks
To insert a page break, include a {.page-break}
header attribute.
For example, the following will cause a page break to be inserted before the Lorem ipsum header:
# Lorem ipsum {.page-break}
Lorem ipsum dolor sit amet...
Customized styles
To customize the default stylesheet, create a ~/.pdfify/style.css
based off the included lib/style.css
.
Customized header / footer
To customize the default header or footer, create a ~/.pdfify/header.html
/ ~/.pdfify/footer.html
based off the included equivalents.