如何使用纯红宝石从Markdown生成PDF [英] How to generate PDF from markdown using pure ruby

查看:76
本文介绍了如何使用纯红宝石从Markdown生成PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用Kramdown从Ruby中的Markdown生成HTML. 我知道我可以使用kramdown生成乳胶文件,并使用命令行实用程序将其转换为pdf.但是我想要一个纯红宝石解决方案.

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.

有没有一种方法可以仅使用ruby而不使用命令行实用程序将markdown转换为pdf?

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

推荐答案

您可以使用 https://github.com/walle/gimli

我只是为了这个目的而做的.虽然,我用纺织品.但是gimli支持GitHub-Markup支持的所有格式.

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

这篇关于如何使用纯红宝石从Markdown生成PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