I use the methods SetCheckValue() and SetRadio() for editing my PDF form.
switch (element.GetCheckStatus()) {
case 0:
element.SetCheckValue(true);
break;
case 1:
element.SetCheckValue(false);
break;
case 2:
case 3:
element.SetRadio();
break;
}
mRadaeeView.vRenderSync(page);
mListener.onFormComboButtonClick(page, element);
It works great and radiobox and checkbox buttons updated. But when I call getters for the updated object of Annotation I get illegal values:
@Override
public void onFormComboButtonClick(PDFVPage vPage, Annotation formElement) {
Log.d(TAG, "onFormComboButtonClick: page #" + vPage.GetPageNo()
+ ", annotation #" + formElement.GetIndexInPage()
+ ", selected: " + formElement.GetComboItemSel()
+ " of " + formElement.GetComboItemCount());
}
09-24 16:09:10.193: D/FormActivity(1061): onFormComboButtonClick: page #0, annotation #-1, selected: -1 of -1
Why the methods GetIndexInPage(), GetComboItemSel() and GetComboItemCount() are not working for me?