本文介绍了将html渲染为png(服务器端)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个工作流程模型.Internet Explorer不支持模型编辑功能所需的某些功能(普通用户则不需要).

I have a workflow model.Internet Explorer doesn't support some features required for model editing functionality(and regular user doesn't need it).

我想要我的模型的只读预览.是否可以在服务器端将HTML渲染为图像?

I want a read-only preview of my model.Is it possible to server-side render my HTML to an image?

我希望使用离线解决方案,以允许我们的系统在公司LAN中运行而无需访问Internet.

I would prefer offline solution to allow our system run in corporate LAN without access to internet.

推荐答案

以下是本地"解决方案:

Here are 'local' solutions:

  • wkhtmltoimage from the wkhtmltopdf package

确切地说是

PhantomJS

更高级的功能,例如在将页面上下文中的任何js代码呈现为图像或pdf之前对其进行评估.

more advanced capabilities, like evaluating any js code in the page's context before rendering it to an image or pdf.

这篇关于将html渲染为png(服务器端)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-16 13:35