akrambe / shotify
Html to PDF and web page screenshots using headless Chrome with no need for Nodejs/npm.
0.1
2019-07-29 05:15 UTC
Requires
- php: ~7.1
- jakubkulhan/chrome-devtools-protocol: ^1.0
Requires (Dev)
- phpunit/phpunit: ^8.2
This package is auto-updated.
Last update: 2025-03-01 00:28:09 UTC
README
No need for Nodejs/npm!
Documentation
Installation
The best way to install this package is through your terminal via Composer.
composer require akrambe/shotify
Usage
<?php require('vendor/autoload.php'); // PDF print from url Shotify\Launcher::fromUrl('http://example.com') ->saveToPDF('example.pdf'); // Screenshot Shotify\Launcher::fromUrl('http://example.com') ->captureScreenshot('hello.png', (new Shotify\Options\ScreenshotOptions) ->setQuality(70) ->setFormat('png') ); // Get document outer HTML $html = Shotify\Launcher::fromUrl('http://example.com') ->outerHtml();
License
Shotify is licensed under the terms of the GNU General Public License v3.0 (See LICENSE file for details).