Reputation: 462
I have a form which contains certain fields . So , What I want is, when the user enters those certain fields and submits the form , it should generate a PDF out of it. Can anyone help me out it ?
What I have done is , I have redirected the form to a new HTML page, got all the data which has to be processed to new page. And then I am stuck as to how to proceed . I am using the naive method of saving the generated HTML and then converting that generated HTML to PDF from command line .
Is there a better method ?
Upvotes: 0
Views: 167
Reputation: 529
There are a few ways to get a pdf from your html
window.print();
in JS
already answered here using jquery, but only to a certain degree, it doesn't support colors or images or other things
lastly I recommend jsPDF which was another answer to a question somewhat like yours
Upvotes: 2