Is it possible to generate PDF using jQuery?

后端 未结 6 755
忘掉有多难
忘掉有多难 2020-12-15 06:35

I am using Ajax functionality to retrieve my content and I need to export PDF on success of jQuery.ajax(). How can I do that?

6条回答
  •  执笔经年
    2020-12-15 07:06

    jQuery cannot (because JavaScript cannot) create a PDF from data, no...it can get one from your server (like any other request), but it cannot generate one. JavaScript simply doesn't have a mechanism (though there are some HTML5 options being implemented now) to create/save a file that works cross-browser, especially a binary file.

提交回复
热议问题