详情介绍
ICSharpCode.SharpZipLib.dll (This component is used to parse the HTML)
itextsharp.dll (This component is used by Pdfizer to create the PDF document)
Pdfizer.dll (This is the main component with the HtmlToPdf object that executes the conversion operations).
Now we can add some code to use this component. Here is the code to generate a PDF from some HTML specified:
// set a path to where you want to write the PDF to.string sPathToWritePdfTo = @"C:\new_pdf_name.pdf"; // build some HTML text to write as a PDF. You could also // read this HTML from a file or other means.// NOTE: This component doesn't understand CSS or other // newer style HTML so you will need to use depricated // HTML formatting such as the <font> tag to make it look correct.System.Text.StringBuilder sbHtml = new System.Text.StringBuilder();sbHtml.Append("<html>");sbHtml.Append("<body>");sbHtml.Append("<font size='14'>My Document Title Line</font>");sbHtml.Append("<br />");sbHtml.Append("This is my document text");sbHtml.Append("</body>");sbHtml.Append("</html>"); // create file stream to PDF file to write tousing (System.IO.Stream stream = new System.IO.FileStream
(sPathToWritePdfTo, System.IO.FileMode.OpenOrCreate)){ // create new instance of Pdfizer Pdfizer.HtmlToPdfConverter htmlToPdf = new Pdfizer.HtmlToPdfConverter(); // open stream to write Pdf to to htmlToPdf.Open(stream); // write the HTML to the component htmlToPdf.Run(sbHtml.ToString()); // close the write operation and complete the PDF file htmlToPdf.Close();}This component also supports PDF Chapters. You could add a single line of code right before the Run() method to make the HTML specified a single chapter like this:
// open stream to write Pdf to tohtmlToPdf.Open(stream); // add a chapter for this HTMLhtmlToPdf.AddChapter("My Chapter Title 1"); // write the HTML to the componenthtmlToPdf.Run(sbHtml.ToString());Repeat the AddChapter() and Run() methods for each chapter you want to add and then Close() to commit it to the PDF.
下载地址
人气软件

Adobe Acrobat Pro DC 2022.001.20085 64位 中文破解版(附安装教
Adobe Acrobat Pro DC 2025 v25.001.20458 英/中文直装免费版(附
Adobe Acrobat Pro DC v2025.001.20458 中文免费直装版(附教程)
Adobe Acrobat Pro DC v2025.001.20458 中文正式免费版(附安装教
Foxit PDF Editor(PDF编辑器) v2023.3.0.23028 中文版破解绿色版![VCE文件浏览 Visual CertExam Suite 1.9 特别版[附破解文件] VCE文件浏览 Visual CertExam Suite 1.9 特别版[附破解文件]](//img.jbzj.com/do/templets/img/default.gif)
VCE文件浏览 Visual CertExam Suite 1.9 特别版[附破解文件]
Adobe Acrobat Pro DC v2025.001.20458 中文免费绿色便携版 64位
用来打开VCE格式文件 Visual Certexam Suite1.9 绿色特别版
Adobe Acrobat Reader DC v2025.001.20458 中文绿色免安装便携版
Adobe Acrobat PRO DC v2025.001.20458 32位 中文正式直装版(附
相关文章
-
Flip PDF Plus Corporate(PDF电子书翻页工具) v7.7.22 英文免费安装版Flip PDF Plus Corporate一款简单好用的PDF文件翻页效果增强工具,可以将PDF或者图片转换成翻页电子杂志,支持添加多媒体文件进行PDF文件的转换等操作等 ...
-
Readest(电子书阅读器) v0.9.28 绿色免安装版Readest绿色版是一款好用的电子书阅读器,为追求沉浸式深度阅读体验的用户打造,支持多种电子书格式,包括EPUB、MOBI、AZW3和PDF等,欢迎下载体验...
-
Olib(免费下载zlibrary书籍) v2.1.1 中文绿色永久免费版Olib是一款可免费高速下载zlibrary书籍的开源软件,无任何次数限制,有了Olib再也不需要去找域名和镜像网站了,Z-Library 号称“全球最大的数字图书馆”和“全球最大的科学...
-
潮汐阅读 v14.4.2 官方安装版潮汐阅读官方最新版是一个简约优美的小说阅读器,支持一键缓存、海量小说免费看、自定义排版、书架管理、平台互通、小说格式支持、阅读样式选择、摸鱼模式、自动滚动等多种...
-
Global Book 图书阅读器 v1.0.2 安装免费版Global Book旨在打造一个开放、免费且非商业化的文学平台,让每一位热爱阅读的用户都能享受到无国界、无障碍的阅读体验,欢迎需要的朋友下载使用...
-
Adobe Acrobat Classic v2024.001.30213 x64 多语言直装版Acrobat Classic 是 Acrobat 的最新非订阅版本,仅限桌面使用。它简化了从桌面处理 PDF 时的日常 PDF 任务,并且包含多项可提高工作效率的增强功能...
下载声明
☉ 解压密码:www.jb51.net 就是本站主域名,希望大家看清楚,[ 分享码的获取方法 ]可以参考这篇文章
☉ 推荐使用 [ 迅雷 ] 下载,使用 [ WinRAR v5 ] 以上版本解压本站软件。
☉ 如果这个软件总是不能下载的请在评论中留言,我们会尽快修复,谢谢!
☉ 下载本站资源,如果服务器暂不能下载请过一段时间重试!或者多试试几个下载地址
☉ 如果遇到什么问题,请评论留言,我们定会解决问题,谢谢大家支持!
☉ 本站提供的一些商业软件是供学习研究之用,如用于商业用途,请购买正版。
☉ 本站提供的PDFizer 可以将html转换成pdf格式文档的工具资源来源互联网,版权归该下载资源的合法拥有者所有。


















![VCE文件浏览 Visual CertExam Suite 1.9 特别版[附破解文件] VCE文件浏览 Visual CertExam Suite 1.9 特别版[附破解文件]](http://img.jbzj.com/do/templets/img/default.gif)





