32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2025-01-23 20:38:25 +00:00
This commit is contained in:
nicolaasuni 2011-02-12 19:43:27 +01:00
parent e2b68927e1
commit 02f55878f9
3 changed files with 18 additions and 13 deletions

View File

@ -1,3 +1,6 @@
5.9.051 (2011-02-12)
- "Commas at beginning of new lines" problem was fixed.
5.9.050 (2011-02-11) 5.9.050 (2011-02-11)
- Bug #3177606 "SVG Bar chart error" was fixed. - Bug #3177606 "SVG Bar chart error" was fixed.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 5.9.050 Version: 5.9.051
Release date: 2011-02-11 Release date: 2011-02-12
Author: Nicola Asuni Author: Nicola Asuni
Copyright (c) 2002-2011: Copyright (c) 2002-2011:

View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : tcpdf.php // File name : tcpdf.php
// Version : 5.9.050 // Version : 5.9.051
// Begin : 2002-08-03 // Begin : 2002-08-03
// Last Update : 2011-02-11 // Last Update : 2011-02-12
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com // Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3 + YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE GENERATED PDF DOCUMENTS. // License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3 + YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE GENERATED PDF DOCUMENTS.
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -134,7 +134,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p> * Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @author Nicola Asuni * @author Nicola Asuni
* @version 5.9.050 * @version 5.9.051
*/ */
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file. // 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.<br> * 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.<br>
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions. * @brief PHP class for generating PDF documents without requiring external extensions.
* @version 5.9.050 * @version 5.9.051
* @author Nicola Asuni - info@tecnick.com * @author Nicola Asuni - info@tecnick.com
*/ */
class TCPDF { class TCPDF {
@ -157,7 +157,7 @@ class TCPDF {
* Current TCPDF version. * Current TCPDF version.
* @private * @private
*/ */
private $tcpdf_version = '5.9.050'; private $tcpdf_version = '5.9.051';
// Protected properties // Protected properties
@ -20286,7 +20286,6 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$strrest = $this->addHtmlLink($this->HREF['url'], $dom[$key]['value'], $wfill, true, $hrefcolor, $hrefstyle, true); $strrest = $this->addHtmlLink($this->HREF['url'], $dom[$key]['value'], $wfill, true, $hrefcolor, $hrefstyle, true);
} else { } else {
$wadj = 0; // space to leave for block continuity $wadj = 0; // space to leave for block continuity
$adjblks = 0; // number of blocks
if ($this->rtl) { if ($this->rtl) {
$cwa = $this->x - $this->lMargin; $cwa = $this->x - $this->lMargin;
} else { } else {
@ -20312,11 +20311,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$same_textdir = ($dom[$nkey]['dir'] == $dom[$key]['dir']); $same_textdir = ($dom[$nkey]['dir'] == $dom[$key]['dir']);
} else { } else {
$nextstr = preg_split('/'.$this->re_space['p'].'+/'.$this->re_space['m'], $dom[$nkey]['value']); $nextstr = preg_split('/'.$this->re_space['p'].'+/'.$this->re_space['m'], $dom[$nkey]['value']);
if (isset($nextstr[0])) { if (isset($nextstr[0]) AND $same_textdir) {
if ($same_textdir) { $wadj += $this->GetStringWidth($nextstr[0], $tmp_fontname, $tmp_fontstyle, $tmp_fontsize);
$wadj += $this->GetStringWidth($nextstr[0], $tmp_fontname, $tmp_fontstyle, $tmp_fontsize);
}
++$adjblks;
} }
if (isset($nextstr[1])) { if (isset($nextstr[1])) {
$write_block = false; $write_block = false;
@ -20325,6 +20321,12 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
++$nkey; ++$nkey;
} }
} }
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]));
}
}
// check for reversed text direction // check for reversed text direction
if (($wadj > 0) AND (($this->rtl AND ($this->tmprtl === 'L')) OR (!$this->rtl AND ($this->tmprtl === 'R')))) { if (($wadj > 0) AND (($this->rtl AND ($this->tmprtl === 'L')) OR (!$this->rtl AND ($this->tmprtl === 'R')))) {
// LTR text on RTL direction or RTL text on LTR direction // LTR text on RTL direction or RTL text on LTR direction