Free Support Forum -

Pagesetup problem


I have a problem with the pagesetup class. When I sepcified a page size for a document it only get applied for the first pages of the document. The others pages have the original document page size. How do I fix this ?

Thank you !



Thanks for your request. You can set page size for section but not for whole document. You can try to set page size for all section in document. See the following example.

Document doc = new Document(@"194_94869_qreverse\in.doc");

foreach (Section section in doc.Sections)


//set page size or set other properties of section.

section.PageSetup.PaperSize = PaperSize.A5;



I hope that it will help you.

Best regards.