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: ApplyTo see usage and an example of TextStamper, visit: https://ironpdf.com/tutorials/csharp-edit-pdf-complete-tutorial/#stamp-text-onto-a-pdf
Inherited Members
Namespace: IronPdf.Editing
Assembly: IronPdf.dll
Syntax
public class TextStamper : Stamper
Constructors
TextStamper(Int32)
Initializes a new instance of the Text
Declaration
public TextStamper(int maxWaitTime = 10000)
Parameters
Type | Name | Description |
---|---|---|
System. |
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 Text
Declaration
public TextStamper(string text, int maxWaitTime = 10000)
Parameters
Type | Name | Description |
---|---|---|
System. |
text | The text to be stamped by the Stamper |
System. |
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 |
---|---|
Iron |
Color
Font Color. Default is black.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Iron |
FontFamily
Font family name for the text.
Note: If using a web font from https://fonts.google.com/ then you must set UseDeclaration
public string FontFamily { get; set; }
Property Value
Type | Description |
---|---|
System. |
FontSize
Font size in px
Declaration
public int FontSize { get; set; }
Property Value
Type | Description |
---|---|
System. |
IsBold
Determines if the bold font weight is applied
Declaration
public bool IsBold { get; set; }
Property Value
Type | Description |
---|---|
System. |
IsItalic
Determines if the text has the italic font style applied
Declaration
public bool IsItalic { get; set; }
Property Value
Type | Description |
---|---|
System. |
IsStrikethrough
Determines if the text has a strike-through applied
Declaration
public bool IsStrikethrough { get; set; }
Property Value
Type | Description |
---|---|
System. |
IsUnderline
Determines if the text has an underline font style applied
Declaration
public bool IsUnderline { get; set; }
Property Value
Type | Description |
---|---|
System. |
Text
The text to be stamped by the Stamper
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System. |
UseGoogleFont
Must be set to true, when using Font
Declaration
public bool UseGoogleFont { get; set; }
Property Value
Type | Description |
---|---|
System. |