TextStamp
Overview
TextStamp is a class in Aspose.PDF FOSS for .NET.
Inherits from: Stamps.TextStamp.
Compat re-export so code that references Aspose.Pdf.TextStamp (from before the type moved to Aspose.Pdf.Stamps) keep compiling.
This class provides 4 methods for working with TextStamp objects in .NET programs.
Available methods include: Put, TextStamp.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: AutoAdjustFontSizePrecision, AutoAdjustFontSizeToFitStampRectangle, Draw, FontSize, Height, Justify, and 11 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Height | double | Read/Write | Gets or sets the height. |
Scale | bool | Read/Write | Gets or sets the scale. |
TextAlignment | Aspose.Pdf.HorizontalAlignment | Read/Write | Gets or sets the text alignment. |
Value | string | Read/Write | Gets or sets the value. |
Width | double | Read/Write | Gets or sets the width. |
WordWrap | bool | Read/Write | Gets or sets the word wrap. |
WordWrapMode | Aspose.Pdf.Text.TextFormattingOptions.WordWrapMode | Read/Write | Gets or sets the word wrap mode. |
TextState | Aspose.Pdf.Text.TextState | Read | Text-state snapshot. |
FontSize | float | Read | Font size in points. |
AutoAdjustFontSizePrecision | float | Read/Write | When auto-adjusting font size to fit the stamp rectangle, the precision (in points). |
AutoAdjustFontSizeToFitStampRectangle | bool | Read/Write | When true, the renderer shrinks the font size until the text fits the stamp’s Width/Height. |
Draw | bool | Read/Write | When false, the stamp records intent but skips drawing. |
Justify | bool | Read/Write | When true, the stamp’s text is full-justified within the stamp width. |
MaxRowWidth | double | Read/Write | Maximum row width before wrapping. |
NoCharacterBehavior | NoCharacterAction | Read/Write | Strategy used when a character has no glyph in the configured font. |
ReplacementFont | Aspose.Pdf.Text.Font | Read/Write | Fallback font used when the main font lacks a required glyph; consulted only when NoCharacterBehavior is UseReplacementFont. |
TreatYIndentAsBaseLine | bool | Read/Write | When true, the stamp’s Y-indent is treated as the text baseline rather than the bounding-box top. |
Methods
| Signature | Description |
|---|---|
TextStamp(value: string) | Calls TextStamp on this TextStamp instance. |
TextStamp(formattedText: Aspose.Pdf.Facades.FormattedText) | Construct a text stamp from a FormattedText template — copies its text, font, size and colour. |
TextStamp(value: string, textState: Aspose.Pdf.Text.TextState) | Construct a text stamp from a value and a precomputed TextState. |
Put(page: Page) | Add this stamp to a page. |