Adding Thai Fonts for Laravel Dompdf
nelisys/laravel-dompdf-thai-font is a Laravel package for adding thai fonts for laravel dompdf.
It currently has 0 GitHub stars and 6.138 downloads on Packagist (latest version v0.1.0).
Install it with composer require nelisys/laravel-dompdf-thai-font.
Discover more Laravel packages by nelisys
or browse all Laravel packages to compare alternatives.
Last updated
This package is adding Thai fonts for barryvdh/laravel-dompdf to allow users can type Thai in generated PDF.
Run composer to install the package.
composer require nelisys/laravel-dompdf-thai-font
Publish the fonts files.
php artisan vendor:publish --provider="Nelisys\LaravelDompdfThaiFont\ServiceProvider"
Create storage/fonts to store cache files.
mkdir storage/fonts
Add @LaravelDompdfThaiFont inside <head>.
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
@LaravelDompdfThaiFont
<style>
body {
font-family: 'THSarabunNew';
}
</style>
</head>
<body>
<h1>
ทดสอบสร้าง PDF ภาษาไทย
</h1>
</body>
</html>
Laravel Dompdf Thai Font is open-sourced software licensed under the MIT license.