source: pmb4.2/trunk/fuentes/pmb/classes/html2pdf/_class/tcpdfConfig.php @ 815

Last change on this file since 815 was 815, checked in by jrpelegrina, 4 years ago

Initial release of pmb 4.2

  • Property svn:executable set to *
File size: 6.4 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    // be sure that the end slash is present
60    $_SERVER['DOCUMENT_ROOT'] = str_replace('//', '/', $_SERVER['DOCUMENT_ROOT'].'/');
61
62    // Automatic calculation for the following K_PATH_MAIN constant
63    $kPathMain = str_replace('\\', '/', dirname(__FILE__));
64    $kPathMain = dirname($kPathMain).'/'; // remove the current directory
65    $kPathMain.= '_tcpdf_'.HTML2PDF_USED_TCPDF_VERSION.'/';
66    define('K_PATH_MAIN', $kPathMain);
67
68    // Automatic calculation for the following K_PATH_URL constant
69    $kPathUrl = $kPathMain; // default value for console mode
70    if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
71        if (isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
72            $kPathUrl = 'https://';
73        } else {
74            $kPathUrl = 'http://';
75        }
76        $kPathUrl .= $_SERVER['HTTP_HOST'];
77        $kPathUrl .= str_replace('\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
78    }
79
80    /**
81     * URL path to tcpdf installation folder (http://localhost/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_URL', $kPathUrl);
85
86    /**
87     * path for PDF fonts
88     * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
89     */
90    define('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
91
92    /**
93     * cache directory for temporary files (full path)
94     */
95    define('K_PATH_CACHE', K_PATH_MAIN.'cache/');
96
97    /**
98     * cache directory for temporary files (url path)
99     */
100    define('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
101
102    /**
103     *images directory
104     */
105    define('K_PATH_IMAGES', K_PATH_MAIN.'images/');
106
107    /**
108     * blank image
109     */
110    define('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
111
112    /**
113     * page format
114     */
115    define('PDF_PAGE_FORMAT', 'A4');
116
117    /**
118     * page orientation (P=portrait, L=landscape)
119     */
120    define('PDF_PAGE_ORIENTATION', 'P');
121
122    /**
123     * document creator
124     */
125    define('PDF_CREATOR', 'HTML2PDF - TCPDF');
126
127    /**
128     * document author
129     */
130    define('PDF_AUTHOR', 'HTML2PDF - TCPDF');
131
132    /**
133     * header title
134     */
135    define('PDF_HEADER_TITLE', null);
136
137    /**
138     * header description string
139     */
140    define('PDF_HEADER_STRING', null);
141
142    /**
143     * image logo
144     */
145    define('PDF_HEADER_LOGO', null);
146
147    /**
148     * header logo image width [mm]
149     */
150    define('PDF_HEADER_LOGO_WIDTH', null);
151
152    /**
153     *  document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
154     */
155    define('PDF_UNIT', 'mm');
156
157    /**
158     * header margin
159     */
160    define('PDF_MARGIN_HEADER', 0);
161
162    /**
163     * footer margin
164     */
165    define('PDF_MARGIN_FOOTER', 0);
166
167    /**
168     * top margin
169     */
170    define('PDF_MARGIN_TOP', 0);
171
172    /**
173     * bottom margin
174     */
175    define('PDF_MARGIN_BOTTOM', 0);
176
177    /**
178     * left margin
179     */
180    define('PDF_MARGIN_LEFT', 0);
181
182    /**
183     * right margin
184     */
185    define('PDF_MARGIN_RIGHT', 0);
186
187    /**
188     * default main font name
189     */
190    define('PDF_FONT_NAME_MAIN', 'helvetica');
191
192    /**
193     * default main font size
194     */
195    define('PDF_FONT_SIZE_MAIN', 10);
196
197    /**
198     * default data font name
199     */
200    define('PDF_FONT_NAME_DATA', 'helvetica');
201
202    /**
203     * default data font size
204     */
205    define('PDF_FONT_SIZE_DATA', 8);
206
207    /**
208     * default monospaced font name
209     */
210    define('PDF_FONT_MONOSPACED', 'courier');
211
212    /**
213     * ratio used to adjust the conversion of pixels to user units
214     */
215    define('PDF_IMAGE_SCALE_RATIO', 1);
216
217    /**
218     * magnification factor for titles
219     */
220    define('HEAD_MAGNIFICATION', 1);
221
222    /**
223     * height of cell respect font height
224     */
225    define('K_CELL_HEIGHT_RATIO', 1);
226
227    /**
228     * title magnification respect main font size
229     */
230    define('K_TITLE_MAGNIFICATION', 1);
231
232    /**
233     * reduction factor for small font
234     */
235    define('K_SMALL_RATIO', 2/3);
236
237    /**
238     * set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
239     */
240    define('K_THAI_TOPCHARS', true);
241
242    /**
243     * if true allows to call TCPDF methods using HTML syntax
244     * IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
245     */
246    define('K_TCPDF_CALLS_IN_HTML', false);
247}
248
249//============================================================+
250// END OF FILE
251//============================================================+
Note: See TracBrowser for help on using the repository browser.