We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to support double sided printing

Hi ,

I would like to print the pdf i render doublesided , therefore i need to append completly blank/white pages to my existing document. I’m using to function below to check if the document has an even or odd pagecount en when it’s odd i append a blank template .
However the template inherrits the header and footer from the main document, how can i prevent this from happening , because the page needs to be completly white with no header and footer from a previous set of pages.

I’ve added the following files :
- current result (page 24 , 25)
- maindoc template with the header and footer
- blankpage template

kind regards,


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. You should just set KeepSourceFormatting and unlink headers/footer before appending documents. Please see the following code:

Document dst = new Document(@"MainDoc.dot");

Document src = new Document(@"blankPage.doc");

// Unlink HeadersFooters


// Set SectionStart to NewPage

src.Sections[0].PageSetup.SectionStart = SectionStart.NewPage;

dst.AppendDocument(src, ImportFormatMode.KeepSourceFormatting);


Best regards,

Hi ,

Many thanks , this solution works perfect .

Kind regards ,