PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Different page margins on different pages?
https://forum.pdfsharp.net/viewtopic.php?f=2&t=852
Page 1 of 1

Author:  midntrdr [ Thu Aug 27, 2009 7:45 pm ]
Post subject:  Different page margins on different pages?

I have a document I'm creating that has multiple pages. Is it possible to have different page margins on different pages? When I set it on one page it changes the margin on all pages. I'll try to include a striped down sample below.


Code:

Document document = new Document();

Section section = document.AddSection();
           
Paragraph paragraph = section.AddParagraph("test" );

// page 2
section.AddPageBreak();
section.PageSetup.LeftMargin = 40;

paragraph = section.AddParagraph("page 2 ");           



Do I have to set the margins after every page break? If so what are the default settings?

Thanks for any insight.

Author:  Thomas Hoevel [ Mon Aug 31, 2009 7:03 am ]
Post subject:  Re: Different page margins on different pages?

You set the margins for the section.

Start a new section if you have to change page margins (or use paragraph margins).

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/