diff --git a/LICENSE.TXT b/LICENSE.TXT index daf21f7..49147d0 100644 --- a/LICENSE.TXT +++ b/LICENSE.TXT @@ -6,6 +6,8 @@ under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + + 2002-2019 Nicola Asuni - Tecnick.com LTD ********************************************************************** ********************************************************************** diff --git a/README.md b/README.md index baa5181..734b987 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ * **category** Library * **author** Nicola Asuni -* **copyright** 2002-2018 Nicola Asuni - Tecnick.com LTD +* **copyright** 2002-2019 Nicola Asuni - Tecnick.com LTD * **license** http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) * **link** http://www.tcpdf.org * **source** https://github.com/tecnickcom/TCPDF diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..798e389 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +6.3.0 diff --git a/composer.json b/composer.json index 1f19dfd..04df3a5 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "tecnickcom/tcpdf", - "version": "6.2.26", + "version": "6.3.0", "homepage": "http://www.tcpdf.org/", "type": "library", "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", diff --git a/include/sRGB.icc b/include/sRGB.icc index 1d8f741..71e3383 100644 Binary files a/include/sRGB.icc and b/include/sRGB.icc differ diff --git a/tcpdf.php b/tcpdf.php index 3a5fdb0..8d96729 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,13 +1,13 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.2.26 + * @version 6.3.0 */ // 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.
* @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 6.2.26 + * @version 6.3.0 * @author Nicola Asuni - info@tecnick.com * @IgnoreAnnotation("protected") * @IgnoreAnnotation("public") @@ -1788,6 +1788,13 @@ class TCPDF { */ protected $custom_xmp = ''; + /** + * Custom XMP RDF data. + * @protected + * @since 6.3.0 (2019-09-19) + */ + protected $custom_xmp_rdf = ''; + /** * Overprint mode array. * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). @@ -1999,6 +2006,7 @@ class TCPDF { $this->default_graphic_vars = $this->getGraphicVars(); $this->header_xobj_autoreset = false; $this->custom_xmp = ''; + $this->custom_xmp_rdf = ''; // Call cleanup method after script execution finishes or exit() is called. // NOTE: This will not be executed if the process is killed with a SIGTERM or SIGKILL signal. register_shutdown_function(array($this, '_destroy'), true); @@ -7788,6 +7796,9 @@ class TCPDF { } closedir($handle); } + foreach($this->imagekeys as $file) { + unlink($file); + } } $preserve = array( 'file_id', @@ -8401,7 +8412,7 @@ class TCPDF { if (is_string($pl['txt']) && !empty($pl['txt'])) { if ($pl['txt'][0] == '#') { // internal destination - $annots .= ' /Dest /'.TCPDF_STATIC::encodeNameObject(substr($pl['txt'], 1)); + $annots .= ' /A <>'; } elseif ($pl['txt'][0] == '%') { // embedded PDF file $filename = basename(substr($pl['txt'], 1)); @@ -9533,6 +9544,17 @@ class TCPDF { $this->custom_xmp = $xmp; } + /** + * Set additional XMP data to be added on the default XMP data just before the end of "rdf:RDF" tag. + * IMPORTANT: This data is added as-is without controls, so you have to validate your data before using this method! + * @param $xmp (string) Custom XMP RDF data. + * @since 6.3.0 (2019-09-19) + * @public + */ + public function setExtraXMPRDF($xmp) { + $this->custom_xmp_rdf = $xmp; + } + /** * Put XMP data object and return ID. * @return (int) The object ID. @@ -9660,6 +9682,7 @@ class TCPDF { $xmp .= "\t\t\t\t".''."\n"; $xmp .= "\t\t\t".''."\n"; $xmp .= "\t\t".''."\n"; + $xmp .= $this->custom_xmp_rdf; $xmp .= "\t".''."\n"; $xmp .= $this->custom_xmp; $xmp .= ''."\n";