简体   繁体   中英

JavaScript how save a html page to a pdf?

I want to save the JSP page as a PDF format, the JSP page has a lot of Highcharts charts and a list of data, so you can not use iText tools to do. The way I can think of is to call the browser to save as PDF function, but how to call? If you can't call me how to solve this problem?

You can actually use a combination of canvas drawing and JavaScript PDF generation to achieve this. Have a look at these libraries:

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