Gracias a AlterElt
por la respuesta,
Este es el codigo en C# probado
public void VariasPaginas(){
Document pdfDoc = new Document();
PdfWriter pdfWrite = PdfWriter.GetInstance(pdfDoc, new FileStream(@"c:\tryme2.pdf", FileMode.Create));
itsEvents ev = new itsEvents();
pdfWrite.PageEvent = ev;
pdfDoc.Open();
for (int i = 0; i < 10000; i++)
{
pdfDoc.Add(new Paragraph("Hello World"));
}
pdfDoc.Close();
}
public class itsEvents : PdfPageEventHelper
{
public override void OnStartPage(PdfWriter writer, Document document)
{
base.OnStartPage(writer, document);
Chunk ch = new Chunk("This is my Stack Overflow Header on page " + writer.PageNumber);
document.Add(ch);
}