mkdir -p /usr/share/fonts/chinese
#centos7
yum install ttmkfdir -y
#centos8
dnf install ttmkfdir -y
ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
vim /etc/fonts/fonts.conf
#加入以下這一 段,存檔退出
<dir>/usr/share/fonts/chinese</dir>
- 重新整理記憶體中的字型快取,這樣就不用 reboot 重啟了
fc-cache
fc-list | grep chinese
yum install -y libpng libjpeg openssl icu libX11 libXext libXrender xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm
rpm -Uvh wkhtmltox-0.12.6-1.centos7.x86_64.rpm
dnf install -y libpng libjpeg openssl icu libX11 libXext libXrender xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos8.x86_64.rpm
rpm -Uvh wkhtmltox-0.12.6-1.centos8.x86_64.rpm
- 修改專案下.env (預設/var/www/html/BookStack.env)
#加入
WKHTMLTOPDF=/usr/local/bin/wkhtmltopdf
#這是剛才wkhtmltopdf 所安裝的路徑