1. Go to this page and download the library: Download endroid/pdf 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/ */
endroid / pdf example snippets
$this->pdfBuilder
->setCover([
'controller' => CoverController::class,
'parameters' => ['title' => 'My PDF', 'date' => new DateTime()],
'cache_key' => 'cover',
'cache_expires_after' => 3600,
'cache_clear' => true, // use to purge any previously cached data
])
;