]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/tcpdf/config/tcpdf_config.php
Release 6.4.0
[Github/sugarcrm.git] / include / tcpdf / config / tcpdf_config.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 : 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  * 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 // If you define the constant K_TCPDF_EXTERNAL_CONFIG, the following settings will be ignored.
59
60 if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
61
62         // DOCUMENT_ROOT fix for IIS Webserver
63         if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
64                 if(isset($_SERVER['SCRIPT_FILENAME'])) {
65                         $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
66                 } elseif(isset($_SERVER['PATH_TRANSLATED'])) {
67                         $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
68                 }       else {
69                         // define here your DOCUMENT_ROOT path if the previous fails
70                         $_SERVER['DOCUMENT_ROOT'] = '/var/www';
71                 }
72         }
73
74         // Automatic calculation for the following K_PATH_MAIN constant
75         $k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
76         if (substr($k_path_main, -1) != '/') {
77                 $k_path_main .= '/';
78         }
79
80         /**
81          * Installation path (/var/www/tcpdf/).
82          * By default it is automatically calculated but you can also set it as a fixed string to improve performances.
83          */
84         define ('K_PATH_MAIN', $k_path_main);
85
86         // Automatic calculation for the following K_PATH_URL constant
87         if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
88                 if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
89                         $k_path_url = 'https://';
90                 } else {
91                         $k_path_url = 'http://';
92                 }
93                 $k_path_url .= $_SERVER['HTTP_HOST'];
94                 $k_path_url .= str_replace( '\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));
95         }
96
97         /**
98          * URL path to tcpdf installation folder (http://localhost/tcpdf/).
99          * By default it is automatically calculated but you can also set it as a fixed string to improve performances.
100          */
101         define ('K_PATH_URL', $k_path_url);
102
103         /**
104          * path for PDF fonts
105          * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
106          */
107         define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
108
109         /**
110          * cache directory for temporary files (full path)
111          */
112         define ('K_PATH_CACHE', sugar_cached(K_PATH_MAIN));
113
114         /**
115          * cache directory for temporary files (url path)
116          */
117         define ('K_PATH_URL_CACHE', "cache/".K_PATH_URL);
118
119         /**
120          *images directory
121          */
122         define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
123
124         /**
125          * blank image
126          */
127         define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
128
129         /**
130          * page format
131          */
132         define ('PDF_PAGE_FORMAT', 'A4');
133
134         /**
135          * page orientation (P=portrait, L=landscape)
136          */
137         define ('PDF_PAGE_ORIENTATION', 'P');
138
139         /**
140          * document creator
141          */
142         define ('PDF_CREATOR', 'TCPDF');
143
144         /**
145          * document author
146          */
147         define ('PDF_AUTHOR', 'TCPDF');
148
149         /**
150          * header title
151          */
152         define ('PDF_HEADER_TITLE', 'TCPDF Example');
153
154         /**
155          * header description string
156          */
157         define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
158
159         /**
160          * image logo
161          */
162         define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
163
164         /**
165          * header logo image width [mm]
166          */
167         define ('PDF_HEADER_LOGO_WIDTH', 30);
168
169         /**
170          *  document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
171          */
172         define ('PDF_UNIT', 'mm');
173
174         /**
175          * header margin
176          */
177         define ('PDF_MARGIN_HEADER', 5);
178
179         /**
180          * footer margin
181          */
182         define ('PDF_MARGIN_FOOTER', 10);
183
184         /**
185          * top margin
186          */
187         define ('PDF_MARGIN_TOP', 27);
188
189         /**
190          * bottom margin
191          */
192         define ('PDF_MARGIN_BOTTOM', 25);
193
194         /**
195          * left margin
196          */
197         define ('PDF_MARGIN_LEFT', 15);
198
199         /**
200          * right margin
201          */
202         define ('PDF_MARGIN_RIGHT', 15);
203
204         /**
205          * default main font name
206          */
207         define ('PDF_FONT_NAME_MAIN', 'helvetica');
208
209         /**
210          * default main font size
211          */
212         define ('PDF_FONT_SIZE_MAIN', 10);
213
214         /**
215          * default data font name
216          */
217         define ('PDF_FONT_NAME_DATA', 'helvetica');
218
219         /**
220          * default data font size
221          */
222         define ('PDF_FONT_SIZE_DATA', 8);
223
224         /**
225          * default monospaced font name
226          */
227         define ('PDF_FONT_MONOSPACED', 'courier');
228
229         /**
230          * Ratio used to scale the images
231          */
232         define ('PDF_IMAGE_SCALE_RATIO', 4);
233
234         /**
235          * magnification factor for titles
236          */
237         define('HEAD_MAGNIFICATION', 1.1);
238
239         /**
240          * height of cell repect font height
241          */
242         define('K_CELL_HEIGHT_RATIO', 1.25);
243
244         /**
245          * title magnification respect main font size
246          */
247         define('K_TITLE_MAGNIFICATION', 1.3);
248
249         /**
250          * reduction factor for small font
251          */
252         define('K_SMALL_RATIO', 2/3);
253
254         /**
255          * if true allows to call TCPDF methods using HTML syntax
256          * IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
257          */
258         define('K_TCPDF_CALLS_IN_HTML', true);
259 }
260
261 //============================================================+
262 // END OF FILE
263 //============================================================+
264 ?>