PDFsharp & MigraDoc Forum https://forum.pdfsharp.net/ |
|
Migradoc page margins https://forum.pdfsharp.net/viewtopic.php?f=2&t=2273 |
Page 1 of 1 |
Author: | weilah [ Tue Dec 18, 2012 3:25 pm ] |
Post subject: | Migradoc page margins |
Hi there, when I create a new section in migradoc, it sets automatically a Page Format and its margins. It is OK for me. But, is it possible to get the value of these (automatic) margins? In cm, mm, points...or whatever? Code: section.PageSetup.LeftMargin seems to be 0, null or void if they aren't manually seted Thanks |
Author: | () => true [ Wed Dec 19, 2012 8:02 pm ] |
Post subject: | Re: Migradoc page margins |
Hi! Call PageSetup.NewDefaultPageSetup(). Or set the values you need. |
Author: | weilah [ Thu Dec 20, 2012 1:56 pm ] |
Post subject: | Re: Migradoc page margins |
yep! Thanks. But NewDefaultPageSetup() seems to be not a member of PageSetup. Neither when a call it from section.PageSetup |
Author: | () => true [ Fri Dec 21, 2012 8:12 am ] |
Post subject: | Re: Migradoc page margins |
Oops, my fault. Use this (for your document): Code: var pageSetup = document.DefaultPageSetup.Clone(); Do not change the DefaultPageSetup, so clone it before making changes. You don't have to clone it if you only read the values, of course. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |