简体   繁体   English

替代无头浏览器生成GCharts的pdf

[英]Alternative to headless browser on pdf generation of GCharts

Does anyone know of an alternative to phantomjs to render some GCharts in pdf? 有没有人知道phantomjs的替代方法,以pdf格式呈现一些GCharts?

We are currently using phantomjs but the speed of it is to slow. 我们目前正在使用phantomjs,但速度很慢。

All the alternatives (casperJS, slimerJS, wkhtmltopdf... See a list here https://github.com/dhamaniasad/HeadlessBrowsers ) will be almost the same... You have to instantiate a browser, takes several seconds. 所有替代方案(casperJS,slimerJS,wkhtmltopdf ...请参阅此处的列表https://github.com/dhamaniasad/HeadlessBrowsers )将几乎相同...您必须实例化浏览器,需要几秒钟。 You have PhantomjsCloud that is pretty fast, takes for me 3-4 seconds for generating a pdf from an html page... 你有PhantomjsCloud非常快,从html页面生成pdf需要3-4秒...

The faster solution will be a native asp.net library, such Select.Pdf : https://www.nuget.org/packages/Select.Pdf/ 更快的解决方案是本机asp.net库,例如Select.Pdf: https ://www.nuget.org/packages/Select.Pdf/

This sample code can help you (uses gchart+asp.net for generating pff) : https://www.spiria.com/en/blog/web-applications/create-html-5-charts-export-them-pdf-free 此示例代码可以帮助您(使用gchart + asp.net生成pff): https ://www.spiria.com/en/blog/web-applications/create-html-5-charts-export-them-pdf- 自由

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM