From 5a1deebb168c526a4670b432c21322b93e71686f Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Mon, 13 Sep 2010 09:53:19 +0200 Subject: [PATCH] 5.8.026 --- CHANGELOG.TXT | 3 + README.TXT | 4 +- doc/classtrees_com-tecnick-tcpdf.html | 2 +- doc/com-tecnick-tcpdf/PDF417.html | 2 +- doc/com-tecnick-tcpdf/QRcode.html | 2 +- doc/com-tecnick-tcpdf/TCPDF.html | 84 +++++++++---------- doc/com-tecnick-tcpdf/TCPDF2DBarcode.html | 2 +- doc/com-tecnick-tcpdf/TCPDFBarcode.html | 2 +- doc/com-tecnick-tcpdf/_2dbarcodes.php.html | 2 +- doc/com-tecnick-tcpdf/_barcodes.php.html | 2 +- .../_config---tcpdf_config.php.html | 2 +- doc/com-tecnick-tcpdf/_htmlcolors.php.html | 2 +- doc/com-tecnick-tcpdf/_pdf417.php.html | 2 +- doc/com-tecnick-tcpdf/_qrcode.php.html | 2 +- doc/com-tecnick-tcpdf/_tcpdf.php.html | 6 +- doc/com-tecnick-tcpdf/_unicode_data.php.html | 2 +- doc/elementindex.html | 2 +- doc/elementindex_com-tecnick-tcpdf.html | 2 +- doc/errors.html | 2 +- doc/index.html | 2 +- doc/li_com-tecnick-tcpdf.html | 2 +- examples/example_059.php | 8 +- tcpdf.php | 30 +++++-- 23 files changed, 92 insertions(+), 77 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 3e3bcfd..d23282f 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,6 @@ +5.8.026 (2010-09-13) + - A bug on addHTMLTOC() method was fixed. Note: be sure that the #TOC_PAGE_NUMBER# template has enough width to be printed correctly. + 5.8.025 (2010-09-09) - Bug #3062692 "Textarea inside a table" was fixed. diff --git a/README.TXT b/README.TXT index d81154a..f834199 100755 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http: sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 5.8.025 -Release date: 2010-09-09 +Version: 5.8.026 +Release date: 2010-09-13 Author: Nicola Asuni Copyright (c) 2002-2010: diff --git a/doc/classtrees_com-tecnick-tcpdf.html b/doc/classtrees_com-tecnick-tcpdf.html index 4af1e80..2e628e3 100644 --- a/doc/classtrees_com-tecnick-tcpdf.html +++ b/doc/classtrees_com-tecnick-tcpdf.html @@ -60,7 +60,7 @@

- Documentation generated on Thu, 09 Sep 2010 16:49:32 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:08 +0200 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/PDF417.html b/doc/com-tecnick-tcpdf/PDF417.html index d4e824e..284611c 100644 --- a/doc/com-tecnick-tcpdf/PDF417.html +++ b/doc/com-tecnick-tcpdf/PDF417.html @@ -1003,7 +1003,7 @@ $code)

- Documentation generated on Thu, 09 Sep 2010 16:49:33 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:08 +0200 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/QRcode.html b/doc/com-tecnick-tcpdf/QRcode.html index 7969406..05af1dc 100644 --- a/doc/com-tecnick-tcpdf/QRcode.html +++ b/doc/com-tecnick-tcpdf/QRcode.html @@ -5551,7 +5551,7 @@ $frame)

- Documentation generated on Thu, 09 Sep 2010 16:49:33 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:08 +0200 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/TCPDF.html b/doc/com-tecnick-tcpdf/TCPDF.html index 5058763..715b169 100644 --- a/doc/com-tecnick-tcpdf/TCPDF.html +++ b/doc/com-tecnick-tcpdf/TCPDF.html @@ -83,7 +83,7 @@ Source Location: /tcpdf.php

Version:

@@ -748,7 +748,7 @@ This is a PHP class for generating PDF documents without requiring external exte author:  Nicola Asuni - info@tecnick.com - version:  5.8.025 + version:  5.8.026 link:  http://www.tcpdf.org @@ -8731,7 +8731,7 @@ $js = false])
-

