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 ...
随机推荐
- css处理最后一个li
.relatebar li{width:98px;height:146px;padding:5px;float:left;border-left:1px solid #ccc;} .relatebar ...
- 网络服务器带宽Mbps、Mb/s、MB/s的区别
例如所谓 10M 带宽,其实是指 10Mbps (兆比特) 计算带宽理论最快下载速度:10÷8=1.25MB/s 那么100M的带宽最快下载速度是12.5MB/s. 但这只是理论上的速度,在这个数值附 ...
- shell脚本,每5个字符之间插入"|",行末不插入“|”
文本aaaaabbbbbcccccddddeeeeefffffkkkkkvvvvnnnnnggggg 希望得到的结果如下:aaaaa|bbbbb|ccccc|ddddeeeee|fffff|kkkkk ...
- python开发函数进阶:递归函数
一,什么叫递归 #递归#在一个函数里调用自己#python递归最大层数限制 997#最大层数限制是python默认的,可以做修改#但是我们不建议你修改 例子和尚讲故事 #!/usr/bin/env p ...
- DB2的安装
jiangxin@db01:~$ su – root #切换到root用户 密码: root@db01:~# uname -a #查看内核和操作系统信息 Linux db01 4.4.0-66-gen ...
- socket粘包现象加解决办法
socket粘包现象分析与解决方案 简单远程执行命令程序开发(内容回顾) res = subprocess.Popen(cmd.decode('utf-8'),shell=True,stderr=su ...
- python中对 函数 闭包 的理解
最近学到 函数 闭包的时候,似懂非懂.迷迷糊糊的样子,很是头疼,今天就特意查了下关于闭包的知识,现将我自己的理解分享如下! 一.python 闭包定义 首先,关于闭包,百度百科是这样解释的: 闭包是指 ...
- Vertrigo Serv + testlink 环境搭建
今天偶要教大家,使用VertrigoServ来搭建PHP服务器平台.有兴趣的你将会马上拥有一台PHP的WEB服务器哦,呵呵! 第一次给偶的感觉类似于我们租用的PHP虚拟主机.功能可和APPSERV媲美 ...
- DRF之注册器响应器分页器
概要 url注册器 响应器 分页器 url注册器 通过DRF的视图组件,数据接口逻辑被我们优化到最剩下一个类,接下来,我们使用DRF的url控制器来帮助我们自动生成url,使用步骤如下: 第一步:导入 ...
- 【Dubbo学习】
dubbo的介绍 dubbo是一个分布式的开源框架,其核心部分如下: 1.服务提供者:provider 2.服务消费者:consumer 3.注册中心:registry (仅仅只是负责通知) 服务者在 ...