wkhtmltopdf是一個開源的命令行工具,可以將HTML轉換為pdf文檔和圖片。
Thank you for reading this post, don't forget to subscribe!先確認更新
yum update
下載RMP包, RMP包可以從官網wkhtmltopdf.org下,也可以從Github下。

wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm
安裝rmp
rpm -Uvh wkhtmltox-0.12.6-1.centos7.x86_64.rpm
測試
wkhtmltopdf "https://yahoo.com.tw" yahoo.pdf
安裝中文字型
http://kaito-kidd.com/2015/03/12/python-html2pdf/
https://iter01.com/541709.html
參考資料
https://wkhtmltopdf.org/index.html
https://www.jibing57.com/2019/11/28/way-to-install-wkhtmltopdf-and-wkhtmltoimage-to-CentOS-7/