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

NameTypeAccessDescription
HeightdoubleRead/WriteGets or sets the height.
ScaleboolRead/WriteGets or sets the scale.
TextAlignmentAspose.Pdf.HorizontalAlignmentRead/WriteGets or sets the text alignment.
ValuestringRead/WriteGets or sets the value.
WidthdoubleRead/WriteGets or sets the width.
WordWrapboolRead/WriteGets or sets the word wrap.
WordWrapModeAspose.Pdf.Text.TextFormattingOptions.WordWrapModeRead/WriteGets or sets the word wrap mode.
TextStateAspose.Pdf.Text.TextStateReadText-state snapshot.
FontSizefloatReadFont size in points.
AutoAdjustFontSizePrecisionfloatRead/WriteWhen auto-adjusting font size to fit the stamp rectangle, the precision (in points).
AutoAdjustFontSizeToFitStampRectangleboolRead/WriteWhen true, the renderer shrinks the font size until the text fits the stamp’s Width/Height.
DrawboolRead/WriteWhen false, the stamp records intent but skips drawing.
JustifyboolRead/WriteWhen true, the stamp’s text is full-justified within the stamp width.
MaxRowWidthdoubleRead/WriteMaximum row width before wrapping.
NoCharacterBehaviorNoCharacterActionRead/WriteStrategy used when a character has no glyph in the configured font.
ReplacementFontAspose.Pdf.Text.FontRead/WriteFallback font used when the main font lacks a required glyph; consulted only when NoCharacterBehavior is UseReplacementFont.
TreatYIndentAsBaseLineboolRead/WriteWhen true, the stamp’s Y-indent is treated as the text baseline rather than the bounding-box top.

Methods

SignatureDescription
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.

See Also