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: 2020.10.3
public PdfDocument WatermarkPages(
	string Html,
	IEnumerable<int> PageIndexesToWaterMark,
	PdfDocumentWaterMarkLocation Location = PdfDocumentWaterMarkLocation.MiddleCenter,
	int Opacity = 100,
	int Rotation = 0,
	string Hyperlink = "",
	PdfDocumentPositionOptions positionOptions = null


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.
positionOptions (Optional)
Type: IronPdfPdfDocumentPositionOptions
Additional options for positioning the watermark on the page

Return Value

Type: PdfDocument
Returns this PdfDocument object, allowing for a 'fluent' (LINQ like) chained in-line code style
See Also
Download DLL or Install with Nuget