PDF简介:PDF(Portable Document Format)文件格式是Adobe公司开发的电子文件格式。这种文件格式与操作系统平台无关,也就是说,PDF文件不管是在Windows,Unix还是在苹果公司的Mac OS操作系统中都是通用的。这一特点使它成为在Internet上进行电子文档发行和数字化信息传播的理想文档格式。越来越多的电子图书、产品说明、公司文告、网络资料、电子邮件开始使用PDF格式文件。PDF格式文件目前已成为数字化信息事实上的一个工业标准。

Adobe公司设计PDF文件格式的目的是为了支持跨平台上的,多媒体集成的信息出版和发布,尤其是提供对网络信息发布的支持。为了达到此目的, PDF具有许多其他电子文档格式无法相比的优点。PDF文件格式可以将文字、字型、格式、颜色及独立于设备和分辨率的图形图像等封装在一个文件中。该格式文件还可以包含超文本链接、声音和动态影像等电子信息,支持特长文件,集成度和安全可靠性都较高。

日常工作中经常遇到想把报表和网页导出到PDF的需求。本文提供完美的解决方案

ASP.NET导出到PDF最终效果图(其实winform和控制台程序都一样可以做)。

本文实现 文字图片数据表的导出
           asp.net2.0导出pdf文件完美解决方案(转载)

核心技术方案:使用itextsharp.dll

1.下载itextsharp.dll和ICSharpCode.SharpZipLib.dll
http://sourceforge.net/project/showfiles.php?group_id=72954

asp.net2.0导出pdf文件完美解决方案(转载)

iTextSharp.tutorial.01.zip    示例文件 提供了各种解决方案本文由于时间问题仅做抛砖引玉,希望大家自己研究其他需求

itextsharp.dll  itextsharp-4.0.3-dll.zip  

ICSharpCode.SharpZipLib.dll    http://download.csdn.net/down/135897  ICSharpCode.SharpZipLib.dll   

SharpZipLib.dll类库中的内容实现的压缩与解压功能,它是开源

2.引用itextsharp.dll和ICSharpCode.SharpZipLib.dll


asp.net2.0导出pdf文件完美解决方案(转载)

3.后台代码:

 

asp.net2.0导出pdf文件完美解决方案(转载)using System;
asp.net2.0导出pdf文件完美解决方案(转载)
using System.Data;
asp.net2.0导出pdf文件完美解决方案(转载)
using System.Configuration;
asp.net2.0导出pdf文件完美解决方案(转载)
using System.Web;
asp.net2.0导出pdf文件完美解决方案(转载)
using System.Web.Security;
asp.net2.0导出pdf文件完美解决方案(转载)
using System.Web.UI;
asp.net2.0导出pdf文件完美解决方案(转载)
using System.Web.UI.WebControls;
asp.net2.0导出pdf文件完美解决方案(转载)
using System.Web.UI.WebControls.WebParts;
asp.net2.0导出pdf文件完美解决方案(转载)
using System.Web.UI.HtmlControls;
asp.net2.0导出pdf文件完美解决方案(转载)
using iTextSharp;
asp.net2.0导出pdf文件完美解决方案(转载)
using iTextSharp.text;
asp.net2.0导出pdf文件完美解决方案(转载)
using iTextSharp.text.pdf;
asp.net2.0导出pdf文件完美解决方案(转载)
using System.IO;
asp.net2.0导出pdf文件完美解决方案(转载)
public partial class _Default : System.Web.UI.Page 


4.前台代码:

>


5.前台操作:
asp.net2.0导出pdf文件完美解决方案(转载)

 6.属性说明:

itextsharp-4.0.3-dll.zip   示例文件包含几乎所有的PDF处理需求

相关文章:

  • 2021-10-09
  • 2021-09-18
  • 2022-01-06
  • 2021-05-19
猜你喜欢
  • 2021-07-17
  • 2022-01-04
  • 2022-12-23
相关资源
相似解决方案