method commitTransaction [line 21814]

+

method commitTransaction [line 21826]

@@ -8885,7 +8885,7 @@ $s)
-

method convertSVGtMatrix [line 23100]

+

method convertSVGtMatrix [line 23112]

@@ -9458,7 +9458,7 @@ $afinish:)
-

method empty_string [line 21868]

+

method empty_string [line 21880]

@@ -9542,7 +9542,7 @@ $tocpage = false])
-

method endSVGElementHandler [line 24172]

+

method endSVGElementHandler [line 24184]

@@ -9590,7 +9590,7 @@ $name)
-

method endTemplate [line 22547]

+

method endTemplate [line 22559]

@@ -10587,7 +10587,7 @@ $char)
-

method getColumn [line 22019]

+

method getColumn [line 22031]

@@ -10973,7 +10973,7 @@ $size = 0])
-

method getFontFamilyName [line 22449]

+

method getFontFamilyName [line 22461]

@@ -11139,7 +11139,7 @@ $fontfamily)
-

method getFontSubsetting [line 22385]

+

method getFontSubsetting [line 22397]

@@ -11584,7 +11584,7 @@ $point)
-

method getHyphenPatternsFromTEX [line 22185]

+

method getHyphenPatternsFromTEX [line 22197]

@@ -11899,7 +11899,7 @@ $iminfo = array()])
-

method getNumberOfColumns [line 22029]

+

method getNumberOfColumns [line 22041]

@@ -12478,7 +12478,7 @@ $pagenum = ''])
-

method getPathPaintOperator [line 22297]

+

method getPathPaintOperator [line 22309]

@@ -12850,7 +12850,7 @@ $getarray = false])
-

method getSVGTransformMatrix [line 22986]

+

method getSVGTransformMatrix [line 22998]

@@ -12949,7 +12949,7 @@ $css)
-

method getTransformationMatrixProduct [line 23082]

+

method getTransformationMatrixProduct [line 23094]

@@ -13048,7 +13048,7 @@ $mode = 0])
-

method getVectorsAngle [line 23714]

+

method getVectorsAngle [line 23726]

@@ -13292,7 +13292,7 @@ $antialias = false])
-

method hyphenateText [line 22224]

+

method hyphenateText [line 22236]

@@ -13373,7 +13373,7 @@ $charmax = 8])
-

method hyphenateWord [line 22115]

+

method hyphenateWord [line 22127]

@@ -13811,7 +13811,7 @@ $palign)
-

method ImageSVG [line 22712]

+

method ImageSVG [line 22724]

@@ -14019,7 +14019,7 @@ $number)
-

method isUnicodeFont [line 22437]

+

method isUnicodeFont [line 22449]

@@ -14875,7 +14875,7 @@ $fitcell = false])
-

method objclone [line 21857]

+

method objclone [line 21869]

@@ -15559,7 +15559,7 @@ $closed)
-

method printTemplate [line 22576]

+

method printTemplate [line 22588]

@@ -16255,7 +16255,7 @@ $data)
-

method revstrpos [line 21881]

+

method revstrpos [line 21893]

@@ -16360,7 +16360,7 @@ $length)
-

method rollbackTransaction [line 21828]

+

method rollbackTransaction [line 21840]

@@ -16858,7 +16858,7 @@ $y = ''])
-

method segSVGContentHandler [line 24235]

+

method segSVGContentHandler [line 24247]

@@ -16906,7 +16906,7 @@ $data)
-

method selectColumn [line 21944]

+

method selectColumn [line 21956]

@@ -16945,7 +16945,7 @@ $col = ''])
-

method serializeTCPDFtagParameters [line 22040]

+

method serializeTCPDFtagParameters [line 22052]

@@ -17329,7 +17329,7 @@ $pad)
-

method setColumnsArray [line 21931]

+

method setColumnsArray [line 21943]

@@ -17785,7 +17785,7 @@ $tint = 100])
-

method setEqualColumns [line 21898]

+

method setEqualColumns [line 21910]

@@ -18238,7 +18238,7 @@ $data)
-

method setFontSubsetting [line 22374]

+

method setFontSubsetting [line 22386]

@@ -19904,7 +19904,7 @@ $pubkeys = null])
-

