Tricky question.
I have a very long form where the user writes down a lot of data. I need to save the form for future reading (pdf, html, or even a jpg will do), but I need to save it with the data that the user wrote down. This has to be done on submitting the form.
I know it's going to be impossible with only PHP, but would it be possible with a little help from javascript-ajax?
I can't prompt the user to print the page, and I need to save the view without any other input from the user (beside the submit).
Any ideas?
EDIT:
in a nutshell,
is it possible to generate a pdf from that page without submitting the data ? is there a way fpdf (or others) could "read" and save what's currently on the screen, just like a "print" function ?
imagine a long, looong form, with a button "save as pdf" who saves the current page (with the data inputted from the user) WITHOUT submitting the form....
Take a look at the thread: Which is the best PDF library for PHP?
Highested listed solutions include:
Another possible solution would be converting HTML to PDF in PHP: HTML to PDF in PHP
You can have a look at: http://php.net/manual/en/book.pdf.php and this http://www.tcpdf.org/
Hope this helps you.. Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With