diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index f2fcb36..0f2effc 100755
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -1,3 +1,6 @@
+5.9.011 (2010-11-02)
+ - Bug item #3101486 "Bug Fix for image loading" was fixed.
+
5.9.010 (2010-10-27)
- Support for CSS properties 'border-spacing' and 'padding' for tables were added.
- Several language files were added.
diff --git a/README.TXT b/README.TXT
index fa2c6dc..5ecb56c 100755
--- a/README.TXT
+++ b/README.TXT
@@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
-Version: 5.9.010
-Release date: 2010-10-27
+Version: 5.9.011
+Release date: 2010-11-02
Author: Nicola Asuni
Copyright (c) 2002-2010:
diff --git a/doc/classtrees_com-tecnick-tcpdf.html b/doc/classtrees_com-tecnick-tcpdf.html
index 9eafffd..21ed68c 100644
--- a/doc/classtrees_com-tecnick-tcpdf.html
+++ b/doc/classtrees_com-tecnick-tcpdf.html
@@ -65,7 +65,7 @@
diff --git a/doc/com-tecnick-tcpdf/PDF417.html b/doc/com-tecnick-tcpdf/PDF417.html
index 74fd1f0..0f4f356 100644
--- a/doc/com-tecnick-tcpdf/PDF417.html
+++ b/doc/com-tecnick-tcpdf/PDF417.html
@@ -1004,7 +1004,7 @@ $code)
diff --git a/doc/com-tecnick-tcpdf/QRcode.html b/doc/com-tecnick-tcpdf/QRcode.html
index 645b3f0..2934962 100644
--- a/doc/com-tecnick-tcpdf/QRcode.html
+++ b/doc/com-tecnick-tcpdf/QRcode.html
@@ -5552,7 +5552,7 @@ $frame)
diff --git a/doc/com-tecnick-tcpdf/TCPDF.html b/doc/com-tecnick-tcpdf/TCPDF.html
index 7e3355c..80d7acd 100644
--- a/doc/com-tecnick-tcpdf/TCPDF.html
+++ b/doc/com-tecnick-tcpdf/TCPDF.html
@@ -84,7 +84,7 @@ Source Location: /tcpdf.php
Version:
@@ -780,7 +780,7 @@ This is a PHP class for generating PDF documents without requiring external exte
author: | Nicola Asuni - info@tecnick.com |
- version: | 5.9.010 |
+ version: | 5.9.011 |
link: | http://www.tcpdf.org |
@@ -28245,7 +28245,7 @@ $file)
diff --git a/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html b/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html
index 4cb01d1..f4d6ef5 100644
--- a/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html
+++ b/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html
@@ -300,7 +300,7 @@ $type)
diff --git a/doc/com-tecnick-tcpdf/TCPDFBarcode.html b/doc/com-tecnick-tcpdf/TCPDFBarcode.html
index 7ee26ac..0b7920d 100644
--- a/doc/com-tecnick-tcpdf/TCPDFBarcode.html
+++ b/doc/com-tecnick-tcpdf/TCPDFBarcode.html
@@ -1378,7 +1378,7 @@ $type)
diff --git a/doc/com-tecnick-tcpdf/TCPDF_UNICODE_DATA.html b/doc/com-tecnick-tcpdf/TCPDF_UNICODE_DATA.html
index 4894e72..e625997 100644
--- a/doc/com-tecnick-tcpdf/TCPDF_UNICODE_DATA.html
+++ b/doc/com-tecnick-tcpdf/TCPDF_UNICODE_DATA.html
@@ -18704,7 +18704,7 @@ This is a PHP class containing Unicde data for TCPDF library
- Documentation generated on Wed, 27 Oct 2010 19:13:46 +0200 by phpDocumentor 1.4.3
+ Documentation generated on Tue, 02 Nov 2010 12:30:49 +0100 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/_2dbarcodes.php.html b/doc/com-tecnick-tcpdf/_2dbarcodes.php.html
index 1841eae..5319610 100644
--- a/doc/com-tecnick-tcpdf/_2dbarcodes.php.html
+++ b/doc/com-tecnick-tcpdf/_2dbarcodes.php.html
@@ -106,7 +106,7 @@ PHP class to creates array representations for 2D barcodes to be used with TCPDF
diff --git a/doc/com-tecnick-tcpdf/_barcodes.php.html b/doc/com-tecnick-tcpdf/_barcodes.php.html
index d88d676..bc1f4eb 100644
--- a/doc/com-tecnick-tcpdf/_barcodes.php.html
+++ b/doc/com-tecnick-tcpdf/_barcodes.php.html
@@ -106,7 +106,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit
diff --git a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html
index 3202c63..aff8bb4 100644
--- a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html
+++ b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html
@@ -543,7 +543,7 @@ Configuration file for TCPDF.
diff --git a/doc/com-tecnick-tcpdf/_htmlcolors.php.html b/doc/com-tecnick-tcpdf/_htmlcolors.php.html
index a2e26be..f2a40a8 100644
--- a/doc/com-tecnick-tcpdf/_htmlcolors.php.html
+++ b/doc/com-tecnick-tcpdf/_htmlcolors.php.html
@@ -98,7 +98,7 @@ Array of WEB safe colors.
diff --git a/doc/com-tecnick-tcpdf/_pdf417.php.html b/doc/com-tecnick-tcpdf/_pdf417.php.html
index d218bb2..1b31b33 100644
--- a/doc/com-tecnick-tcpdf/_pdf417.php.html
+++ b/doc/com-tecnick-tcpdf/_pdf417.php.html
@@ -158,7 +158,7 @@ Class to create PDF417 barcode arrays for TCPDF class.
PDF417 (ISO
diff --git a/doc/com-tecnick-tcpdf/_qrcode.php.html b/doc/com-tecnick-tcpdf/_qrcode.php.html
index feab410..6d8911f 100644
--- a/doc/com-tecnick-tcpdf/_qrcode.php.html
+++ b/doc/com-tecnick-tcpdf/_qrcode.php.html
@@ -481,7 +481,7 @@ string $string, [int $split_length = 1])
diff --git a/doc/com-tecnick-tcpdf/_tcpdf.php.html b/doc/com-tecnick-tcpdf/_tcpdf.php.html
index 3f65c19..4fc462c 100644
--- a/doc/com-tecnick-tcpdf/_tcpdf.php.html
+++ b/doc/com-tecnick-tcpdf/_tcpdf.php.html
@@ -83,7 +83,7 @@ This is a PHP class for generating PDF documents without requiring external exte
author: | Nicola Asuni |
- version: | 5.9.010 |
+ version: | 5.9.011 |
copyright: | 2002-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com |
@@ -112,7 +112,7 @@ main configuration file
(define the K_TCPDF_EXTERNAL_CONFIG consta
diff --git a/doc/com-tecnick-tcpdf/_unicode_data.php.html b/doc/com-tecnick-tcpdf/_unicode_data.php.html
index dcc59b4..695dbda 100644
--- a/doc/com-tecnick-tcpdf/_unicode_data.php.html
+++ b/doc/com-tecnick-tcpdf/_unicode_data.php.html
@@ -103,7 +103,7 @@ Unicode data class for TCPDF library.
diff --git a/doc/elementindex.html b/doc/elementindex.html
index cfc310f..e4c338b 100644
--- a/doc/elementindex.html
+++ b/doc/elementindex.html
@@ -2134,7 +2134,7 @@
top
diff --git a/doc/elementindex_com-tecnick-tcpdf.html b/doc/elementindex_com-tecnick-tcpdf.html
index 7067f59..39ab397 100644
--- a/doc/elementindex_com-tecnick-tcpdf.html
+++ b/doc/elementindex_com-tecnick-tcpdf.html
@@ -2167,7 +2167,7 @@
top
diff --git a/doc/errors.html b/doc/errors.html
index ac6a887..83bb53c 100644
--- a/doc/errors.html
+++ b/doc/errors.html
@@ -35,7 +35,7 @@
Post-parsing
diff --git a/doc/index.html b/doc/index.html
index 4e1fc76..0c9c12f 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -68,7 +68,7 @@
This documentation was generated by phpDocumentor v1.4.3
diff --git a/doc/li_com-tecnick-tcpdf.html b/doc/li_com-tecnick-tcpdf.html
index 4e1fc76..0c9c12f 100644
--- a/doc/li_com-tecnick-tcpdf.html
+++ b/doc/li_com-tecnick-tcpdf.html
@@ -68,7 +68,7 @@
This documentation was generated by phpDocumentor v1.4.3
diff --git a/tcpdf.php b/tcpdf.php
index 0603366..2ffa952 100755
--- a/tcpdf.php
+++ b/tcpdf.php
@@ -1,9 +1,9 @@
* 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.
* @name TCPDF
* @package com.tecnick.tcpdf
-* @version 5.9.010
+* @version 5.9.011
* @author Nicola Asuni - info@tecnick.com
* @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL
@@ -7048,44 +7048,44 @@ class TCPDF {
// check page for no-write regions and adapt page margins if necessary
$this->checkPageRegions($h, $x, $y);
$cached_file = false; // true when the file is cached
+ // check if is local file
+ if (!@file_exists($file)) {
+ // encode spaces on filename (file is probably an URL)
+ $file = str_replace(' ', '%20', $file);
+ }
// get image dimensions
$imsize = @getimagesize($file);
if ($imsize === FALSE) {
- // try to encode spaces on filename
- $file = str_replace(' ', '%20', $file);
- $imsize = @getimagesize($file);
- if ($imsize === FALSE) {
- if (function_exists('curl_init')) {
- // try to get remote file data using cURL
- $cs = curl_init(); // curl session
- curl_setopt($cs, CURLOPT_URL, $file);
- curl_setopt($cs, CURLOPT_BINARYTRANSFER, true);
- curl_setopt($cs, CURLOPT_FAILONERROR, true);
- curl_setopt($cs, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($cs, CURLOPT_CONNECTTIMEOUT, 5);
- curl_setopt($cs, CURLOPT_TIMEOUT, 30);
- $imgdata = curl_exec($cs);
- curl_close($cs);
- if($imgdata !== FALSE) {
- // copy image to cache
- $file = tempnam(K_PATH_CACHE, 'img_');
- $fp = fopen($file, 'w');
- fwrite($fp, $imgdata);
- fclose($fp);
- unset($imgdata);
- $cached_file = true;
- $imsize = @getimagesize($file);
- if ($imsize === FALSE) {
- unlink($file);
- $cached_file = false;
- }
+ if (function_exists('curl_init')) {
+ // try to get remote file data using cURL
+ $cs = curl_init(); // curl session
+ curl_setopt($cs, CURLOPT_URL, $file);
+ curl_setopt($cs, CURLOPT_BINARYTRANSFER, true);
+ curl_setopt($cs, CURLOPT_FAILONERROR, true);
+ curl_setopt($cs, CURLOPT_RETURNTRANSFER, true);
+ curl_setopt($cs, CURLOPT_CONNECTTIMEOUT, 5);
+ curl_setopt($cs, CURLOPT_TIMEOUT, 30);
+ $imgdata = curl_exec($cs);
+ curl_close($cs);
+ if($imgdata !== FALSE) {
+ // copy image to cache
+ $file = tempnam(K_PATH_CACHE, 'img_');
+ $fp = fopen($file, 'w');
+ fwrite($fp, $imgdata);
+ fclose($fp);
+ unset($imgdata);
+ $cached_file = true;
+ $imsize = @getimagesize($file);
+ if ($imsize === FALSE) {
+ unlink($file);
+ $cached_file = false;
}
- } elseif (($w > 0) AND ($h > 0)) {
- // get measures from specified data
- $pw = $this->getHTMLUnitToUnits($w, 0, $this->pdfunit, true) * $this->imgscale * $this->k;
- $ph = $this->getHTMLUnitToUnits($h, 0, $this->pdfunit, true) * $this->imgscale * $this->k;
- $imsize = array($pw, $ph);
}
+ } elseif (($w > 0) AND ($h > 0)) {
+ // get measures from specified data
+ $pw = $this->getHTMLUnitToUnits($w, 0, $this->pdfunit, true) * $this->imgscale * $this->k;
+ $ph = $this->getHTMLUnitToUnits($h, 0, $this->pdfunit, true) * $this->imgscale * $this->k;
+ $imsize = array($pw, $ph);
}
}
if ($imsize === FALSE) {