Free Support Forum -

Page Footer disappeared while merge tables


We found a problem that Page footer disappeared if the table merged cross the page.(data is too much, e.g.)

Is it by design or do we have some settings option to make header and footer stay in each page?
Hi Guilin,

Thanks for your inquiry. To ensure a timely and accurate response please supply us with the following information, if you cannot supply us with this information we will not be able to investigate your issue and raise a ticket.

What environment are you running on?

  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • Java version
  • Please supply us with the code from your application that is causing the issue
  • Please supply us with the input document that is causing the issue
  • Please supply us with the output document showing the undesired behavior
  • Please supply us with the expected document showing the desired behavior (You can create this document using Microsoft Word).

As soon as you get these pieces of information to us we'll start our investigation into your issue.

Moreover, I suggest you please read following documentation link for your kind reference.

Hi Tahir,

Thanks for your reply, let me describe the detailed problem:
We have a big template which contains header and footer.
After mailmerge, the header and footer only exist in odd page but not even page.
Do we have some control parameters about this?
And it still don’t work even if I set linkToPrevious = true

My env info:
Mac OS/Java 1.6.x 64bit

The application code and template is confidential so I can not give it out here. I will try to make a fake one later.

Hi Guilin,

Thanks for sharing the details. Please use the setOddAndEvenPagesHeaderFooter and setDifferentFirstPageHeaderFooter method of PageSetup class to work with options ‘Different First Page’ and 'Differnt Odd & Even Pages

setDifferentFirstPageHeaderFooter : True if a different header or footer is used on the first page.

setOddAndEvenPagesHeaderFooter : True if the document has different headers and footers for odd-numbered and even-numbered pages.

Please check the following code snippet for your kind reference.

<span style=“font-size:
10.0pt;font-family:“Courier New”;color:#2B91AF;mso-no-proof:yes”>DocumentBuilder<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”> builder = new DocumentBuilder();<o:p></o:p>

PageSetup ps = builder.getPageSetup();




builder.writeln("First page header.");


builder.writeln("Even pages header.");


builder.writeln("Odd pages header.");

// Move back to the main story of the first section.


builder.writeln("Text page 1.");


builder.writeln("Text page 2.");


builder.writeln("Text page 3.");

builder.getDocument().save(MyDir + "PageSetup.DifferentHeaders Out.doc");

It is hard to investigate the issue without template document. Please create a fake template and share it with us along with sample code snippet for investigation purposes.