資源簡(jiǎn)介
實(shí)現(xiàn)功能如下:
1.構(gòu)造函數(shù)
2.私有字段
3.設(shè)置字體
4.設(shè)置頁(yè)面大小
5.實(shí)例化文檔
6.打開文檔對(duì)象
7.關(guān)閉打開的文檔
8.添加段落
9.添加圖片
10.添加鏈接、點(diǎn)
代碼片段和文件信息
///?
///?類說(shuō)明:Assistant
///?編?碼?人:蘇飛
///?聯(lián)系方式:361983679??
///?更新網(wǎng)站:http://www.cckan.net/thread-655-1-1.html
///?
using?System.IO;
using?iTextSharp.text;
using?iTextSharp.text.pdf;
namespace?DotNet.Utilities
{
????///?
????///?PDF文檔操作類
????///?
????//------------------------------------調(diào)用--------------------------------------------
????//PDFOperation?pdf?=?new?PDFOperation();
????//pdf.Open(new?FileStream(path?FileMode.Create));
????//pdf.SetbaseFont(@“C:\Windows\Fonts\SIMHEI.TTF“);
????//pdf.AddParagraph(“測(cè)試文檔(生成時(shí)間:“?+?DateTime.Now?+?“)“?15?1?20?0?0);
????//pdf.Close();
????//-------------------------------------------------------------------------------------
????public?class?PDFOperation
????{
????????#region?構(gòu)造函數(shù)
?????
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????8028??2012-12-07?13:58??PDFOperation.cs
-----------?---------??----------?-----??----
?????????????????8028????????????????????1
- 上一篇:C# 給pdf文件加背景圖
- 下一篇:C# 解壓縮文件和文件夾源碼
評(píng)論
共有 條評(píng)論