]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/tcpdf/config/tcpdf_config_alt.php
Release 6.5.0
[Github/sugarcrm.git] / include / tcpdf / config / tcpdf_config_alt.php
1 <?php
2
3 /*
4
5 Modification information for LGPL compliance
6
7 r57813 - 2010-08-19 10:34:44 -0700 (Thu, 19 Aug 2010) - kjing - Author: John Mertic <jmertic@sugarcrm.com>
8     Bug 39085 - When loading the opposite search panel via ajax on the ListViews, call the index action instead of the ListView action to avoid touching pre-MVC code by accident.
9
10 r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync
11
12 r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover
13
14 r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex
15
16 r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3  tags and updated the build system 
17
18 r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development
19
20 r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372
21
22 r46451 - 2009-04-23 16:57:40 -0700 (Thu, 23 Apr 2009) - jenny - tcpdf initial checkin.
23
24
25 */
26
27
28 //============================================================+
29 // File name   : tcpdf_config.php
30 // Begin       : 2004-06-11
31 // Last Update : 2009-03-18
32 //
33 // Description : Alternative configuration file for TCPDF.
34 //
35 // Author: Nicola Asuni
36 //
37 // (c) Copyright:
38 //               Nicola Asuni
39 //               Tecnick.com s.r.l.
40 //               Via Della Pace, 11
41 //               09044 Quartucciu (CA)
42 //               ITALY
43 //               www.tecnick.com
44 //               info@tecnick.com
45 //============================================================+
46
47 /**
48  * Alternative configuration file for TCPDF.
49  * @author Nicola Asuni
50  * @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
51  * @package com.tecnick.tcpdf
52  * @version 4.0.014
53  * @link http://tcpdf.sourceforge.net
54  * @license http://www.gnu.org/copyleft/lesser.html LGPL
55  * @since 2004-10-27
56  */
57
58 // DOCUMENT_ROOT fix for IIS Webserver
59 if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
60         if(isset($_SERVER['SCRIPT_FILENAME'])) {
61                 $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
62         } elseif(isset($_SERVER['PATH_TRANSLATED'])) {
63                 $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
64         }       else {
65                 // define here your DOCUMENT_ROOT path if the previous fails
66                 $_SERVER['DOCUMENT_ROOT'] = '/var/www';
67         }
68 }
69
70 // Automatic calculation for the following K_PATH_MAIN constant
71 $k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
72 if (substr($k_path_main, -1) != '/') {
73         $k_path_main .= '/';
74 }
75
76 /**
77  * Installation path (/var/www/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_MAIN', $k_path_main);
81
82 // Automatic calculation for the following K_PATH_URL constant
83 if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
84         if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
85                 $k_path_url = 'https://';
86         } else {
87                 $k_path_url = 'http://';
88         }
89         $k_path_url .= $_SERVER['HTTP_HOST'];
90         $k_path_url .= str_replace( '\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));
91 }
92
93 /**
94  * URL path to tcpdf installation folder (http://localhost/tcpdf/).
95  * By default it is automatically calculated but you can also set it as a fixed string to improve performances..
96  */
97 define ('K_PATH_URL', $k_path_url);
98
99 /**
100  * path for PDF fonts
101  * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
102  */
103 define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
104
105 /**
106  * cache directory for temporary files (full path)
107  */
108 define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
109
110 /**
111  * cache directory for temporary files (url path)
112  */
113 define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
114
115 /**
116  *images directory
117  */
118 define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
119
120 /**
121  * blank image
122  */
123 define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
124
125 /**
126  * page format
127  */
128 define ('PDF_PAGE_FORMAT', 'A4');
129
130 /**
131  * page orientation (P=portrait, L=landscape)
132  */
133 define ('PDF_PAGE_ORIENTATION', 'P');
134
135 /**
136  * document creator
137  */
138 define ('PDF_CREATOR', 'TCPDF');
139
140 /**
141  * document author
142  */
143 define ('PDF_AUTHOR', 'TCPDF');
144
145 /**
146  * header title
147  */
148 define ('PDF_HEADER_TITLE', 'TCPDF Example');
149
150 /**
151  * header description string
152  */
153 define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
154
155 /**
156  * image logo
157  */
158 define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
159
160 /**
161  * header logo image width [mm]
162  */
163 define ('PDF_HEADER_LOGO_WIDTH', 30);
164
165 /**
166  *  document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
167  */
168 define ('PDF_UNIT', 'mm');
169
170 /**
171  * header margin
172  */
173 define ('PDF_MARGIN_HEADER', 5);
174
175 /**
176  * footer margin
177  */
178 define ('PDF_MARGIN_FOOTER', 10);
179
180 /**
181  * top margin
182  */
183 define ('PDF_MARGIN_TOP', 27);
184
185 /**
186  * bottom margin
187  */
188 define ('PDF_MARGIN_BOTTOM', 25);
189
190 /**
191  * left margin
192  */
193 define ('PDF_MARGIN_LEFT', 15);
194
195 /**
196  * right margin
197  */
198 define ('PDF_MARGIN_RIGHT', 15);
199
200 /**
201  * default main font name
202  */
203 define ('PDF_FONT_NAME_MAIN', 'helvetica');
204
205 /**
206  * default main font size
207  */
208 define ('PDF_FONT_SIZE_MAIN', 10);
209
210 /**
211  * default data font name
212  */
213 define ('PDF_FONT_NAME_DATA', 'helvetica');
214
215 /**
216  * default data font size
217  */
218 define ('PDF_FONT_SIZE_DATA', 8);
219
220 /**
221  * default monospaced font name
222  */
223 define ('PDF_FONT_MONOSPACED', 'courier');
224
225 /**
226  * Ratio used to scale the images
227  */
228 define ('PDF_IMAGE_SCALE_RATIO', 4);
229
230 /**
231  * magnification factor for titles
232  */
233 define('HEAD_MAGNIFICATION', 1.1);
234
235 /**
236  * height of cell repect font height
237  */
238 define('K_CELL_HEIGHT_RATIO', 1.25);
239
240 /**
241  * title magnification respect main font size
242  */
243 define('K_TITLE_MAGNIFICATION', 1.3);
244
245 /**
246  * reduction factor for small font
247  */
248 define('K_SMALL_RATIO', 2/3);
249
250 /**
251  * if true allows to call TCPDF methods using HTML syntax
252  * IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
253  */
254 define('K_TCPDF_CALLS_IN_HTML', true);
255
256 //============================================================+
257 // END OF FILE                                                 
258 //============================================================+
259 ?>