Take webpage screenshot from command line in Ubuntu Linux | Binary Tides

Take webpage screenshot from command line in Ubuntu Linux | Binary Tides,第1张

Take webpage screenshot from command line in Ubuntu Linux | Binary Tides

There are many instances when you want to take the screenshot of a webpage from within a php script or the command line. On ubuntu there are several ways to do it and most of them produce a webkit , gecko or khtml rendered screenshot image.

Some of the methods require X session to open a window and take screenshots. So VNC can be used to run in on servers for example. To Setup a VNC server on Ubuntu read this article.

1. wkhtmltopdfUrl :

http://code.google.com/p/wkhtmltopdf/

wkhtmltopdf is a command line utility that converts html to pdf using webkit rendering engine.

Install :

sudo apt-get install wkhtmltopdf

Usage :view source

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/zaji/2090052.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-07-22
下一篇2022-07-22

发表评论

登录后才能评论

评论列表(0条)

    保存