Freek Van der Herten: Easily convert webpages to images using PHP

Freek Van der Herten
has an article posted to his site showing how you can use the Browsershot
package to convert web pages to images
with a bit of PHP.

Browsershot
is a package that can easily convert any webpage into a image. Under the hood the conversion is made possible new headless options in Chrome 59
. In this post I’d like to show you how you can use Browsershot v2.

He starts with a bit of history about the package and the recent switch from PhantomJS (a now abandoned project) over to Chrome’s screenshot handling for creating the web page captures. He then shows how to install Chrome 59, the first version to include this feature, into a unix-based environment. Next comes the package
and some example code of it in use: making a simple capture, setting the window size, manipulate the image post-capture and change it to grayscale.

PHPDeveloper责编内容来自:PHPDeveloper (源链) | 更多关于

阅读提示:酷辣虫无法对本内容的真实性提供任何保证,请自行验证并承担相关的风险与后果!
本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 综合编程 » Freek Van der Herten: Easily convert webpages to images using PHP

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录