how to check checkbox on iText?
form.setField("pt_gender_female", "On");
form.setField("pt_gender_female", true);
I did couple of trial and error but none of these worked. I searched but didn't find the perfect answer.
String states[] = stamper.getAcroFields().getAppearanceStates("pt_gender_female");
form.setField("pt_gender_female",states[1]);
I tried the abode snipet. It checked the checkbox.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With