简体   繁体   中英

JavaScript: create Pdf from div (HTML and plain text, no images)

I would like to add a function to a page that export a certain div content to PDf. My div only contains a table, standard HTML and plain text, no images or iframes etc.

Through Google and the search here I came across jsPdf but that seems to be a large file to include.

Can anyone recommend a (free) alternative to this or help me to write a function myself ?

Many thanks in advance for any help with this, Tim.

This jQuery plugin can help you:

http://parall.ax/products/jspdf

https://github.com/MrRio/jsPDF

Or

check it Generate PDF using jquery ajax

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