简体   繁体   中英

How to convert HTML(CSS) To PDF Using JavaScript bowser independent

我想将Java脚本或jquery中的按钮单击事件上的带有CSS的网页转换为PDF。

There is actually a package out there that does this for you

https://github.com/Xportability/css-to-pdf

"css2pdf is a simple to use Javascript for CSS to PDF rendering that can easily be plugged-in to your website."

Example:

<a href="#" onclick="return xepOnline.Formatter.Format('Usage',{render:'download'});">
    <img src="button-print.png">
</a>

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