FoxitPDFSDKforWeb  8.4.0
Foxit PDF SDK for Web
PDFControl Class Reference

Public Member Functions

 getDefaultAppearance ()
 Get form control's default appearance. More...
 
 getField ()
 Get field which owned this control. More...
 
 getIndex ()
 Get the index of current form control among all the controls of related form field. More...
 
 getWidgetAnnot ()
 Get widget annot. More...
 
 setDefaultAppearance (defaultAppearance)
 Set the default annotation appearances. More...
 

Detailed Description

PDF Form Control object

Since
7.5.0

Member Function Documentation

◆ getDefaultAppearance()

PDFControl::getDefaultAppearance ( )
inline

Get form control's default appearance.

Returns
{object} - A json object of default appearance.
{
textColor: 0xff0000ff,//default appearance's text color,
textSize: 12,//default appearance's text size
fontName: "FoxitSansOTF" //default appearance's font name
}
Since
7.2.0

◆ getField()

PDFControl::getField ( )
inline

Get field which owned this control.

Returns
{PDFField} - PDFField

◆ getIndex()

PDFControl::getIndex ( )
inline

Get the index of current form control among all the controls of related form field.

Returns
{Promise<number>} - Index of current form control.

◆ getWidgetAnnot()

PDFControl::getWidgetAnnot ( )
inline

Get widget annot.

Returns
{Promise<Widget>} - Widget annot.

◆ setDefaultAppearance()

PDFControl::setDefaultAppearance (   defaultAppearance)
inline

Set the default annotation appearances.

Note
Due to font matching ruler, font name may be changed after set.
Parameters
defaultAppearance{object} - Json obejct of default appearance.
defaultAppearance.fontName{string} - Default appearance font name.
defaultAppearance.textColor{number} - Default appearance text color (0x**RRGGBB).
defaultAppearance.textSize{number} - Default appearance text size. Range: 6~40;
Returns
{Promise.<*>}

Foxit Software Corporation Logo
@2022 Foxit Software Incorporated. All rights reserved.