barryvdh / laravel-dompdf

A DOMPDF Wrapper for Laravel
MIT License
6.57k stars 965 forks source link

How we can show multi Languages in pdf? #1016

Open rituatalea opened 7 months ago

rituatalea commented 7 months ago

你在做

I want to show this text in my pdf but it's showing me '???????'. I tried fonts Noto and DejaVu but it's not working. How to fix this issue?

parallels999 commented 7 months ago

https://github.com/barryvdh/laravel-dompdf/blob/424a223ce80e7afc8bfb6e84449679efe272fbb5/.github/ISSUE_TEMPLATE/bug_report.md?plain=1#L10-L12

This is just a Dompdf wrapper! I understand that this package is just a Laravel wrapper for https://github.com/dompdf/dompdf Any issues with PDF rendering, CSS that is not applied correctly, aligning/fonts/characters/images/html etc that are not directly related to this package, should be reported there. When having doubts, please try to reproduce the issue with just dompdf. If it's also present there, do not open an issue here please.

parallels999 commented 7 months ago

Duplicate of #1015

Rajneesh-rawat commented 1 month ago

try to add font file in storage/fonts folder. @font-face { font-family: "Roboto", sans-serif; src: url("{{ storage_path('fonts/Roboto-Bold.ttf') }}") format("truetype"); } body{ font-family: "Roboto", sans-serif; }