简体   繁体   中英

How can I generate a PDF file after i submit a form?

I'm not using node js or some front-end framework, I work now in plain html and js, and I got a form, i want to simplify my work, I have to create 500 pdf files as some reports for my business and I created a form and every time I click the submit button I want to autogenerate that pdf and download it to my computer. I have the html template on how I want my pdf too look like, but I can't find something on Google on how I parse the form data to that page and make it downloadable as PDF, can you please help me? Is there a solution or I must use a front-end framework

Sorry it doesn't look like I can comment yet (new user). I'm not sure how to solve your specific problem, but if all else fails you can try to print it and when you get shown the print screen, select "Save as PDF" instead of a printer. I'm also a little confused on that you mean by a form. What kind of data is it? Tables? Values? Personal information? Does it need to be downloadable as soon as you hit submit? Do you want to print it the same way some companies will offer you the option to print a receipt after purchasing something? Please explain your problem a little more so we can help you :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM