Skip to content

Commit a770c9c

Browse files
committed
tcpdf_5_9_075
1 parent 0123901 commit a770c9c

11 files changed

+286
-108
lines changed

CHANGELOG.TXT

+22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
5.9.075 (2011-05-02)
2+
- Table header alignment when using WriteHTMLCell() or MultiCell() was fixed.
3+
4+
5.9.074 (2011-04-28)
5+
- Bug item #3294306 "CSS classes not work in <thead> table section" was fixed.
6+
7+
5.9.073 (2011-04-27)
8+
- A bug related to character entities on HTML cells was fixed.
9+
10+
5.9.072 (2011-04-26)
11+
- Method resetColumns() was added to remove multiple columns and reset page margins (example n. 10 was updated).
12+
13+
5.9.071 (2011-04-19)
14+
- Bug #3288574 "<br/> trouble" was fixed.
15+
16+
5.9.069 (2011-04-19)
17+
- Bug #3288763 "HTML-Table: non-breaking table rows: Bug" was fixed.
18+
19+
5.9.068 (2011-04-15)
20+
- Bookmark, addTOC and addHTMLTOC methods were improved to include font style and color (Examples 15, 49 and 59 were updated).
21+
- Default $_SERVER['DOCUMENT_ROOT'] value on tcpdf_config.php file was changed.
22+
123
5.9.067 (2011-04-10)
224
- Performances were drastically improved (PDF documents are now created more quickly).
325

README.TXT

+2-2
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: 5.9.067
12-
Release date: 2011-04-10
11+
Version: 5.9.075
12+
Release date: 2011-05-02
1313
Author: Nicola Asuni
1414

1515
Copyright (c) 2002-2011:

config/lang/far.php

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
//============================================================+
3+
// File name : far.php
4+
// Begin : 2010-10-26
5+
// Last Update : 2010-10-26
6+
//
7+
// Description : Language module for TCPDF
8+
// (contains translated texts)
9+
// Farsi
10+
//
11+
// Author: Nicola Asuni
12+
//
13+
// (c) Copyright:
14+
// Nicola Asuni
15+
// Tecnick.com s.r.l.
16+
// Via Della Pace, 11
17+
// 09044 Quartucciu (CA)
18+
// ITALY
19+
// www.tecnick.com
20+
21+
//============================================================+
22+
23+
/**
24+
* TCPDF language file (contains translated texts).
25+
* @package com.tecnick.tcpdf
26+
* @brief TCPDF language file: Farsi
27+
* @author Sina Saeedi
28+
* @since 2011-04-12
29+
*/
30+
31+
// Farsi
32+
33+
global $l;
34+
$l = Array();
35+
36+
// PAGE META DESCRIPTORS --------------------------------------
37+
38+
$l['a_meta_charset'] = 'UTF-8';
39+
$l['a_meta_dir'] = 'rtl';
40+
$l['a_meta_language'] = 'fa';
41+
42+
// TRANSLATIONS --------------------------------------
43+
$l['w_page'] = 'صفحه';
44+
45+
//============================================================+
46+
// END OF FILE
47+
//============================================================+

config/tcpdf_config.php

+4-4
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 : 2010-12-16
5+
// Last Update : 2011-04-15
66
//
77
// Description : Configuration file for TCPDF.
88
//
@@ -36,9 +36,9 @@
3636
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
3737
} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
3838
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
39-
} else {
40-
// define here your DOCUMENT_ROOT path if the previous fails
41-
$_SERVER['DOCUMENT_ROOT'] = '/var/www';
39+
} else {
40+
// define here your DOCUMENT_ROOT path if the previous fails (e.g. '/var/www')
41+
$_SERVER['DOCUMENT_ROOT'] = '/';
4242
}
4343
}
4444

config/tcpdf_config_alt.php

+4-4
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 : 2010-12-16
5+
// Last Update : 2011-04-15
66
//
77
// Description : Alternative configuration file for TCPDF.
88
//
@@ -32,9 +32,9 @@
3232
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
3333
} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
3434
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
35-
} else {
36-
// define here your DOCUMENT_ROOT path if the previous fails
37-
$_SERVER['DOCUMENT_ROOT'] = '/var/www';
35+
} else {
36+
// define here your DOCUMENT_ROOT path if the previous fails (e.g. '/var/www')
37+
$_SERVER['DOCUMENT_ROOT'] = '/';
3838
}
3939
}
4040

