1. Download the appropriate version of TCPDF for the php version used by your server (either 4 or 5).
2. Decompress the downloaded file in the includes/ folder. Rename the new folder tcpdf (if it's not already called so).
3. Correct the installation and URL path in includes/tcpdf/config/tcpdf_config.php like so:
Code: Select all
define ("K_PATH_MAIN", "path_to_your_joomla/includes/tcpdf/");
define ("K_PATH_URL", "url_to_your_joomla/includes/tcpdf/");
5. Rename path_to_your_joomla/includes/pdf.php into path_to_your_joomla/includes/pdf.php.bk
6. Download the attached modified pdf.php and copy it to path_to_your_joomla/includes/.
7. Change the following variables as needed in file pdf.php
Code: Select all
/************************ Start editing here ************************/
$lang = 'el'; // Language (change it to eng for English)
$enc = 'UTF-8'; // Encoding
$unit = 'mm'; // Unit of measurement
$format = 'A4'; // Page format
$orient = 'P'; // Page orientation
$fnt = 'FreeSerif'; // Font name
$size = 10; // Font size
$mrgleft = 20; // Left margin
$mrgright = 20; // Right margin
$mrgtop = 40; // Top margin
$mrgbottom = 30; // Bottom margin
$mrghead = 20; // Header margin
$mrgfoot = 20; // Footer margin
$scale = 1; // Image scale factor
/************************ Stop editing here ************************/
This hack has been tested on php4 and php5. Images do not seem to be incorporated in the produced pdf files with php5 and there seems to be a problem with wide tables.
Any suggestions or bug reports are highly appreciated and, if possible, should be cc'ed to the creator of TCPDF.