Jul 28, 2021
0
Level 1
How to import font using DomPDF?
I am using Dompdf to generate PDF-s, but I can not get my custom fonts to work. What is the proper way to include them, where to put my ttf files?
I tried putting them in storage/fonts folder, and then including them with:
@font-face {
font-family: 'Nunito';
src: url({{ storage_path('fonts\nunito-bold.ttf') }});
}
body {
font-family: "Nunito";
}
but I get "Failed to load PDF document." error.
Please or to participate in this conversation.