I am trying to resize a table automatically to full width of the page. That table should have 2 columns, 50% width each.
How can I achieve this? I tried LeftIndent and RightIndent properties with no luck.
I am trying to resize a table automatically to full width of the page. That table should have 2 columns, 50% width each.
How can I achieve this? I tried LeftIndent and RightIndent properties with no luck.
You cannot use percent values with MigraDoc.
You can set the absolute width of each column.
So when using DIN A4 with 2.5 cm margin at each side, you have 16 cm left for the table and so you have to create two columns of 8 cm each.
You can set the left indent of the table to move tables horizontally.
If the answer from Kidquick does not work, use document.DefaultPageSetup:
Here's an approach that avoids hardcoding widths and allows for more flexible paper formats. Make sure to include the
using MigraDoc.DocumentObjectModel;
statement in your class.