I'm creating a Java system with Swing, where I would have document templates, and would populate with user-entered data in a form I've already created, so that it generates a template PDF filled with the data.
I tried to do it in a "raw" way, saving the default text in TXT, putting "wildcards" type, where for date, I inserted $data$
and then I would filter using pattern , however, I see which in this way became unfeasible.
How to make these templates more functional?