6.0.026 (2013-09-14)

- A bug in tcpdf_parser wen decoding streams was fixed.
This commit is contained in:
nicolaasuni 2013-09-14 12:05:57 +01:00
parent a8ec5fe7ef
commit d9e2ca6348
6 changed files with 21 additions and 18 deletions

View File

@ -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.

View File

@ -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:

View File

@ -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.",

View File

@ -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.

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 6.0.025
// Version : 6.0.026
// Begin : 2002-08-03
// Last Update : 2013-09-04
// Last Update : 2013-09-14
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
@ -139,7 +139,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @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.<br>
* @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 {

View File

@ -1,11 +1,11 @@
<?php
//============================================================+
// File name : tcpdf_parser.php
// Version : 1.0.003
// Version : 1.0.004
// Begin : 2011-05-23
// Last Update : 2013-03-17
// Last Update : 2013-09-14
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3
// -------------------------------------------------------------------
// Copyright (C) 2011-2013 Nicola Asuni - Tecnick.com LTD
//
@ -37,7 +37,7 @@
* This is a PHP class for parsing PDF documents.<br>
* @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;