2009-09-30 09:18:36 +00:00
|
|
|
<?php
|
|
|
|
//============================================================+
|
|
|
|
// File name : tcpdf_config.php
|
|
|
|
// Begin : 2004-06-11
|
2010-03-30 22:10:43 +00:00
|
|
|
// Last Update : 2010-03-30
|
2009-09-30 09:18:36 +00:00
|
|
|
//
|
|
|
|
// Description : Configuration file for TCPDF.
|
|
|
|
//
|
|
|
|
// Author: Nicola Asuni
|
|
|
|
//
|
|
|
|
// (c) Copyright:
|
|
|
|
// Nicola Asuni
|
|
|
|
// Tecnick.com s.r.l.
|
|
|
|
// Via Della Pace, 11
|
|
|
|
// 09044 Quartucciu (CA)
|
|
|
|
// ITALY
|
|
|
|
// www.tecnick.com
|
|
|
|
// info@tecnick.com
|
|
|
|
//============================================================+
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Configuration file for TCPDF.
|
|
|
|
* @author Nicola Asuni
|
|
|
|
* @copyright 2004-2008 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
|
|
|
* @package com.tecnick.tcpdf
|
|
|
|
* @version 4.0.014
|
|
|
|
* @link http://tcpdf.sourceforge.net
|
|
|
|
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
|
|
|
* @since 2004-10-27
|
|
|
|
*/
|
|
|
|
|
|
|
|
// If you define the constant K_TCPDF_EXTERNAL_CONFIG, the following settings will be ignored.
|
|
|
|
|
|
|
|
if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
// 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'])));
|
|
|
|
} else {
|
|
|
|
// define here your DOCUMENT_ROOT path if the previous fails
|
|
|
|
$_SERVER['DOCUMENT_ROOT'] = '/var/www';
|
|
|
|
}
|
|
|
|
}
|
2010-03-30 22:10:43 +00:00
|
|
|
|
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 .= '/';
|
|
|
|
}
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* 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);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
// Automatic calculation for the following K_PATH_URL constant
|
2010-03-30 22:10:43 +00:00
|
|
|
$k_path_url = $k_path_main; // default value for console mode
|
2009-09-30 09:18:36 +00:00
|
|
|
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'];
|
|
|
|
$k_path_url .= str_replace( '\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));
|
|
|
|
}
|
2010-03-30 22:10:43 +00:00
|
|
|
|
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);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* path for PDF fonts
|
|
|
|
* use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
|
|
|
|
*/
|
|
|
|
define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* cache directory for temporary files (full path)
|
|
|
|
*/
|
|
|
|
define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* cache directory for temporary files (url path)
|
|
|
|
*/
|
|
|
|
define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
*images directory
|
|
|
|
*/
|
|
|
|
define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* blank image
|
|
|
|
*/
|
|
|
|
define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* page format
|
|
|
|
*/
|
|
|
|
define ('PDF_PAGE_FORMAT', 'A4');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* page orientation (P=portrait, L=landscape)
|
|
|
|
*/
|
|
|
|
define ('PDF_PAGE_ORIENTATION', 'P');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* document creator
|
|
|
|
*/
|
|
|
|
define ('PDF_CREATOR', 'TCPDF');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* document author
|
|
|
|
*/
|
|
|
|
define ('PDF_AUTHOR', 'TCPDF');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* header title
|
|
|
|
*/
|
|
|
|
define ('PDF_HEADER_TITLE', 'TCPDF Example');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* header description string
|
|
|
|
*/
|
|
|
|
define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* image logo
|
|
|
|
*/
|
|
|
|
define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* header logo image width [mm]
|
|
|
|
*/
|
|
|
|
define ('PDF_HEADER_LOGO_WIDTH', 30);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
|
|
|
|
*/
|
|
|
|
define ('PDF_UNIT', 'mm');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* header margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_HEADER', 5);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* footer margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_FOOTER', 10);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* top margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_TOP', 27);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* bottom margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_BOTTOM', 25);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* left margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_LEFT', 15);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* right margin
|
|
|
|
*/
|
|
|
|
define ('PDF_MARGIN_RIGHT', 15);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* default main font name
|
|
|
|
*/
|
|
|
|
define ('PDF_FONT_NAME_MAIN', 'helvetica');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* default main font size
|
|
|
|
*/
|
|
|
|
define ('PDF_FONT_SIZE_MAIN', 10);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* default data font name
|
|
|
|
*/
|
2009-03-24 18:37:18 +00:00
|
|
|
define ('PDF_FONT_NAME_DATA', 'helvetica');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
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);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* default monospaced font name
|
|
|
|
*/
|
|
|
|
define ('PDF_FONT_MONOSPACED', 'courier');
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* ratio used to adjust the conversion of pixels to user units
|
|
|
|
*/
|
|
|
|
define ('PDF_IMAGE_SCALE_RATIO', 1);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* magnification factor for titles
|
|
|
|
*/
|
|
|
|
define('HEAD_MAGNIFICATION', 1.1);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* height of cell repect font height
|
|
|
|
*/
|
|
|
|
define('K_CELL_HEIGHT_RATIO', 1.25);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* title magnification respect main font size
|
|
|
|
*/
|
|
|
|
define('K_TITLE_MAGNIFICATION', 1.3);
|
2010-03-30 22:10:43 +00:00
|
|
|
|
2009-09-30 09:18:36 +00:00
|
|
|
/**
|
|
|
|
* reduction factor for small font
|
|
|
|
*/
|
|
|
|
define('K_SMALL_RATIO', 2/3);
|
|
|
|
}
|
|
|
|
|
|
|
|
//============================================================+
|
2010-03-30 22:10:43 +00:00
|
|
|
// END OF FILE
|
2009-09-30 09:18:36 +00:00
|
|
|
//============================================================+
|
2009-03-24 18:37:18 +00:00
|
|
|
?>
|