method setRasterizeVectorImages [line 22271]

+

method setRasterizeVectorImages [line 22283]

@@ -20255,7 +20255,7 @@ $subject)
-

method setSVGStyles [line 23139]

+

method setSVGStyles [line 23151]

@@ -20508,7 +20508,7 @@ $color)
-

method setTextRenderingMode [line 22052]

+

method setTextRenderingMode [line 22064]

diff --git a/examples/example_059.php b/examples/example_059.php index 1a6f6d6..0e3356b 100644 --- a/examples/example_059.php +++ b/examples/example_059.php @@ -2,7 +2,7 @@ //============================================================+ // File name : example_059.php // Begin : 2010-05-06 -// Last Update : 2010-08-08 +// Last Update : 2010-09-13 // // Description : Example 059 for TCPDF class // Table Of Content using HTML templates. @@ -168,9 +168,9 @@ $bookmark_templates = array(); */ // A monospaced font for the page number is mandatory to get the right alignment -$bookmark_templates[0] = '
diff --git a/doc/li_com-tecnick-tcpdf.html b/doc/li_com-tecnick-tcpdf.html index 5376909..5725de7 100644 --- a/doc/li_com-tecnick-tcpdf.html +++ b/doc/li_com-tecnick-tcpdf.html @@ -67,7 +67,7 @@ This documentation was generated by phpDocumentor v1.4.3

- Documentation generated on Thu, 09 Sep 2010 16:49:32 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:07 +0200 by phpDocumentor 1.4.3
@@ -21430,7 +21430,7 @@ $page = ''])
-

method startSVGElementHandler [line 23738]

+

method startSVGElementHandler [line 23750]

diff --git a/doc/index.html b/doc/index.html index 5376909..5725de7 100644 --- a/doc/index.html +++ b/doc/index.html @@ -67,7 +67,7 @@ This documentation was generated by phpDocumentor v1.4.3

- Documentation generated on Thu, 09 Sep 2010 16:49:32 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:07 +0200 by phpDocumentor 1.4.3
diff --git a/doc/errors.html b/doc/errors.html index dde2a2e..7e349e8 100644 --- a/doc/errors.html +++ b/doc/errors.html @@ -35,7 +35,7 @@ Post-parsing

- Documentation generated on Thu, 09 Sep 2010 16:49:38 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:14 +0200 by phpDocumentor 1.4.3
@@ -21490,7 +21490,7 @@ $ctm = array()])
-

method startTemplate [line 22491]

+

method startTemplate [line 22503]

diff --git a/doc/elementindex_com-tecnick-tcpdf.html b/doc/elementindex_com-tecnick-tcpdf.html index c8862da..f481e36 100644 --- a/doc/elementindex_com-tecnick-tcpdf.html +++ b/doc/elementindex_com-tecnick-tcpdf.html @@ -2090,7 +2090,7 @@ top

- Documentation generated on Thu, 09 Sep 2010 16:49:32 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:07 +0200 by phpDocumentor 1.4.3
diff --git a/doc/elementindex.html b/doc/elementindex.html index 0a45591..3f32a28 100644 --- a/doc/elementindex.html +++ b/doc/elementindex.html @@ -2058,7 +2058,7 @@ top

- Documentation generated on Thu, 09 Sep 2010 16:49:32 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:07 +0200 by phpDocumentor 1.4.3
@@ -21544,7 +21544,7 @@ $h = 0])
-

method startTransaction [line 21797]

+

method startTransaction [line 21809]

diff --git a/doc/com-tecnick-tcpdf/_unicode_data.php.html b/doc/com-tecnick-tcpdf/_unicode_data.php.html index 40a02be..94c1e4f 100644 --- a/doc/com-tecnick-tcpdf/_unicode_data.php.html +++ b/doc/com-tecnick-tcpdf/_unicode_data.php.html @@ -246,7 +246,7 @@ Unicode data for TCPDF library.




- Documentation generated on Thu, 09 Sep 2010 16:49:38 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:14 +0200 by phpDocumentor 1.4.3
@@ -21634,7 +21634,7 @@ $h = 0])
-

method stringLeftTrim [line 22398]

+

