Package Data | |
---|---|
Maintainer Username: | beyondplus |
Maintainer Contact: | sanpwintthu@hotmail.com (San Pwint Thu) |
Package Create Date: | 2017-03-23 |
Package Last Update: | 2017-05-10 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-19 03:19:49 |
Package Statistics | |
---|---|
Total Downloads: | 153 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Custom Myanmar Font View PDF Generator
laravel 5.4
Find config/app.php in Project Folder
'providers' => [
//...
Elibyy\TCPDF\ServiceProvider::class,
BeyondPlus\TCPDF\TcpdfServiceProvider::class,
]
//...
'aliases' => [
//...
'MMTCPDF' => BeyondPlus\TCPDF\Facades\MMTCPDF::class,
]
use MMTCPDF;
At function
$fontname = MMTCPDF::font('Zawgyi-One');
//$fontname = MMTCPDF::font('Myanmar3');
MMTCPDF::SetFont($fontname , 11);
MMTCPDF::SetTitle('Record Report');
MMTCPDF::AddPage('P','A4');
MMTCPDF::writeHtml("Myanmar Words");
MMTCPDF::Output('report.pdf', 'I');
$query = Database::get();
$fontname = MMTCPDF::font('Zawgyi-One');
MMTCPDF::SetFont($fontname , 11);
MMTCPDF::SetTitle('Record Report');
MMTCPDF::AddPage('P','A4');
MMTCPDF::writeHtml(view('pdf', array('records'=> $query)));
MMTCPDF::Output('report.pdf', 'I');
Margin
MMTCPDF::SetMargins(1, 1, 1);
Paper Size
MMTCPDF::AddPage ->
P = Portrait
L = Landscape
MMTCPDF::Output ->
F = localserver download
D = download
I = inline
$pagelayout = array('80', '210');
MMTCPDF::AddPage('P',$pagelayout);
// Background Image (width x height unit mm)
$img_file = public_path('upload/').'images.jpg';
MMTCPDF::setBgImage($img_file, 210, 148);
<span style="font-family:Zawgyi-One">ျမန္မာစာ</span>
php artisan vendor:publish
The Beyond Plus Laravel TCPDF is open-sourced software licensed under the MIT license.