Watermarking

IronPDF provides methods to 'watermark' PDF documents with HTML.

Using the ApplyStamp method, developers can add an HTML-based watermark to a PDF file. As shown in the example above, the HTML code for the watermark goes as the first argument to the method. Additional arguments to ApplyStamp control the rotation, opacity, and position of the watermark.

Utilize the ApplyStamp method in lieu of the ApplyWatermark method for more granular control over watermark placement. For example, use ApplyStamp to:

  • Add Text, Image, or HTML watermarks to PDFs
  • Apply the same watermark to every page of the PDF
  • Apply different watermarks to specific PDF pages
  • Adjust the placement of watermarks in front or behind page copy
  • Adjust the opacity, rotation and alignment of watermarks with more precision

How to Add Watermarks to PDF Files in C#

  1. Download and install the IronPDF library.
  2. Create a new PdfDocument or use an existing PdfDocument file.
  3. Call the ApplyWatermark method to add watermarks to the PDF.
  4. Export the PDF file by calling SaveAs.