1. Go to this page and download the library: Download asyncphp/paper library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
asyncphp / paper example snippets
use AsyncInterop\Loop;
use AsyncPHP\Paper\Driver\DomDriver;
use AsyncPHP\Paper\Runner\AmpRunner;
Loop::execute(Amp\wrap(function() use ($sample) {
$driver = new DomDriver();
$runner = new AmpRunner();
$promise = $driver
->html($sample)
->size("A4")
->orientation("portrait")
->dpi(300)
->render($runner);
$results = yield $promise;
}));