What I'm trying to achieve is to have the same content twice on the page, separated by a dotted line, with padding so that the one copy is on the top-half and the second is on the bottom half. Something like firstSection.SpaceAfter = (height of page / 2) - (height of first section)
tl;dr: How do I calculate the height of the first section after everything is added?
I have this, which has the copied content and the dotted line, but I need the padding.
Document document = new Document();
document.Info.Title = "Testing";
Style style = document.Styles["Normal"];
style.Font = new Font("Times New Roman", 12);
Section section = document.AddSection();
section.PageSetup = document.DefaultPageSetup.Clone();
Paragraph paragraph = section.AddParagraph("Hello");
paragraph = section.AddParagraph("World");
paragraph = section.AddParagraph();
paragraph.Format.Borders.Bottom = new Border
{
Width = "1pt",
Color = Colors.Black,
Style = BorderStyle.DashLargeGap
};
paragraph = section.AddParagraph("Hello");
paragraph = section.AddParagraph("World");