Add table row counts to every page
问题 How can I get the total number of rows written to a PdfPTable for every page using iTextSharp? I want to put all of my code onStartPage public class MyPdfPageEventHelpPageNo : iTextSharp.text.pdf.PdfPageEventHelper { public override void OnStartPage(PdfWriter writer, Document document) { /// my code } } 回答1: As Bruno said you'll want to look into IPdfPTableEvent. The downside of that specific interface is that it gets called on every page with only a copy of the table that's being printed to