Wkhtmltopdf Web to PDF program installation tutorial

Source: Internet
Author: User
Tags wkhtmltopdf

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.