PHP code example of anouar / fpdf

1. Go to this page and download the library: Download anouar/fpdf 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/ */

    

anouar / fpdf example snippets


'providers' => array(
	// ...

	'Anouar\Fpdf\FpdfServiceProvider',
)

'aliases' => array(
	// ...

	'Fpdf'	  => 'Anouar\Fpdf\Facades\Fpdf',
)

Route::get('pdf', function(){
	$fpdf = new Fpdf();
        $fpdf->AddPage();
        $fpdf->SetFont('Arial','B',16);
        $fpdf->Cell(40,10,'Hello World!');
        $fpdf->Output();
        exit;

});