2017 © Pedro PelĂĄez
 

library laravel-fpdf

originally by codedge/laravel-fpdf, edited some work to meet our own requirement

image

tesarwijaya/laravel-fpdf

originally by codedge/laravel-fpdf, edited some work to meet our own requirement

  • Thursday, September 28, 2017
  • by tesarwijaya
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 18 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Laravel 5 package for Fpdf

Latest Stable Version Total Downloads StyleCI License, (*1)

This repository implements a simple ServiceProvider that creates a singleton instance of the Fpdf PDF library - easily accessible via a Facade in Laravel 5., (*2)

See FPDF homepage for more information about the usage., (*3)

Installation using Composer

$ composer require codedge/laravel-fpdf

Usage

To use the static interfaces (facades) you need to add the following lines to your config/app.php. The [1] is for registering the service provider, the [2] are for specifying the facades:, (*4)

// config/app.php

return [

    //...

    'providers' => [
        // ...

        /*
         * Application Service Providers...
         */
        // ...
        Codedge\Fpdf\FpdfServiceProvider::class, // [1]
    ],

    // ...

    'aliases' => [
        // ...
        'Fpdf' => Codedge\Fpdf\Facades\Fpdf::class, // [2]
]

Now you can use the facades in your application., (*5)

Configuration (optional)

Run
php artisan vendor:publish --provider="Codedge\Fpdf\FpdfServiceProvider" --tag=config
to publish the configuration file to config/fpdf.php., (*6)

Open this file and enter the correct page settings, if you do not want the defaults., (*7)

Basic example

If you want to use the facade you can see a basic example here:, (*8)

// app/Http/routes.php | app/routes/web.php

Route::get('/', function () {

    Fpdf::AddPage();
    Fpdf::SetFont('Courier', 'B', 18);
    Fpdf::Cell(50, 25, 'Hello World!');
    Fpdf::Output();

});

Of course you can also inject the singleton instance via dependency injection. See an example here:, (*9)

// app/Http/routes.php | app/routes/web.php

Route::get('/', function (Codedge\Fpdf\Fpdf\Fpdf $fpdf) {

    $fpdf->AddPage();
    $fpdf->SetFont('Courier', 'B', 18);
    $fpdf->Cell(50, 25, 'Hello World!');
    $fpdf->Output();

});

The Versions

28/09 2017

dev-master

9999999-dev

originally by codedge/laravel-fpdf, edited some work to meet our own requirement

  Sources   Download

MIT

The Requires

 

by Tesar Wijaya

laravel pdf fpdf

02/06 2017

1.2.2

1.2.2.0

Laravel 5 package for use with Fpdf. It ships with Fpdf 1.81.

  Sources   Download

MIT

The Requires

 

laravel pdf fpdf

30/04 2017

1.2.1

1.2.1.0

Laravel 5 package for use with Fpdf. It ships with Fpdf 1.81.

  Sources   Download

MIT

The Requires

 

laravel pdf fpdf

30/04 2017

1.2

1.2.0.0

Laravel 5 package for use with Fpdf. It ships with Fpdf 1.81.

  Sources   Download

MIT

The Requires

 

laravel pdf fpdf

30/04 2017

1.1

1.1.0.0

Laravel 5 package for use with Fpdf. It ships with Fpdf 1.81.

  Sources   Download

MIT

The Requires

 

laravel pdf fpdf

21/06 2016

1.0

1.0.0.0

Laravel 5 package for use with Fpdf. It ships with Fpdf 1.81.

  Sources   Download

MIT

The Requires

 

laravel pdf fpdf