Looking to hire Laravel developers? Try LaraJobs

laravel-tcpdf maintained by roy-sandip

Description
TCPDF for laravel use.
Author
Last update
2025/05/21 22:47 (dev-main)
License
Links
Downloads
21

Comments
comments powered by Disqus

Laravel TCPDF

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.