Search Results for

    Show / Hide Table of Contents

    Class TextStamper

    This allows the user to edit an existing PDF by adding some stamped text.

    A subclass of Stamper. Defines a Text PDF Stamper. Can be applied with: ApplyStamp(Stamper)

    To see usage and an example of TextStamper, visit: https://ironpdf.com/tutorials/csharp-edit-pdf-complete-tutorial/#stamp-text-onto-a-pdf

    Inheritance
    System.Object
    Stamper
    TextStamper
    Inherited Members
    Stamper.Html
    Stamper.Opacity
    Stamper.Rotation
    Stamper.HorizontalAlignment
    Stamper.VerticalAlignment
    Stamper.HorizontalOffset
    Stamper.VerticalOffset
    Stamper.MaxWidth
    Stamper.MaxHeight
    Stamper.MinWidth
    Stamper.MinHeight
    Stamper.Hyperlink
    Stamper.Scale
    Stamper.IsStampBehindContent
    Stamper.WaitFor
    Stamper.Timeout
    Stamper.IsStampAnnotation
    Namespace: IronPdf.Editing
    Assembly: IronPdf.dll
    Syntax
    public class TextStamper : Stamper

    Constructors

    TextStamper(Int32)

    Initializes a new instance of the TextStamper class. This will also automatically wait for all fonts to be loaded before rendering.

    Declaration
    public TextStamper(int maxWaitTime = 10000)
    Parameters
    Type Name Description
    System.Int32 maxWaitTime

    Maximum wait time to wait for all fonts to be loaded before rendering. Default value is 10,000 ms or 10 seconds.

    TextStamper(String, Int32)

    Initializes a new instance of the TextStamper class. This will also automatically wait for all fonts to be loaded before rendering.

    Declaration
    public TextStamper(string text, int maxWaitTime = 10000)
    Parameters
    Type Name Description
    System.String text

    The text to be stamped by the Stamper

    System.Int32 maxWaitTime

    Maximum wait time to wait for all fonts to be loaded before rendering. Default value is 10,000 ms or 10 seconds.

    Properties

    BackgroundColor

    Background Color. Default is transparent.

    Declaration
    public Color BackgroundColor { get; set; }
    Property Value
    Type Description
    IronSoftware.Drawing.Color

    Color

    Font Color. Default is black.

    Declaration
    public Color Color { get; set; }
    Property Value
    Type Description
    IronSoftware.Drawing.Color

    FontFamily

    Font family name for the text.

    Note: If using a web font from https://fonts.google.com/ then you must set UseGoogleFont property of this TextStamper to true.
    Declaration
    public string FontFamily { get; set; }
    Property Value
    Type Description
    System.String

    FontSize

    Font size in px

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

    IsBold

    Determines if the bold font weight is applied

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

    IsItalic

    Determines if the text has the italic font style applied

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

    IsStrikethrough

    Determines if the text has a strike-through applied

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

    IsUnderline

    Determines if the text has an underline font style applied

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

    Text

    The text to be stamped by the Stamper

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

    UseGoogleFont

    Must be set to true, when using FontFamily from https://fonts.google.com/ as a web font

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

    Inherited members

    Html
    Opacity
    Rotation
    HorizontalAlignment
    VerticalAlignment
    HorizontalOffset
    VerticalOffset
    MaxWidth
    MaxHeight
    MinWidth
    MinHeight
    Hyperlink
    Scale
    IsStampBehindContent
    WaitFor
    Timeout
    IsStampAnnotation
    ☀
    ☾
    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.