1

I fetch data from mysql which contain book name (in english and hindi/marathi font). When i tried to generate pdf (using mpdf) of some data i got below things enter image description here

I tried using some css but its not working

p,
td {
  font-family: freeserif;
}

I was working on live server if i use

font-family: freeserif;

in inline css then pdf dont work.

please guide me someone

  • 1
    Does this answer your question? [mPDF doesn't print Hebrew on the pdf file](https://stackoverflow.com/questions/41337384/mpdf-doesnt-print-hebrew-on-the-pdf-file) – voiarn Jan 16 '22 at 08:10
  • check out this one https://stackoverflow.com/questions/24412203/dompdf-and-set-different-font-family – najmieh sadat safarabadi Jan 16 '22 at 09:50
  • @voiarn No thats not my question – rahul gupta Jan 16 '22 at 13:54
  • still not working @NajmiehSadatSafarabadi – rahul gupta Jan 16 '22 at 13:54
  • 1
    Voiarn's post is likely to be talking about a similar issue, even if the specific language is different. Give it a try, at least. – ADyson Jan 16 '22 at 14:58
  • @ADyson I tried voiarn link, but now pdf not visible – rahul gupta Jan 16 '22 at 16:40
  • What do you mean "not visible"? You mean the code crashes and doesn't create it, or something? Try to be more precise about the problem. – ADyson Jan 16 '22 at 17:04
  • @ADyson I received fetal error "Fatal error: Uncaught Mpdf\MpdfException: Cannot find TTF TrueType font file "FreeSerif.ttf" in configured font directories. in /home/u665034481/domains/mylibrarywala.com/public_html/admin/mpdf/vendor/mpdf/mpdf/src/Fonts/FontFileFinder.php:33 Stack trace: #0" – rahul gupta Jan 18 '22 at 03:53
  • That probably just means you need to download the mentioned font file... – ADyson Jan 18 '22 at 07:55

0 Answers0