How to install PHP-FPDF in Ubuntu

March 28, 2010

What is FPDF?

In this article, Apache2 and PHP5 assumed has been installed and running well.

The following lines are the installation steps.

  1. Please login as “root” or equivalent for installing.

    ~# apt-get install php-fpdf

  2. If the installation is successful, there will be a file “fpdf.php” in the following folder.

    ~# ls -l /usr/share/php/fpdf

  3. Please create a symbolic link is directed at each site are available on your web server with the following way.

    e.g.

    ~# ln -s /usr/share/php/fpdf /var/www/fpdf

  4. Reload your web server.

    ~# /etc/init.d/apache2 force-reload

  5. Make sure the PHP commands on the web page associated with the conversion to PDF function like this.
    <?php
    require('fpdf/fpdf.php');
    ?>
    
  6. Finish.

7 Responses to “How to install PHP-FPDF in Ubuntu”

  1. kushal Says:

    Exactly what i was looking for thank you!

  2. Ryan Says:

    Perfect, thanks for the instructions! -Ryan and Kyle

  3. fernando Says:

    awsome post! very useful

  4. Musa Says:

    ok, worked perfectly thx.

  5. dharminder singh Says:

    Exactly what i was looking for thank you!

  6. Bill Lopes Says:

    Thanks worked perfectly!!

  7. Devasena Says:

    Thank you


Leave a reply to kushal Cancel reply