Can you please point me to open source or a reasonably priced comercial product capable of generating PDF from HTML?
能否请您指出能够从HTML生成PDF的开源或价格合理的商业产品?
12 个解决方案
#1
6
We currently use ABCpdf in one of our more complex applications. It has served us well and is not very expensive at all. I like that fact that I can send it raw HTML text and it will render it to a PDF in memory or as a file so we use to generate PDFs on the fly and serve them up via the web without actually ever saving it disk ever.
我们目前在一个更复杂的应用程序中使用ABCpdf。它为我们提供了很好的服务,而且价格也不贵。我喜欢这样一个事实:我可以发送原始HTML文本,它会将其呈现为内存中的PDF或文件,因此我们可以动态生成PDF并通过Web提供它们,而无需实际保存它。
We have been using it for about 3 years and early on I had to use their support for a very odd issue that was very specific and the support was very fast and help solved the issue quickly.
我们已经使用它大约3年了,在早期我不得不使用他们的支持非常奇怪的问题非常具体,支持非常快,并帮助快速解决问题。
You can find more information on their website at: http://www.websupergoo.com/abcpdf-1.htm
您可以在以下网站上找到更多信息:http://www.websupergoo.com/abcpdf-1.htm
#3
3
By nature of the task (HTML to PDF conversion) pretty looking PDF generation tool should able to render HTML like web-browser. Fortunately it is already exists: WkHtmlToPdf open source project but it doesn't provide any integration with .NET from the box.
根据任务的性质(HTML到PDF转换),漂亮的PDF生成工具应该能够像Web浏览器一样呈现HTML。幸运的是它已经存在:WkHtmlToPdf开源项目,但它没有提供与.NET的任何集成。
Don't spend your time on reinventing the wheel: I've already packed WkHtmlToPdf into one DLL (no external dependencies at all), just add it to your project and generate PDF with one line of code:
不要把时间花在重新发明*上:我已经将WkHtmlToPdf打包成一个DLL(根本没有外部依赖),只需将其添加到项目中并使用一行代码生成PDF:
var pdfBytes = (new NReco.HtmlToPdfConverter()).GeneratePdf(htmlContent);
Additionally, it's possible to specify various options (like margins, zoom-factor etc) through HtmlToPdfConverter's properties.
此外,可以通过HtmlToPdfConverter的属性指定各种选项(如边距,缩放系数等)。
DLL can be downloaded here (it's FREE): PdfGenerator for .NET
DLL可以在这里下载(它是免费的):PdfGenerator for .NET
#4
2
We've used ABCPdf in the past and it's able to take a web request and generate a PDF from it
我们过去曾使用过ABCPdf,它可以接收Web请求并从中生成PDF
#5
1
We've had a lot of success with an open source product called 'itextsharp' - it's not so hot at the HTML-to-PDF but is good for carefully piecing together a specific PDF document (such as a receipt). It's also free, which is always a bonus. See:
我们在一个名为'itextsharp'的开源产品上取得了很大的成功 - 它在HTML-to-PDF方面并不是那么热门,但它可以很好地拼凑出特定的PDF文档(例如收据)。它也是免费的,这总是一个奖励。看到:
http://sourceforge.net/projects/itextsharp/
Another quick and lightweight solution is XMLPdf, written by a software company called Ibex from New Zealand no less. This tool has a model where you create an XML template file, with HTML-ish tags in the schema. You can also define tags in the XML which you associate with objects in your .NET code behind. Kind of clunky, but useful in particular circumstances. Not free, but cheap. Can find it by searching for XMLpdf on Google.
另一个快速轻量级的解决方案是XMLPdf,由新西兰的一家名为Ibex的软件公司编写。此工具有一个模型,您可以在其中创建XML模板文件,模式中包含HTML-ish标记。您还可以在XML中定义与.NET代码中的对象关联的标记。有点笨重,但在特殊情况下很有用。不是免费的,而是便宜的。可以通过在Google上搜索XMLpdf找到它。
#6
1
Here is HTML to PDF .NET component at the reasonable price. But it has own html/css reading and pdf rendering engines.
这是HTML到PDF .NET组件,价格合理。但它有自己的html / css阅读和pdf渲染引擎。
#8
1
Using the (commercial) Aspose.Pdf since years successfully. Works both for .NET and Java.
使用(商业)Aspose.Pdf成功多年。适用于.NET和Java。
#9
0
I've successfully used HTML to PDF Converter for .NET before on a project.
我之前在项目上成功使用过HTML to PDF Converter for .NET。
#10
0
One alternative solution would be to use the web browser control and print the html to an installed PDF printer.
There are several free PDF printers available and they can be set up to print directly to a file without displaying a user interface.
一种替代解决方案是使用Web浏览器控件并将html打印到已安装的PDF打印机。有几种免费的PDF打印机可用,它们可以设置为直接打印到文件而不显示用户界面。
I used a solution like this once and it worked fine even for large documents and large numbers of documents.
我曾经使用过这样的解决方案,即使对于大型文档和大量文档也能正常工作。
#11
0
Abcpdf .Net version 8 works but it creates lot of issue in production servers where security and user rights are restrictive.
Abcpdf .Net版本8可以工作,但它在安全性和用户权限受到限制的生产服务器中产生了很多问题。
It is difficult to directly to do URL->pdf conversion. We ended up URL-Save HTML in local folder ->read HTML and convert to PDF-> delete HTML file from folder - tricky approach but it works. The only flaw is that you need to give read/write permission on a folder on server. Its still better than decreasing security settings.
很难直接进行URL-> pdf转换。我们最终在本地文件夹中保存了URL-Save HTML - >读取HTML并转换为PDF->从文件夹中删除HTML文件 - 棘手的方法,但它的工作原理。唯一的缺陷是您需要对服务器上的文件夹赋予读/写权限。它仍然比降低安全设置更好。
#1
6
We currently use ABCpdf in one of our more complex applications. It has served us well and is not very expensive at all. I like that fact that I can send it raw HTML text and it will render it to a PDF in memory or as a file so we use to generate PDFs on the fly and serve them up via the web without actually ever saving it disk ever.
我们目前在一个更复杂的应用程序中使用ABCpdf。它为我们提供了很好的服务,而且价格也不贵。我喜欢这样一个事实:我可以发送原始HTML文本,它会将其呈现为内存中的PDF或文件,因此我们可以动态生成PDF并通过Web提供它们,而无需实际保存它。
We have been using it for about 3 years and early on I had to use their support for a very odd issue that was very specific and the support was very fast and help solved the issue quickly.
我们已经使用它大约3年了,在早期我不得不使用他们的支持非常奇怪的问题非常具体,支持非常快,并帮助快速解决问题。
You can find more information on their website at: http://www.websupergoo.com/abcpdf-1.htm
您可以在以下网站上找到更多信息:http://www.websupergoo.com/abcpdf-1.htm
#2
#3
3
By nature of the task (HTML to PDF conversion) pretty looking PDF generation tool should able to render HTML like web-browser. Fortunately it is already exists: WkHtmlToPdf open source project but it doesn't provide any integration with .NET from the box.
根据任务的性质(HTML到PDF转换),漂亮的PDF生成工具应该能够像Web浏览器一样呈现HTML。幸运的是它已经存在:WkHtmlToPdf开源项目,但它没有提供与.NET的任何集成。
Don't spend your time on reinventing the wheel: I've already packed WkHtmlToPdf into one DLL (no external dependencies at all), just add it to your project and generate PDF with one line of code:
不要把时间花在重新发明*上:我已经将WkHtmlToPdf打包成一个DLL(根本没有外部依赖),只需将其添加到项目中并使用一行代码生成PDF:
var pdfBytes = (new NReco.HtmlToPdfConverter()).GeneratePdf(htmlContent);
Additionally, it's possible to specify various options (like margins, zoom-factor etc) through HtmlToPdfConverter's properties.
此外,可以通过HtmlToPdfConverter的属性指定各种选项(如边距,缩放系数等)。
DLL can be downloaded here (it's FREE): PdfGenerator for .NET
DLL可以在这里下载(它是免费的):PdfGenerator for .NET
#4
2
We've used ABCPdf in the past and it's able to take a web request and generate a PDF from it
我们过去曾使用过ABCPdf,它可以接收Web请求并从中生成PDF
#5
1
We've had a lot of success with an open source product called 'itextsharp' - it's not so hot at the HTML-to-PDF but is good for carefully piecing together a specific PDF document (such as a receipt). It's also free, which is always a bonus. See:
我们在一个名为'itextsharp'的开源产品上取得了很大的成功 - 它在HTML-to-PDF方面并不是那么热门,但它可以很好地拼凑出特定的PDF文档(例如收据)。它也是免费的,这总是一个奖励。看到:
http://sourceforge.net/projects/itextsharp/
Another quick and lightweight solution is XMLPdf, written by a software company called Ibex from New Zealand no less. This tool has a model where you create an XML template file, with HTML-ish tags in the schema. You can also define tags in the XML which you associate with objects in your .NET code behind. Kind of clunky, but useful in particular circumstances. Not free, but cheap. Can find it by searching for XMLpdf on Google.
另一个快速轻量级的解决方案是XMLPdf,由新西兰的一家名为Ibex的软件公司编写。此工具有一个模型,您可以在其中创建XML模板文件,模式中包含HTML-ish标记。您还可以在XML中定义与.NET代码中的对象关联的标记。有点笨重,但在特殊情况下很有用。不是免费的,而是便宜的。可以通过在Google上搜索XMLpdf找到它。
#6
1
Here is HTML to PDF .NET component at the reasonable price. But it has own html/css reading and pdf rendering engines.
这是HTML到PDF .NET组件,价格合理。但它有自己的html / css阅读和pdf渲染引擎。
#7
#8
1
Using the (commercial) Aspose.Pdf since years successfully. Works both for .NET and Java.
使用(商业)Aspose.Pdf成功多年。适用于.NET和Java。
#9
0
I've successfully used HTML to PDF Converter for .NET before on a project.
我之前在项目上成功使用过HTML to PDF Converter for .NET。
#10
0
One alternative solution would be to use the web browser control and print the html to an installed PDF printer.
There are several free PDF printers available and they can be set up to print directly to a file without displaying a user interface.
一种替代解决方案是使用Web浏览器控件并将html打印到已安装的PDF打印机。有几种免费的PDF打印机可用,它们可以设置为直接打印到文件而不显示用户界面。
I used a solution like this once and it worked fine even for large documents and large numbers of documents.
我曾经使用过这样的解决方案,即使对于大型文档和大量文档也能正常工作。
#11
0
Abcpdf .Net version 8 works but it creates lot of issue in production servers where security and user rights are restrictive.
Abcpdf .Net版本8可以工作,但它在安全性和用户权限受到限制的生产服务器中产生了很多问题。
It is difficult to directly to do URL->pdf conversion. We ended up URL-Save HTML in local folder ->read HTML and convert to PDF-> delete HTML file from folder - tricky approach but it works. The only flaw is that you need to give read/write permission on a folder on server. Its still better than decreasing security settings.
很难直接进行URL-> pdf转换。我们最终在本地文件夹中保存了URL-Save HTML - >读取HTML并转换为PDF->从文件夹中删除HTML文件 - 棘手的方法,但它的工作原理。唯一的缺陷是您需要对服务器上的文件夹赋予读/写权限。它仍然比降低安全设置更好。