roy-sandip / laravel-tcpdf
TCPDF for laravel use.
2.0
2023-07-07 16:59 UTC
Requires
- tecnickcom/tcpdf: 6.2.*|6.3.*|6.4.*|6.5.*|6.6.*
README
TCPDF support for laravel app. This package allows to use TCPDF with Laravel as native TCPDF.
Usages
You can use just like TCPDF native. Check its official documentation for all the reatures.
use RoySandip\LaravelTcpdf\PDF; $pdf = new PDF; $pdf->writeHTML('Hello World!', true, false, true, false, ''); $pdf->Output('example.pdf', 'D');
For working conveniently, there are some features like-
$pdf->view('admin.pdf.booking-receipt', ['dataModel' => $model]) ->download('file_name'); //file name can be set optionally
Publish Configuration
php artisan vendor:publish --tag=tcpdf-config
TCPDF default configuration can be edited at config/tcpdf.php
Publish Fonts
php artisan vendor:publish --tag=tcpdf-fonts
Documentation
Check TCPDF official Documentation.