diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index b9bdb3c..9ab9973 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,6 @@ +6.0.026 (2013-09-14) + - A bug in tcpdf_parser wen decoding streams was fixed. + 6.0.025 (2013-09-04) - A pregSplit() bug was fixed. - Improved content loading from URLs. diff --git a/README.TXT b/README.TXT index e420bfe..3e11b13 100644 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 6.0.025 -Release date: 2013-09-04 +Version: 6.0.026 +Release date: 2013-09-14 Author: Nicola Asuni Copyright (c) 2002-2013: diff --git a/composer.json b/composer.json index 5857876..fd691ba 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "tecnick.com/tcpdf", - "version": "6.0.025", + "version": "6.0.026", "homepage": "http://www.tcpdf.org/", "type": "library", "description": "TCPDF is a PHP class for generating PDF documents.", diff --git a/include/tcpdf_static.php b/include/tcpdf_static.php index b189485..e46a147 100644 --- a/include/tcpdf_static.php +++ b/include/tcpdf_static.php @@ -55,7 +55,7 @@ class TCPDF_STATIC { * Current TCPDF version. * @private static */ - private static $tcpdf_version = '6.0.025'; + private static $tcpdf_version = '6.0.026'; /** * String alias for total number of pages. diff --git a/tcpdf.php b/tcpdf.php index 407f337..800bfc3 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.0.025 + * @version 6.0.026 */ // TCPDF configuration @@ -163,7 +163,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.0.025 + * @version 6.0.026 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { diff --git a/tcpdf_parser.php b/tcpdf_parser.php index 23a9e63..161468f 100644 --- a/tcpdf_parser.php +++ b/tcpdf_parser.php @@ -1,11 +1,11 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 1.0.003 + * @version 1.0.004 */ // include class for decoding filters @@ -576,12 +576,12 @@ class TCPDF_PARSER { // start stream object $objtype = 'stream'; $offset += 6; - if (preg_match('/^([\r\n]+)/isU', substr($this->pdfdata, $offset), $matches) == 1) { + if (preg_match('/^([\r]?[\n])/isU', substr($this->pdfdata, $offset), $matches) == 1) { $offset += strlen($matches[0]); - } - if (preg_match('/([\r\n]*endstream)/isU', substr($this->pdfdata, $offset), $matches, PREG_OFFSET_CAPTURE) == 1) { - $objval = substr($this->pdfdata, $offset, $matches[0][1]); - $offset += $matches[0][1]; + if (preg_match('/([\r]?[\n])(endstream)/isU', substr($this->pdfdata, $offset), $matches, PREG_OFFSET_CAPTURE) == 1) { + $objval = substr($this->pdfdata, $offset, $matches[0][1]); + $offset += $matches[2][1]; + } } } elseif (substr($this->pdfdata, $offset, 9) == 'endstream') { // end stream object @@ -640,7 +640,7 @@ class TCPDF_PARSER { $offset = $element[2]; // decode stream using stream's dictionary information if ($decoding AND ($element[0] == 'stream') AND (isset($objdata[($i - 1)][0])) AND ($objdata[($i - 1)][0] == '<<')) { - $element[3] = $this->decodeStream($objdata[($i - 1)][1], substr($element[1], 1)); + $element[3] = $this->decodeStream($objdata[($i - 1)][1], $element[1]); } $objdata[$i] = $element; ++$i;