Convert HTML to PDF with New Plugin
FROM:http://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-HTML-to-PDF-with-New-Plugin.html
Converting HTML to PDF with C# PDF component is so important that we always try our best to improve our Spire.PDF better and better. We aim to make it is much more convenient for our developers to use. Now besides the previous method of converting HTML to PDF offered by Spire.PDF, we have a new plugin for html conversion to PDF. This section will focus on the new plugin of convert HTML to PDF. With this new plugin, we support to convert the HTML page with rich elements, such as HTTPS, CSS3, HTML5, JavaScript.
You need to download Spire.PDF and install it on your system, add Spire.PDF.dll as reference in the downloaded Bin folder thought the below path '..\Spire.PDF\Bin\NET4.0\Spire.PDF.dll'. And for gain the new plugin, you could get the new plugin from the download file directly: HTMLConvertor-0.2.3.3.zip
You need to unzip the convertor plugin package and copy the folder 'plugins' under the same folder of Spire.Pdf.dll.
C# HtmlToPdf.zip and VB.NET HtmlToPdfVB.zip, you could download and try it.
Calling the plugins is very simple, please check the below C# code for convert HTML to PDF.
using System.Drawing;
using Spire.Pdf.Graphics;
using Spire.Pdf.HtmlConverter.Qt; namespace SPIREPDF_HTMLtoPDF
{
class Program
{
static void Main(string[] args)
{
HtmlConverter.Convert("http://www.wikipedia.org/", "HTMLtoPDF.pdf", //enable javascript
true, //load timeout
* , //page size
new SizeF(, ), //page margins
new PdfMargins(, ));
System.Diagnostics.Process.Start("HTMLtoPDF.pdf");
}
}
}
如果出现异常
The conversion provider cann't be found.
Please make sure:
1. the folder "plugins" under the same folder of Spire.Pdf.dll
2. exists "plugins\HTMLConverter.dll" and other "plugins\*.dll
首先把IIS里web对应的应用程序池,高级设置里改成32位模式
其次要安装
Microsoft Visual C++ 2010 Redistributable Package (x86)
Convert HTML to PDF with New Plugin的更多相关文章
- [Tools] Convert SVG to a PDF in Node with PDFKit and SVG.js
Given a epxress application and an svg template, we want to draw some text, date onto it and convert ...
- ImageMagick convert多张照片JPG转成pdf格式,pdfunite合并PDF文件
在认识ImageMagick之前,我***的图像浏览软件是KuickShow,截图软件是KSnapShot,这两款软件都是KDE附带的软件,用起来也是蛮方便的.在一次偶然的机会中,我遇到了Imag ...
- Linux之convert命令
Linux之convert命令 强大的convert命令 convert命令可以用来转换图像的格式,支持JPG, BMP, PCX, GIF, PNG, TIFF, XPM和XWD等类型,下面举几个例 ...
- 一个不错的能将HTML表格导出为excel,pdf等的jquery插件
https://github.com/kayalshri/tableExport.jquery.plugin https://github.com/kayalshri/ tableExport.jqu ...
- 使用aspose.word两句代码将word转换为pdf
//Load Document Document document = new Document(@"C:\Users\Administrator\Desktop\人事---新员工转正总结( ...
- Html网页生成Pdf
在http://code.google.com/p/wkhtmltopdf/downloads/list下载安装程序. 1.添加引用 using System.Diagnostics; 添加引用 2. ...
- [C#] 网页Html转PDF档(一行程式码解决)
原文 [C#] 网页Html转PDF档(一行程式码解决) 网页转PDF档做法很多( Convert HTML to PDF in .NET ) 这边纪录一下老外最多人加分的那篇做法,使用wkhtmto ...
- 自制 Word、Excel 批转 PDF 工具
原文:自制 Word.Excel 批转 PDF 工具 目前做金融业的项目,该公司每天会产生很多 Word.Excel 文档,需要大量地转换为 PDF,除了自己保存外,也要给金融主管机构作为备份.由于文 ...
- html to pdf
C++ Library to Convert HTML to PDF html2pdf PrinceXML 收费 CutePDF Ghostscript PDFDoc VisPDF PDFDoc Sc ...
随机推荐
- HttpModule和HttpHandler -- 系列文章
ASP.NET 生命周期 在ASP.Net2.0中使用UrlRewritingNet实现链接重写 IHttpModule实现URL重写 使用IHttpHandler防盗链 HttpModule,Htt ...
- QtAV的编译方法
1--编译准备 QtAV的安装编译总指导说明:https://github.com/wang-bin/QtAV/wiki/Build-QtAV QtAV的源代码:https://github.com/ ...
- 服务端获得客户端ip
/** * 获取客户端ip地址(可以穿透代理) * * @param request * @return */ public static String getRemoteAddr(HttpServl ...
- 基于SQL调用Com组件来发送邮件
这个需求是公司有个文控中心,如果有用增删改了文件信息希望可以发邮件通知到有权限的人.当然方式很多. 这里是用数据库作业来完成 JOB+Com,这里用的com组件是Jmail 当然你需要把com组件放到 ...
- 读写另一EXE的内存
procedure TfrmMain.tmrChangeServerNameTimer(Sender: TObject); function GetProcessID(FileName: string ...
- 安装jenkins 的时候 记录默认密码文件为空的情况
1.把文件的权限改成 chmod 777 .jenkins/secrets/initialAdminPassword 然后再使用编辑器打开,密码就出来的 密码文件的地址 /var/root/.hud ...
- NOIP2005普及组第3题 采药 (背包问题)
NOIP2005普及组第3题 采药 时间限制: 1 Sec 内存限制: 128 MB提交: 50 解决: 23[提交][状态][讨论版][命题人:外部导入] 题目描述 辰辰是个天资聪颖的孩子,他的 ...
- linux lcd设备驱动剖析三
上一节文章中详细地剖析了probe函数,但是从始至终都没有看到打开读写文件接口的操作函数,只看到了下面这个操作结构体 [cpp] view plain? static struct fb_ops s3 ...
- node.js的了解
在node环境上面运行js代码,js相当于php,node相当于apache环境 第一步装 node 环境1.从官网下载 dmg 文件安装 2.通过命令行安装 需要用到 homebrew(mac上专门 ...
- Julia - 变量
变量的赋值 julia> a = 1 # 把 10 赋给变量 a 1 julia> a + 1 # 变量 a 的值加 1 2 julia> a = 4 # 重新赋值给变量 a 4 j ...