Generates Octocat-friendly PDFs from Markdown.
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
.
pdfify /path/to/some/markdown/file.md
This will generate a PDF, /path/to/some/markdown/file.pdf
.
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...
To customize the default stylesheet, create a ~/.pdfify/style.css
based off the included lib/style.css
.
To customize the default header or footer, create a ~/.pdfify/header.html
/ ~/.pdfify/footer.html
based off the included equivalents.