diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 7d7b38e..45d4a69 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,8 @@ +5.9.062 (2011-03-23) + - Bug item #3232650 "Using Write if there are pageRegions active creates error" was fixed. + - Bug item #3221891 "text input borders" was fixed. + - Bug item #3228958 "Adobe Reader 9.4.2 crash" was fixed. + 5.9.061 (2011-03-15) - Bug item #3213488 "wrong function call in function Write" was fixed. - Bug item #3203007 "list element with black background" was fixed. diff --git a/README.TXT b/README.TXT index 27ce592..cd47771 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.061 -Release date: 2011-03-15 +Version: 5.9.062 +Release date: 2011-03-23 Author: Nicola Asuni Copyright (c) 2002-2011: diff --git a/tcpdf.php b/tcpdf.php index c283be0..ea7aba2 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 5.9.061 + * @version 5.9.062 */ // 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.061 + * @version 5.9.062 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -157,7 +157,7 @@ class TCPDF { * Current TCPDF version. * @private */ - private $tcpdf_version = '5.9.061'; + private $tcpdf_version = '5.9.062'; // Protected properties @@ -4049,7 +4049,7 @@ class TCPDF { // header string $this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]); $this->SetX($header_x); - $this->MultiCell($cw, $cell_height, $headerdata['string'], 0, '', 0, 1, '', '', true, 0, false); + $this->MultiCell($cw, $cell_height, $headerdata['string'], 0, '', 0, 1, '', '', true, 0, false, true, 0, 'T', false); // print an ending header line $this->SetLineStyle(array('width' => 0.85 / $this->k, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))); $this->SetY((2.835 / $this->k) + max($imgy, $this->y)); @@ -5435,6 +5435,8 @@ class TCPDF { * @see Cell() */ protected function getCellCode($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') { + // replace 'NO-BREAK SPACE' (U+00A0) character with a simple space + $txt = str_replace($this->unichr(160), ' ', $txt); $prev_cell_margin = $this->cell_margin; $prev_cell_padding = $this->cell_padding; $txt = $this->removeSHY($txt); @@ -14582,13 +14584,15 @@ class TCPDF { $opt['bs'] = array('w'=>$linewidth, 's'=>'U'); break; } - default: case 'border.s': case 'solid': { $opt['border'] = array(0, 0, $linewidth); $opt['bs'] = array('w'=>$linewidth, 's'=>'S'); break; } + default: { + break; + } } } if (isset($prop['border']) AND is_array($prop['border'])) { @@ -19145,7 +19149,7 @@ class TCPDF { // text $dom[$key]['tag'] = false; $dom[$key]['block'] = false; - $element = str_replace(' ', $this->unichr(160), $element); + //$element = str_replace(' ', $this->unichr(160), $element); $dom[$key]['value'] = stripslashes($this->unhtmlentities($element)); $dom[$key]['parent'] = end($level); $dom[$key]['dir'] = $dom[$dom[$key]['parent']]['dir']; @@ -24620,9 +24624,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: if (empty($h)) { $h = ($this->FontSize * $this->cell_height_ratio) + $this->cell_padding['T'] + $this->cell_padding['B']; } - if ($this->AutoPageBreak AND (!$this->InFooter) AND (($y + $h) > $this->PageBreakTrigger)) { + // check for page break + if ($this->checkPageBreak($h, $y)) { // the content will be printed on a new page - return; + $x = $this->x; + $y = $this->y; } if ($this->num_columns > 1) { if ($this->rtl) {