Search results

TextFieldSettings API in JavaScript PDF Viewer API control

The TextFieldSettings is used to to show and customize the appearance of text box HTML element.

<div id="pdfViewer" style="height: 100%;width: 100%;"></div>
 let viewer: PdfViewer = new PdfViewer();
 // Change the text field settings.
 viewer.textFieldSettings = {
     name: '',
     value: '',
     fontFamily: 'Courier',
     fontSize: 10,
     fontStyle: 'None',
     color: 'black',
     borderColor: 'black',
     backgroundColor: 'white',
     alignment: 'Right',
     isReadOnly: false,
     visibility: 'visible',
     maxLength: 0,
     isRequired: false,
     isPrint: true,
     tooltip: '',
     thickness: 1,
     isMultiline: false
 };
 viewer.appendTo("#pdfViewer");

Properties

alignment

TextAlignment

Get or set the alignment of the text.

backgroundColor

string

Get or set the background color of the textbox in hexadecimal string format.

borderColor

string

Get or set the border color of the textbox field.

bounds

IFormFieldBound

Get or set the form field bounds.

color

string

Get or set the font color of the textbox in hexadecimal string format.

fontFamily

string

Get or set the font family of the textbox field.

fontSize

number

Get or set the font size of the textbox field.

fontStyle

FontStyle

Get or set the font Style of textbox field.

isMultiline

boolean

Allows multiline input in the text field. FALSE, by default.

isPrint

boolean

Get or set the boolean value to print the textbox field. TRUE by default.

isReadOnly

boolean

Specifies whether the textbox field is in read-only or read-write mode. FALSE by default.

isRequired

boolean

If it is set as true, consider as mandatory field in the PDF document. By default it is false.

maxLength

number

Get or set the maximum character length.

name

string

Get or set the name of the form field element.

pageNumber

number

specifies the page number of the form field.

thickness

number

Get or set the thickness of the textbox field.

tooltip

string

Get or set the text to be displayed as tooltip. By default it is empty.

value

string

Get or set the value of the form field.

visibility

Visibility

Gets or set the visibility of the form field.