Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Form

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Form(fxForm: any): Form
  • Parameters

    • fxForm: any

    Returns Form

Properties

fxForm

fxForm: fxForm

Methods

addField

  • addField(pageIndex: number, fieldName: string, fieldType: FiledType, rect: Rect): Promise<undefined | object>
  • Add a new form control to a specified form field. If the form field does not exist, this function will add a form field as well. (Not support signature field)

    see

    FiledType

    see

    Form

    Parameters

    • pageIndex: number

      The page index, which starts from 0 as the first page.

    • fieldName: string

      The full field name. It should not be an empty string.

    • fieldType: FiledType

      Field type. Please refer to FieldType except Field_Type.

    • rect: Rect

      Rectangle of the new form control which specifies the position in PDF page. It should be in [PDF coordinate system].

    Returns Promise<undefined | object>

    Promise.<{ success:boolean, - true means success, while false means failure. newFieldName:string - if the specified field name can not be used for a new field in specified field type, It will use a new field name for the specified field type. }>

getField

  • getField(name: string): Promise<null | Field>
  • Get PDFField specified by title(a.k.a name).

    see

    Form

    Parameters

    • name: string

      The title of field.

    Returns Promise<null | Field>

    • Target field if existed.

getFieldCount

  • getFieldCount(): Promise<number>
  • Get the count of form fields including unsupported signature.

    see

    Form

    Returns Promise<number>

    • The count of fields.

removeField

  • removeField(fieldName: string): Promise<boolean>
  • Remove a form field.

    see

    Form

    Parameters

    • fieldName: string

      A string value. It should not be an empty string.

    Returns Promise<boolean>

    true means success, while false means failure.