method stringLeftTrim [line 22410]

diff --git a/doc/com-tecnick-tcpdf/_tcpdf.php.html b/doc/com-tecnick-tcpdf/_tcpdf.php.html index a294fcb..5e0a043 100644 --- a/doc/com-tecnick-tcpdf/_tcpdf.php.html +++ b/doc/com-tecnick-tcpdf/_tcpdf.php.html @@ -82,7 +82,7 @@ This is a PHP class for generating PDF documents without requiring external exte - + @@ -113,7 +113,7 @@ unicode data

diff --git a/doc/com-tecnick-tcpdf/_qrcode.php.html b/doc/com-tecnick-tcpdf/_qrcode.php.html index 80836c8..dcfedee 100644 --- a/doc/com-tecnick-tcpdf/_qrcode.php.html +++ b/doc/com-tecnick-tcpdf/_qrcode.php.html @@ -480,7 +480,7 @@ string $string, [int $split_length = 1])

- Documentation generated on Thu, 09 Sep 2010 16:49:33 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:08 +0200 by phpDocumentor 1.4.3
@@ -21685,7 +21685,7 @@ $replace = ''])
-

method stringRightTrim [line 22411]

+

method stringRightTrim [line 22423]

diff --git a/doc/com-tecnick-tcpdf/_pdf417.php.html b/doc/com-tecnick-tcpdf/_pdf417.php.html index 3821688..90c80ca 100644 --- a/doc/com-tecnick-tcpdf/_pdf417.php.html +++ b/doc/com-tecnick-tcpdf/_pdf417.php.html @@ -157,7 +157,7 @@ Class to create PDF417 barcode arrays for TCPDF class.

PDF417 (ISO


- Documentation generated on Thu, 09 Sep 2010 16:49:33 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:08 +0200 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/_htmlcolors.php.html b/doc/com-tecnick-tcpdf/_htmlcolors.php.html index 1de70e5..10878d8 100644 --- a/doc/com-tecnick-tcpdf/_htmlcolors.php.html +++ b/doc/com-tecnick-tcpdf/_htmlcolors.php.html @@ -97,7 +97,7 @@ Array of WEB safe colors.




- Documentation generated on Thu, 09 Sep 2010 16:49:33 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:08 +0200 by phpDocumentor 1.4.3
@@ -21736,7 +21736,7 @@ $replace = ''])
-

method stringTrim [line 22424]

+

method stringTrim [line 22436]

diff --git a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html index f07ad83..72d505b 100644 --- a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html +++ b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html @@ -542,7 +542,7 @@ Configuration file for TCPDF.




- Documentation generated on Thu, 09 Sep 2010 16:49:38 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:13 +0200 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/_barcodes.php.html b/doc/com-tecnick-tcpdf/_barcodes.php.html index d62ae99..bfab127 100644 --- a/doc/com-tecnick-tcpdf/_barcodes.php.html +++ b/doc/com-tecnick-tcpdf/_barcodes.php.html @@ -105,7 +105,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit

- Documentation generated on Thu, 09 Sep 2010 16:49:32 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:08 +0200 by phpDocumentor 1.4.3
@@ -21787,7 +21787,7 @@ $replace = ''])
-

method SVGPath [line 23394]

+

method SVGPath [line 23406]

diff --git a/doc/com-tecnick-tcpdf/_2dbarcodes.php.html b/doc/com-tecnick-tcpdf/_2dbarcodes.php.html index c9e66c6..78e7918 100644 --- a/doc/com-tecnick-tcpdf/_2dbarcodes.php.html +++ b/doc/com-tecnick-tcpdf/_2dbarcodes.php.html @@ -105,7 +105,7 @@ PHP class to creates array representations for 2D barcodes to be used with TCPDF

- Documentation generated on Thu, 09 Sep 2010 16:49:32 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:08 +0200 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/TCPDFBarcode.html b/doc/com-tecnick-tcpdf/TCPDFBarcode.html index 2fe301e..c8040d4 100644 --- a/doc/com-tecnick-tcpdf/TCPDFBarcode.html +++ b/doc/com-tecnick-tcpdf/TCPDFBarcode.html @@ -1377,7 +1377,7 @@ $type)

