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

MigraDoc page margins change
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3026
Page 1 of 1

Author:  fsiskakis [ Sun Jan 11, 2015 1:49 pm ]
Post subject:  MigraDoc page margins change

Hello fellow programmers :)

I am trying to create a pdf using MigraDoc. So far so good.
But since i need to print a lot of data, space is precious...

I See that the left margin and the right margin by default (i copied the invoice sample code, and working from there) is 4cm. How can i programmatically reduce it accordingly?

Thanks a lot for your help

Author:  () => true [ Sun Jan 11, 2015 8:02 pm ]
Post subject:  Re: MigraDoc page margins change

Hi!
fsiskakis wrote:
How can i programmatically reduce it accordingly?
Set document.LastSection.PageSetup.LeftIndent and .RightIndent as you need it.

Author:  fsiskakis [ Sun Jan 11, 2015 8:39 pm ]
Post subject:  Re: MigraDoc page margins change

Hello.

The LastSection is always null.
When shall i set these values? Can you give me a small example?

Thanks

Author:  Thomas Hoevel [ Mon Jan 12, 2015 9:40 am ]
Post subject:  Re: MigraDoc page margins change

fsiskakis wrote:
The LastSection is always null.
Create a section before setting the margins.

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