From 6845c1be68252b27bc9b8512f18b8f6e3dd776aa Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 12 Aug 2011 19:26:14 +0200 Subject: [PATCH] 5.9.109 --- CHANGELOG.TXT | 4 ++++ README.TXT | 4 ++-- tcpdf.php | 21 ++++++++++++--------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 5cd6ea5..d8fc463 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,7 @@ +5.9.109 (2011-08-12) + - Method getNumLines() was fixed. + - A bug related to page break in multi-column mode was fixed. + 5.9.108 (2011-08-09) - A bug on PHP4 version was fixed. diff --git a/README.TXT b/README.TXT index a7b53eb..794fc78 100755 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 5.9.108 -Release date: 2011-08-09 +Version: 5.9.109 +Release date: 2011-08-12 Author: Nicola Asuni Copyright (c) 2002-2011: diff --git a/tcpdf.php b/tcpdf.php index 3ec5c7b..718fa6e 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 5.9.108 + * @version 5.9.109 */ // Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file. @@ -148,7 +148,7 @@ require_once(dirname(__FILE__).'/config/tcpdf_config.php'); * 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.
* @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 5.9.108 + * @version 5.9.109 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -159,7 +159,7 @@ class TCPDF { * Current TCPDF version. * @private */ - private $tcpdf_version = '5.9.108'; + private $tcpdf_version = '5.9.109'; // Protected properties @@ -6174,10 +6174,10 @@ class TCPDF { $y = $this->GetY(); } $resth = 0; - if (($this->inPageBody()) AND (($y + $h + $mc_margin['T'] + $mc_margin['B']) > $this->PageBreakTrigger)) { + if (($h > 0) AND $this->inPageBody() AND (($y + $h + $mc_margin['T'] + $mc_margin['B']) > $this->PageBreakTrigger)) { // spit cell in more pages/columns - $newh = $this->PageBreakTrigger - $y; - $resth = $h - $newh; // cell to be printed on the next page/column + $newh = ($this->PageBreakTrigger - $y); + $resth = ($h - $newh); // cell to be printed on the next page/column $h = $newh; } // get current page number @@ -6589,7 +6589,10 @@ class TCPDF { } if ((($sum + $charWidth) > $wmax) OR ($chars[$i] == 10)) { ++$lines; - if ($lastSeparator != -1) { + if ($chars[$i] == 10) { + $lastSeparator = -1; + $sum = 0; + } elseif ($lastSeparator != -1) { $i = $lastSeparator; $lastSeparator = -1; $sum = 0;