mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-25 22:07:33 +00:00
6.0.053 (2014-01-03)
- Bug #876 "Cell padding should not be multiplied with number of lines in getStringHeight" was fixed. - Patch #68 "Empty img src attribute leads to access of uninitialized string offset" was applied.
This commit is contained in:
parent
e6a6ffa36c
commit
4a7678a1ad
@ -1,3 +1,7 @@
|
|||||||
|
6.0.053 (2014-01-03)
|
||||||
|
- Bug #876 "Cell padding should not be multiplied with number of lines in getStringHeight" was fixed.
|
||||||
|
- Patch #68 "Empty img src attribute leads to access of uninitialized string offset" was applied.
|
||||||
|
|
||||||
6.0.052 (2013-12-12)
|
6.0.052 (2013-12-12)
|
||||||
- Bug #871 "Datamatrix coding" was fixed.
|
- Bug #871 "Datamatrix coding" was fixed.
|
||||||
|
|
||||||
|
@ -8,11 +8,11 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
|||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
||||||
Name: TCPDF
|
Name: TCPDF
|
||||||
Version: 6.0.052
|
Version: 6.0.053
|
||||||
Release date: 2013-12-12
|
Release date: 2014-01-03
|
||||||
Author: Nicola Asuni
|
Author: Nicola Asuni
|
||||||
|
|
||||||
Copyright (c) 2002-2013:
|
Copyright (c) 2002-2014:
|
||||||
Nicola Asuni
|
Nicola Asuni
|
||||||
Tecnick.com LTD
|
Tecnick.com LTD
|
||||||
www.tecnick.com
|
www.tecnick.com
|
||||||
@ -67,7 +67,7 @@ Additional Documentation:
|
|||||||
http://www.tcpdf.org
|
http://www.tcpdf.org
|
||||||
|
|
||||||
License:
|
License:
|
||||||
Copyright (C) 2002-2013 Nicola Asuni - Tecnick.com LTD
|
Copyright (C) 2002-2014 Nicola Asuni - Tecnick.com LTD
|
||||||
|
|
||||||
TCPDF is free software: you can redistribute it and/or modify it
|
TCPDF is free software: you can redistribute it and/or modify it
|
||||||
under the terms of the GNU Lesser General Public License as
|
under the terms of the GNU Lesser General Public License as
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tecnick.com/tcpdf",
|
"name": "tecnick.com/tcpdf",
|
||||||
"version": "6.0.052",
|
"version": "6.0.053",
|
||||||
"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.",
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// File name : tcpdf_fonts.php
|
// File name : tcpdf_fonts.php
|
||||||
// Version : 1.0.010
|
// Version : 1.0.011
|
||||||
// Begin : 2008-01-01
|
// Begin : 2008-01-01
|
||||||
// Last Update : 2013-11-10
|
// Last Update : 2014-01-03
|
||||||
// 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) 2008-2013 Nicola Asuni - Tecnick.com LTD
|
// Copyright (C) 2008-2014 Nicola Asuni - Tecnick.com LTD
|
||||||
//
|
//
|
||||||
// This file is part of TCPDF software library.
|
// This file is part of TCPDF software library.
|
||||||
//
|
//
|
||||||
@ -42,7 +42,7 @@
|
|||||||
* @class TCPDF_FONTS
|
* @class TCPDF_FONTS
|
||||||
* Font methods for TCPDF library.
|
* Font methods for TCPDF library.
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @version 1.0.010
|
* @version 1.0.011
|
||||||
* @author Nicola Asuni - info@tecnick.com
|
* @author Nicola Asuni - info@tecnick.com
|
||||||
*/
|
*/
|
||||||
class TCPDF_FONTS {
|
class TCPDF_FONTS {
|
||||||
@ -1603,9 +1603,9 @@ class TCPDF_FONTS {
|
|||||||
*/
|
*/
|
||||||
public static function UTF8ArrayToUniArray($ta, $isunicode=true) {
|
public static function UTF8ArrayToUniArray($ta, $isunicode=true) {
|
||||||
if ($isunicode) {
|
if ($isunicode) {
|
||||||
return array_map(array('self', 'unichrUnicode'), $ta);
|
return array_map(array('TCPDF_FONTS', 'unichrUnicode'), $ta);
|
||||||
}
|
}
|
||||||
return array_map(array('self', 'unichrASCII'), $ta);
|
return array_map(array('TCPDF_FONTS', 'unichrASCII'), $ta);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1882,7 +1882,7 @@ class TCPDF_FONTS {
|
|||||||
if ($isunicode) {
|
if ($isunicode) {
|
||||||
// requires PCRE unicode support turned on
|
// requires PCRE unicode support turned on
|
||||||
$chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY);
|
$chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY);
|
||||||
$carr = array_map(array('self', 'uniord'), $chars);
|
$carr = array_map(array('TCPDF_FONTS', 'uniord'), $chars);
|
||||||
} else {
|
} else {
|
||||||
$chars = str_split($str);
|
$chars = str_split($str);
|
||||||
$carr = array_map('ord', $chars);
|
$carr = array_map('ord', $chars);
|
||||||
|
27
tcpdf.php
27
tcpdf.php
@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// File name : tcpdf.php
|
// File name : tcpdf.php
|
||||||
// Version : 6.0.052
|
// Version : 6.0.053
|
||||||
// Begin : 2002-08-03
|
// Begin : 2002-08-03
|
||||||
// Last Update : 2013-12-12
|
// Last Update : 2014-01-03
|
||||||
// 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.
|
||||||
//
|
//
|
||||||
@ -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.052
|
* @version 6.0.053
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// 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.052
|
* @version 6.0.053
|
||||||
* @author Nicola Asuni - info@tecnick.com
|
* @author Nicola Asuni - info@tecnick.com
|
||||||
*/
|
*/
|
||||||
class TCPDF {
|
class TCPDF {
|
||||||
@ -2406,10 +2406,15 @@ class TCPDF {
|
|||||||
/**
|
/**
|
||||||
* Return the cell height
|
* Return the cell height
|
||||||
* @param $fontsize (int) Font size in internal units
|
* @param $fontsize (int) Font size in internal units
|
||||||
|
* @param $padding (boolean) If true add cell padding
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function getCellHeight($fontsize) {
|
public function getCellHeight($fontsize, $padding=TRUE) {
|
||||||
return round((($fontsize * $this->cell_height_ratio) + $this->cell_padding['T'] + $this->cell_padding['B']), 3);
|
$height = ($fontsize * $this->cell_height_ratio);
|
||||||
|
if ($padding) {
|
||||||
|
$height += ($this->cell_padding['T'] + $this->cell_padding['B']);
|
||||||
|
}
|
||||||
|
return round($height, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -6221,11 +6226,7 @@ class TCPDF {
|
|||||||
}
|
}
|
||||||
$this->adjustCellPadding($border);
|
$this->adjustCellPadding($border);
|
||||||
$lines = $this->getNumLines($txt, $w, $reseth, $autopadding, $cellpadding, $border);
|
$lines = $this->getNumLines($txt, $w, $reseth, $autopadding, $cellpadding, $border);
|
||||||
$height = $lines * $this->getCellHeight($this->FontSize);
|
$height = $this->getCellHeight(($lines * $this->FontSize), $autopadding);
|
||||||
if ($autopadding) {
|
|
||||||
// add top and bottom padding
|
|
||||||
$height += ($this->cell_padding['T'] + $this->cell_padding['B']);
|
|
||||||
}
|
|
||||||
$this->cell_padding = $prev_cell_padding;
|
$this->cell_padding = $prev_cell_padding;
|
||||||
$this->lasth = $prev_lasth;
|
$this->lasth = $prev_lasth;
|
||||||
return $height;
|
return $height;
|
||||||
@ -18670,7 +18671,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'img': {
|
case 'img': {
|
||||||
if (isset($tag['attribute']['src'])) {
|
if (!empty($tag['attribute']['src'])) {
|
||||||
if ($tag['attribute']['src']{0} === '@') {
|
if ($tag['attribute']['src']{0} === '@') {
|
||||||
// data stream
|
// data stream
|
||||||
$tag['attribute']['src'] = '@'.base64_decode(substr($tag['attribute']['src'], 1));
|
$tag['attribute']['src'] = '@'.base64_decode(substr($tag['attribute']['src'], 1));
|
||||||
|
Loading…
Reference in New Issue
Block a user