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

    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
    Want to deploy IronPDF to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronPDF free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.