How to install wkhtmltopd 0.12.5
This article mainly explains "how to install wkhtmltopd 0.12.5", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "how to install wkhtmltopd 0.12.5"!
Installation environment:
Centos7.2
Yum is available. Not available online find another tutorial.
Download version 0.12.5 at https://wkhtmltopdf.org/downloads.html, as rpm file
Then upload the downloaded wkhtmltox-0.12.5-1.centos7.x86_64.rpm to the server/mnt
Run rpm -ivh wkhtmltox-0.12.5-1.centos7.x86_64.rpm under mnt directory and error will be reported.
You need to install some dependencies first. It doesn't matter. Install whatever he needs.
One installation at a time. If there is something in the middle that needs to be asked, it will be fine if you agree to it.
yum install xorg-x11-fonts-Type1*yum install xorg-x11-fonts-75dpi*yum install libjpeg*yum install libXext*yum install libfontconfig*yum install libXrender*
After installing dependency, execute rpm -ivh wkhtmltox-0.12.5-1.centos7.x86_64.rpm and report error again
You need an OpenSSL.
yum -y install openssl
After installation, execute rpm -ivh wkhtmltox-0.12.5-1.centos7.x86_64.rpm
It's done this time.
execute test
wkhtmltopdf http://www.baidu.com ./ test.pdf
But open test.pdf and find Chinese characters actually square
It seems to install Chinese character support.
First install this.
yum install -y fontconfig mkfontscale
Take two fonts out of windows.
These two.
The requested URL/fonts/font.svg was not found on this server.
The requested URL/fonts/fonts/font.svg was not found on this server.
cd /usr/share/fonts/chinese/TrueTypemkfontscalemkfontdirfc-cache -fvsource /etc/profile
Executing fc-list :lang=zh found that there is indeed a Chinese font
Go back to the/mnt directory and execute
wkhtmltopdf http://www.baidu.com ./ test2.pdf
Open test2.pdf . Oh. brighten up the whole sky
At this point, I believe that everyone has a deeper understanding of "how to install wkhtmltopd 0.12.5", may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!