0

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 ?

MercyDude
  • 884
  • 10
  • 27
Gopal Chitalia
  • 430
  • 4
  • 18

1 Answers1

2

There are a few ways to get a pdf from your html

  1. window.print(); in JS

  2. already answered here using jquery, but only to a certain degree, it doesn't support colors or images or other things

  3. lastly I recommend jsPDF which was another answer to a question somewhat like yours

chriscrutt
  • 500
  • 3
  • 5
  • 17