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