Skip to content

Commit 39528a1

Browse files
committed
6.0.015 (2013-04-14)
- Some unused vars were removed from AddFont() method. - Some directories were moved inside the examples directory. - All examples were updated to reflect the new default structure. - Source code were clean-up up to be more compatible with system packaging. - Files encodings and permissions were reset. - The command line tool tcpdf_addfont.php was added on the tools directory.
1 parent e7c64b4 commit 39528a1

File tree

168 files changed

+6929
-6441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+6929
-6441
lines changed

CHANGELOG.TXT

100755100644
+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
6.0.015 (2013-04-14)
2+
- Some unused vars were removed from AddFont() method.
3+
- Some directories were moved inside the examples directory.
4+
- All examples were updated to reflect the new default structure.
5+
- Source code were clean-up up to be more compatible with system packaging.
6+
- Files encodings and permissions were reset.
7+
- The command line tool tcpdf_addfont.php was added on the tools directory.
8+
19
6.0.014 (2013-04-13)
210
- The signature of addTTFfont() method includes a new parameter to link existing fonts instead of copying and compressing them.
311

LICENSE.TXT

100755100644
File mode changed.

README.TXT

100755100644
+3-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
88
------------------------------------------------------------
99

1010
Name: TCPDF
11-
Version: 6.0.014
12-
Release date: 2013-05-13
11+
Version: 6.0.015
12+
Release date: 2013-05-14
1313
Author: Nicola Asuni
1414

1515
Copyright (c) 2002-2013:
@@ -86,7 +86,7 @@ License
8686
See LICENSE.TXT file for more information.
8787

8888
Third party fonts
89-
This library includes third party font files released with different licenses.
89+
This library may include third party font files released with different licenses.
9090
These fonts are not required by TCPDF but have been included as you convenience.
9191
The original TTF font files have been renamed for compatibility with TCPDF and compressed using the gzcompress PHP function that uses the ZLIB data format (.z files).
9292
To get the original distribution archives please check the information on fonts subfolders:

composer.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tecnick.com/tcpdf",
3-
"version": "6.0.014",
3+
"version": "6.0.015",
44
"homepage": "http://www.tcpdf.org/",
55
"type": "library",
66
"description": "TCPDF is a PHP class for generating PDF documents.",
@@ -19,7 +19,6 @@
1919
"autoload": {
2020
"classmap": [
2121
"fonts",
22-
"config/lang",
2322
"config",
2423
"include",
2524
"tcpdf.php",

config/tcpdf_config.php

100755100644
+64-51
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//============================================================+
33
// File name : tcpdf_config.php
44
// Begin : 2004-06-11
5-
// Last Update : 2013-02-06
5+
// Last Update : 2013-05-14
66
//
77
// Description : Configuration file for TCPDF.
88
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - [email protected]
@@ -51,204 +51,217 @@
5151
$_SERVER['DOCUMENT_ROOT'] = '/';
5252
}
5353
}
54-
5554
// be sure that the end slash is present
5655
$_SERVER['DOCUMENT_ROOT'] = str_replace('//', '/', $_SERVER['DOCUMENT_ROOT'].'/');
5756

58-
// Automatic calculation for the following K_PATH_MAIN constant
59-
$k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
60-
if (substr($k_path_main, -1) != '/') {
61-
$k_path_main .= '/';
57+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
58+
// Try to automatically set the value for the following K_PATH_MAIN constant.
59+
// NOTE: delete this section and manually set the K_PATH_MAIN constant below for better performances.
60+
$tcpdf_install_dirs = array();
61+
if (strpos(dirname(__FILE__), '/config') !== false) {
62+
// default config file
63+
$k_path_main_default = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
64+
if (substr($k_path_main_default, -1) != '/') {
65+
$k_path_main_default .= '/';
66+
}
67+
$tcpdf_install_dirs[] = $k_path_main_default;
68+
}
69+
$tcpdf_install_dirs += array('/usr/share/php/tcpdf/', '/usr/share/tcpdf/', '/usr/share/php-tcpdf/', '/var/www/tcpdf/', '/var/www/html/tcpdf/', '/usr/local/apache2/htdocs/tcpdf/');
70+
foreach ($tcpdf_install_dirs as $k_path_main) {
71+
if (file_exists($k_path_main.'tcpdf.php')) {
72+
break;
73+
}
74+
}
75+
if (!file_exists($k_path_main)) {
76+
die('TCPDF ERROR: please set the correct path to TCPDF on the configuration file');
6277
}
78+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6379

6480
/**
6581
* Installation path (/var/www/tcpdf/).
6682
* By default it is automatically calculated but you can also set it as a fixed string to improve performances.
6783
*/
6884
define ('K_PATH_MAIN', $k_path_main);
69-
70-
// Automatic calculation for the following K_PATH_URL constant
85+
86+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
87+
// Try to automatically set the value for the following K_PATH_URL constant.
88+
// NOTE: delete this section and manually set the K_PATH_URL constant below for better performances.
7189
$k_path_url = $k_path_main; // default value for console mode
7290
if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
73-
if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
91+
if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND (strtolower($_SERVER['HTTPS']) != 'off')) {
7492
$k_path_url = 'https://';
7593
} else {
7694
$k_path_url = 'http://';
7795
}
7896
$k_path_url .= $_SERVER['HTTP_HOST'];
7997
$k_path_url .= str_replace( '\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
8098
}
99+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
81100

82101
/**
83102
* URL path to tcpdf installation folder (http://localhost/tcpdf/).
84-
* By default it is automatically calculated but you can also set it as a fixed string to improve performances.
103+
* By default it is automatically set but you can also set it as a fixed string to improve performances.
85104
*/
86105
define ('K_PATH_URL', $k_path_url);
87106

