bhighley / pdfify

Generates Octocat-friendly PDFs from Markdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pdfify

Generates Octocat-friendly PDFs from Markdown.

Installation

brew cask install wkhtmltopdf  # see note below
brew tap swinton/brews
brew install pdfify

⚠️ Due to an existing 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.

About

Generates Octocat-friendly PDFs from Markdown

License:MIT License


Languages

Language:HTML 97.6%Language:Shell 2.0%Language:CSS 0.4%Language:Ruby 0.0%