phpfpdffpdi

using FPDF and FPDI


the root of my website is "/var/www/PDFBuilder". I have 2 folders "fpdf17" and "fpdi142" and i've unzipper a file called "fpdf_tpl.php" in the "fpdf17" folder.

This is my code:

error_reporting(E_ALL);
ini_set('display_errors', '1');

define('FPDF_FONTPATH','/var/www/PDFBuilder/fpdf17/');

require('/var/www/PDFBuilder/fpdf17/fpdf.php');
include('/var/www/PDFBuilder/fpdi142/fpdi.php');

When I try to open my website, this is the output I get:

Warning: require_once(fpdf_tpl.php): failed to open stream: No such file or directory in /var/www/PDFBuilder/fpdi142/fpdi.php on line 27 Fatal error: require_once(): Failed opening required 'fpdf_tpl.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/PDFBuilder/fpdi142/fpdi.php on line 27

What am i doing wrong?


Solution

  • Found a solution.

    you can download the PDF_TPL file (PDF_TPL-1.2.1.zip) from http://www.setasign.de/support/manuals/fpdi/fpdi/

    Just extract it and put it in the same folder as the fpdi and you will be fine.