My application allows users to fill out a form and submit it using an Ajax mail call. The si form has been submitted to the TCPDF class, which creates the PDF file. The class has a method "-> output (...)" that allows you to save the file on a web server, send it to the browser, ecc ... my goal is to create a PDF file after sending the form and force the user to download it (without updating ) The method does not work with ajax calls. The only solution I found was to create a file, transfer it to the web server and redirect the user to the file location on the web server; but this is not a good solution, I need to force download (automatic start). I read other similar solutions on the forum, but they are not very good. Any suggestions?
source share