Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robin850/mdown2pdf
Easily convert Markdown documents to PDF
https://github.com/robin850/mdown2pdf
Last synced: 29 days ago
JSON representation
Easily convert Markdown documents to PDF
- Host: GitHub
- URL: https://github.com/robin850/mdown2pdf
- Owner: robin850
- License: mit
- Created: 2017-06-12T21:38:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-11T12:59:40.000Z (almost 7 years ago)
- Last Synced: 2024-10-05T10:36:45.163Z (about 1 month ago)
- Language: CSS
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mdown2PDF - Convert Markdown documents to PDF
This tiny project is a wrapper around the following libraries to generate PDF from
Markdown files:* [Redcarpet](https://github.com/vmg/redcarpet) : to parse Markdown and produce HTML.
* [Rouge](https://github.com/jneen/rouge) : to support syntax highlighting.
* [wkhtmltopdf](https://wkhtmltopdf.org/) : to transform the HTML markup to a PDF file.> **Important note**: This project has been designed for my personal need; it's far
> from being perfect but feel free to fork it to fit to yours. ❤️## Installation
Add this line to your application's Gemfile:
~~~ruby
gem 'mdown2pdf'
~~~And then execute:
~~~
$ bundle
~~~Or install it yourself as:
~~~
$ gem install mdown2pdf
~~~## Usage
This gems provides a command line utility to easily convert your Markdown files
to PDF. For example:~~~
$ md2pdf resume.md
~~~Will produce a file called resume.pdf, properly styled with a table of contents.
You can specify the output file and even opt out from the default table of contents
generation with the following options:~~~
$ md2pdf resume.md -o my_resume.pdf --skip-toc
~~~## Contributing
Bug reports and pull requests are welcome on GitHub. If you are willing to send
a patch:1. Fork this project.
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).