使用 FF 引擎的 Html 2 png

发布于 2024-09-19 08:02:58 字数 102 浏览 2 评论 0原文

我会找到一些使用 FireFox 引擎使用浏览器引擎在服务器站点上生成图形文件(可以是 png)的示例。我想获得与在浏览器中打开此 html 文件并使用 prinscr.txt 相同的图像。

I would find some example uses of FireFox engine to generate graphic file (it can be png) on server site with using browser engine. I would like achive the same image as if i open this html file in browser and use prinscr.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

-残月青衣踏尘吟 2024-09-26 08:02:58

您可以使用 Xvfb(虚拟帧缓冲区)在无头 X 环境中运行 Firefox。在 google 上搜索 虚拟帧缓冲区 firefox

您可以执行以下操作与 webkit(Chrome 和 Safari 背后的引擎)类似。例如,查找 webkit python qt。也有针对其他语言的 Qt 绑定,但 Python 是迄今为止最好的。

You can use Xvfb (virtual frame buffer) to run Firefox in a headless X environment. Do a google search for virtual frame buffer firefox

You can do similar things with webkit (The engine behind Chrome and Safari). For example, look for webkit python qt. There are Qt bindings for other languages too, but the Python ones are by far the best.

如若梦似彩虹 2024-09-26 08:02:58

据我所知,如果没有一些繁重的脚本编写,这在服务器端是不可能的。如果您想按需执行,这也将相当耗费资源。

您可以获得的最接近的是 标记上的服务器端 drawWindow() 方法,但这仅限于 Mozilla。

As far as I'm aware, this isn't possible server-side without some heavy scripting. It would also be fairly resource-intensive if you want to do it on demand.

The closest you can get is the serverside drawWindow() method on the <canvas> tag, but that is Mozilla-only.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文