脚本之家

电脑版
提示:原网页已由神马搜索转码, 内容由www.jb51.net提供.

PDFizer 可以将html转换成pdf格式文档的工具

PDFizer 可以将html转换成pdf格式文档的工具

投诉报错

  • 软件大小:420KB
  • 软件语言:英文软件
  • 软件类型:国外软件
  • 软件授权:免费软件
  • 软件类别:浏览阅读
  • 应用平台:windows平台
  • 软件官网:官方网址
  • 更新时间:2009-03-01
  • 网友评分:
360通过腾讯通过金山通过

情介绍

First, set a reference in your project to the 3 DLL's that Pdfizer uses. Here are the 3 dll names to set a reference to:

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.

    载地址

    下载错误?【投诉报错】

    PDFizer 可以将html转换成pdf格式文档的工具

        气软件

        关文章

        • WxReader 微信自动阅读器 V2.0.2 绿色免费版

          WxReader 是一款致力于提升微信读书体验的高效阅读助手。借助先进的技术框架,这款开源项目提供了更加流畅、个性化的阅读方式,让沉浸在书籍中的时光更为惬意...

        • BookxNote Pro(电子笔记软件) v2.0.0.1122 linux最新版

          BookxNote Pro是一款电子学习笔记软件,在电脑端用户就可以用该软件进行阅读学习,软件内有很多的笔记工具,可以在阅读的时候用来进行标注笔记...

        • ReadCat 阅读器 v1.0 绿色便携版

          ReadCat是一款免费、开源、简洁、纯净、无广告的小说阅读器。目前还处于内侧,在官网可以下载内侧包。软件支持Win10及以上版本,后续会支持macOS和Linux,欢迎需要的朋友下...

        • Jane Reader EPUB阅读器 V1.0.0.2 中文安装版

          Jane Reader专业的电子书阅读软件,该软件内置书库,内置 6 种背景颜色,自动深色模式,支持阅读清单,支持自定义边距、行高、字体大小,自动保存、恢复阅读进度...

        • CAJViewer(文献阅读器)9.0 Linux最新版

          CAJViewer阅读器支持中国期刊网的CAJ、NH、KDH及PDF格式文件阅读,本站提供的是这款软件的Linux版本...

        • Paperlib(论文管理工具) v3.1.5 官方中文安装版

          Paperlib是一款简单好用的论文管理工具,软件接入各学科数据库用于匹配论文元数据,逐步为每一个学科(例如计算机科学,物理学等)定制化数据库组合提高检索精度...

        载声明

        ☉ 解压密码:www.jb51.net就是本站主域名,希望大家看清楚,[ 分享码的获取方法]可以参考这篇文章
        ☉ 推荐使用 [ 迅雷] 下载,使用 [ WinRAR v5] 以上版本解压本站软件。
        ☉ 如果这个软件总是不能下载的请在评论中留言,我们会尽快修复,谢谢!
        ☉ 下载本站资源,如果服务器暂不能下载请过一段时间重试!或者多试试几个下载地址
        ☉ 如果遇到什么问题,请评论留言,我们定会解决问题,谢谢大家支持!
        ☉ 本站提供的一些商业软件是供学习研究之用,如用于商业用途,请购买正版。
        ☉ 本站提供的PDFizer 可以将html转换成pdf格式文档的工具资源来源互联网,版权归该下载资源的合法拥有者所有。

        • 详情介绍
        • 下载地址
        • 其它版本
        • 猜你喜欢
        • 人气软件
        • 相关文章
        • 下载说明