iTextSharp学习心得-20140406
来源:互联网 发布:mac 管理员不见了 编辑:程序博客网 时间:2024/05/27 00:41
1. 学习版本:5.1.2.0
2. 下载地址: http://sourceforge.net/projects/itextsharp/files/
3. 主要操作部分
块是最小的单位
a) 主是划分为:块、短句、段落
Chunk、Phrase、Paragraph
b) 列表
List
c) 表格、单元格(可以用来控件排版)
PdfPTable PdfPCell
d) 矩形
Rectangle
4. 具体操作
引用iTextSharp就可以生成pdf档
Document doc = newDocument(PageSize.A4, 40, 30, 20, 5); // 四周边距上,下、左、右 FileStream fs = newFileStream("c:\\01.pdf", FileMode.Create); PdfWriter pWrite =PdfWriter.GetInstance(doc, fs); doc.Open(); // 块 短句 Chunk chunk = new Chunk("Hello world", FontFactory.GetFont(FontFactory.COURIER, 20, BaseColor.RED)); doc.Add(new Phrase(chunk)); doc.Close();
5. 在此版本没有HeaderFooter页眉页脚操作,需实现PdfPageEventHelper,IpdfPageEvent事件
具体实例可参考http://download.csdn.net/download/aasswwe/4356788
其它参考:http://blog.csdn.net/iflash50/article/details/4653850
表格操作: http://www.docin.com/p-23672859.html
0 0
- iTextSharp学习心得-20140406
- iTextSharp
- iTextSharp
- itextsharp
- iTextSharp
- ITextSharp 使用
- itextsharp整理
- 实战 iTextSharp
- 学习心得
- 学习心得
- 学习心得
- 学习心得
- 学习心得
- 学习心得
- 学习心得
- 学习心得
- 学习心得
- 学习心得
- 【Android UI设计与开发】第07期:底部菜单栏(二)Fragment的详细介绍和使用方法
- 从键盘输入,输出和JAVA
- 协变返回类型
- 日工作日志2014-3-31----2014-4-6
- 【python系列】TypeError: 'module' object is not callable 原因分析
- iTextSharp学习心得-20140406
- hdu 1806线段树 区间合并
- 浅谈C++虚继承及虚基类表
- C/C++中产生随机数(rand,srand用法)
- C++ builder package(bcb bpl)创建和vcl调用
- 简化代码,C/C++函数指针数组实现菜单系统
- 算法导论_最大子数组问题(分治策略)
- 有趣的小程序--统计系统中不同种类文件数量
- c++中的static的作用?