examples/example_010.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//============================================================+
33
// File name : example_010.php
44
// Begin : 2008-03-04
5-
// Last Update : 2010-08-11
5+
// Last Update : 2011-04-26
66
//
77
// Description : Example 010 for TCPDF class
88
// Text on multiple columns
@@ -45,12 +45,10 @@ class MC_TCPDF extends TCPDF {
4545
* @public
4646
*/
4747
public function PrintChapter($num, $title, $file, $mode=false) {
48-
// disable existing columns
49-
$this->setEqualColumns();
5048
// add a new page
5149
$this->AddPage();
52-
// reset margins
53-
$this->selectColumn();
50+
// disable existing columns
51+
$this->resetColumns();
5452
// print chapter title
5553
$this->ChapterTitle($num, $title);
5654
// set columns

examples/example_015.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//============================================================+
33
// File name : example_015.php
44
// Begin : 2008-03-04
5-
// Last Update : 2010-08-08
5+
// Last Update : 2011-04-15
66
//
77
// Description : Example 015 for TCPDF class
88
// Bookmarks (Table of Content)
@@ -66,7 +66,7 @@
6666

6767
// ---------------------------------------------------------
6868

69-
// Bookmark($txt, $level=0, $y=-1, $page='')
69+
// Bookmark($txt, $level=0, $y=-1, $page='', $style='', $color=array(0,0,0))
7070

7171
// set font
7272
$pdf->SetFont('times', 'B', 20);
@@ -75,7 +75,7 @@
7575
$pdf->AddPage();
7676

7777
// set a bookmark for the current position
78-
$pdf->Bookmark('Chapter 1', 0, 0);
78+
$pdf->Bookmark('Chapter 1', 0, 0, '', 'B', array(0,64,128));
7979

8080
// print a line using Cell()
8181
$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L');
@@ -88,27 +88,27 @@
8888
// add other pages and bookmarks
8989

9090
$pdf->AddPage();
91-
$pdf->Bookmark('Paragraph 1.1', 1, 0);
91+
$pdf->Bookmark('Paragraph 1.1', 1, 0, '', '', array(0,0,0));
9292
$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L');
9393

9494
$pdf->AddPage();
95-
$pdf->Bookmark('Paragraph 1.2', 1, 0);
95+
$pdf->Bookmark('Paragraph 1.2', 1, 0, '', '', array(0,0,0));
9696
$pdf->Cell(0, 10, 'Paragraph 1.2', 0, 1, 'L');
9797

9898
$pdf->AddPage();
99-
$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0);
99+
$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0, '', 'I', array(0,0,0));
100100
$pdf->Cell(0, 10, 'Sub-Paragraph 1.2.1', 0, 1, 'L');
101101

102102
$pdf->AddPage();
103-
$pdf->Bookmark('Paragraph 1.3', 1, 0);
103+
$pdf->Bookmark('Paragraph 1.3', 1, 0, '', '', array(0,0,0));
104104
$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L');
105105

106106
$pdf->AddPage();
107-
$pdf->Bookmark('Chapter 2', 0, 0);
107+
$pdf->Bookmark('Chapter 2', 0, 0, '', 'BI', array(128,0,0));
108108
$pdf->Cell(0, 10, 'Chapter 2', 0, 1, 'L');
109109

110110
$pdf->AddPage();
111-
$pdf->Bookmark('Chapter 3', 0, 0);
111+
$pdf->Bookmark('Chapter 3', 0, 0, '', 'B', array(0,64,128));
112112
$pdf->Cell(0, 10, 'Chapter 3', 0, 1, 'L');
113113

114114
// ---------------------------------------------------------
@@ -117,5 +117,5 @@
117117
$pdf->Output('example_015.pdf', 'I');
118118

119119
//============================================================+
120-
// END OF FILE
120+
// END OF FILE
121121
//============================================================+

examples/example_045.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//============================================================+
33
// File name : example_045.php
44
// Begin : 2008-03-04
5-
// Last Update : 2010-08-08
5+
// Last Update : 2011-04-15
66
//
77
// Description : Example 045 for TCPDF class
88
// Bookmarks and Table of Content
@@ -73,31 +73,31 @@
7373
$pdf->AddPage();
7474

7575
// set a bookmark for the current position
76-
$pdf->Bookmark('Chapter 1', 0, 0);
76+
$pdf->Bookmark('Chapter 1', 0, 0, '', 'B', array(0,64,128));
7777

7878
// print a line using Cell()
7979
$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L');
8080

8181
$pdf->AddPage();
82-
$pdf->Bookmark('Paragraph 1.1', 1, 0);
82+
$pdf->Bookmark('Paragraph 1.1', 1, 0, '', '', array(128,0,0));
8383
$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L');
8484

8585
$pdf->AddPage();
86-
$pdf->Bookmark('Paragraph 1.2', 1, 0);
86+
$pdf->Bookmark('Paragraph 1.2', 1, 0, '', '', array(128,0,0));
8787
$pdf->Cell(0, 10, 'Paragraph 1.2', 0, 1, 'L');
8888

8989
$pdf->AddPage();
90-
$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0);
90+
$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0, '', 'I', array(0,128,0));
9191
$pdf->Cell(0, 10, 'Sub-Paragraph 1.2.1', 0, 1, 'L');
9292

9393
$pdf->AddPage();
94-
$pdf->Bookmark('Paragraph 1.3', 1, 0);
94+
$pdf->Bookmark('Paragraph 1.3', 1, 0, '', '', array(128,0,0));
9595
$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L');
9696

