If it is a PDF form you are referring to, then you can try one of the two methods below:
- Using overlay’s
- Create a document that fits the text fields on your existing document
- Fill the values in the text fields on your created document
- Using OverlayPdfDocument in community commons, you can keep your existing PDF on the background and overlay the values on top of the existing form.
- IMHO, this is more maintainable
- Write a Java class, which can put some text on the PDF on a given location
- You can use PDPageContentStream for the same