FoxitPDFSDKforWeb v10.0.0
Foxit PDF SDK for Web
|
Public Member Functions | |
getAlignment () | |
Get field's alignment. More... | |
getAlternateName () | |
Get alternate name. More... | |
getBorderColor () | |
Get field's border color. More... | |
getBorderStyle () | |
Get field's border style. More... | |
getControlByIndex (index) | |
Get field's control by index. Please call PDFField.getControlsCount() to get count. More... | |
getControlsCount () | |
Get the count of field's controls. More... | |
getDAFontSize () | |
Get default appearance's font size. More... | |
getFillColor () | |
Get field's fill color. More... | |
getFlags () | |
Get field's flags. For more information, refer to Field_Flag. More... | |
getMappingName () | |
Get mapping name. More... | |
getMaxLength () | |
Get text field's max length. More... | |
getName () | |
Get form field's name(aka title). More... | |
getOptions () | |
Set combo box and list box's options. More... | |
getType () | |
Get form field's type. More... | |
getValue () | |
Get field value. More... | |
setAction (trigger, action) | |
Set field's action. More... | |
setAlignment (alignment) | |
Set field's alignment(Not support signature field). More... | |
setAlternateName (alternateName) | |
Set alternate name. More... | |
setBorderColor (borderColor) | |
Set field's border color(Not support signature field). More... | |
setBorderStyle (strStyle) | |
Set field's border style(Not support signature field). More... | |
setFillColor (fillColor) | |
Set field's fillColor(Not support signature field). More... | |
setFlags (flags) | |
Set field's flags. More... | |
setMappingName (mappingName) | |
Set mapping name. (Not support signature field). More... | |
setMaxLength (maxLength) | |
Set text field's max length. More... | |
setOptions (options) | |
Set options(items) of list box or combo box. More... | |
setValue (value='', control=null) | |
Set field's value. More... | |
PDF Form Field object
|
inline |
Get field's alignment.
|
inline |
Get alternate name.
An alternate field name to be used in place of the actual field name wherever the field must be identified in the user interface (such as in error or status messages referring to the field). This text is also useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes.
|
inline |
Get field's border color.
|
inline |
Get field's border style.
|
inline |
Get field's control by index. Please call PDFField.getControlsCount() to get count.
index | number - Index of the control. |
|
inline |
Get the count of field's controls.
|
inline |
Get default appearance's font size.
|
inline |
Get field's fill color.
|
inline |
Get field's flags. For more information, refer to Field_Flag.
|
inline |
Get mapping name.
Mapping name is to be used when exporting interactive form field data from the document.
|
inline |
Get text field's max length.
|
inline |
Get form field's name(aka title).
|
inline |
Set combo box and list box's options.
|
inline |
Get form field's type.
Unknown:0; PushButton:1; CheckBox:2; RadioButton:3; ComboBox:4; ListBox:5; Text:6; Sign:7; Barcode:8
|
inline |
Get field value.
|
inline |
Set field's action.
trigger | number - The trigger of action. Please refer to Action_Trigger. |
action | string|Action - Action or string. If it is a string, it must be valid JavaScript.. |
|
inline |
Set field's alignment(Not support signature field).
alignment | number - Alignment. Please Refer to Alignment. |
|
inline |
Set alternate name.
An alternate field name is to be used in place of the actual field name wherever the field must be identified in the user interface (such as in error or status messages referring to the field). This text is also useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes.
alternateName | string - A new alternate name string. |
|
inline |
Set field's border color(Not support signature field).
borderColor | number|[string,number,number,number]|string - Border color for field. Supported color format:
|
|
inline |
Set field's border style(Not support signature field).
style | string - Border style, should be one of 'solid','dashed','inset','beveled'. Nothing will be done with invalid string |
|
inline |
Set field's fillColor(Not support signature field).
fillColor | number|['T']|[string,number,number,number]|string - Specify fill color for field (alpha is not supported). Supported color format:
|
|
inline |
Set field's flags.
flags | number - New form field flags. Please refer to Field_Flag, and this should be one or a combination of these values let fieldname = 'Check Box0' let pdfviewer = await pdfui.getPDFViewer() let field = pdfviewer.getPDFDocRender().getPDFDoc().getPDFForm().getField(fieldname) let Field_Flag = PDFViewCtrl.PDF.form.constant.Field_Flag field.setFlags(Field_Flag.ReadOnly | Field_Flag.Required) |
|
inline |
Set mapping name. (Not support signature field).
Mapping name is to be used when exporting interactive form field data from the document.
If current form field is a signature field, this function will do nothing.
mappingName | string - A new mapping name string. |
|
inline |
Set text field's max length.
maxLength | number - Max length to be set to field. |
|
inline |
Set options(items) of list box or combo box.
Applicable for list box and combo box. For field types that are not applicable, this function will do nothing.
options | Array<{label:string,value:string,selected:boolean,defaultSelected:boolean}> - An array of options which is to be set to list box or combo box. [ { label:"label0", value:"value0", selected:true, defaultSelected:true },{ label:"label1", value:"value1", selected:false, defaultSelected:false }, ... ] |
|
inline |
Set field's value.