使用iText在所有续页中重复PdfPTable标头 [英] Repeat PdfPTable header in all the continuation pages using iText

查看:973
本文介绍了使用iText在所有续页中重复PdfPTable标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果表格的长度超过一页,我如何在所有页面中重复 PdfPTable 的标题?

How can I repeat the headings of a PdfPTable in all the pages if the length of the table exceeds one page?

推荐答案

查看的setHeaderRows(int headerRows) PdfPTable 。在那里定义为标题的行应该保留在新页面上。

Look at setHeaderRows(int headerRows) of PdfPTable. Rows defined there as a header should persist on new pages.

table.setHeaderRows(1)

第一行作为标题。

参见API

这篇关于使用iText在所有续页中重复PdfPTable标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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