detectAndAddFormFields

public final void detectAndAddFormFields()

Detects form fields on every page of the document and adds matching interactive form fields to the PDF. Detection uses the Vision form pipeline; detected fields are converted into AcroForm form fields placed at the detected positions. Field-type mapping: Text, Textarea, Unknown → text fieldCheckbox → check box fieldSignature → signature fieldSelect → combo box fieldRadio → skipped (no reliable group/option mapping in current detection output) Field names default to the detector-provided name; nameless or duplicate names are replaced with synthesized identifiers of the form detected_field_N.