从生成原始HTML / CSS内容从ASP.NET PDF? [英] Generate PDF from ASP.NET from raw HTML/CSS content?

查看:127
本文介绍了从生成原始HTML / CSS内容从ASP.NET PDF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要送有附加为PDF格式发票的电子邮件。我已经 - 其他应用程序 - 在.aspx页面创建发票。我想使用使用Server.Execute返回输出HTML和生成一个PDF。否则,我不得不使用报告工具画在PDF发票。这打击了许多原因,而不是其中最重要的是,我不得不同时更新.aspx页和每一个微小变化的报告。怎么办...

I'm sending emails that have invoices attached as PDFs. I'm already - elsewhere in the application - creating the invoices in an .aspx page. I'd like to use Server.Execute to return the output HTML and generate a PDF from that. Otherwise, I'd have to use a reporting tool to "draw" the invoice on a PDF. That blows for lots of reasons, not the least of which is that I'd have to update both the .aspx page and the report for every minor change. What to do...

推荐答案

有没有办法生成.NET内直接HTML字符串一个PDF,但也有做工精良第三方控件的数量。

There is no way to generate a PDF from an HTML string directly within .NET, but there are number of third party controls that work well.

我已经成功
而这个: http://www.htmltopdfasp.net

要问的重要问题是:


  1. 是否正确渲染相比,3个主要的浏览器:IE,FF和Safari /铬

  2. 是否处理CSS罚款?

  3. 是否控制有它自己的渲染引擎?如果是这样,反弹它。你不想信任一个土生土长的渲染引擎 - 浏览器有够硬的问题让一切完美的像素

  4. 没有第三方控制需要什么样的依赖呢?越少,越好。

有几个人,但他们处理的ActiveX显示器和等。

There are a few others but they deal with ActiveX displays and such.

这篇关于从生成原始HTML / CSS内容从ASP.NET PDF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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