jPDFFields is a Java library for working with interactive PDF forms in both AcroForm and XFA formats. It allows your application to get and set field values, and can import and export to the FDF, XFDF, and XDP formats. It can also "flatten" fields in a document. (Flattening is the process of merging the fields into the PDF content layer so the information is retained, but as static PDF content.)

URL: jPDFFields | Java PDF Form Library | Fill, Flatten, Export PDF Form with Java