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

[MigraDoc] Table.LeftPadding inflicts a LeftMargin-Change?
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1643
Page 1 of 1

Author:  ReinerWolff [ Mon May 02, 2011 3:20 pm ]
Post subject:  [MigraDoc] Table.LeftPadding inflicts a LeftMargin-Change?

Hi ho,

the LeftPadding-Property is the space between border and contents of a cell, right?
If I add two tables to a section and use different LeftPadding-Values for the tables the result is, that the tables are not flush to each other. The left margin from these two tables have not the same value, if you look at the printed PDF.

My problem with that is, that I use the LeftPadding-Property in most of the tables,
but if I want to put a image or a table into one cell the padding is annoying.
So I set the LeftPadding-Property to 0.
Therefore the left margin of my PDF-file isn't a flat line anymore.

Thankful for a hint
Reiner

Author:  Thomas Hoevel [ Tue May 03, 2011 7:26 am ]
Post subject:  Re: [MigraDoc] Table.LeftPadding inflicts a LeftMargin-Change?

Moin!

MigraDoc does it like Word does it: a PDF document should look like the RTF document if you create both with MigraDoc.

And the text in the tables has the same alignment as the text outside the tables, the border of the tables are drawn to the left of the left margin.

If you use different paddings on one page, the text will be aligned, but the borders won't be.

So don't use table left padding. Setting ParagraphFormat.LeftIndent of the text in the table should have a similar effect.
Or add thin, empty columns to your text tables to get the same "padding" effect.

Author:  ReinerWolff [ Tue May 03, 2011 8:29 am ]
Post subject:  Re: [MigraDoc] Table.LeftPadding inflicts a LeftMargin-Change?

Ja, moin ;-)

Thank you for the explanation and the quick support job you are doing.

Is this the time to put an entry onto the wishlist 'what about an innerPadding for the Cell-Objekt'?
In conjunction with nested tables I think you cannot use LeftPadding other than zero.
So I should look up for 'nested tables' in the wishlist first :-)


Your given workaround with ParagraphFormat.LeftIndent works fine for me.
I put in the Styles:
Styles("Normal").ParagraphFormat.LeftIndent = Unit.FromCentimeter(0.1)

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