FoxitPDFSDKforWeb v10.0.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
{textColor:number,textSize:number,fontName:string} - 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
defaultAppearanceobject - Json obejct of default appearance.
defaultAppearance.fontNamestring - Default appearance font name.
defaultAppearance.textColornumber - Default appearance text color (0x**RRGGBB).
defaultAppearance.textSizenumber - Default appearance text size. Range: 6~40;
Returns
Promise<void> -

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