-
-
Save mingsai/03b37ac8e9abcf71e8d5ff42636d150a to your computer and use it in GitHub Desktop.
Convert Markdown to PDF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install markdown htmldoc | |
$ markdown <file.md> | htmldoc --cont --headfootsize 8.0 --linkcolor blue --linkstyle plain --format pdf14 - > <file.pdf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (( $# != 2 )) | |
then | |
echo "Usage: md2pdf <input.md> <output.pdf>" | |
exit 1 | |
fi | |
markdown $1 | htmldoc --cont --headfootsize 8.0 --linkcolor blue --linkstyle plain --format pdf14 - > $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment