0
我有一个页脚在每个页面的左侧和右侧。页脚中的每个段落都包含2行文字。我想要的是在页脚的两行文字之间添加一条水平线。Migra Doc PDF页脚样式
这里是添加页脚的代码。
private void AddFooterData(Section section) {
// add prepared by. approved by etc
var rightFooterSection = new Paragraph {
Format = { Alignment = ParagraphAlignment.Right }
};
rightFooterSection.AddText("Prepared By Eng: " + _preparedBy);
rightFooterSection.AddLineBreak();
rightFooterSection.AddText("Page ");
rightFooterSection.AddPageField();
rightFooterSection.AddText("/");
rightFooterSection.AddNumPagesField();
section.Footers.Primary.Add(rightFooterSection);
var date = DateTime.Now.ToString("yyyy/MM/dd");
var leftSection = new Paragraph {
Format = { Alignment = ParagraphAlignment.Left }
};
leftSection.AddText("Approved By: " + _approvedBy);
leftSection.AddLineBreak();
leftSection.AddText(date);
section.Footers.Primary.Add(leftSection);
}
这里是所需页脚结果的图片。