DefaultAppearance

DefaultAppearance

Overview

DefaultAppearance is a class in Aspose.Pdf FOSS for Java.

Represents the default appearance string (/DA) for form fields and free text annotations (ISO 32000-1:2008, Section 12.7.3.3).

Properties

NameTypeAccessDescription
fontNameStringReadReturns the font name.
fontSizedoubleReadReturns the font size in points.
textColorColorReadReturns the text color.
textStringReadReturns the default appearance string in PDF operator format.

Methods

SignatureDescription
DefaultAppearance()Creates a DefaultAppearance with default values (Helvetica, 12pt, black).
DefaultAppearance(fontName: String, fontSize: double, color: Color)Creates a DefaultAppearance with the specified font, size, and color.
getFontName()StringReturns the font name.
setFontName(fontName: String)Sets the font name.
getFontSize()doubleReturns the font size in points.
setFontSize(fontSize: double)Sets the font size in points.
getTextColor()ColorReturns the text color.
setTextColor(textColor: Color)Sets the text color.
getText()StringReturns the default appearance string in PDF operator format.
toAppearanceString()StringGenerates the DA string in PDF operator format.
fromString(da: String)DefaultAppearanceParses a default appearance string (/DA) into a {@link DefaultAppearance} object.
toString()StringReturns the DA string (same as {@link #getText()}).

See Also