[英]How do I export my HTML page which is dynamically generated by AngularJs as PDF?
I have tested JavaScript library jsPDF for a exporting a complete page to pdf and downloading the same. 我已经对JavaScript库jsPDF进行了测试,以将完整的页面导出为pdf并下载。 Wasn't really happy with the format of elements that has an overflow which I have handled through CSS.
我对通过CSS处理的溢出元素的格式不是很满意。 But seems to get the basic work dome.
但是似乎得到了基本的工作。 Also has some issues if i assign it to onload event.
如果我将其分配给onload事件,也会有一些问题。 The page gets stuck and browser stops responding.
页面卡住,浏览器停止响应。
The Kendo library seem to do an Ok job for me clientside but you do get some rendering issues now and then. Kendo库似乎对我的客户端工作还不错,但是您确实会时不时遇到一些渲染问题。
You will get the best results from a server side rendering library. 您将从服务器端渲染库中获得最佳结果。 You can scrape the HTML from the DOM and send it server side to a rendering engine like ABCPDF and the results are usually pretty good.
您可以从DOM抓取HTML,并将其发送到服务器端到ABCPDF之类的呈现引擎,结果通常都很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.