ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
tcpdf_config.php
Go to the documentation of this file.
1 <?php
2 //============================================================+
3 // File name : tcpdf_config.php
4 // Begin : 2004-06-11
5 // Last Update : 2010-08-19
6 //
7 // Description : Configuration file for TCPDF.
8 //
9 // Author: Nicola Asuni
10 //
11 // (c) Copyright:
12 // Nicola Asuni
13 // Tecnick.com s.r.l.
14 // Via Della Pace, 11
15 // 09044 Quartucciu (CA)
16 // ITALY
17 // www.tecnick.com
18 // info@tecnick.com
19 //============================================================+
20 
32 // If you define the constant K_TCPDF_EXTERNAL_CONFIG, the following settings will be ignored.
33 
34 if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
35 
36  // DOCUMENT_ROOT fix for IIS Webserver
37  if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
38  if(isset($_SERVER['SCRIPT_FILENAME'])) {
39  $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
40  } elseif(isset($_SERVER['PATH_TRANSLATED'])) {
41  $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
42  } else {
43  // define here your DOCUMENT_ROOT path if the previous fails
44  $_SERVER['DOCUMENT_ROOT'] = '/var/www';
45  }
46  }
47 
48  // Automatic calculation for the following K_PATH_MAIN constant
49  $k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
50  if (substr($k_path_main, -1) != '/') {
51  $k_path_main .= '/';
52  }
53 
58  define ('K_PATH_MAIN', $k_path_main);
59 
60  // Automatic calculation for the following K_PATH_URL constant
61  $k_path_url = $k_path_main; // default value for console mode
62  if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
63  if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
64  $k_path_url = 'https://';
65  } else {
66  $k_path_url = 'http://';
67  }
68  $k_path_url .= $_SERVER['HTTP_HOST'];
69  $k_path_url .= str_replace( '\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
70  }
71 
76  define ('K_PATH_URL', $k_path_url);
77 
82  define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
83 
87  define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
88 
92  define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
93 
97  define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
98 
102  define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
103 
107  define ('PDF_PAGE_FORMAT', 'A4');
108 
112  define ('PDF_PAGE_ORIENTATION', 'P');
113 
117  define ('PDF_CREATOR', 'TCPDF');
118 
122  define ('PDF_AUTHOR', 'TCPDF');
123 
127  define ('PDF_HEADER_TITLE', 'TCPDF Example');
128 
132  define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
133 
137  define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
138 
142  define ('PDF_HEADER_LOGO_WIDTH', 30);
143 
147  define ('PDF_UNIT', 'mm');
148 
152  define ('PDF_MARGIN_HEADER', 5);
153 
157  define ('PDF_MARGIN_FOOTER', 10);
158 
162  define ('PDF_MARGIN_TOP', 27);
163 
167  define ('PDF_MARGIN_BOTTOM', 25);
168 
172  define ('PDF_MARGIN_LEFT', 15);
173 
177  define ('PDF_MARGIN_RIGHT', 15);
178 
182  define ('PDF_FONT_NAME_MAIN', 'helvetica');
183 
187  define ('PDF_FONT_SIZE_MAIN', 10);
188 
192  define ('PDF_FONT_NAME_DATA', 'helvetica');
193 
197  define ('PDF_FONT_SIZE_DATA', 8);
198 
202  define ('PDF_FONT_MONOSPACED', 'courier');
203 
207  define ('PDF_IMAGE_SCALE_RATIO', 1.25);
208 
212  define('HEAD_MAGNIFICATION', 1.1);
213 
217  define('K_CELL_HEIGHT_RATIO', 1.25);
218 
222  define('K_TITLE_MAGNIFICATION', 1.3);
223 
227  define('K_SMALL_RATIO', 2/3);
228 
232  define('K_THAI_TOPCHARS', true);
233 
238  define('K_TCPDF_CALLS_IN_HTML', true);
239 }
240 
241 //============================================================+
242 // END OF FILE
243 //============================================================+