Привет и спасибо за чтение этого сообщения.Itextsharp сделать нижний колонтитул внизу каждой страницы pdf
Я использую ItextSharp для создания pdf-файла с контентом из моей базы данных, но это не важная часть.
Мой нижний колонтитул придерживается нижней части каждой страницы, кроме последней страницы, потому что может быть недостаточно контента, чтобы «нажать» его.
Document ResultPDF = new Document(iTextSharp.text.PageSize.A4, 25, 10, 20, 30);
PdfWriter Write = PdfWriter.GetInstance(ResultPDF, new FileStream(Server.MapPath("~") + "/PDF/" + fileName, FileMode.Create));
ResultPDF.Open();
PdfPTable Headtable = new PdfPTable(7);
Headtable.TotalWidth = 525f;
Headtable.LockedWidth = true;
Headtable.HeaderRows = 5;
Headtable.FooterRows = 2;
Headtable.KeepTogether = true;
.....
PdfPCell Footer = new PdfPCell(new Phrase(" ")) { Colspan = 7, UseVariableBorders = true, BorderColorTop = BaseColor.BLACK, BorderColorLeft = BaseColor.WHITE, BorderColorBottom = BaseColor.WHITE, BorderColorRight = BaseColor.WHITE };
PdfPCell Footer2 = new PdfPCell(new Phrase(Session["Surveyname"].ToString() + " - " + DateTime.Now.Date.ToString("dd-MM-yyyy") + " - " + email, smallText)) { Colspan = 6 };
PdfPCell Footer3 = new PdfPCell(new Phrase("", smallText)) { Colspan = 1, HorizontalAlignment = 1 };
Headtable.AddCell(Footer);
Headtable.AddCell(Footer2);
Headtable.AddCell(Footer3);
Как я могу убедиться, что мой нижний колонтитул остается внизу каждой страницы ни на что?
Спасибо за ваше время.