g4t/webshot is a Laravel package for package to take screenshoot for web page as image or pdf..
It currently has 8 GitHub stars and 37 downloads on Packagist (latest version 0.1.1).
Install it with composer require g4t/webshot.
Discover more Laravel packages by g4t
or browse all Laravel packages to compare alternatives.
Last updated

Laravel G4T WebShot is a powerful PHP package designed to capture screenshots or generate PDFs from any web page. It provides robust functionality for managing and retrieving screen dimensions based on predefined identifiers.
To install the Laravel G4T WebShot, follow these steps:
Install via Composer:
composer require g4t/webshot
To capture a screenshot of a web page and return its URL:
use g4t\WebShot\Screenshot;
$save_path = public_path('files/save.png');
return Screenshot::take('https://google.com')
->size('14-inc')
->saveAs($save_path)
->url();
To capture a screenshot of a web page and download it directlyURL:
use g4t\WebShot\Screenshot;
$save_path = public_path('files/save.png');
return Screenshot::take('https://google.com')
->size('14-inc')
->saveAs($save_path)
->path();
To capture a screenshot of a web page and download it directly:
use g4t\WebShot\Screenshot;
$save_path = public_path('files/save.png');
return Screenshot::take('https://google.com')
->size('14-inc')
->saveAs($save_path)
->download();
To specify custom dimensions for the screenshot:
use g4t\WebShot\Screenshot;
$save_path = public_path('files/save.png');
return Screenshot::take('https://google.com')
->customSize(width: 1000, height: 1000)
->saveAs($save_path)
->download();
'13-inc',
'14-inc',
'15-inc',
'16-inc',
'iphone-SE1st',
'iphone-SE-2nd',
'iphone-6',
'iphone-6s',
'iphone-7',
'iphone-8',
'iphone-8-plus',
'iphone-11-pro-max',
'ipad-landscape',
'ipad-pro-10.5-landscape',
'ipad-pro-11-inch-landscape',
'ipad-pro-12.9-inch-landscape',
'full-hd',
'2k',
'4k'
Contributions to the Laravel G4T WebShot Package are always welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
The Laravel G4T WebShot is open-source software licensed under the MIT license.
The Laravel G4T WebShot Package is developed and maintained by HusseinAlaa.