88107
/**
89-
* path for PDF fonts
90-
* use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
91-
*/
92-
define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
93-
94-
/**
95-
* cache directory for temporary files (full path)
108+
* Cache directory for temporary files (full path).
96109
*/
97-
define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
110+
define ('K_PATH_CACHE', sys_get_temp_dir().'/');
98111

99112
/**
100-
* cache directory for temporary files (url path)
113+
* Path for PDF fonts.
101114
*/
102-
define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
115+
define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
103116

104117
/**
105-
*images directory
118+
* Default images directory.
106119
*/
107-
define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
120+
define ('K_PATH_IMAGES', K_PATH_MAIN.'examples/images/');
108121

109122
/**
110-
* blank image
123+
* Blank image.
111124
*/
112125
define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
113126

114127
/**
115-
* page format
128+
* Page format.
116129
*/
117130
define ('PDF_PAGE_FORMAT', 'A4');
118131

119132
/**
120-
* page orientation (P=portrait, L=landscape)
133+
* Page orientation (P=portrait, L=landscape).
121134
*/
122135
define ('PDF_PAGE_ORIENTATION', 'P');
123136

124137
/**
125-
* document creator
138+
* Document creator.
126139
*/
127140
define ('PDF_CREATOR', 'TCPDF');
128141

129142
/**
130-
* document author
143+
* Document author.
131144
*/
132145
define ('PDF_AUTHOR', 'TCPDF');
133146

134147
/**
135-
* header title
148+
* Header title.
136149
*/
137150
define ('PDF_HEADER_TITLE', 'TCPDF Example');
138151

139152
/**
140-
* header description string
153+
* Header description string.
141154
*/
142155
define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
143156

144157
/**
145-
* image logo
158+
* Image logo.
146159
*/
147160
define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
148161

149162
/**
150-
* header logo image width [mm]
163+
* Header logo image width [mm].
151164
*/
152165
define ('PDF_HEADER_LOGO_WIDTH', 30);
153166

154167
/**
155-
* document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
168+
* Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch].
156169
*/
157170
define ('PDF_UNIT', 'mm');
158171

159172
/**
160-
* header margin
173+
* Header margin.
161174
*/
162175
define ('PDF_MARGIN_HEADER', 5);
163176

164177
/**
165-
* footer margin
178+
* Footer margin.
166179
*/
167180
define ('PDF_MARGIN_FOOTER', 10);
168181

169182
/**
170-
* top margin
183+
* Top margin.
171184
*/
172185
define ('PDF_MARGIN_TOP', 27);
173186

174187
/**
175-
* bottom margin
188+
* Bottom margin.
176189
*/
177190
define ('PDF_MARGIN_BOTTOM', 25);
178191

179192
/**
180-
* left margin
193+
* Left margin.
181194
*/
182195
define ('PDF_MARGIN_LEFT', 15);
183196

184197
/**
185-
* right margin
198+
* Right margin.
186199
*/
187200
define ('PDF_MARGIN_RIGHT', 15);
188201

189202
/**
190-
* default main font name
203+
* Default main font name.
191204
*/
192205
define ('PDF_FONT_NAME_MAIN', 'helvetica');
193206

194207
/**
195-
* default main font size
208+
* Default main font size.
196209
*/
197210
define ('PDF_FONT_SIZE_MAIN', 10);
198211

199212
/**
200-
* default data font name
213+
* Default data font name.
201214
*/
202215
define ('PDF_FONT_NAME_DATA', 'helvetica');
203216

204217
/**
205-
* default data font size
218+
* Default data font size.
206219
*/
207220
define ('PDF_FONT_SIZE_DATA', 8);
208221

209222
/**
210-
* default monospaced font name
223+
* Default monospaced font name.
211224
*/
212225
define ('PDF_FONT_MONOSPACED', 'courier');
213226

214227
/**
215-
* ratio used to adjust the conversion of pixels to user units
228+
* Ratio used to adjust the conversion of pixels to user units.
216229
*/
217230
define ('PDF_IMAGE_SCALE_RATIO', 1.25);
218231

219232
/**
220-
* magnification factor for titles
233+
* Magnification factor for titles.
221234
*/
222235
define('HEAD_MAGNIFICATION', 1.1);
223236

224237
/**
225-
* height of cell respect font height
238+
* Height of cell respect font height.
226239
*/
227240
define('K_CELL_HEIGHT_RATIO', 1.25);
228241

229242
/**
230-
* title magnification respect main font size
243+
* Title magnification respect main font size.
231244
*/
232245
define('K_TITLE_MAGNIFICATION', 1.3);
233246

234247
/**
235-
* reduction factor for small font
248+
* Reduction factor for small font.
236249
*/
237250
define('K_SMALL_RATIO', 2/3);
238251

239252
/**
240-
* set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
253+
* Set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language.
241254
*/
242255
define('K_THAI_TOPCHARS', true);
243256

244257
/**
245-
* if true allows to call TCPDF methods using HTML syntax
258+
* If true allows to call TCPDF methods using HTML syntax
246259
* IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
247260
*/
248261
define('K_TCPDF_CALLS_IN_HTML', true);
249262

250263
/**
251-
* if true adn PHP version is greater than 5, then the Error() method throw new exception instead of terminating the execution.
264+
* If true adn PHP version is greater than 5, then the Error() method throw new exception instead of terminating the execution.
252265
*/
253266
define('K_TCPDF_THROW_EXCEPTION_ERROR', false);
254267
}

doc/index.html

-11
This file was deleted.

0 commit comments

Comments
 (0)