Create image and PDF with custom fonts using wkhtmltoimage and wkhtmltopdf (Linux centos6 64-bit, hostgator)

I am trying to create an image using wkhtmltoimage with my custom fonts.

  • OS Linux CentOs 64-bit
  • wkhtmltoimage

    and wkhtmltopdf

    version0.11.0_rc1-static-amd64




An example of the expected result:

this is what i am expecting

and My OUTPUT:

enter image description here

You can check this link :

After Googling I found that by encoding the fonts with base64 you can get the exact result, but after coding I got success loading the fonts but still ran into the font-weight issue

Expected Result:

enter image description here

My conclusion:

enter image description here

You can check this link :

All of this works fine on my windows server using wkhtmltoimage.exe version 0.12.1.2 , but I can't seem to solve this issue on my hosting hosting hosting that has linux CentOs6 64-bit .

Your help will be appreciated.

+3


source to share


1 answer


wkhtmltoimage requires several font libraries that host-host apparently does not have. I don't think you can install them on a shared hosting account.



+1


source







All Articles