• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class VariableTextAppearance

Appearance model for variable-text fields (spec §12.7.3.2). Encapsulates the default appearance string (/DA) which carries the font name, font size, and text colour used to render the field's value. A font size of zero means the viewer auto-sizes the text to fit the field.

Inheritance
object
VariableTextAppearance
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Pdf.Forms
Assembly: DRIT.Pdf.dll
Syntax
public sealed class VariableTextAppearance

Properties

FontName

The resource name of the font (e.g. Helv). Defaults to Helv (Helvetica), the standard AcroForm default resource.

Declaration
public string FontName { get; set; }
Property Value
Type Description
string

FontSize

The font size in points. A value of zero means auto-size (spec §12.7.3.2).

Declaration
public double FontSize { get; set; }
Property Value
Type Description
double

TextColor

The text colour. Defaults to black.

Declaration
public PdfColor TextColor { get; set; }
Property Value
Type Description
PdfColor

Methods

BuildDefaultAppearanceString()

Builds the default appearance string (/DA) for this appearance model. The format is /FontName size Tf r g b rg.

Declaration
public string BuildDefaultAppearanceString()
Returns
Type Description
string

LoadFromDefaultAppearanceString(string?)

Parses a default appearance string and populates this appearance model. Unrecognised operators are ignored.

Declaration
public void LoadFromDefaultAppearanceString(string? da)
Parameters
Type Name Description
string da

The /DA string to parse.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX