34 if (!defined(
'K_TCPDF_EXTERNAL_CONFIG')) {
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'])));
44 $_SERVER[
'DOCUMENT_ROOT'] =
'/var/www';
49 $k_path_main = str_replace(
'\\',
'/', realpath(substr(dirname(__FILE__), 0, 0-strlen(
'config'))));
50 if (substr($k_path_main, -1) !=
'/') {
58 define (
'K_PATH_MAIN', $k_path_main);
61 if (isset($_SERVER[
'HTTP_HOST']) AND (!empty($_SERVER[
'HTTP_HOST']))) {
62 if(isset($_SERVER[
'HTTPS']) AND (!empty($_SERVER[
'HTTPS'])) AND strtolower($_SERVER[
'HTTPS'])!=
'off') {
68 $k_path_url .= str_replace(
'\\',
'/', substr($_SERVER[
'PHP_SELF'], 0, -24));
81 define (
'K_PATH_FONTS', K_PATH_MAIN.
'fonts/');
86 define (
'K_PATH_CACHE', K_PATH_MAIN.
'cache/');
91 define (
'K_PATH_URL_CACHE', K_PATH_URL.
'cache/');
96 define (
'K_PATH_IMAGES', K_PATH_MAIN.
'images/');
101 define (
'K_BLANK_IMAGE', K_PATH_IMAGES.
'_blank.png');
106 define (
'PDF_PAGE_FORMAT',
'A4');
111 define (
'PDF_PAGE_ORIENTATION',
'P');
116 define (
'PDF_CREATOR',
'TCPDF');
121 define (
'PDF_AUTHOR',
'TCPDF');
126 define (
'PDF_HEADER_TITLE',
'TCPDF Example');
131 define (
'PDF_HEADER_STRING',
"by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
136 define (
'PDF_HEADER_LOGO',
'tcpdf_logo.jpg');
141 define (
'PDF_HEADER_LOGO_WIDTH', 30);
146 define (
'PDF_UNIT',
'mm');
151 define (
'PDF_MARGIN_HEADER', 5);
156 define (
'PDF_MARGIN_FOOTER', 10);
161 define (
'PDF_MARGIN_TOP', 27);
166 define (
'PDF_MARGIN_BOTTOM', 25);
171 define (
'PDF_MARGIN_LEFT', 15);
176 define (
'PDF_MARGIN_RIGHT', 15);
181 define (
'PDF_FONT_NAME_MAIN',
'helvetica');
186 define (
'PDF_FONT_SIZE_MAIN', 10);
191 define (
'PDF_FONT_NAME_DATA',
'helvetica');
196 define (
'PDF_FONT_SIZE_DATA', 8);
201 define (
'PDF_FONT_MONOSPACED',
'courier');
206 define (
'PDF_IMAGE_SCALE_RATIO', 1);
211 define(
'HEAD_MAGNIFICATION', 1.1);
216 define(
'K_CELL_HEIGHT_RATIO', 1.25);
221 define(
'K_TITLE_MAGNIFICATION', 1.3);
226 define(
'K_SMALL_RATIO', 2/3);