mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-22 12:55:10 +00:00
5.9.080
This commit is contained in:
parent
3c1d9f7f4f
commit
53aa39ca0c
@ -1,3 +1,7 @@
|
||||
5.9.080 (2011-05-17)
|
||||
- A problem related to file path calculation for images was fixed.
|
||||
- A problem related to unsupressed getimagesize() error was fixed.
|
||||
|
||||
5.9.079 (2011-05-16)
|
||||
- Footer() method was changed to use C128 barcode as default (instead of the previous C128B).
|
||||
|
||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 5.9.079
|
||||
Release date: 2011-05-16
|
||||
Version: 5.9.080
|
||||
Release date: 2011-05-17
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2002-2011:
|
||||
|
33
tcpdf.php
33
tcpdf.php
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Version : 5.9.079
|
||||
// Version : 5.9.080
|
||||
// Begin : 2002-08-03
|
||||
// Last Update : 2011-05-16
|
||||
// Last Update : 2011-05-17
|
||||
// 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.079
|
||||
* @version 5.9.080
|
||||
*/
|
||||
|
||||
// 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.079
|
||||
* @version 5.9.080
|
||||
* @author Nicola Asuni - info@tecnick.com
|
||||
*/
|
||||
class TCPDF {
|
||||
@ -157,7 +157,7 @@ class TCPDF {
|
||||
* Current TCPDF version.
|
||||
* @private
|
||||
*/
|
||||
private $tcpdf_version = '5.9.079';
|
||||
private $tcpdf_version = '5.9.080';
|
||||
|
||||
// Protected properties
|
||||
|
||||
@ -7261,8 +7261,12 @@ class TCPDF {
|
||||
// encode spaces on filename (file is probably an URL)
|
||||
$file = str_replace(' ', '%20', $file);
|
||||
}
|
||||
// get image dimensions
|
||||
$imsize = @getimagesize($file);
|
||||
if (@file_exists($file)) {
|
||||
// get image dimensions
|
||||
$imsize = @getimagesize($file);
|
||||
} else {
|
||||
$imsize = false;
|
||||
}
|
||||
if ($imsize === FALSE) {
|
||||
if (function_exists('curl_init')) {
|
||||
// try to get remote file data using cURL
|
||||
@ -20967,7 +20971,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
if (($tag['attribute']['src'][0] == '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
$findroot = strpos($tag['attribute']['src'], $_SERVER['DOCUMENT_ROOT']);
|
||||
if (($findroot === false) OR ($findroot > 1)) {
|
||||
$tag['attribute']['src'] = $_SERVER['DOCUMENT_ROOT'].$tag['attribute']['src'];
|
||||
if (substr($_SERVER['DOCUMENT_ROOT'], -1) == '/') {
|
||||
$tag['attribute']['src'] = substr($_SERVER['DOCUMENT_ROOT'], 0, -1).$tag['attribute']['src'];
|
||||
} else {
|
||||
$tag['attribute']['src'] = $_SERVER['DOCUMENT_ROOT'].$tag['attribute']['src'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$tag['attribute']['src'] = urldecode($tag['attribute']['src']);
|
||||
@ -26371,11 +26379,14 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
// replace relative path with full server path
|
||||
$img = $this->svgdir.'/'.$img;
|
||||
}
|
||||
if (($img{0} == '/') AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
if (($img[0] == '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
$findroot = strpos($img, $_SERVER['DOCUMENT_ROOT']);
|
||||
if (($findroot === false) OR ($findroot > 1)) {
|
||||
// replace relative path with full server path
|
||||
$img = $_SERVER['DOCUMENT_ROOT'].$img;
|
||||
if (substr($_SERVER['DOCUMENT_ROOT'], -1) == '/') {
|
||||
$img = substr($_SERVER['DOCUMENT_ROOT'], 0, -1).$img;
|
||||
} else {
|
||||
$img = $_SERVER['DOCUMENT_ROOT'].$img;
|
||||
}
|
||||
}
|
||||
}
|
||||
$img = urldecode($img);
|
||||
|
Loading…
Reference in New Issue
Block a user