VB.NET或CS.NET中的HTML到PDF [英] HTML to PDF in VB.NET or CS.NET

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

问题描述

Hello Guys,



我想在Windows窗体应用程序中动态地将html文件或html字符串转换为PDF格式。



请帮助。

Hello Guys,

I want to dynamically convert html file or html string to PDF in Windows Forms application.

Please help.

推荐答案

iTextSharp [ ^ ]试一试。它是一个免费的库,可以用来将HTML变成PDF。 CP上有一篇小文章可以帮助你入门:使用C#2.0创建PDF文件的教程 [ ^ ]。以下是一些教程: http://www.mikesdotnetting.com/Category/20 [ ^ ]。

这是一个开始使用iTextSharp的好方法: http://www.mikesdotnetting.com/Article/80/Create-PDFs-in-ASP.NET-getting-started-with-iTextSharp [ ^ ] 。



问候,



Manfred
Please give iTextSharp[^] a try. It''s a free library and can among other things be used to turn HTML into a PDF. There is even a small article here on CP to get you started: Tutorials on creating PDF files using C# 2.0[^]. Here are some more tutorials: http://www.mikesdotnetting.com/Category/20[^].
This one here is a good way to get started with iTextSharp: http://www.mikesdotnetting.com/Article/80/Create-PDFs-in-ASP.NET-getting-started-with-iTextSharp[^].

Regards,

Manfred


你也可以尝试 GemBox.Document 组件,我认为它有一个非常简单的API。

查看如何[删除垃圾链接] 1行代码:

Hi, you can also try GemBox.Document component, I think it has a really simple API.
See how to [spam link removed] with 1 line of code:
// Convert HTML to PDF in C#
DocumentModel.Load("Document.html").Save("Document.pdf");




' Convert HTML to PDF in VB.NET
DocumentModel.Load("Document.html").Save("Document.pdf")


请查看以下链接,



使用ASP.NET从HTML页面生成PDF文档 [ ^ ]
Please check with following link,

Generate PDF documents from a HTML page using ASP.NET[^]


这篇关于VB.NET或CS.NET中的HTML到PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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