title: How to add Header and Footer to a PDF with iText 7
body: <p>With iTextSharp you could add header/footer to a PDF by attaching an event to the PDF like explained in this SO answer: <a href="https://stackoverflow.com/a/19004392">https://stackoverflow.com/a/19004392</a></p>
  
  <p>How can I do the same thing with iText 7?</p>
  
  <p><a href="https://itextpdf.com/en/resources/examples/itext-7/header-and-footer-examples" rel="nofollow noreferrer">This link</a> has Java code example but does not seem like its using page events. </p>