J'ai un pied de page qui va à droite et à gauche de chaque page. Chaque paragraphe du pied de page contient deux lignes de texte. Ce que je veux, c'est ajouter une ligne horizontale entre les 2 lignes de texte dans le pied de page.Migra Doc PDF Footer Styling
Voici le code pour ajouter le pied de page.
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);
}
Voici une image du résultat de pied de page souhaité.