更新时间:2022-12-21 21:58:23
得到后援头事件必须在打开文档之前被放置。
使用跨度>(PdfWriter作家= PdfWriter.GetInstance(文件, fs))
{
// 现在插入标题
writer .PageEvent = new Header();
// 标题结尾
// 步骤4:打开文档
doc.Open();
。
。
。
。
。
}
Good pple
How to add a header/footer to a pdf document containing tables that overlaps to other pages using iTextSharp? The header/footer should appear on everypage
Thank you in advance
Got it.The header event must be placed before opening the doc.using (PdfWriter writer = PdfWriter.GetInstance(doc, fs)) { //now inserting header writer.PageEvent = new Header(); // end of header // Step 4: Openning the Document doc.Open(); . . . . . }