TextStamp

Overview

TextStamp is a class in Aspose.Pdf FOSS for Java. Inherits from: Stamp.

Represents a text stamp that can be overlaid on a PDF page.

Properties

NameTypeAccessDescription
valueStringReadReturns the text content of this stamp.
textStateTextStateReadReturns the text state for this stamp, creating it lazily if needed.
wordWrapModeTextFormattingOptions.WordWrapModeReadReturns the word wrap mode for this stamp’s text.
textAlignmentHorizontalAlignmentReadReturns the text alignment within the stamp area.
originXdoubleReadReturns the horizontal position of the stamp origin.
originYdoubleReadReturns the vertical position of the stamp origin.
rotationfloatReadReturns the rotation angle in degrees.
backgroundbooleanReadReturns whether this stamp is rendered behind the page content.
pageNumberintReadReturns the page number this stamp should be applied to.
stampIdintReadReturns the stamp identifier.
formattedTextFormattedTextReadReturns the bound {@link FormattedText}, or {@code null} if none has been set.
imageFileStringReadReturns the bound image file path, or {@code null}.
imageStreamInputStreamReadReturns the bound image stream, or {@code null}.
pdfFileStringReadReturns the bound PDF file path, or {@code null}.
pdfDocumentDocumentReadReturns the bound PDF document, or {@code null}.
pdfPageNumberintReadReturns the 1-based source PDF page number.

Methods

SignatureDescription
TextStamp(value: String)Creates a new TextStamp with the given text value.
TextStamp(formattedText: FormattedText)Creates a new TextStamp from a {@link FormattedText} instance.
getValue()StringReturns the text content of this stamp.
setValue(value: String)Sets the text content of this stamp.
getTextState()TextStateReturns the text state for this stamp, creating it lazily if needed.
setTextState(textState: TextState)Sets the text state for this stamp.
getWordWrapMode()TextFormattingOptions.WordWrapModeReturns the word wrap mode for this stamp’s text.
setWordWrapMode(wordWrapMode: TextFormattingOptions.WordWrapMode)Sets the word wrap mode for this stamp’s text.
getTextAlignment()HorizontalAlignmentReturns the text alignment within the stamp area.
setTextAlignment(textAlignment: HorizontalAlignment)Sets the text alignment within the stamp area.
put(page: Page)Applies this text stamp to the given page.
Stamp()Creates a new empty {@code Stamp} instance.
bindLogo(formattedText: FormattedText)Binds a {@link FormattedText} as the text content (logo) of this stamp.
bindImage(imageFile: String)Binds an image file as the stamp source.
bindPdf(pdfFile: String, pageNumber: int)Binds a PDF page as the stamp source.
setOrigin(x: double, y: double)Sets the origin (position) of the stamp on the page.
getOriginX()doubleReturns the horizontal position of the stamp origin.
getOriginY()doubleReturns the vertical position of the stamp origin.
getRotation()floatReturns the rotation angle in degrees.
setRotation(rotation: float)Sets the rotation angle in degrees.
isBackground()booleanReturns whether this stamp is rendered behind the page content.
setBackground(background: boolean)Sets whether this stamp is rendered behind the page content.
getPageNumber()intReturns the page number this stamp should be applied to.
setPageNumber(pageNumber: int)Sets the page number this stamp should be applied to.
getStampId()intReturns the stamp identifier.
setStampId(stampId: int)Sets the stamp identifier.
getFormattedText()FormattedTextReturns the bound {@link FormattedText}, or {@code null} if none has been set.
getImageFile()StringReturns the bound image file path, or {@code null}.
getImageStream()InputStreamReturns the bound image stream, or {@code null}.
getPdfFile()StringReturns the bound PDF file path, or {@code null}.
getPdfDocument()DocumentReturns the bound PDF document, or {@code null}.
getPdfPageNumber()intReturns the 1-based source PDF page number.

See Also