Knowledge Base and examples

Knowledge Base - Get/Set form Fields programmatically

Below you can find an example on how to call Get/Set form fields methods.

Note, these methods need to be called after the pdf has been rendered, so here we will use the callback didShowReader

 

function didShowReader()
{
console.log("--- Callback: didShowReader");

RadaeePDFPlugin.getJSONFormFields({},function(message){console.log("Success: " + message);

RadaeePDFPlugin.setFormFieldWithJSON({
json: "{\"Pages\":[{\"Page\":0,\"Annots\":[{\"Index\":0,\"Name\":\"\",\"Type\":20,\"FieldName\":\"Left_wzVTfZ71mu781lCeYfayrQ\",\"FieldNameWithNO\":\"Left_wzVTfZ71mu781lCeYfayrQ\",\"FieldFullName\":\"Left_wzVTfZ71mu781lCeYfayrQ\",\"FieldFullName2\":\"Left_wzVTfZ71mu781lCeYfayrQ\",\"FieldFlag\":0,\"FieldType\":2,\"CheckStatus\":-1,\"ComboItemSel\":-1,\"ComboItemSelItem\":-1,\"ComboItemCount\":-1,\"ListSels\":\"\",\"ListItemCount\":-1,\"EditText\":\"left\",\"EditType\":1,\"SignStatus\":-1},{\"Index\":1,\"Name\":\"\",\"Type\":20,\"FieldName\":\"Center_HrV43gLqlMjipUc1D9vVLA\",\"FieldNameWithNO\":\"Center_HrV43gLqlMjipUc1D9vVLA\",\"FieldFullName\":\"Center_HrV43gLqlMjipUc1D9vVLA\",\"FieldFullName2\":\"Center_HrV43gLqlMjipUc1D9vVLA\",\"FieldFlag\":0,\"FieldType\":2,\"CheckStatus\":-1,\"ComboItemSel\":-1,\"ComboItemSelItem\":-1,\"ComboItemCount\":-1,\"ListSels\":\"\",\"ListItemCount\":-1,\"EditText\":\"center\",\"EditType\":1,\"SignStatus\":-1},{\"Index\":2,\"Name\":\"\",\"Type\":20,\"FieldName\":\"Right_RiIT1tGHsfO9QHa-j6FwNQ\",\"FieldNameWithNO\":\"Right_RiIT1tGHsfO9QHa-j6FwNQ\",\"FieldFullName\":\"Right_RiIT1tGHsfO9QHa-j6FwNQ\",\"FieldFullName2\":\"Right_RiIT1tGHsfO9QHa-j6FwNQ\",\"FieldFlag\":0,\"FieldType\":2,\"CheckStatus\":-1,\"ComboItemSel\":-1,\"ComboItemSelItem\":-1,\"ComboItemCount\":-1,\"ListSels\":\"\",\"ListItemCount\":-1,\"EditText\":\"right\",\"EditType\":1,\"SignStatus\":-1},{\"Index\":3,\"Name\":\"\",\"Type\":20,\"FieldName\":\"fc-int01-generateAppearances\",\"FieldNameWithNO\":\"fc-int01-generateAppearances\",\"FieldFullName\":\"fc-int01-generateAppearances\",\"FieldFullName2\":\"fc-int01-generateAppearances\",\"FieldFlag\":1,\"FieldType\":2,\"CheckStatus\":-1,\"ComboItemSel\":-1,\"ComboItemSelItem\":-1,\"ComboItemCount\":-1,\"ListSels\":\"\",\"ListItemCount\":-1,\"EditText\":\"\",\"EditType\":1,\"SignStatus\":-1}]}]}"
},
function(message){
console.log("Success: " + message);
},
function(err){
console.log("Failure: " + err);
});},function(err){console.log("Failure: " + err);});
}

 

 For more Details about the callbacks and/or other JS methods, please check below the related articles.

Applies To

RadaeePDF SDK for Cordova

Related Articles

RadaeePDF-Cordova Plugin JS methods

How to manage reader callbacks

Details

Created : 2017-12-05 08:35:34, Last Modified : 2017-12-05 08:45:05