japseyz / pdf-renderer
PDF Renderer
1.0.6
2024-03-30 20:33 UTC
Requires
- php: ^8.1
- api2pdf/api2pdf.php: ^2.0
- barryvdh/laravel-snappy: ^1.0
- spatie/browsershot: ^4.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- nunomaduro/collision: ^7.9|^8.1
- orchestra/testbench: ^8.0
- roave/security-advisories: dev-latest
README
Installation
You can install the package via composer:
composer require japseyz/pdf-renderer
You can publish the config file with:
php artisan vendor:publish --tag="pdf-renderer-config"
This is the contents of the published config file:
return [ // Possible values are: // 'browsershot', 'api2pdf' 'service' => 'browsershot' ];
Usage
$renderer = PDFRenderer::view( 'documents.invoice', [ 'client' => $client, ] ); return response($renderer->render(), 200, [ 'Content-Type' => 'application/pdf', 'Content-Disposition' => 'attachment; filename="invoice.pdf"', ]);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.