source: trunk/client/inc/hpdf403/_class/tcpdfConfig.php@ 269

Last change on this file since 269 was 107, checked in by eol, 13 years ago

aggiornamento della classe per i pdf

File size: 6.2 KB
Line 
1<?php
2//============================================================+
3// File name : tcpdf_config.php
4// Begin : 2004-06-11
5// Last Update : 2009-09-30
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
21/**
22 * Configuration file for TCPDF.
23 * @author Nicola Asuni
24 * @copyright 2004-2008 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com)
25 * Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
26 * @package com.tecnick.tcpdf
27 * @version 4.0.014
28 * @link http://tcpdf.sourceforge.net
29 * @license http://www.gnu.org/copyleft/lesser.html LGPL
30 * @since 2004-10-27
31 */
32
33// If you define the constant K_TCPDF_EXTERNAL_CONFIG, the following settings will be ignored.
34
35if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
36
37 define('K_TCPDF_EXTERNAL_CONFIG', true);
38
39 // DOCUMENT_ROOT fix for IIS Webserver
40 if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
41 if (isset($_SERVER['SCRIPT_FILENAME'])) {
42 $_SERVER['DOCUMENT_ROOT'] = str_replace(
43 '\\',
44 '/',
45 substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF']))
46 );
47 } elseif (isset($_SERVER['PATH_TRANSLATED'])) {
48 $_SERVER['DOCUMENT_ROOT'] = str_replace(
49 '\\',
50 '/',
51 substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF']))
52 );
53 } else {
54 // define here your DOCUMENT_ROOT path if the previous fails
55 $_SERVER['DOCUMENT_ROOT'] = '/var/www';
56 }
57 }
58
59 // Automatic calculation for the following K_PATH_MAIN constant
60 $kPathMain = str_replace('\\', '/', dirname(__FILE__));
61 $kPathMain = dirname($kPathMain).'/'; // remove the current directory
62 $kPathMain.= '_tcpdf_'.HTML2PDF_USED_TCPDF_VERSION.'/';
63 define('K_PATH_MAIN', $kPathMain);
64
65 // Automatic calculation for the following K_PATH_URL constant
66 if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
67 if (isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
68 $kPathUrl = 'https://';
69 } else {
70 $kPathUrl = 'http://';
71 }
72 $kPathUrl .= $_SERVER['HTTP_HOST'];
73 $kPathUrl .= str_replace('\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
74 }
75
76 /**
77 * URL path to tcpdf installation folder (http://localhost/tcpdf/).
78 * By default it is automatically calculated but you can also set it as a fixed string to improve performances.
79 */
80 define('K_PATH_URL', $kPathUrl);
81
82 /**
83 * path for PDF fonts
84 * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
85 */
86 define('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
87
88 /**
89 * cache directory for temporary files (full path)
90 */
91 define('K_PATH_CACHE', K_PATH_MAIN.'cache/');
92
93 /**
94 * cache directory for temporary files (url path)
95 */
96 define('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
97
98 /**
99 *images directory
100 */
101 define('K_PATH_IMAGES', K_PATH_MAIN.'images/');
102
103 /**
104 * blank image
105 */
106 define('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
107
108 /**
109 * page format
110 */
111 define('PDF_PAGE_FORMAT', 'A4');
112
113 /**
114 * page orientation (P=portrait, L=landscape)
115 */
116 define('PDF_PAGE_ORIENTATION', 'P');
117
118 /**
119 * document creator
120 */
121 define('PDF_CREATOR', 'HTML2PDF - TCPDF');
122
123 /**
124 * document author
125 */
126 define('PDF_AUTHOR', 'HTML2PDF - TCPDF');
127
128 /**
129 * header title
130 */
131 define('PDF_HEADER_TITLE', null);
132
133 /**
134 * header description string
135 */
136 define('PDF_HEADER_STRING', null);
137
138 /**
139 * image logo
140 */
141 define('PDF_HEADER_LOGO', null);
142
143 /**
144 * header logo image width [mm]
145 */
146 define('PDF_HEADER_LOGO_WIDTH', null);
147
148 /**
149 * document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
150 */
151 define('PDF_UNIT', 'mm');
152
153 /**
154 * header margin
155 */
156 define('PDF_MARGIN_HEADER', 0);
157
158 /**
159 * footer margin
160 */
161 define('PDF_MARGIN_FOOTER', 0);
162
163 /**
164 * top margin
165 */
166 define('PDF_MARGIN_TOP', 0);
167
168 /**
169 * bottom margin
170 */
171 define('PDF_MARGIN_BOTTOM', 0);
172
173 /**
174 * left margin
175 */
176 define('PDF_MARGIN_LEFT', 0);
177
178 /**
179 * right margin
180 */
181 define('PDF_MARGIN_RIGHT', 0);
182
183 /**
184 * default main font name
185 */
186 define('PDF_FONT_NAME_MAIN', 'helvetica');
187
188 /**
189 * default main font size
190 */
191 define('PDF_FONT_SIZE_MAIN', 10);
192
193 /**
194 * default data font name
195 */
196 define('PDF_FONT_NAME_DATA', 'helvetica');
197
198 /**
199 * default data font size
200 */
201 define('PDF_FONT_SIZE_DATA', 8);
202
203 /**
204 * default monospaced font name
205 */
206 define('PDF_FONT_MONOSPACED', 'courier');
207
208 /**
209 * ratio used to adjust the conversion of pixels to user units
210 */
211 define('PDF_IMAGE_SCALE_RATIO', 1);
212
213 /**
214 * magnification factor for titles
215 */
216 define('HEAD_MAGNIFICATION', 1);
217
218 /**
219 * height of cell repect font height
220 */
221 define('K_CELL_HEIGHT_RATIO', 1);
222
223 /**
224 * title magnification respect main font size
225 */
226 define('K_TITLE_MAGNIFICATION', 1);
227
228 /**
229 * reduction factor for small font
230 */
231 define('K_SMALL_RATIO', 2/3);
232
233 /**
234 * set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
235 */
236 define('K_THAI_TOPCHARS', true);
237
238 /**
239 * if true allows to call TCPDF methods using HTML syntax
240 * IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
241 */
242 define('K_TCPDF_CALLS_IN_HTML', false);
243}
244
245//============================================================+
246// END OF FILE
247//============================================================+
Note: See TracBrowser for help on using the repository browser.