Bump TCPDF from 6.10.1 to 6.11.2

This commit is contained in:
johnnyq
2026-03-07 17:01:53 -05:00
parent 8dbbef37bb
commit ffb97006ec
27 changed files with 153 additions and 124 deletions

View File

@@ -5,9 +5,9 @@
// Begin : 2010-06-07
// Last Update : 2014-05-06
// 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 (https://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2010-2014 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2010-2014 2026 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
@@ -22,7 +22,7 @@
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
// along with TCPDF. If not, see <https://www.gnu.org/licenses/>.
//
// See LICENSE.TXT file for more information.
// -------------------------------------------------------------------

View File

@@ -5,9 +5,9 @@
// Begin : 2010-06-03
// Last Update : 2014-04-25
// 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 (https://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2010-2013 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2010-2013 2026 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
@@ -22,7 +22,7 @@
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
// along with TCPDF. If not, see <https://www.gnu.org/licenses/>.
//
// See LICENSE.TXT file for more information.
// -------------------------------------------------------------------

View File

@@ -5,9 +5,9 @@
// Begin : 2010-03-22
// Last Update : 2012-07-25
// 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 (https://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2010-2012 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2010-2026 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
@@ -22,7 +22,7 @@
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
// along with TCPDF. If not, see <https://www.gnu.org/licenses/>.
//
// See LICENSE.TXT file for more information.
// -------------------------------------------------------------------

View File

@@ -5,9 +5,9 @@
// Begin : 2002-04-09
// Last Update : 2014-04-25
// 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 (https://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2002-2013 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2002-2013 2026 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
@@ -22,7 +22,7 @@
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
// along with TCPDF. If not, see <https://www.gnu.org/licenses/>.
//
// See LICENSE.TXT file for more information.
// -------------------------------------------------------------------

View File

@@ -5,9 +5,9 @@
// Begin : 2011-05-23
// Last Update : 2014-04-25
// 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 (https://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2011-2013 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2011-2026 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//

View File

@@ -5,9 +5,9 @@
// Begin : 2008-01-01
// Last Update : 2013-04-01
// 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 (https://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2008-2013 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2008-2026 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
@@ -22,7 +22,7 @@
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
// along with TCPDF. If not, see <https://www.gnu.org/licenses/>.
//
// See LICENSE.TXT file for more information.
// -------------------------------------------------------------------

View File

@@ -5,9 +5,9 @@
// Begin : 2008-01-01
// Last Update : 2024-12-23
// 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 (https://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2008-2025 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2008-2026 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
@@ -22,7 +22,7 @@
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
// along with TCPDF. If not, see <https://www.gnu.org/licenses/>.
//
// See LICENSE.TXT file for more information.
// -------------------------------------------------------------------
@@ -1384,7 +1384,7 @@ class TCPDF_FONTS {
}
// set checkSumAdjustment on head table
$checkSumAdjustment = 0xB1B0AFBA - self::_getTTFtableChecksum($font, strlen($font));
$font = substr($font, 0, $table['head']['offset'] + $offset + 8).pack('N', $checkSumAdjustment).substr($font, $table['head']['offset'] + $offset + 12);
$font = substr($font, 0, $table['head']['offset'] + $offset + 4).pack('N', $checkSumAdjustment).substr($font, $table['head']['offset'] + $offset + 8);
return $font;
}

View File

@@ -5,9 +5,9 @@
// Begin : 2002-08-03
// Last Update : 2014-11-15
// 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 (https://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2002-2014 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2002-2026 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
@@ -126,7 +126,9 @@ class TCPDF_IMAGES {
// create temporary PNG image
imagepng($image, $tempfile);
// remove image from memory
imagedestroy($image);
if (PHP_VERSION_ID < 80000) {
imagedestroy($image);
}
// get PNG image data
$retvars = self::_parsepng($tempfile);
// tidy up by removing temporary image
@@ -145,7 +147,9 @@ class TCPDF_IMAGES {
*/
public static function _toJPEG($image, $quality, $tempfile) {
imagejpeg($image, $tempfile, $quality);
imagedestroy($image);
if (PHP_VERSION_ID < 80000) {
imagedestroy($image);
}
$retvars = self::_parsejpeg($tempfile);
// tidy up by removing temporary image
unlink($tempfile);
@@ -270,12 +274,12 @@ class TCPDF_IMAGES {
return 'pngalpha';
}
if (ord(fread($f, 1)) != 0) {
// Unknown compression method
// Unknownn compression method
fclose($f);
return false;
}
if (ord(fread($f, 1)) != 0) {
// Unknown filter method
// Unknownn filter method
fclose($f);
return false;
}
@@ -327,7 +331,7 @@ class TCPDF_IMAGES {
}
// get compression method
if (ord(fread($f, 1)) != 0) {
// Unknown filter method
// Unknownn filter method
fclose($f);
return false;
}

View File

@@ -5,9 +5,9 @@
// Begin : 2002-08-03
// Last Update : 2024-12-23
// 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 (https://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2002-2025 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2002-2026 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
@@ -55,7 +55,7 @@ class TCPDF_STATIC {
* Current TCPDF version.
* @private static
*/
private static $tcpdf_version = '6.10.1';
private static $tcpdf_version = '6.11.2';
/**
* String alias for total number of pages.
@@ -492,7 +492,7 @@ class TCPDF_STATIC {
* @param string $last_enc_key_c Reference to last RC4 computed key.
* @return string encrypted text
* @since 2.0.000 (2008-01-02)
* @author Klemen Vodopivec, Nicola Asuni
* @author Klemen Vodopivec,2026 Nicola Asuni
* @public static
*/
public static function _RC4($key, $text, &$last_enc_key, &$last_enc_key_c) {
@@ -1863,7 +1863,9 @@ class TCPDF_STATIC {
curl_setopt_array($crs, $curlopts);
curl_exec($crs);
$code = curl_getinfo($crs, CURLINFO_HTTP_CODE);
curl_close($crs);
if (PHP_VERSION_ID < 80000) {
curl_close($crs);
}
return ($code == 200);
}
@@ -1995,7 +1997,9 @@ class TCPDF_STATIC {
$curlopts[CURLOPT_URL] = $url;
curl_setopt_array($crs, $curlopts);
$ret = curl_exec($crs);
curl_close($crs);
if (PHP_VERSION_ID < 80000) {
curl_close($crs);
}
if ($ret !== false) {
return $ret;
}