服务器端HTML到PDF [英] Server Side HTML to PDF

查看:122
本文介绍了服务器端HTML到PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一个C#库,这将让我打印我的HTML页面的PDF文件之一。我似乎无法找出如果当前不存在,可以让你做到这一点。我已经发现了几个,可以让你建立一个页面,但如果将生成PDF只是基于HTML过的都没有注意到

I'm trying to find a C# library that will allow me to "Print" one of my HTML pages to a PDF file. I can't seem to find out if one currently exists that will allow you to do this. I've found several that will let you build a page, but haven't noticed if one would generate the pdf only based off of HTML.

编辑:我在工作中不允许这样的预算,因此将需要一个开源/免费产品。如果不是我知道iTextSharp的和将要编程生成PDF(这是我希望避免:))

I'm not allowed a budget on this at work so it will need to be an open source/free product. If not I'm aware of iTextSharp and will have to generate the pdf programmatically (which is what I'm hoping to avoid :) )

推荐答案

iTextSharp的带有一个小伙伴: XML工人

iTextSharp comes with a little companion : XML Worker

有关演示,这里看看

For a demo, have a look here

虽然文档指在Java API,适应到C#应该是简单的。

Even though the documentation refers to the Java API, the adaptation to C# should be straightforward.

这篇关于服务器端HTML到PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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