4.前台代码:
5.前台操作:
6.属性说明:
itextsharp-4.0.3-dll.zip 示例文件包含几乎所有的PDF处理需求
颜色:
Font fontChinese = new Font(bfChinese, 12, Font.NORMAL,new Color(0, 0, 0)); //黑Font fontChinese = new Font(bfChinese, 12, Font.NORMAL,new Color(0, 255, 0)); //绿
注释:
iText支持不同风格的注释。
u 文本注释:
你可以添加一小段文本到你的文档中,但它并非文档内容的一部分,注释有标题和内容:
Annotation a = new Annotation(
"authors",
"Maybe it''s because I wanted to be an author myself that I wrote iText.");
对齐方式:
cell.HorizontalAlignment = Element.ALIGN_CENTER;
cell.VerticalAlignment = Element.ALIGN_MIDDLE;
下划线/删除线:
Chunk chunk1 = new Chunk("This text is underlined", FontFactory.getFont(FontFactory.HELVETICA, 12, Font.UNDERLINE));
Chunk chunk2 = new Chunk("This font is of type ITALIC | STRIKETHRU", FontFactory.getFont(FontFactory.HELVETICA, 12, Font.ITALIC | Font.STRIKETHRU));
加密:
public void setEncryption(boolean strength, String userPassword, String ownerPassword, int permissions);