从HTML生成PDF [英] Generate PDF's from HTML
问题描述
在ASP.NET项目中,我需要生成一个PDF文件供用户下载,该文件由HTML制成. HTML中也包含img,需要嵌入.如果链接是可单击的,那也很好.
现在,我已经尝试了各种不同的产品演示,但是它们要么都不起作用,要么是经典的ASP,要么非常昂贵.
这是用于商业应用.
最有前途的(尽管很昂贵)看起来像 http://www.websupergoo.com/abcpdf-1.htm [ ^ ],但示例代码从HTML到PDF(找到此处: http://www.websupergoo.com/helppdf8net/source/5-abcpdf6/doc/1-methods/addimagetochain.htm [
In an ASP.NET project I need to generate a PDF for the user to download which is made from HTML. That HTML has img''s in it too, which need to be embedded. It would also be great if links are clickable.
Now i''ve tried a whole range of different product demo''s, and they all either don''t work, are classic ASP, or are horridly expensive.
This is for a commercial application.
The most promising (although expensive) looked like http://www.websupergoo.com/abcpdf-1.htm[^] but the example code from HTML to PDF (found here: http://www.websupergoo.com/helppdf8net/source/5-abcpdf6/doc/1-methods/addimagetochain.htm[^])crashes IIS, on every page I try, with a very generic error message.
Please can someone suggest a product for this. I can''t run an CMD line app on the server unfortunately, so it does have to be just a dll that I stick in.
Thanks!
推荐答案
我以前使用过ABCPdf,并且没有任何问题.现在,我倾向于使用 iTextSharp [ ^ ]会花费更多的工作(因为文档不是很好),但是效果很好.
I''ve used ABCPdf before and not had any problems. Now I tend to use iTextSharp[^] which takes a bit more work (because the documentation is not that good) but works well.
这篇关于从HTML生成PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!