Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install wkhtmltopd 0.12.5

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report