Click or drag to resize

PdfDocumentWatermarkPages Method

Watermarks all pages of this PDF with HTML content.

Watermarks are restricted to basic positioning and a 100mm by 100mm maximum size. For more advanced options see StampHTML(HtmlStamp, IEnumerableInt32)

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: (
public void WatermarkPages(
	string Html,
	IEnumerable<int> PageIndexesToWaterMark,
	PdfDocumentWaterMarkLocation Location = PdfDocumentWaterMarkLocation.MiddleCenter,
	int Opacity = 100,
	int Rotation = 0,
	string Hyperlink = ""


Type: SystemString
The HTML fragment
Type: System.Collections.GenericIEnumerableInt32
A list of page index (zero-based page number) of this PDF to watermark.
Location (Optional)
Type: IronPdfPdfDocumentWaterMarkLocation
The location of the watermark. PdfDocumentWaterMarkLocation
Opacity (Optional)
Type: SystemInt32
The opacity of the watermark from 0-100%. 100 is opaque, 0 is invisible.
Rotation (Optional)
Type: SystemInt32
The rotation of the watermark content in clockwise degrees.
Hyperlink (Optional)
Type: SystemString
An optional hyperlink which the watermark will link to.
See Also