9797
// add some pages and bookmarks
9898
for ($i = 2; $i < 12; $i++) {
9999
$pdf->AddPage();
100-
$pdf->Bookmark('Chapter '.$i, 0, 0);
100+
$pdf->Bookmark('Chapter '.$i, 0, 0, '', 'B', array(0,64,128));
101101
$pdf->Cell(0, 10, 'Chapter '.$i, 0, 1, 'L');
102102
}
103103

@@ -115,7 +115,7 @@
115115

116116
// add a simple Table Of Content at first page
117117
// (check the example n. 59 for the HTML version)
118-
$pdf->addTOC(1, 'courier', '.', 'INDEX');
118+
$pdf->addTOC(1, 'courier', '.', 'INDEX', 'B', array(128,0,0));
119119

120120
// end of TOC page
121121
$pdf->endTOCPage();
@@ -126,5 +126,5 @@
126126
$pdf->Output('example_045.pdf', 'I');
127127

128128
//============================================================+
129-
// END OF FILE
129+
// END OF FILE
130130
//============================================================+

examples/example_059.php

+10-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//============================================================+
33
// File name : example_059.php
44
// Begin : 2010-05-06
5-
// Last Update : 2010-09-13
5+
// Last Update : 2011-04-15
66
//
77
// Description : Example 059 for TCPDF class
88
// Table Of Content using HTML templates.
@@ -110,30 +110,31 @@ public function Footer() {
110110
$pdf->AddPage();
111111

112112
// set a bookmark for the current position
113-
$pdf->Bookmark('Chapter 1', 0, 0);
113+
$pdf->Bookmark('Chapter 1', 0, 0, '', 'B', array(0,64,128));
114114

115115
// print a line using Cell()
116116
$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L');
117117

118118
$pdf->AddPage();
119-
$pdf->Bookmark('Paragraph 1.1', 1, 0);
119+
$pdf->Bookmark('Paragraph 1.1', 1, 0, '', '', array(128,0,0));
120120
$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L');
121121

122122
$pdf->AddPage();
123-
$pdf->Bookmark('Paragraph 1.2', 1, 0);
123+
$pdf->Bookmark('Paragraph 1.2', 1, 0, '', '', array(128,0,0));
124124
$pdf->Cell(0, 10, 'Paragraph 1.2', 0, 1, 'L');
125125

126126
$pdf->AddPage();
127-
$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0);
127+
$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0, '', 'I', array(0,128,0));
128128
$pdf->Cell(0, 10, 'Sub-Paragraph 1.2.1', 0, 1, 'L');
129129

130130
$pdf->AddPage();
131-
$pdf->Bookmark('Paragraph 1.3', 1, 0);
131+
$pdf->Bookmark('Paragraph 1.3', 1, 0, '', '', array(128,0,0));
132132
$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L');
133133

134-
for ($i = 2; $i < 12; ++$i) {
134+
// add some pages and bookmarks
135+
for ($i = 2; $i < 12; $i++) {
135136
$pdf->AddPage();
136-
$pdf->Bookmark('Chapter '.$i, 0, 0);
137+
$pdf->Bookmark('Chapter '.$i, 0, 0, '', 'B', array(0,64,128));
137138
$pdf->Cell(0, 10, 'Chapter '.$i, 0, 1, 'L');
138139
}
139140

@@ -172,7 +173,7 @@ public function Footer() {
172173

173174
// add table of content at page 1
174175
// (check the example n. 45 for a text-only TOC
175-
$pdf->addHTMLTOC($page=1, $toc_name='INDEX', $bookmark_templates, $correct_align=true);
176+
$pdf->addHTMLTOC(1, 'INDEX', $bookmark_templates, true, 'B', array(128,0,0));
176177

177178
// end of TOC page
178179
$pdf->endTOCPage();

fonts/utils/README.TXT

+1-6
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The PDF Core (standard) fonts are:
3030

3131
Setting up a font for usage with TCPDF requires the following steps:
3232

33-
1. Convert all font filenames to lowercase and rename using the following schema:
33+
1. Convert all font filenames to lowercase, remove all spaces and special characters and rename them using the following schema:
3434
* [basic-font-name-in-lowercase].ttf for regular font
3535
* [basic-font-name-in-lowercase]b.ttf for bold variation
3636
* [basic-font-name-in-lowercase]i.ttf for oblique variation
@@ -127,9 +127,4 @@ Setting up a font for usage with TCPDF requires the following steps:
127127
include(dirname(__FILE__).'/uni2cid_aj16.php');
128128

129129
o copy the .php file to the TCPDF fonts directory.
130-
5. Rename php font files variations using the following schema:
131-
* [basic-font-name-in-lowercase].php for regular font
132-
* [basic-font-name-in-lowercase]b.php for bold variation
133-
* [basic-font-name-in-lowercase]i.php for oblique variation
134-
* [basic-font-name-in-lowercase]bi.php for bold oblique variation
135130

0 commit comments

Comments
 (0)