mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-25 13:57:33 +00:00
5.9.181 (2012-08-31)
- composer.json file was added. - Bug item #3563369 "Cached images are not unlinked some time" was fixed.
This commit is contained in:
parent
184bbe0a4f
commit
c47cad2bdd
@ -1,3 +1,7 @@
|
|||||||
|
5.9.181 (2012-08-31)
|
||||||
|
- composer.json file was added.
|
||||||
|
- Bug item #3563369 "Cached images are not unlinked some time" was fixed.
|
||||||
|
|
||||||
5.9.180 (2012-08-22)
|
5.9.180 (2012-08-22)
|
||||||
- Bug item #3560493 "Problems with nested cells in HTML" was fixed.
|
- Bug item #3560493 "Problems with nested cells in HTML" was fixed.
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
|||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
||||||
Name: TCPDF
|
Name: TCPDF
|
||||||
Version: 5.9.180
|
Version: 5.9.181
|
||||||
Release date: 2012-08-22
|
Release date: 2012-08-31
|
||||||
Author: Nicola Asuni
|
Author: Nicola Asuni
|
||||||
|
|
||||||
Copyright (c) 2002-2012:
|
Copyright (c) 2002-2012:
|
||||||
|
38
composer.json
Normal file
38
composer.json
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"name": "tcpdf/tcpdf",
|
||||||
|
"version": "5.9.181",
|
||||||
|
"homepage": "http://www.tcpdf.org/",
|
||||||
|
"type": "library",
|
||||||
|
"description": "TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions.",
|
||||||
|
"keywords": ["pdf"],
|
||||||
|
"license": "LGPLv3",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicola Asuni",
|
||||||
|
"email": "info@tecnick.com",
|
||||||
|
"homepage": "http://nicolaasuni.tecnick.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">5.2"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"fonts",
|
||||||
|
"config/lang",
|
||||||
|
"config",
|
||||||
|
"2dbarcodes.php",
|
||||||
|
"barcodes.php",
|
||||||
|
"datamatrix.php",
|
||||||
|
"encodings_maps.php",
|
||||||
|
"htmlcolors.php",
|
||||||
|
"pdf417.php",
|
||||||
|
"qrcode.php",
|
||||||
|
"spotcolors.php",
|
||||||
|
"tcpdf.php",
|
||||||
|
"tcpdf_filters.php",
|
||||||
|
"tcpdf_parser.php",
|
||||||
|
"unicode_data.php"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
39
tcpdf.php
39
tcpdf.php
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// File name : tcpdf.php
|
// File name : tcpdf.php
|
||||||
// Version : 5.9.180
|
// Version : 5.9.181
|
||||||
// Begin : 2002-08-03
|
// Begin : 2002-08-03
|
||||||
// Last Update : 2012-08-22
|
// Last Update : 2012-08-31
|
||||||
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
|
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
|
||||||
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3
|
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
@ -138,7 +138,7 @@
|
|||||||
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
|
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @version 5.9.180
|
* @version 5.9.181
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
|
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
|
||||||
@ -150,7 +150,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>
|
* 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
|
* @package com.tecnick.tcpdf
|
||||||
* @brief PHP class for generating PDF documents without requiring external extensions.
|
* @brief PHP class for generating PDF documents without requiring external extensions.
|
||||||
* @version 5.9.180
|
* @version 5.9.181
|
||||||
* @author Nicola Asuni - info@tecnick.com
|
* @author Nicola Asuni - info@tecnick.com
|
||||||
*/
|
*/
|
||||||
class TCPDF {
|
class TCPDF {
|
||||||
@ -161,7 +161,7 @@ class TCPDF {
|
|||||||
* Current TCPDF version.
|
* Current TCPDF version.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private $tcpdf_version = '5.9.180';
|
private $tcpdf_version = '5.9.181';
|
||||||
|
|
||||||
// Protected properties
|
// Protected properties
|
||||||
|
|
||||||
@ -359,6 +359,12 @@ class TCPDF {
|
|||||||
*/
|
*/
|
||||||
protected $images = array();
|
protected $images = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Array of cached files.
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
protected $cached_files = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of Annotations in pages.
|
* Array of Annotations in pages.
|
||||||
* @protected
|
* @protected
|
||||||
@ -7849,7 +7855,6 @@ class TCPDF {
|
|||||||
}
|
}
|
||||||
// check page for no-write regions and adapt page margins if necessary
|
// check page for no-write regions and adapt page margins if necessary
|
||||||
list($x, $y) = $this->checkPageRegions($h, $x, $y);
|
list($x, $y) = $this->checkPageRegions($h, $x, $y);
|
||||||
$cached_file = false; // true when the file is cached
|
|
||||||
$exurl = ''; // external streams
|
$exurl = ''; // external streams
|
||||||
// check if we are passing an image as file or string
|
// check if we are passing an image as file or string
|
||||||
if ($file[0] === '@') {
|
if ($file[0] === '@') {
|
||||||
@ -7860,11 +7865,11 @@ class TCPDF {
|
|||||||
fwrite($fp, $imgdata);
|
fwrite($fp, $imgdata);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
unset($imgdata);
|
unset($imgdata);
|
||||||
$cached_file = true;
|
|
||||||
$imsize = @getimagesize($file);
|
$imsize = @getimagesize($file);
|
||||||
if ($imsize === FALSE) {
|
if ($imsize === FALSE) {
|
||||||
unlink($file);
|
unlink($file);
|
||||||
$cached_file = false;
|
} else {
|
||||||
|
$this->cached_files[] = $file;
|
||||||
}
|
}
|
||||||
} else { // image file
|
} else { // image file
|
||||||
if ($file{0} === '*') {
|
if ($file{0} === '*') {
|
||||||
@ -7908,11 +7913,11 @@ class TCPDF {
|
|||||||
fwrite($fp, $imgdata);
|
fwrite($fp, $imgdata);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
unset($imgdata);
|
unset($imgdata);
|
||||||
$cached_file = true;
|
|
||||||
$imsize = @getimagesize($file);
|
$imsize = @getimagesize($file);
|
||||||
if ($imsize === FALSE) {
|
if ($imsize === FALSE) {
|
||||||
unlink($file);
|
unlink($file);
|
||||||
$cached_file = false;
|
} else {
|
||||||
|
$this->cached_files[] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (($w > 0) AND ($h > 0)) {
|
} elseif (($w > 0) AND ($h > 0)) {
|
||||||
@ -8172,10 +8177,6 @@ class TCPDF {
|
|||||||
// add image to document
|
// add image to document
|
||||||
$this->setImageBuffer($file, $info);
|
$this->setImageBuffer($file, $info);
|
||||||
}
|
}
|
||||||
if ($cached_file) {
|
|
||||||
// remove cached file
|
|
||||||
unlink($file);
|
|
||||||
}
|
|
||||||
// set alignment
|
// set alignment
|
||||||
$this->img_rb_y = $y + $h;
|
$this->img_rb_y = $y + $h;
|
||||||
// set alignment
|
// set alignment
|
||||||
@ -9075,6 +9076,7 @@ class TCPDF {
|
|||||||
AND ($val != 'bufferlen')
|
AND ($val != 'bufferlen')
|
||||||
AND ($val != 'buffer')
|
AND ($val != 'buffer')
|
||||||
AND ($val != 'diskcache')
|
AND ($val != 'diskcache')
|
||||||
|
AND ($val != 'cached_files')
|
||||||
AND ($val != 'sign')
|
AND ($val != 'sign')
|
||||||
AND ($val != 'signature_data')
|
AND ($val != 'signature_data')
|
||||||
AND ($val != 'signature_max_length')
|
AND ($val != 'signature_max_length')
|
||||||
@ -9085,6 +9087,15 @@ class TCPDF {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (isset($this->cached_files) AND !empty($this->cached_files)) {
|
||||||
|
// remove cached files
|
||||||
|
foreach ($this->cached_files as $cachefile) {
|
||||||
|
if (is_file($cachefile)) {
|
||||||
|
unlink($cachefile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($this->cached_files);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user