diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 1087302..b4524c5 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,8 @@ +5.9.043 (2011-01-14) + - Bug #3158178 "PHP Notice" was fixed. + - Bug #3158193 "Endless loop in writeHTML" was fixed. + - Bug #3157764 "SVG Pie chart incorrectly rendered2". + 5.9.042 (2011-01-14) - Some problems of the PHP4 version were fixed. diff --git a/README.TXT b/README.TXT index f117604..c142b07 100755 --- a/README.TXT +++ b/README.TXT @@ -8,7 +8,7 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 5.9.042 +Version: 5.9.043 Release date: 2011-01-14 Author: Nicola Asuni diff --git a/tcpdf.php b/tcpdf.php index ac344ab..8bf4a68 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,7 +1,7 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 5.9.042 + * @version 5.9.043 */ // 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.042 + * @version 5.9.043 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -157,7 +157,7 @@ class TCPDF { * Current TCPDF version. * @private */ - private $tcpdf_version = '5.9.042'; + private $tcpdf_version = '5.9.043'; // Protected properties @@ -6079,12 +6079,12 @@ class TCPDF { $this->writeHTML($txt, true, 0, $reseth, true, $align); $nl = 1; } else { // ******* Write simple text + $prev_FontSizePt = $this->FontSizePt; // vertical alignment if ($maxh > 0) { // get text height $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border); if ($fitcell) { - $prev_FontSizePt = $this->FontSizePt; // try to reduce font size to fit text on cell (use a quick search algorithm) $fmin = 1; $fmax = $this->FontSizePt; @@ -19290,8 +19290,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $autolinebreak = false; if (isset($dom[$key]['width']) AND ($dom[$key]['width'] > 0)) { $imgw = $this->getHTMLUnitToUnits($dom[$key]['width'], 1, 'px', false); - if (($this->rtl AND (($this->x - $imgw) < ($this->lMargin + $this->cell_padding['L']))) - OR (!$this->rtl AND (($this->x + $imgw) > ($this->w - $this->rMargin - $this->cell_padding['R'])))) { + if (($imgw <= ($this->w - $this->lMargin - $this->rMargin - $this->cell_padding['L'] - $this->cell_padding['R'])) + AND (($this->rtl AND (($this->x - $imgw) < ($this->lMargin + $this->cell_padding['L']))) + OR (!$this->rtl AND (($this->x + $imgw) > ($this->w - $this->rMargin - $this->cell_padding['R']))))) { // add automatic line break $autolinebreak = true; $this->Ln('', $cell); @@ -25503,8 +25504,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $fs = $rawparams[($ck - 2)]; // sweep-flag $x = $params[($ck - 1)] + $xoffset; $y = $params[$ck] + $yoffset; - if (($x0 == $x) AND ($y0 == $y)) { - // endpoints are identical + $minlen = (0.01 / $this->k); // 3 point + if ((abs($x0 - $x) < $minlen) AND (abs($x0 - $x) < $minlen)) { + // endpoints are almost identical break; } $cos_ang = cos($angle);