| Package Data | |
|---|---|
| Maintainer Username: | limweb | 
| Maintainer Contact: | limweb@hotmail.com (thongchai) | 
| Package Create Date: | 2015-01-09 | 
| Package Last Update: | 2016-09-14 | 
| Language: | PHP | 
| License: | Unknown | 
| Last Refreshed: | 2025-11-04 03:03:03 | 
| Package Statistics | |
|---|---|
| Total Downloads: | 2,438 | 
| Monthly Downloads: | 0 | 
| Daily Downloads: | 0 | 
| Total Stars: | 8 | 
| Total Watchers: | 2 | 
| Total Forks: | 10 | 
| Total Open Issues: | 2 | 
In development.
Add:
"servit/l5mpdf": "dev-master@dev",
To your composer.json
or Run:
composer require servit/l5mpdf
Then add:
'Servit\Mpdf\ServiceProvider',
To the providers array on your config/app.php
And
'PDF'     => 'Servit\Mpdf\Facades\Pdf',
To the aliases array on yout config/app.php in order to enable the PDF facade
$router->get('/pdf/view', function() {
       // Config::set('mpdfconfig.pdf.options',['th','A5','','',10,10,10,10,10,5,'L'] );
       // Config::set('mpdfconfig.pdf.options','"th","A0","","",10,10,10,10,6,3');
       // $mpdfcfg = Config::get('mpdfconfig');
       // dump($mpdfcfg);
       // consolelog('mpdfcfg1',$mpdfcfg);
       $pdf = \App::make('mpdf.wrapper',['th','A0','','',10,10,10,10,10,5,'L']);
       // $pdf = \App::make('mpdf.wrapper');
       $pdf->WriteHTML('<h1>test</h1>');
       $pdf->AddPage('P');
       $pdf->WriteHTML('<h1>test2</h1>');
       $pdf->stream();
});
$router->get('/pdf/download', function() {
    $html = view('pdfs.example')->render();
    return PDF::load($html)->download();
});
$router->get('/pdf/output', function() {
    $html = view('pdfs.example')->render();
    PDF::load($html)
        ->filename('/tmp/example1.pdf')
        ->output();
    return 'PDF saved';
});
This mPDF Wrapper for Laravel5 is open-sourced software licensed under the MIT license 1
............. /****************************/