У меня есть нижний колонтитул, который идет справа и слева на каждой странице. Каждый абзац нижнего колонтитула содержит 2 строки текста. Я хочу добавить горизонтальную линию между двумя строками текста в нижнем колонтитуле.
Вот код для добавления нижнего колонтитула.
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);
}
вот изображение желаемого результата нижнего колонтитула.