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 ...
随机推荐
- JAVA框架--hibernate、struts2、spring
JAVAEE——spring01:介绍.搭建.概念.配置详解.属性注入和应用到项目 JAVAEE——struts2_04:自定义拦截器.struts2标签.登陆功能和校验登陆拦截器的实现 JA ...
- android资源目录---assets与res/raw区别
android资源目录---assets与res/raw的不同 Android 2011-05-24 14:40:21 阅读20 评论0 字号:大中小 订阅 assets:用于存放需要打包到应用程 ...
- 加载rocksdb实例报错:java.lang.UnsatisfiedLinkError: C:\Users\Administrator\AppData\Local\Temp\librocksdbjni3696928169151614297.dll
项目的缓存中用到了rocksdb,实例化时报错了: Related cause: org.springframework.beans.factory.BeanCreationException: Er ...
- delphi 线程的使用
unit untWorkThread; interface uses Windows,Classes,SysUtils; type TWorkItem=class end; TProcessWork= ...
- C++的三大特性?C也可以做到
C++的三大特性是什么?封装.继承与多态,那么今天这篇文章小编就来介绍一下,如何用C语言实现C++的这三个特性. 1.封装 何为封装? 在面向对象的思想中,将数据和对数据的操作封装在一起——即类. 类 ...
- (转)Makefile经典教程(掌握这些足够)
该篇文章为转载,是对原作者系列文章的总汇加上标注. 支持原创,请移步陈浩大神博客: http://blog.csdn.net/haoel/article/details/2886 makefile很重 ...
- js实现的点击div区域外隐藏div区域
首先看下JS的事件模型,JS事件模型为向上冒泡,如onclick事件在某一DOM元素被触发后,事件将跟随节点向上传播,直到有click事件绑定在某一父节点上,如果没有将直至文档的根. 阻止冒泡:1.对 ...
- Deep Learning 学习笔记(4):Logistic Regression 逻辑回归
逻辑回归主要用于解决分类问题,在现实中有更多的运用, 正常邮件or垃圾邮件 车or行人 涨价or不涨价 用我们EE的例子就是: 高电平or低电平 同时逻辑回归也是后面神经网络到深度学习的基础. (原来 ...
- SerialPort缓冲区
SerialPort缓冲区中有:接收缓冲区,发送缓冲区,输入缓冲区,输出缓冲区,传输缓冲区. 例如: 串口属性:BytesToRead(获取接收缓冲区中数据的字节数)--这里提到的是“接收缓冲区” 串 ...
- MySQL复制错误 The slave I/O thread stopsbecause master and slave have equal MySQL server UUIDs; these UUIDs must bedifferent for replication to work 解析
在搭建Mysql主从复制时候,在执行完相关操作以后,通过命令查看是否主从复制成功的时候 show slave status\G; 在"Slave_SQL_Running_State" ...