I am a new learner of MERN stack ...............I want to create a pdf report of a prescribed format in which data need to be filled from a different component form having many inputs in the form. From that form, few inputs data is needed to fill in the pdf report as said above. after generating that pdf, it needed to be saved in the database (Mongo). What is the best possible way to do it. Is it possible to generate the PDF on client side by taking the selected form inputs data and then save the generated pdf in the database or it should be generated by fetching the data from database after saving all the the form input data and then saving the generated pdf in database. Also i have to render the same pdf report on clint side after clicking on a button of view.
I tried it doing with PDF-LIB but could not find the way to create PDF template. also tried wih react pdf/renderer but it is not working with react 18.PLZ help ....Thanks in advance