I am using Laravel 5.4 and barryvdh/laravel-dompdf plugin for dompdf. I am using this code,
Controller
$pdf = PDF::loadView('invoice');
View (invoice.blade.php)
<!DOCTYPE html>
<html>
<head>
<title>Invoice</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<div>빨간색</div>
</body>
</html>
When using this code the japanese text will not show correctly. How do I fix this issue?
You can use this link for the answer. It is in japanese but you can use google chrome translate.
In Summary:
#php load_font.php ipag $path_to_font_directory/ipag.tt
which will generate something likeUnable to find bold face file.
Unable to find italic face file.
Unable to find bold_italic face file.
Copying $path_to_font_directory/ ipag.ttf to $laravel_install_directory /vendor/dompdf/dompdf/lib/fonts/ipag.ttf...
Generating Adobe Font Metrics for $laravel_install_directory /vendor/dompdf/dompdf/lib/fonts/ipag...
body {
font-family: ipag;
}