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

Centos7 render font error

randomHHH opened this issue · comments

system version: CentOS Linux release 7.3.1611 (Core)
wkh version: wkhtmltopdf 0.12.6 (with patched qt)

i use rpm -ivh wkhtmltox-0.12.6-1.centos7.x86_64.rpm to install

I had install this packages:
xorg-x11-server-Xvfb
xorg-x11-fonts-Type1
xorg-x11-fonts-75dpi
dejavu-sans-fonts
urw-fonts

image

image

i want to render to like this

This issues is a wkhtmltopdf issue and I think you will have more luck to open an issue on wkhtmltopdf repository (there are already similar issues opened wkhtmltopdf/wkhtmltopdf#4879, wkhtmltopdf/wkhtmltopdf#4863 and wkhtmltopdf/wkhtmltopdf#4836 for example).
By experience I can tell you that you are probably missing the necessary font (or not loading it correctly) on your server and, in order to fix the issue, you should install it/check why it's not loaded.
If you try to launch the pdf generation from the command line using wkhtmltopdf command you'll probably be able to get more information about the failure.

I'm closing the issue as this is not a Snappy issue.