JpGraph and TCPDF are used to dynamically generate graphic PDF files.

Source: Internet
Author: User

Basic Environment: PHP5

Because jpgraph depends on the GD library, you need to check whether the GD library is installed before using jpgraph. (The GD library is an extension library for php to process graphics. The GD library provides a series of APIS for processing images. You can use the GD library to process images or generate images .)

How do I check whether the GD library is installed? The method is as follows:

Create a file in the root directory of the apache website (/var/www by default), such as phpinfo. php. The content is as follows:

<% Php
Phpinfo ()
%>

Access this php file through a browser, such as http: // server_ip/phpinfo. php. If the following content is displayed, the GD library has been installed. If not, install the GD library first.

How to install gd library can see: http://www.boutell.com/gd/

Jpgraph

1. Download jpgraph

Http://jpgraph.net/download

2. Install jpgraph

Decompress the downloaded jpgraph and place it in the directory accessible to php. Here, it is/usr/share/php5/, and a soft connection is established under/usr/share/php5 to point to the src directory of the jpgraph library.

Ln-s jpgraph-3.5.0b1/src jpgraph

Change the php configuration file/etc/php5/apache2/php. ini and/etc/php5/cli/php. ini, locate the include_path item, uncomment and add/usr/share/php5 to the search directory, for example:

Include_path = ".:/usr/share/php5"

TCPDF details: click here
TCPDF: click here

Related reading: Use TCPDF to dynamically create a PDF

  • 1
  • 2
  • 3
  • Next Page

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.