How to add pagebreak

Hi ,

I am creating word document by using HTML stream insertHtml()

I created one template file which first page is a cover page and rest all pages contains information

I want to add Header and footer not on first page but rest of all pages.

so how to do that how to add page break using HTML stream

or any other logic to do this.

Regards ,
Jeevan Joshi.

Hi Jeevan,

Thanks for your inquiry. In your case, I suggest you to use PageSetup.DifferentFirstPageHeaderFooter property. True if a different header or footer is used on the first page. Following code example creates headers and footers different for first, even and odd pages using DocumentBuilder. Hope this helps you. Please let us know if you have any more queries.

DocumentBuilder builder = new DocumentBuilder();
PageSetup ps = builder.PageSetup;
ps.DifferentFirstPageHeaderFooter = true;
ps.OddAndEvenPagesHeaderFooter = true;
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.Document.Save(MyDir + "PageSetup.DifferentHeaders Out.doc");