You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there!
When exporting PDF files (using MPDF library) with custom unicode font (Noto Sans), Laravel Excel renders the characters as squares making them unreadable (like the image below).
What I'm actually trying to do is implement a custom unicode font that supports Devanagari in Laravel Excel exported PDFs.
To test for the file, I've created a blade template and created a PDF with just mPDF library and it gets the required result like this:
But when I try to export the same blade view with Laravel Excel, it gets the square characters like the first image shown. I've even tried to set the default font using the WithDefaultStyles concern as shown in the docs, like the image below but couldn't fix the issue:
Am I missing something here or Laravel Excel doesn't support any custom loaded unicode fonts? Would really help if someone could kindly enlighten me on this issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!

When exporting PDF files (using MPDF library) with custom unicode font (Noto Sans), Laravel Excel renders the characters as squares making them unreadable (like the image below).
What I'm actually trying to do is implement a custom unicode font that supports Devanagari in Laravel Excel exported PDFs.
To test for the file, I've created a blade template and created a PDF with just mPDF library and it gets the required result like this:

But when I try to export the same blade view with Laravel Excel, it gets the square characters like the first image shown. I've even tried to set the default font using the WithDefaultStyles concern as shown in the docs, like the image below but couldn't fix the issue:

Am I missing something here or Laravel Excel doesn't support any custom loaded unicode fonts? Would really help if someone could kindly enlighten me on this issue.
Beta Was this translation helpful? Give feedback.
All reactions