Backgrounds & Foregrounds

An existing or rendered PDF may be used as the Background or Foreground for another PDF document. This is particularly useful for design consistency and templating.

How add a Background (or overlay) to a PDF in C#

  1. Load or create a multi-page PDF as an IronPdf.PdfDocument object.
  2. You can add backgrounds using PdfDocument.AddBackgroundPdf. There are several background insertion methods and overrides in the IronPdf.PdfDocument documentation
  3. You can add Foregrounds also known as "Overlays" using PdfDocument.AddForegroundOverlayPdfToPage. There are several foreground insertion methods and overrides in the IronPdf.PdfDocument documentation
  4. Save the PDF to disk, or serve it as a FileActionResult via MVC.