beverio/tcpdf-laravel

tcpdf support for laravel 5
301 1
Install
composer require beverio/tcpdf-laravel
Latest Version:5.3.0
License:MIT
Last Updated:Nov 11, 2016
Links: GitHub  ·  Packagist
Maintainer: beverio

Laravel 5.3 TCPDF

Forked from: elibyy/tcpdf-laravel

Installation

Step 1

Require package using composer require beverio/tcpdf-laravel

Step 2

Add the service provider and aliases to config/app.php.

'providers' => [
    //...
    Elibyy\TCPDF\ServiceProvider::class,
]

//...

'aliases' => [
    //...
    'PDF' => Elibyy\TCPDF\Facades\TCPDF::class
]

Usage

Create a view in resources/views/. You can use all TCPDF methods with the PDF facade.


Close each view with

PDF::Show();

In your controller use

return PDF::inline('path.to.view', compact('var1', 'var2'), 'OptionalFilename.pdf');

to show a PDF file inline, or

return PDF::save('path.to.view', compact('var1', 'var2'), 'OptionalFilename.pdf');

to force the user to download the file.

For a list of all available function take a look at the TCPDF Documentation

Configuration

Laravel-TCPDF comes with some basic configuration. If you want to override the defaults, you can publish the config, like so:

php artisan vendor:publish

Now access config/tcpdf.php to customize.

Related Packages

racklin/pdf-generator

simple pdf generator for laravel 5

112 3
xaoc/laravel-tcpdf

A simple Laravel 5 service provider with some basic configuration for including...

16,103 3
elibyy/tcpdf-laravel

tcpdf support for Laravel 6, 7, 8, 9, 10, 11

2,996,537 355
platolin/laravel-tcpdf

tcpdf support for laravel 5

12 0
maxxscho/laravel-tcpdf

A simple Laravel 4 service provider with some basic configuration for including...

25,789 87