I am developing a web application to get user input and query data from mysql DB using jsp+servlet. After that I need to fill in the data to a pdf template (retrieve from tomcat8/webapps/project/pdf/ folder etc) using itext and show the pdf on user browser. And finally allow user save the filled pdf to mysql DB. Would you please suggest which kinds of program code (itext + jsp or itext + servlet) is better to suit my above case? Thank.
Asked
Active
Viewed 77 times
0
-
I just want to load a pdf template -> system load user data (e.g. name, address etc) and fill into the pdf -> user confirm data correct -> user click submit button to upload the pdf (convert to base64 format data) to mysql database. – stockton Sep 19 '22 at 03:52
-
understand. I just have itext 5 license. Looking for which itext 5 function can load an existing pdf , write data to new pdf and display on screen (pdf preview something) for user double confirm before upload to database. Do you have any reference for me to perform such operation? Thanks. – stockton Sep 19 '22 at 04:24
-
*"better to suit my above case"* - that unfortunately is a matter of opinions. I would say that any jsp should only be used to return HTML responses; in particular in case of binary response types (like pdf) the use of jsp can damage the response by adding some space characters (or even leftover markup) somewhere. – mkl Sep 19 '22 at 04:47