1. Go to this page and download the library: Download gocanto/laravel-simple-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/ */
gocanto / laravel-simple-pdf example snippets
use Gocanto\SimplePDF\Builder;
use Gocanto\SimplePDF\TemplateContext;
Route::get('default-template', function (Builder $builder) {
$context = TemplateContext::make([
'title' => 'foo',
'name' => 'bar',
'content' => '<h1>Some amazing content!</h1>',
]);
$builder->make($context);
return $builder->render();
});
use Psr\Http\Message\StreamInterface;
$new->render(function (StreamInterface $stream) {
//do something amazing with the stream
echo $stream->getContents();
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.