Class StampLayer
Controls whether stamps appear above or below existing PDF content. Essential for watermarks, backgrounds, and overlay positioning.
// Watermark behind content (won't obscure text):
var watermark = new TextStamper("CONFIDENTIAL") {
Layer = StampLayer.BehindExistingPDFContent,
Opacity = 30
};
pdf.ApplyStamp(watermark);
// Annotation on top (covers content):
var stamp = new HtmlStamper("<div>APPROVED</div>") {
Layer = StampLayer.OnTopOfExistingPDFContent
};
pdf.ApplyStamp(stamp);Behind = watermarks, On top = annotations/signatures
See: https://ironpdf.com/how-to/stamping/
Inheritance
System.Object
StampLayer
Namespace: IronPdf.Editing
Assembly: IronPdf.dll
Syntax
public sealed class StampLayer : Enum
Fields
BehindExistingPDFContent
Places stamp behind existing content (watermark effect). Text remains readable, stamp acts as background.
var bgStamp = new ImageStamper("watermark.png") {
Layer = StampLayer.BehindExistingPDFContent,
Opacity = 25 // Semi-transparent
};
Declaration
public const StampLayer BehindExistingPDFContent
Field Value
| Type | Description |
|---|---|
| StampLayer |
OnTopOfExistingPDFContent
Places stamp on top of existing content (overlay effect). Stamp covers underlying content, use for signatures/annotations.
var signature = new ImageStamper("signature.png") {
Layer = StampLayer.OnTopOfExistingPDFContent
};
Declaration
public const StampLayer OnTopOfExistingPDFContent
Field Value
| Type | Description |
|---|---|
| StampLayer |
value__
Declaration
public int value__
Field Value
| Type | Description |
|---|---|
| System.Int32 |