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#
- Load or create a multi-page PDF as an IronPdf.PdfDocument object.
- You can add backgrounds using PdfDocument.AddBackgroundPdf. There are several background insertion methods and overrides in the IronPdf.PdfDocument documentation
- You can add Foregrounds also known as "Overlays" using PdfDocument.AddForegroundOverlayPdfToPage. There are several foreground insertion methods and overrides in the IronPdf.PdfDocument documentation
- Save the PDF to disk, or serve it as a FileActionResult via MVC.