ItextSharp生成PDF页脚设置问题
来源:互联网 发布:mac虚拟机能不能带动ps 编辑:程序博客网 时间:2024/04/28 12:24
利用ITextSharp生成PDF时,想在每个页面的下方显示一段文字,决定采用页脚的方式实现,但发现将文字作为参数传入Phrase,然后指定其为document的Footer,文字无法显示,或者只出现了最后两个字,百思不得其解,后来经同事提示,猜测可能是Phrase的某些属性造成的。改用Paragraph对象,发现问题解决。
Paragraph phfooter = new Paragraph(10f, strpagefooter, ChHeadBold09);
phfooter.Alignment = Element.ALIGN_LEFT;
phfooter.SpacingBefore = 20f;
HeaderFooter footer = new HeaderFooter(phfooter, false);
footer.Border = Rectangle.NO_BORDER;
footer.Left = 5;
footer.Right = 5;
phfooter.Alignment = Element.ALIGN_LEFT;
phfooter.SpacingBefore = 20f;
HeaderFooter footer = new HeaderFooter(phfooter, false);
footer.Border = Rectangle.NO_BORDER;
footer.Left = 5;
footer.Right = 5;
document.Footer = footer;
页脚设置时要特别注意,在document对象open之前进行设置,不然设置的页脚将会从第二页开始生效。
0 0
- ItextSharp生成PDF页脚设置问题
- 使用iTextSharp生成pdf
- iTextSharp网页生成pdf
- iTextSharp网页生成pdf
- VS2008 使用itextsharp生成PDF
- 使用 iTextSharp 生成 PDF 表格
- C#调用iTextSharp组件生成PDF文件
- iTextSharp.dll生成pdf 实战实例
- iTextSharp.dll生成pdf 实战实例(2)
- iTextSharp.dll生成pdf 实战实例(3)
- iTextSharp.dll生成pdf 实战实例
- iTextSharp.dll生成pdf 实战实例
- C#使用itextsharp生成PDF文件
- iTextSharp添加图片生成PDF文件
- C#使用itextsharp生成PDF文件
- 使用ITextSharp生成PDF文件心得
- iTextSharp.dll生成pdf 实战实例
- iTextSharp 设置PDF所有页面背景图功能
- ping ip 2
- CSDN新账户第一天
- magento collection中的or条件
- Java百问
- Using waitpid to Reap Zombie Children
- ItextSharp生成PDF页脚设置问题
- android 执行root命令
- 三维数组 多维数组 的声明 和添加
- C语言变量声明内存分配
- EBS并发程序监控
- xshell常用技巧搜集
- SQL 判断表中是否存在记录的高效率方法
- 积木盒子如何确保投资者安全
- Socket