iText添加新页面 [英] iText add new page

查看:660
本文介绍了iText添加新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在iText文档中添加新页面? document.newPage(); 似乎无法正常工作。

How can you add a new page to an iText document? document.newPage(); doesn't seem to work.

我正在使用带有RTF支持的iText < a href =http://sourceforge.net/projects/itextrtf/> http://sourceforge.net/projects/itextrtf/

I am using iText with RTF support from http://sourceforge.net/projects/itextrtf/

Part我的代码:

Font titleFont = new Font(Font.COURIER, 14, Font.BOLD);
document.add(new Paragraph("Title1", titleFont));

Table table = new Table(4);
table.setBorderWidth(0);

// Filling table

document.add(table);

document.newPage();

document.add(new Paragraph("Title2", titleFont));

Table table = new Table(4);
table.setBorderWidth(0);

// Filling table

document.add(table);


推荐答案

问题是我使用的是错误的RTF阅读器,断裂线在那里,读者只是没有渲染它。

The problem was I was using a wrong RTF reader, the breakline was there, the reader just didn't render it.

这篇关于iText添加新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