PdfFormFieldOptions Class

The attributes of a field created by PdfInteractiveForm and of its widgets: PdfInteractiveForm.AddSignatureField uses them as they are; the other fields derive from it.

public class PdfFormFieldOptions

Constructors

NameDescription
PdfFormFieldOptions()

PdfFormFieldOptions()

PdfFormFieldOptions.cs
public PdfFormFieldOptions()

No documentation is available.

Properties

NameDescription
AlternateNameGets or sets the alternate name of the field (/TU): the text the user interface shows, and assistive technologies read.
BackgroundColorGets or sets the color of the background, or null for a transparent background, the default.
BorderColorGets or sets the color of the border, or null for no border. The default is black.
BorderWidthGets or sets the width of the border. The default is 1.
FontGets or sets the font of the text, or null for Helvetica. It is added to the default resources of the form (PdfInteractiveForm.AddFont). Check boxes and radio buttons ignore it: they draw their symbols as paths, and their default appearance names ZapfDingbats.
FontSizeGets or sets the font size; 0 fits the text in the widget. The default is 12, and 0 for check boxes and radio buttons.
IsReadOnlyGets or sets a value indicating whether the user cannot change the value of the field.
IsRequiredGets or sets a value indicating whether the field must have a value when the form is submitted.
SubsetFontGets or sets a value indicating whether an embedded PdfFormFieldOptions.Font keeps only the glyphs the document shows, even when the field is not read-only. The file is smaller, but viewers may not show the characters typed in the field that are not in the subset.
TextColorGets or sets the color of the text and of the symbol of check boxes and radio buttons, or null for black.

Gets or sets the alternate name of the field (/TU): the text the user interface shows, and assistive technologies read.

public string? AlternateName { get; set; }

Property value

string?

BackgroundColor

PdfFormFieldOptions.cs

Gets or sets the color of the background, or null for a transparent background, the default.

public PdfColor? BackgroundColor { get; set; }

Property value

PdfColor?

Gets or sets the color of the border, or null for no border. The default is black.

public PdfColor? BorderColor { get; set; }

Property value

PdfColor?

Gets or sets the width of the border. The default is 1.

public double BorderWidth { get; set; }

Property value

double

Gets or sets the font of the text, or null for Helvetica. It is added to the default resources of the form (PdfInteractiveForm.AddFont). Check boxes and radio buttons ignore it: they draw their symbols as paths, and their default appearance names ZapfDingbats.

public PdfFont? Font { get; set; }

Property value

PdfFont?

Remarks

An embedded font is embedded whole when the field is not read-only, so that viewers can show the text typed in the field, unless PdfFormFieldOptions.SubsetFont is set.

Gets or sets the font size; 0 fits the text in the widget. The default is 12, and 0 for check boxes and radio buttons.

public double? FontSize { get; set; }

Property value

double?

Gets or sets a value indicating whether the user cannot change the value of the field.

public bool IsReadOnly { get; set; }

Property value

bool

Gets or sets a value indicating whether the field must have a value when the form is submitted.

public bool IsRequired { get; set; }

Property value

bool

Gets or sets a value indicating whether an embedded PdfFormFieldOptions.Font keeps only the glyphs the document shows, even when the field is not read-only. The file is smaller, but viewers may not show the characters typed in the field that are not in the subset.

public bool SubsetFont { get; set; }

Property value

bool

Gets or sets the color of the text and of the symbol of check boxes and radio buttons, or null for black.

public PdfColor? TextColor { get; set; }

Property value

PdfColor?