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
| Name | Type | Access | Description |
|---|---|---|---|
fontName | String | Read | Returns the font name. |
fontSize | double | Read | Returns the font size in points. |
textColor | Color | Read | Returns the text color. |
text | String | Read | Returns the default appearance string in PDF operator format. |
Methods
| Signature | Description |
|---|---|
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() → String | Returns the font name. |
setFontName(fontName: String) | Sets the font name. |
getFontSize() → double | Returns the font size in points. |
setFontSize(fontSize: double) | Sets the font size in points. |
getTextColor() → Color | Returns the text color. |
setTextColor(textColor: Color) | Sets the text color. |
getText() → String | Returns the default appearance string in PDF operator format. |
toAppearanceString() → String | Generates the DA string in PDF operator format. |
fromString(da: String) → DefaultAppearance | Parses a default appearance string (/DA) into a {@link DefaultAppearance} object. |
toString() → String | Returns the DA string (same as {@link #getText()}). |