Search Results for

    Show / Hide Table of Contents

    Class HtmlStamp

    Class HtmlStamp. Used With the methods to edit PDF documents by 'stamping' additional content into the foreground or background.

    Inheritance
    System.Object
    HtmlStamp
    Namespace: IronPdf.Editing
    Assembly: IronPdf.dll
    Syntax
    public class HtmlStamp : Object

    Constructors

    HtmlStamp()

    Initializes a new instance of the HtmlStamp class.

    Declaration
    public HtmlStamp()

    HtmlStamp(String)

    Initializes a new instance of the HtmlStamp class.

    Declaration
    public HtmlStamp(string Html)
    Parameters
    Type Name Description
    System.String Html

    The HTML fragment which will be stamped onto your PDF.

    HtmlStamp(String, Int32, Int32)

    Initializes a new instance of the HtmlStamp class.

    Declaration
    public HtmlStamp(string Html, int WidthInMM, int HeightInMM)
    Parameters
    Type Name Description
    System.String Html

    The HTML fragment which will be stamped onto your PDF.

    System.Int32 WidthInMM

    The width of the stamp in mm.

    System.Int32 HeightInMM

    The height of the stamp in mm.

    Properties

    AutoCenterStampContentOnStampCanvas

    The automatic centers stamp content within stamp canvas as defined by Width and Height.

    Declaration
    public bool AutoCenterStampContentOnStampCanvas { get; set; }
    Property Value
    Type Description
    System.Boolean

    Bottom

    The position of the stamp from the Bottom edge of the PDF document in mm. If Top or Bottom is not set, the stamp will be vertically centered in the document.

    Declaration
    public int Bottom { get; set; }
    Property Value
    Type Description
    System.Int32

    Height

    The height of the stamp in mm. Stamps can not automatically detect their own size based on their content.

    Declaration
    public int Height { get; set; }
    Property Value
    Type Description
    System.Int32

    Html

    The HTML fragment which will be stamped onto your PDF. All external references to javascript, CSS and image files will be relative to HtmlBaseUrl.

    Declaration
    public string Html { get; set; }
    Property Value
    Type Description
    System.String

    HtmlBaseUrl

    The HTML base URL for which references to external CSS, Javascript and Image files will be relative.

    A trick to make references relative to a your project file is

    HtmlBaseUrl = new
    Uri(System.Reflection.Assembly.GetEntryAssembly().Location).AbsoluteUri

    Declaration
    public string HtmlBaseUrl { get; set; }
    Property Value
    Type Description
    System.String

    Hyperlink

    Makes the entire stamp link to a web hyperlink. Note that HTML links created by <a href=''> tags are not reserved by stamping.

    Declaration
    public string Hyperlink { get; set; }
    Property Value
    Type Description
    System.String

    Left

    The position of the stamp from the Left of the PDF document in mm. If Left or Right is not set, the stamp will be horizontally centered in the document.

    Declaration
    public int Left { get; set; }
    Property Value
    Type Description
    System.Int32

    Location

    Defines default position of the stamp on the page

    Declaration
    public StampLocation Location { get; set; }
    Property Value
    Type Description
    StampLocation

    Opacity

    Allows the stamp to be transparent. 0 is invisible, 100 if fully opaque.

    Declaration
    public int Opacity { get; set; }
    Property Value
    Type Description
    System.Int32

    Right

    The position of the stamp from the Right of the PDF document in mm. If Left or Right is not set, the stamp will be horizontally centered in the document.

    Declaration
    public int Right { get; set; }
    Property Value
    Type Description
    System.Int32

    Rotation

    Rotates the stamp clockwise from 0 to 360 degrees as specified.

    Declaration
    public int Rotation { get; set; }
    Property Value
    Type Description
    System.Int32

    Top

    The position of the stamp from the Top edge of the PDF document in mm. If Top or Bottom is not set, the stamp will be vertically centered in the document.

    Declaration
    public int Top { get; set; }
    Property Value
    Type Description
    System.Int32

    Width

    The width of the stamp in mm. Stamps can not automatically detect their own size based on their content.

    Declaration
    public int Width { get; set; }
    Property Value
    Type Description
    System.Int32

    ZIndex

    Defines if this stamp should be placed behind or on-top of existing PDF contents.

    Declaration
    public HtmlStamp.StampLayer ZIndex { get; set; }
    Property Value
    Type Description
    HtmlStamp.StampLayer
    ☀
    ☾
    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.