开源HTML到带有完整CSS支持的PDF渲染器 [英] Open Source HTML to PDF Renderer with Full CSS Support

查看:338
本文介绍了开源HTML到带有完整CSS支持的PDF渲染器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我问过关于让iTextSharp从HTML和CSS表格中提取PDF,这里,但似乎这可能不可能...所以我想我将不得不尝试别的东西。

I asked about getting iTextSharp to render a PDF from HTML and a CSS sheet before here but it seems like that may not be possible... So I guess I will have to try something else.

有开放源.NET / C#库,可以采用HTML CSS作为输入并正确呈现?

Is there an open source .NET/C# library out there that can take HTML and CSS as input and render it correctly?

我必须重申...图书馆必须是免费的,最好是有一个相当宽松的许可证。我在这里基本上没有预算。

I must reiterate... the library MUST be free and preferably something with a fairly liberal license. I'm working with basically no budget here.

推荐答案

我一直在命令行使用它, ,但 HTMLDOC 会给出优异的结果,它至少会处理一些

I've always used it on the command line and not as a library, but HTMLDOC gives me excellent results, and it handles at least some CSS (I couldn't easily see how much).

以下是一个示例命令行:

Here's a sample command line

htmldoc --webpage -t pdf --size letter --fontsize 10pt index.html > index.pdf

这篇关于开源HTML到带有完整CSS支持的PDF渲染器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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