mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-25 22:07:33 +00:00
6.0.073 (2014-04-29)
- Bug #913 "Possible bug with line-height" was fixed. - Bug #914 "MultiCell and FitCell" was fixed. - Bug #915 "Problem with SVG Image using Radial Gradients" was fixed.
This commit is contained in:
parent
6c3cfd5b16
commit
214e1ea511
@ -1,3 +1,8 @@
|
|||||||
|
6.0.073 (2014-04-29)
|
||||||
|
- Bug #913 "Possible bug with line-height" was fixed.
|
||||||
|
- Bug #914 "MultiCell and FitCell" was fixed.
|
||||||
|
- Bug #915 "Problem with SVG Image using Radial Gradients" was fixed.
|
||||||
|
|
||||||
6.0.072 (2014-04-27)
|
6.0.072 (2014-04-27)
|
||||||
- Deprecated curly braces substring syntax was replaced with square braces.
|
- Deprecated curly braces substring syntax was replaced with square braces.
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
|||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
||||||
Name: TCPDF
|
Name: TCPDF
|
||||||
Version: 6.0.072
|
Version: 6.0.073
|
||||||
Release date: 2014-04-27
|
Release date: 2014-04-29
|
||||||
Author: Nicola Asuni
|
Author: Nicola Asuni
|
||||||
|
|
||||||
Copyright (c) 2002-2014:
|
Copyright (c) 2002-2014:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tecnick.com/tcpdf",
|
"name": "tecnick.com/tcpdf",
|
||||||
"version": "6.0.072",
|
"version": "6.0.073",
|
||||||
"homepage": "http://www.tcpdf.org/",
|
"homepage": "http://www.tcpdf.org/",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"description": "TCPDF is a PHP class for generating PDF documents.",
|
"description": "TCPDF is a PHP class for generating PDF documents.",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Copyright (C) 2002-2013 Nicola Asuni - Tecnick.com LTD
|
// Copyright (C) 2002-2014 Nicola Asuni - Tecnick.com LTD
|
||||||
//
|
//
|
||||||
// This file is part of TCPDF software library.
|
// This file is part of TCPDF software library.
|
||||||
//
|
//
|
||||||
@ -55,7 +55,7 @@ class TCPDF_STATIC {
|
|||||||
* Current TCPDF version.
|
* Current TCPDF version.
|
||||||
* @private static
|
* @private static
|
||||||
*/
|
*/
|
||||||
private static $tcpdf_version = '6.0.072';
|
private static $tcpdf_version = '6.0.073';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* String alias for total number of pages.
|
* String alias for total number of pages.
|
||||||
|
29
tcpdf.php
29
tcpdf.php
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// File name : tcpdf.php
|
// File name : tcpdf.php
|
||||||
// Version : 6.0.072
|
// Version : 6.0.073
|
||||||
// Begin : 2002-08-03
|
// Begin : 2002-08-03
|
||||||
// Last Update : 2014-04-27
|
// Last Update : 2014-04-29
|
||||||
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
@ -104,7 +104,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 6.0.072
|
* @version 6.0.073
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TCPDF configuration
|
// TCPDF configuration
|
||||||
@ -128,7 +128,7 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.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 6.0.072
|
* @version 6.0.073
|
||||||
* @author Nicola Asuni - info@tecnick.com
|
* @author Nicola Asuni - info@tecnick.com
|
||||||
*/
|
*/
|
||||||
class TCPDF {
|
class TCPDF {
|
||||||
@ -5757,7 +5757,7 @@ class TCPDF {
|
|||||||
* @param $autopadding (boolean) if true, uses internal padding and automatically adjust it to account for line width.
|
* @param $autopadding (boolean) if true, uses internal padding and automatically adjust it to account for line width.
|
||||||
* @param $maxh (float) maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false.
|
* @param $maxh (float) maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false.
|
||||||
* @param $valign (string) Vertical alignment of text (requires $maxh = $h > 0). Possible values are:<ul><li>T: TOP</li><li>M: middle</li><li>B: bottom</li></ul>. This feature works only when $ishtml=false and the cell must fit in a single page.
|
* @param $valign (string) Vertical alignment of text (requires $maxh = $h > 0). Possible values are:<ul><li>T: TOP</li><li>M: middle</li><li>B: bottom</li></ul>. This feature works only when $ishtml=false and the cell must fit in a single page.
|
||||||
* @param $fitcell (boolean) if true attempt to fit all the text within the cell by reducing the font size (do not work in HTML mode).
|
* @param $fitcell (boolean) if true attempt to fit all the text within the cell by reducing the font size (do not work in HTML mode). $maxh must be greater than 0 and wqual to $h.
|
||||||
* @return int Return the number of cells or 1 for html mode.
|
* @return int Return the number of cells or 1 for html mode.
|
||||||
* @public
|
* @public
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
@ -5838,6 +5838,11 @@ class TCPDF {
|
|||||||
$nl = 1;
|
$nl = 1;
|
||||||
} else { // ******* Write simple text
|
} else { // ******* Write simple text
|
||||||
$prev_FontSizePt = $this->FontSizePt;
|
$prev_FontSizePt = $this->FontSizePt;
|
||||||
|
if ($fitcell) {
|
||||||
|
// ajust height values
|
||||||
|
$tobottom = ($this->h - $this->y - $this->bMargin - $this->cell_padding['T'] - $this->cell_padding['B']);
|
||||||
|
$h = $maxh = max(min($h, $tobottom), min($maxh, $tobottom));
|
||||||
|
}
|
||||||
// vertical alignment
|
// vertical alignment
|
||||||
if ($maxh > 0) {
|
if ($maxh > 0) {
|
||||||
// get text height
|
// get text height
|
||||||
@ -5846,17 +5851,20 @@ class TCPDF {
|
|||||||
// try to reduce font size to fit text on cell (use a quick search algorithm)
|
// try to reduce font size to fit text on cell (use a quick search algorithm)
|
||||||
$fmin = 1;
|
$fmin = 1;
|
||||||
$fmax = $this->FontSizePt;
|
$fmax = $this->FontSizePt;
|
||||||
$prev_text_height = $text_height;
|
$diff_epsilon = (1 / $this->k); // one point (min resolution)
|
||||||
$maxit = 100; // max number of iterations
|
$maxit = ($fmax - $fmin); // max number of iterations
|
||||||
while ($maxit > 0) {
|
while ($maxit > 0) {
|
||||||
$fmid = (($fmax + $fmin) / 2);
|
$fmid = (($fmax + $fmin) / 2);
|
||||||
$this->SetFontSize($fmid, false);
|
$this->SetFontSize($fmid, false);
|
||||||
$this->resetLastH();
|
$this->resetLastH();
|
||||||
$text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border);
|
$text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border);
|
||||||
if (($text_height == $maxh) OR (($text_height < $maxh) AND ($fmin >= ($fmax - 0.01)))) {
|
$diff = ($maxh - $text_height);
|
||||||
|
if ($diff >= 0) {
|
||||||
|
if ($diff < $diff_epsilon) {
|
||||||
break;
|
break;
|
||||||
} elseif ($text_height < $maxh) {
|
} else {
|
||||||
$fmin = $fmid;
|
$fmin = $fmid;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$fmax = $fmid;
|
$fmax = $fmid;
|
||||||
}
|
}
|
||||||
@ -18639,7 +18647,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
}
|
}
|
||||||
if (($this->htmlvspace <= 0) AND ($n > 0)) {
|
if (($this->htmlvspace <= 0) AND ($n > 0)) {
|
||||||
if (isset($parent['fontsize'])) {
|
if (isset($parent['fontsize'])) {
|
||||||
$hbz = $this->getCellHeight($tag['fontsize'] / $this->k);
|
$hbz = (($parent['fontsize'] / $this->k) * $this->cell_height_ratio);
|
||||||
} else {
|
} else {
|
||||||
$hbz = $this->getCellHeight($this->FontSize);
|
$hbz = $this->getCellHeight($this->FontSize);
|
||||||
}
|
}
|
||||||
@ -23055,6 +23063,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
$newgradient = $this->svggradients[$gradient['xref']];
|
$newgradient = $this->svggradients[$gradient['xref']];
|
||||||
$newgradient['coords'] = $gradient['coords'];
|
$newgradient['coords'] = $gradient['coords'];
|
||||||
$newgradient['mode'] = $gradient['mode'];
|
$newgradient['mode'] = $gradient['mode'];
|
||||||
|
$newgradient['type'] = $gradient['type'];
|
||||||
$newgradient['gradientUnits'] = $gradient['gradientUnits'];
|
$newgradient['gradientUnits'] = $gradient['gradientUnits'];
|
||||||
if (isset($gradient['gradientTransform'])) {
|
if (isset($gradient['gradientTransform'])) {
|
||||||
$newgradient['gradientTransform'] = $gradient['gradientTransform'];
|
$newgradient['gradientTransform'] = $gradient['gradientTransform'];
|
||||||
|
Loading…
Reference in New Issue
Block a user