You might try this code here - I remembered that it was not so straight forward - you actually had to read a value of the field. If it does not have a field name - you will need to get the reference to the checkbox and read values - it does not automagically translate to bool.
public String getCheckboxValue(String src, String name)
{
PdfReader reader = new PdfReader(SRC);
AcroFields fields = reader.getAcroFields();
String[] values = fields.getAppearanceStates("CP_1");
StringBuilder sb = new StringBuilder();
for (String value : values)
{
sb.append(value);
sb.append('\n');
}
return sb.ToString();
}
Or you can use this [From Here:
Get the Export Value of a Checkbox[^]
public string GetCheckBoxExportValue(AcroFields fields, string cbFieldName)
{
AcroFields.Item item = fields.GetFieldItem(cbFieldName);
if (item.values.Count > 0)
{
PdfDictionary valueDict = item.values[0] as PdfDictionary;
PdfDictionary appDict = valueDict.GetAsDict(PdfName.AP);
if (appDict != null)
{
PdfDictionary normalApp = appDict.GetAsDict(PdfName.N);
foreach (PdfName curKey in normalApp.Keys)
{
if (!PdfName.OFF.Equals(curKey))
{
return curKey.ToString();
}
}
}
PdfName curVal = valueDict.GetAsName(PdfName.AS);
if (curVal != null)
{
return curVal.ToString();
}
}
return null;
}