PHP class for generating PDF documents
EN IT
This website uses only session cookies and does not use profiling cookies for the purposes of sending targeted advertisements. However, this site uses "third parties" cookies installed by different services than the site you are visiting. To disable the third-party profiling cookies, please visit the following links: AddThis Targeting Opt-Out and Google Ads Settings. By using this website, you agree to our use of cookies.

TCPDF Installation

Assuming you have a working Apache/IIS web server with PHP, you are on your way to installing TCPDF.

Getting the files

TCPDF can be downloaded from SourceForge.net. The file is a compressed archive so you will need an utility program, either locally or on your host server, that can "unzip" the file (i.e. WinZip, WinRAR, 7Zip). Ensure that you choose latest stable release version.

Installing Files

We are assuming you have established a working web server, with the necessary requirements, and that you know where to put files to display on the web server.
Unzip the distribution file into a directory under your web server root. If you are using the Apache web server, this is typically c:\apache group\apache\htdocs on the Windows OS and /usr/local/apache/htdocs or /var/www/ on a UNIX-like system but it my vary particularly on hosted servers and between different distributions of GNU-Linux OS.
What you do to install TCPDF on a remote host is largely dependant upon the facilities your host provides - with regard to Control Panel software and connection resources. It may also depend upon your own skills concerning server access methods. A simple and typical procedure may involve: unzip the TCPDF distribution file to a local directory on your local computer and then FTP the files to the host server placing them either directly under, or in, a directory under the web server root. There are many free FTP programs available for this operation, such as Filezilla. A Google search or visit to any of the open source resource sites will assist you in finding a suitable tool.

When you have finished uploading the files and folders, change the files owner to the Web server user (typically "www-data" or "apache"). On POSIX based systems (like Unix, Linux, etc), change to the TCPDF directory and enter the following system command (substitute the user name appropriate for your system): chown -R apache.
Change the files access permission so that all user can write into the them. On POSIX based systems change to the TCPDF directory and enter the following system command: chmod -R 777. For security reasons, you must properly set the permissions of these files at the end of the installation process.

Configuration

The configuration parameters of TCPDF are on the following file:

  • config/tcpdf_config.php

Post Installation

Once the installation is completed you must:

  • Change the files' owner/group so they can be executed by the webserver.
  • set as read-only the entire TCPDF folder (chmod -R 644 in POSIX systems);
  • properly set the write permissions for the following folders where TCPDF will have to write (chmod -R 666 in POSIX systems):
    • cache
    • fonts
    • images
  • point your browser to one of the example files to check if it's all OK (i.e. http://www.yoursite.com/tcpdf/examples/example_001.php)
Flattr: TCPDF - PHP class for generating PDF documents. Follow us on Twitter Support This Project Get TCPDF - PHP class for PDF at SourceForge.net. Fast, secure and Free Open Source software downloads
EN IT
W3C XHTML 1.0 W3C CSS 2.0