开发者

How to generate PDF from markdown using pure ruby

I'm currently using Kramdown to开发者_开发问答 generate HTML from Markdown in Ruby. I know that I can generate a latex file using kramdown and convert it to pdf usaing a command line utility. But I want a pure ruby solution.

Is there a way to convert markdown to pdf using only ruby without using command-line utilities?


You can use https://github.com/walle/gimli

I made it just for this purpose. Though, I use textile. But gimli supports all formats supported by GitHub-Markup.


Prawn: The Pure Ruby PDF Generation Library
http://www.rubyinside.com/prawn-ruby-pdf-library-987.html


The wkhtmltopdf gem is also available: http://rubygems.org/gems/wkhtmltopdf


Pandoc is a universal document converter which can convert documents in markdown, reStructuredText, textile, HTML, DocBook, or LaTeX to HTML, EPUB, Microsoft Word, TeX, PDF via LaTeX, Lightweight markup formats.

You can find it here. http://johnmacfarlane.net/pandoc/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