TextField

Overview

TextField is a class in Aspose.PDF FOSS for TypeScript. Inherits from: Field.

A text field (/FT /Tx).

This class declares 6 methods for TextField objects in TypeScript programs. Available methods include: Flatten, GenerateAppearance, SetActions, SetStyle, constructor, setFlagForTest. All public members are accessible to any TypeScript application after installing the Aspose.PDF FOSS for TypeScript package. Properties: Actions, Comb, DoNotScroll, DoNotSpellCheck, FileSelect, MaxLen, and 11 more.

Properties

NameTypeAccessDescription
Type: 'text'ReadGets the type.
MultilinebooleanRead/WriteGets the multiline.
PasswordbooleanRead/WriteGets the password.
CombbooleanRead/WriteGets the comb.
FileSelectbooleanRead/WriteGets the file select.
RichTextbooleanRead/WriteGets the rich text.
DoNotSpellCheckbooleanRead/WriteGets the do not spell check.
DoNotScrollbooleanRead/WriteGets the do not scroll.
RichTextValuestring | undefinedRead/WriteGets the rich text value.
RichTextPlainstring | undefinedReadGets the rich text plain.
MaxLennumberRead/WriteGets the max len.
WidgetsPdfDict[]ReadGets the widgets.
Optionsstring[]ReadGets the options.
Valuestring | string[] | booleanRead/WriteGets the value.
ActionsFieldActionsReadGets the actions.
ReadOnlybooleanRead/WriteGets the read only.
RequiredbooleanRead/WriteGets the required.

Methods

SignatureDescription
setFlagForTest(bit: number, on: boolean)@internal Test seam for setFlag, which is protected.
constructor(doc: Document, acroForm: PdfDict, Dict: PdfDict, Name: string, FullName: string, Type: FieldType, ff: number, initialV: PdfObject)Calls constructor(doc, acroForm, Dict, Name, FullName, Type, ff, initialV) on this TextField instance.
SetActions(actions: FieldActionsUpdate)Set or clear /AA triggers.
Flatten()numberBake just this field into static page content: draw each of its widgets’ appearances into their page’s /Contents, drop those widgets from /Annots, and unwire the field from /AcroForm /Fields.
GenerateAppearance()Regenerate this field’s appearance stream(s) from its current value, so the result renders without relying on a viewer honoring /NeedAppearances.
SetStyle(style: FieldStyle)Restyle this field: border, background and text.