KnpLabs / snappy

PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage

Home Page:https://knplabs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed fonts rendering

dimakornev13 opened this issue · comments

Left image is barryvdh/laravel-dompdf (dompdf)
Right image is yours engine.

Font is Gilroy.

Testing code: https://gist.github.com/dimakornev13/5f985353002e8ac7fa87416c93e24394
View is: https://gist.github.com/dimakornev13/334cd2fef173589d7976b3eeeb0ef291
config for enging: https://gist.github.com/dimakornev13/4e563060d54fd25e457724e3bdc08027

How to fix fonts view?

Hello,
I would say that wkhtmltopdf is not able to access some resources (like the font and maybe some css) probably due to wrong urls.
I can't really help you more than this with the provided information.

Thanks to reply. Ok, there is repositoty to reproduce problem.

Steps to reproduce:

Ok, I mis-read and thought you were using https://github.com/barryvdh/laravel-snappy instead of the DOMPdf lib.
From what I see it might be related to an issue loading the font related to wkhtmltopdf or the version you are using of wkhtmltopdf not completely supporting font-face.
Check, for example, wkhtmltopdf/wkhtmltopdf#5156

I'm closing the issue as not related to Snappy itself.