30
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-06-05 23:30:47 +00:00
This commit is contained in:
nicolaasuni 2011-06-01 10:18:55 +02:00
parent 483af8043a
commit ad4f8613ba
5 changed files with 35 additions and 26 deletions

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : 2dbarcodes.php
// Version : 1.0.008
// Version : 1.0.009
// Begin : 2009-04-07
// Last Update : 2011-05-31
// Last Update : 2011-06-01
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
@ -37,14 +37,14 @@
* PHP class to creates array representations for 2D barcodes to be used with TCPDF.
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 1.0.008
* @version 1.0.009
*/
/**
* @class TCPDF2DBarcode
* PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org).
* @package com.tecnick.tcpdf
* @version 1.0.008
* @version 1.0.009
* @author Nicola Asuni
*/
class TCPDF2DBarcode {
@ -92,8 +92,8 @@ class TCPDF2DBarcode {
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;
}

View File

@ -1,3 +1,7 @@
5.9.087 (2011-06-01)
- Method sendOutputData() was improved to include deflate encoding.
- Barcode classes on PHP 4 version were fixed.
5.9.086 (2011-05-31)
- Font files were updated (the ones on the previous release were broken).
- The script fonts/utils/makeallttffonts.php was updated and fixed.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 5.9.086
Release date: 2011-05-31
Version: 5.9.087
Release date: 2011-06-01
Author: Nicola Asuni
Copyright (c) 2002-2011:

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : barcodes.php
// Version : 1.0.016
// Version : 1.0.017
// Begin : 2008-06-09
// Last Update : 2011-05-31
// Last Update : 2011-06-01
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
@ -37,14 +37,14 @@
* PHP class to creates array representations for common 1D barcodes to be used with TCPDF.
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 1.0.016
* @version 1.0.017
*/
/**
* @class TCPDFBarcode
* PHP class to creates array representations for common 1D barcodes to be used with TCPDF (http://www.tcpdf.org).<br>
* @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;
}

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 5.9.086
// Version : 5.9.087
// Begin : 2002-08-03
// Last Update : 2011-05-31
// Last Update : 2011-06-01
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3 + YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE GENERATED PDF DOCUMENTS.
// -------------------------------------------------------------------
@ -134,7 +134,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @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.<br>
* @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;
}
/**