setCheckbox

fun setCheckbox(field: PdfFormField, checked: Boolean)

Check or uncheck a checkbox field. The "on" state name is taken from the widget's /AP /N keys (the non-Off one, e.g. /Yes), so the value matches whatever the document author defined.