PHP code example of rizalafani / fpdflaravel

1. Go to this page and download the library: Download rizalafani/fpdflaravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rizalafani / fpdflaravel example snippets


'providers' => [
	// ...

	rizalafani\fpdflaravel\FpdfServiceProvider::class,
]

'aliases' => [
	// ...

	'FPDF' => rizalafani\fpdflaravel\FpdfFacade::class,
]

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

        FPDF::AddPage();
        FPDF::SetFont('Arial','B',16);
        FPDF::Cell(40,10,'Hello World!');
        FPDF::Output();
        exit;

});