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
| Name | Type | Access | Description |
|---|---|---|---|
Type | : 'text' | Read | Gets the type. |
Multiline | boolean | Read/Write | Gets the multiline. |
Password | boolean | Read/Write | Gets the password. |
Comb | boolean | Read/Write | Gets the comb. |
FileSelect | boolean | Read/Write | Gets the file select. |
RichText | boolean | Read/Write | Gets the rich text. |
DoNotSpellCheck | boolean | Read/Write | Gets the do not spell check. |
DoNotScroll | boolean | Read/Write | Gets the do not scroll. |
RichTextValue | string | undefined | Read/Write | Gets the rich text value. |
RichTextPlain | string | undefined | Read | Gets the rich text plain. |
MaxLen | number | Read/Write | Gets the max len. |
Widgets | PdfDict[] | Read | Gets the widgets. |
Options | string[] | Read | Gets the options. |
Value | string | string[] | boolean | Read/Write | Gets the value. |
Actions | FieldActions | Read | Gets the actions. |
ReadOnly | boolean | Read/Write | Gets the read only. |
Required | boolean | Read/Write | Gets the required. |
Methods
| Signature | Description |
|---|---|
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() → number | Bake 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. |