- Documentation generated on Thu, 09 Sep 2010 16:49:32 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:08 +0200 by phpDocumentor 1.4.3
@@ -21838,7 +21838,7 @@ $style = ''])
-

method SVGTransform [line 23120]

+

method SVGTransform [line 23132]

diff --git a/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html b/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html index a263ee4..4c804da 100644 --- a/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html +++ b/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html @@ -299,7 +299,7 @@ $type)

- Documentation generated on Thu, 09 Sep 2010 16:49:32 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:08 +0200 by phpDocumentor 1.4.3
@@ -26952,7 +26952,7 @@ $file)

- Documentation generated on Thu, 09 Sep 2010 16:49:34 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:09 +0200 by phpDocumentor 1.4.3
author:  Nicola Asuni
version:  5.8.025version:  5.8.026
copyright:  2002-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
- PDF_PRODUCER = 'TCPDF 5.8.025 (http://www.tcpdf.org)' + PDF_PRODUCER = 'TCPDF 5.8.026 (http://www.tcpdf.org)'
@@ -124,7 +124,7 @@ unicode data


- Documentation generated on Thu, 09 Sep 2010 16:49:34 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 13 Sep 2010 09:53:09 +0200 by phpDocumentor 1.4.3
#TOC_DESCRIPTION##TOC_PAGE_NUMBER#
'; -$bookmark_templates[1] = '
 #TOC_DESCRIPTION##TOC_PAGE_NUMBER#
'; -$bookmark_templates[2] = '
 #TOC_DESCRIPTION##TOC_PAGE_NUMBER#
'; +$bookmark_templates[0] = '
#TOC_DESCRIPTION##TOC_PAGE_NUMBER#
'; +$bookmark_templates[1] = '
 #TOC_DESCRIPTION##TOC_PAGE_NUMBER#
'; +$bookmark_templates[2] = '
 #TOC_DESCRIPTION##TOC_PAGE_NUMBER#
'; // add other bookmark level templates here ... // add table of content at page 1 diff --git a/tcpdf.php b/tcpdf.php index 89dcea0..a4d2927 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
* @name TCPDF * @package com.tecnick.tcpdf - * @version 5.8.025 + * @version 5.8.026 * @author Nicola Asuni - info@tecnick.com * @link http://www.tcpdf.org * @license http://www.gnu.org/copyleft/lesser.html LGPL @@ -21640,7 +21640,7 @@ if (!class_exists('TCPDF', false)) { $k = '{#'.$n.'}'; $ku = '{'.$k.'}'; $alias_a = $this->_escape($k); - $alias_au = $this->_escape('{'.$k.'}'); + $alias_au = $this->_escape($ku); if ($this->isunicode) { $alias_b = $this->_escape($this->UTF8ToLatin1($k)); $alias_bu = $this->_escape($this->UTF8ToLatin1($ku)); @@ -21706,18 +21706,30 @@ if (!class_exists('TCPDF', false)) { $this->htmlLinkColorArray = array(); $this->htmlLinkFontStyle = ''; $page_first = $this->getPage(); + // get the font type used for numbers in each template + $current_font = $this->FontFamily; + foreach ($templates as $level => $html) { + $dom = $this->getHtmlDomArray($html); + foreach ($dom as $key => $value) { + if ($value['value'] == '#TOC_PAGE_NUMBER#') { + $this->SetFont($dom[($key - 1)]['fontname']); + $templates['F'.$level] = $this->isUnicodeFont(); + } + } + } + $this->SetFont($current_font); foreach ($this->outlines as $key => $outline) { + // get HTML template + $row = $templates[$outline['l']]; if ($this->empty_string($page)) { $pagenum = $outline['p']; } else { // placemark to be replaced with the correct number $pagenum = '{#'.($outline['p']).'}'; - if ($this->isUnicodeFont()) { + if ($templates['F'.$outline['l']]) { $pagenum = '{'.$pagenum.'}'; } } - // get HTML template - $row = $templates[$outline['l']]; // replace templates with current values $row = str_replace('#TOC_DESCRIPTION#', $outline['t'], $row); $row = str_replace('#TOC_PAGE_NUMBER#', $pagenum, $row);