From ad4f8613ba3ddda0e38649f6664a3679df00b61f Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Wed, 1 Jun 2011 10:18:55 +0200 Subject: [PATCH] 5.9.087 --- 2dbarcodes.php | 10 +++++----- CHANGELOG.TXT | 4 ++++ README.TXT | 4 ++-- barcodes.php | 10 +++++----- tcpdf.php | 33 +++++++++++++++++++-------------- 5 files changed, 35 insertions(+), 26 deletions(-) diff --git a/2dbarcodes.php b/2dbarcodes.php index 4333052..47b0bed 100644 --- a/2dbarcodes.php +++ b/2dbarcodes.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf - * @version 1.0.016 + * @version 1.0.017 * @author Nicola Asuni */ class TCPDFBarcode { @@ -98,8 +98,8 @@ class TCPDFBarcode { header('Pragma: public'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - //header('Content-Length: '.strlen($code)); header('Content-Disposition: inline; filename="'.md5($code).'.svg";'); + //header('Content-Length: '.strlen($code)); echo $code; } diff --git a/tcpdf.php b/tcpdf.php index d8e0f56..777f4e2 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 5.9.086 + * @version 5.9.087 */ // Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file. @@ -146,7 +146,7 @@ require_once(dirname(__FILE__).'/config/tcpdf_config.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 5.9.086 + * @version 5.9.087 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -157,7 +157,7 @@ class TCPDF { * Current TCPDF version. * @private */ - private $tcpdf_version = '5.9.086'; + private $tcpdf_version = '5.9.087'; // Protected properties @@ -8154,25 +8154,30 @@ class TCPDF { $enc = false; // check for encoding support if (isset($_SERVER['HTTP_ACCEPT_ENCODING'])) { - if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false ) { + if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false) { $enc = 'x-gzip'; - } elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false ) { + } elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false) { $enc = 'gzip'; + } elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false) { + $enc = 'deflate'; + } else { + // unsupported encoding + $enc = '-1'; } } if ($enc === false) { // no compression header('Content-Length: '.$lenght); - echo $data; - } else { - if (function_exists('gzencode')) { - // send data compressed + } elseif (($enc != '-1') AND function_exists('gzencode')) { + if ($enc{0} == 'd') { + $data = gzdeflate($data, 9); + } else { $data = gzencode($data, 9, FORCE_GZIP); - header('Content-Encoding: '.$enc); - header('Content-Length: '.strlen($data)); } - echo $data; + header('Content-Encoding: '.$enc); + header('Content-Length: '.strlen($data)); } + echo $data; } /**