Looking to hire Laravel developers? Try LaraJobs

laravel-dompdf-thai-font maintained by nelisys

Description
Adding Thai Fonts for Laravel Dompdf
Last update
2021/01/17 10:43 (dev-main)
License
Links
Downloads
6 110
Tags

Comments
comments powered by Disqus

Laravel Dompdf Thai Font

This package is adding Thai fonts for barryvdh/laravel-dompdf to allow users can type Thai in generated PDF.

Installation

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

Usage

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>

Related Links

License

Laravel Dompdf Thai Font is open-sourced software licensed under the MIT license.