Search Results for

    Show / Hide Table of Contents

    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

    The StampLayer enumeration in IronPDF controls whether a stamp is placed above or below the existing page content of a PDF.

    Part of the IronPdf.Editing namespace, it declares two values: OnTopOfExistingPDFContent and BehindExistingPDFContent.

    Set the layer on any Stamper to overlay logos, signatures, and headers, or to push watermarks beneath the original page. See Stamp Text & Images for typical C# usage.

    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
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget