2009-09-30 09:18:36 +00:00
|
|
|
<?php
|
|
|
|
//============================================================+
|
|
|
|
// File name : tcpdf_config.php
|
|
|
|
// Begin : 2004-06-11
|
2013-01-30 17:13:12 +00:00
|
|
|
// Last Update : 2013-01-28
|
2009-09-30 09:18:36 +00:00
|
|
|
//
|
|
|
|
// Description : Alternative configuration file for TCPDF.
|
2011-12-23 17:19:43 +00:00
|
|
|
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
|
|
|
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Copyright (C) 2004-2012 Nicola Asuni - Tecnick.com LTD
|
2009-09-30 09:18:36 +00:00
|
|
|
//
|
2011-12-23 17:19:43 +00:00
|
|
|
// This file is part of TCPDF software library.
|
2009-09-30 09:18:36 +00:00
|
|
|
//
|
2011-12-23 17:19:43 +00:00
|
|
|
// TCPDF is free software: you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License as
|
|
|
|
// published by the Free Software Foundation, either version 3 of the
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// TCPDF is distributed in the hope that it will be useful, but
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
//
|
|
|
|
// See LICENSE.TXT file for more information.
|
2009-09-30 09:18:36 +00:00
|
|
|
//============================================================+
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Alternative configuration file for TCPDF.
|
|
|
|
* @author Nicola Asuni
|
|
|
|
* @package com.tecnick.tcpdf
|
2010-04-01 18:40:11 +00:00
|
|
|
* @version 4.9.005
|
2009-09-30 09:18:36 +00:00
|
|
|
* @since 2004-10-27
|
|
|
|
*/
|
|
|
|
|
|
|
|
// DOCUMENT_ROOT fix for IIS Webserver
|
|
|
|
if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
|
|
|
|
if(isset($_SERVER['SCRIPT_FILENAME'])) {
|
|
|
|
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
|
|
|
|
} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
|
|
|
|
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
|
2011-04-15 09:24:02 +00:00
|
|
|
} else {
|
|
|
|
// define here your DOCUMENT_ROOT path if the previous fails (e.g. '/var/www')
|
|
|
|
$_SERVER['DOCUMENT_ROOT'] = '/';
|
2009-09-30 09:18:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-30 17:13:12 +00:00
|
|
|
// be sure that the end slash is present
|
|
|
|
$_SERVER['DOCUMENT_ROOT'] = str_replace('//', '/', $_SERVER['DOCUMENT_ROOT'].'/');
|
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
// Automatic calculation for the following K_PATH_MAIN constant
|
|
|
|
$k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
|
|
|
|
if (substr($k_path_main, -1) != '/') {
|
|
|
|
$k_path_main .= '/';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Installation path (/var/www/tcpdf/).
|
|
|
|
* By default it is automatically calculated but you can also set it as a fixed string to improve performances.
|
|
|
|
*/
|
|
|
|
define ('K_PATH_MAIN', $k_path_main);
|
|
|
|
|
|
|
|
// Automatic calculation for the following K_PATH_URL constant
|
|
|
|
if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
|
|
|
|
if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
|
|
|
|
$k_path_url = 'https://';
|
|
|
|
} else {
|
|
|
|
$k_path_url = 'http://';
|
|
|
|
}
|
|
|
|
$k_path_url .= $_SERVER['HTTP_HOST'];
|
2010-08-19 20:39:07 +00:00
|
|
|
$k_path_url .= str_replace( '\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
|
2009-09-30 09:18:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* URL path to tcpdf installation folder (http://localhost/tcpdf/).
|
|
|
|
* By default it is automatically calculated but you can also set it as a fixed string to improve performances..
|
|
|
|
*/
|
|
|
|
define ('K_PATH_URL', $k_path_url);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* path for PDF fonts
|
|
|
|
* use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
|
|
|
|
*/
|
|
|
|
define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* cache directory for temporary files (full path)
|
|
|
|
*/
|
|
|
|
define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* cache directory for temporary files (url path)
|
|
|
|
*/
|
|
|
|
define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
|
|
|
|
|
|
|
|
/**
|
|
|
|
*images directory
|
|
|
|
*/
|
|
|
|
define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* blank image
|
|
|
|
*/
|
|
|
|
define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* page format
|
|
|
|
*/
|
|
|
|
define ('PDF_PAGE_FORMAT', 'A4');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* page orientation (P=portrait, L=landscape)
|
|
|
|
*/
|
|
|
|
define ('PDF_PAGE_ORIENTATION', 'P');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* document creator
|
|
|
|
*/
|
|
|
|
define ('PDF_CREATOR', 'TCPDF');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* document author
|
|
|
|
*/
|
|
|
|
define ('PDF_AUTHOR', 'TCPDF');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* header title
|
|
|
|
*/
|
|
|
|
define ('PDF_HEADER_TITLE', 'TCPDF Example');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* header description string
|
|
|
|
*/
|
|
|
|
define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
|
|
|
|
|
|
|
|
/**
|
|
|
|
* image logo
|
|
|
|
*/
|
|
|
|
define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* header logo image width [mm]
|
|
|
|
*/
|
|
|
|
define ('PDF_HEADER_LOGO_WIDTH', 30);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
|
|
|
|
*/
|
|
|
|
define ('PDF_UNIT', 'mm');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* header margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_HEADER', 5);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* footer margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_FOOTER', 10);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* top margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_TOP', 27);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* bottom margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_BOTTOM', 25);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* left margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_LEFT', 15);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* right margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_RIGHT', 15);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* default main font name
|
|
|
|
*/
|
|
|
|
define ('PDF_FONT_NAME_MAIN', 'helvetica');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* default main font size
|
|
|
|
*/
|
|
|
|
define ('PDF_FONT_SIZE_MAIN', 10);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* default data font name
|
|
|
|
*/
|
2009-03-24 18:37:18 +00:00
|
|
|
define ('PDF_FONT_NAME_DATA', 'helvetica');
|
2009-09-30 09:18:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* default data font size
|
|
|
|
*/
|
2009-03-24 18:37:18 +00:00
|
|
|
define ('PDF_FONT_SIZE_DATA', 8);
|
2009-09-30 09:18:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* default monospaced font name
|
|
|
|
*/
|
|
|
|
define ('PDF_FONT_MONOSPACED', 'courier');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ratio used to adjust the conversion of pixels to user units
|
|
|
|
*/
|
2010-05-05 09:56:22 +00:00
|
|
|
define ('PDF_IMAGE_SCALE_RATIO', 1.25);
|
2009-09-30 09:18:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* magnification factor for titles
|
|
|
|
*/
|
|
|
|
define('HEAD_MAGNIFICATION', 1.1);
|
|
|
|
|
|
|
|
/**
|
2013-01-30 17:13:12 +00:00
|
|
|
* height of cell repect font height
|
2009-09-30 09:18:36 +00:00
|
|
|
*/
|
|
|
|
define('K_CELL_HEIGHT_RATIO', 1.25);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* title magnification respect main font size
|
|
|
|
*/
|
|
|
|
define('K_TITLE_MAGNIFICATION', 1.3);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* reduction factor for small font
|
|
|
|
*/
|
|
|
|
define('K_SMALL_RATIO', 2/3);
|
|
|
|
|
2010-04-01 18:40:11 +00:00
|
|
|
/**
|
|
|
|
* set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
|
|
|
|
*/
|
|
|
|
define('K_THAI_TOPCHARS', true);
|
|
|
|
|
2010-04-02 13:30:26 +00:00
|
|
|
/**
|
|
|
|
* if true allows to call TCPDF methods using HTML syntax
|
|
|
|
* IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
|
|
|
|
*/
|
|
|
|
define('K_TCPDF_CALLS_IN_HTML', true);
|
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
//============================================================+
|
2010-04-01 18:40:11 +00:00
|
|
|
// END OF FILE
|
2009-09-30 09:18:36 +00:00
|
|
|
//============================================================+
|