Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Freek Van der Herten:
Easily convert webpages to images using PHP
Jul 03, 2017 @ 16:53:35

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.

tagged: convert webpage image capture screenshot browsershot package

Link: https://murze.be/2017/07/easily-covert-webpages-to-images-using-php/


Trending Topics: