我要实现的目的是使页面上的内容相同两次,并用虚线隔开,并用填充填充,以便一个副本位于上半部,第二个副本位于下半部。就像是firstSection.SpaceAfter = (height of page / 2) - (height of first section)
tl; dr:添加所有内容后,如何计算第一部分的高度?
我有这个,它具有复制的内容和虚线,但是我需要填充。
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");
慕斯709654
相关分类