From e5aa76fdbe4fc4500ddaf2ec652678f9732b3a2b Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Tue, 15 Feb 2011 09:36:24 +0100 Subject: [PATCH] 5.9.052 --- CHANGELOG.TXT | 3 +++ README.TXT | 4 ++-- tcpdf.php | 19 ++++++++++--------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index e4a14ce..5e34292 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,6 @@ +5.9.052 (2011-02-15) + - A bug related to HTML automatic newlines was fixed. + 5.9.051 (2011-02-12) - "Commas at beginning of new lines" problem was fixed. diff --git a/README.TXT b/README.TXT index f6752a2..120c575 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.051 -Release date: 2011-02-12 +Version: 5.9.052 +Release date: 2011-02-15 Author: Nicola Asuni Copyright (c) 2002-2011: diff --git a/tcpdf.php b/tcpdf.php index ac2e3a6..c3edb28 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 5.9.051 + * @version 5.9.052 */ // Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file. @@ -146,7 +146,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.051 + * @version 5.9.052 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -157,7 +157,7 @@ class TCPDF { * Current TCPDF version. * @private */ - private $tcpdf_version = '5.9.051'; + private $tcpdf_version = '5.9.052'; // Protected properties @@ -20291,7 +20291,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } else { $cwa = $this->w - $this->rMargin - $this->x; } - if ($strlinelen < $cwa) { + if (($strlinelen < $cwa) AND (isset($dom[($key + 1)])) AND ($dom[($key + 1)]['tag']) AND (!$dom[($key + 1)]['block'])) { // check the next text blocks for continuity $nkey = ($key + 1); $write_block = true; @@ -20322,9 +20322,10 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } } if (($wadj > 0) AND (($strlinelen + $wadj) >= $cwa)) { - $nextstr = preg_split('/'.$this->re_space['p'].'/'.$this->re_space['m'], $dom[$key]['value'], 2); - if (isset($nextstr[0])) { - $wadj = ($cwa - $this->GetStringWidth($nextstr[0])); + $nextstr = preg_split('/'.$this->re_space['p'].'/'.$this->re_space['m'], $dom[$key]['value']); + $numblks = count($nextstr); + if ($numblks > 1) { + $wadj = ($cwa - $strlinelen + $this->GetStringWidth($nextstr[($numblks - 1)])); } } // check for reversed text direction