title: How to add image background to pdf for every page?
body: <p>I'm trying to set a background to a pdf and managed to set it with an image my pdf has a big table so the pages are added automatically not with the <code>Document.NewPage()</code> method so the image background is set only on the first page. This is the code that adds the background:</p>
  
  <pre><code>    Image backImg = Image.GetInstance(@"D:\websites\DIS\bugs\130208\A4.png");
      backImg.SetAbsolutePosition(0, 0);
      backImg.Alignment = Image.UNDERLYING;
  
      var doc = new Document(pageSize);
      PdfWriter pdfWriter = PdfWriter.GetInstance(doc, new FileStream(filePath, FileMode.Create));
      doc.Open();
  
      doc.Add(backImg);
      ...
      creating a big table
  </code></pre>
  
  <p>and not using the <code>doc.NewPage()</code> method. Do I have to loop throw every page and add the background image at the end before closing the doc, but how do I put it in the background not on top of the other elements?</p>