Background
Recently, the development department to get a Web-to-pdf program, I found a ready-made program on the Internet, feel very useful, you can also turn the page into pictures. Need to take away. Let's record the installation below.
Official website: https://wkhtmltopdf.org/
Installation environment: Centos 6.8 x64
Steps
1. Download
Https://wkhtmltopdf.org/downloads.html, choose a version based on your operating system. I chose the binary package, the direct decompression can be used. You can also choose source code to compile the installation.
650) this.width=650; "title=" clip_image002 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "alt=" clip_image002 "src=" Http://s3.51cto.com/wyfs02/M02/95/2F/wKioL1kSpAvjBR1xAACKBqGVp7o087.jpg "border=" 0 "height=" 241 "/>
2. Install.
Upload the package to the server first
Installation dependencies
Yum install zlib fontconfig freetype X11 Libs libX11 libxext Libxrender libpng*
Extract
TAR-XVF WKHTMLTOX-0.12.4_LINUX-GENERIC-AMD64.TAR.XZ
Change directory Permissions
Chown-r Root.root Wkhtmltox
Setting environment variables
Vim/etc/profile
Export Wkhtmltopdf=/data/service/wkhtmltox
Export path= $wkhtmltopdf/bin: $PATH
Variable takes effect
Source/etc/profile
Setting Lib library files
New vim/etc/ld.so.conf.d/wkhtmltox.conf File
/data/service/wkhtmltox/lib
Library file is in effect
Ldconfig
3. Verification
Wkhtmltopdf www.sohu.com Aliyun.pdf
650) this.width=650; "title=" clip_image004 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "alt=" clip_image004 "src=" Http://s3.51cto.com/wyfs02/M02/95/2F/wKiom1kSpA2DP54nAAF6nfNxbQY705.jpg "border=" 0 "height=" 463 "/>
OK, Finish.
This article is from the "Technical Achievement Dream" blog, please be sure to keep this source http://pizibaidu.blog.51cto.com/1361909/1924076
Wkhtmltopdf Web to PDF program installation tutorial