Im getting possible values of checkbox from a dynamic pdf(pdf is uploaded by user at runtime)using GetAppearanceState(). But how to refer the off value and not based on array nos as suggested by @Bruno Lowagie comments on below post. Reference : Checking off pdf checkbox with itextsharp
The Off value should always reflect the off state. The order doesn't matter. So you shouldn't count on the 1st state to be the "uncheck" state. – Bruno Lowagie Apr 22 '16 at 17:35
My code
string[] checkboxStates = myAcrofields.GetAppearanceStates(strChkboxName);
string strChecked = checkboxStates[0]; //Here i want to refer array
["Off"].
string strUnchecked = checkboxStates[1];
if (my_fieldproperties[5] == "true")
myAcrofields.SetField(my_fieldproperties[8], strChecked);
else
myAcrofields.SetField(my_fieldproperties[8], strUnchecked);