如何在多页pdf报告中添加页码
问题描述:
我使用 iReport 创建了多页pdf报告,如下所示。
I have created multiple pages pdf report using iReport as below.
如何在这个pdf报告中添加页码(第1页,共2页)?
How to put page number like (page 1 of 2) in this pdf report ?
如果我将其放入 iReport 中,它将会将所有页面作为单独的页面并相应地给出数字,例如:
If i will put same in iReport it will take all pages as separate page and give numbers accordingly, like:
for page1.jrml >> page 1 of 2 and page 2 of 2
for page2.jrml >> agian same page 1 of 1
...
应该如下:
for page1.jrml >> page 1 of 3 and page 2 of 3
for page2.jrml >> page 3 of 3
请建议。
答
您的页码编号将不正确,因为使用该方法您将创建2个报表并将它们合并为1个PDF,而不是创建单个报表。
You page numbering won't be correct because by using that approach you are creating 2 reports and merging them into 1 PDF, instead of creating a single report.
如果您将第二个报表作为子报表嵌入到第一个报表中,则页面编号应正确。
If you embed the second report into the first as a subreport, the page numbering should then be correct.