1
votes

I am generating PDF with WKHTMLTOPDF library in PHP project (https://github.com/mikehaertl/phpwkhtmltopdf)

When I generate invoices(PDF) on my local comnputer it is in good quality enter image description here

but when I generate it on production server, it gives me this quality enter image description here

The options are same (it is same project with same conf). What is the reason for this behavior?

1
You need to install fonts on your production server. Install urw-fontsFarkie
its also subtracted 100005!DevDonkey
@DevDonkey You made my day. Thanks!arkascha
@Farkie Ok. I will try to install it.MakoBuk
Did it work? I should have submitted it as an answer reallyFarkie

1 Answers

0
votes

Complete solution is to install Microsoft fonts on server.

  1. aptitude install ttf-mscorefonts-installer
  2. fc-cache -fv
  3. dpkg-reconfigure fontconfig-config (native, automatic, no)
  4. dpkg-reconfigure fontconfig
  5. restart php-fpm