mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-22 21:05:10 +00:00
5.9.013
This commit is contained in:
parent
f6b17d555d
commit
06a47e85e1
@ -1,6 +1,10 @@
|
||||
5.9.013 (2010-11-15)
|
||||
- Bug item #3109257 "Problem with interlaced GIFs and PNGs" was fixed.
|
||||
- Image function now accepts image data streams (check example n. 9).
|
||||
|
||||
5.9.012 (2010-11-12)
|
||||
- Method getTCPDFVersion() was added.
|
||||
- PDF_PRODUCER constat was removed.
|
||||
- PDF_PRODUCER constant was removed.
|
||||
- Method convertHTMLColorToDec() was improved.
|
||||
- HTML colors now support spot color names defined on the new spotcolors.php file.
|
||||
- The default method Header() was improved to support SVG and EPS/AI images.
|
||||
@ -212,7 +216,7 @@
|
||||
- CSS borders are now supported for HTML tables and other block tags (see example n. 61);
|
||||
- Cell borders were improved (see example n. 57);
|
||||
- Minor bugs were fixed.
|
||||
encry
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
5.6.000 (2010-07-31)
|
||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 5.9.012
|
||||
Release date: 2010-11-12
|
||||
Version: 5.9.013
|
||||
Release date: 2010-11-15
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2002-2010:
|
||||
|
@ -65,7 +65,7 @@
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -1004,7 +1004,7 @@ $code)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:08 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -5552,7 +5552,7 @@ $frame)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:08 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -300,7 +300,7 @@ $type)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -1378,7 +1378,7 @@ $type)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -18704,7 +18704,7 @@ This is a PHP class containing Unicde data for TCPDF library<br /><br /><br /><b
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:14 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -106,7 +106,7 @@ PHP class to creates array representations for 2D barcodes to be used with TCPDF
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -106,7 +106,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -543,7 +543,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:14 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -98,7 +98,7 @@ Array of WEB safe colors<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:08 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -158,7 +158,7 @@ Class to create PDF417 barcode arrays for TCPDF class.<br /><br /><p>PDF417 (ISO
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:08 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -481,7 +481,7 @@ string $string, [int $split_length = 1])</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:08 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -83,7 +83,7 @@ This is a PHP class for generating PDF documents without requiring external exte
|
||||
<td><b>author:</b> </td><td>Nicola Asuni</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>version:</b> </td><td>5.9.012</td>
|
||||
<td><b>version:</b> </td><td>5.9.013</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>copyright:</b> </td><td>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</td>
|
||||
@ -110,7 +110,7 @@ main configuration file<br /><br /><p>(define the K_TCPDF_EXTERNAL_CONFIG consta
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:55 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:09 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -103,7 +103,7 @@ Unicode data class for TCPDF library.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:14 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -2138,7 +2138,7 @@
|
||||
<a href="elementindex.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -2171,7 +2171,7 @@
|
||||
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:52 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -35,7 +35,7 @@
|
||||
<a href="#Post-parsing">Post-parsing</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:14 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -68,7 +68,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -68,7 +68,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 12 Nov 2010 14:39:53 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Mon, 15 Nov 2010 10:34:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -2,7 +2,7 @@
|
||||
//============================================================+
|
||||
// File name : example_009.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2010-08-08
|
||||
// Last Update : 2010-11-15
|
||||
//
|
||||
// Description : Example 009 for TCPDF class
|
||||
// Test Image
|
||||
@ -77,9 +77,17 @@ $pdf->setJPEGQuality(75);
|
||||
|
||||
// Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false, $fitonpage=false)
|
||||
|
||||
|
||||
// Image example
|
||||
$pdf->Image('../images/image_demo.jpg', 50, 50, 100, 150, 'JPG', 'http://www.tcpdf.org', '', true, 150, '', false, false, 1, false, false, false);
|
||||
|
||||
|
||||
// Example of Image from data stream
|
||||
$imgdata = base64_decode('iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABlBMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDrEX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg==');
|
||||
|
||||
// The '@' character is used to indicate that follows image data stream and not image file name
|
||||
$pdf->Image('@'.$imgdata);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
|
34
tcpdf.php
34
tcpdf.php
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Version : 5.9.012
|
||||
// Version : 5.9.013
|
||||
// Begin : 2002-08-03
|
||||
// Last Update : 2010-11-12
|
||||
// Last Update : 2010-11-15
|
||||
// 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)
|
||||
// -------------------------------------------------------------------
|
||||
@ -134,7 +134,7 @@
|
||||
* @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
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @version 5.9.012
|
||||
* @version 5.9.013
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -148,7 +148,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>
|
||||
* @name TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @version 5.9.012
|
||||
* @version 5.9.013
|
||||
* @author Nicola Asuni - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
@ -161,7 +161,7 @@ class TCPDF {
|
||||
* @var current TCPDF version
|
||||
* @access private
|
||||
*/
|
||||
private $tcpdf_version = '5.9.012';
|
||||
private $tcpdf_version = '5.9.013';
|
||||
|
||||
// Protected properties
|
||||
|
||||
@ -7081,7 +7081,7 @@ class TCPDF {
|
||||
* The format can be specified explicitly or inferred from the file extension.<br />
|
||||
* It is possible to put a link on the image.<br />
|
||||
* Remark: if an image is used several times, only one copy will be embedded in the file.<br />
|
||||
* @param string $file Name of the file containing the image.
|
||||
* @param string $file Name of the file containing the image or a '@' character followed by the image data string.
|
||||
* @param float $x Abscissa of the upper-left corner (LTR) or upper-right corner (RTL).
|
||||
* @param float $y Ordinate of the upper-left corner (LTR) or upper-right corner (RTL).
|
||||
* @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
|
||||
@ -7112,6 +7112,21 @@ 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 we are passing an image as file or string
|
||||
if ($file{0} === '@') { // image from string
|
||||
$imgdata = substr($file, 1);
|
||||
$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;
|
||||
}
|
||||
} else { // image file
|
||||
// check if is local file
|
||||
if (!@file_exists($file)) {
|
||||
// encode spaces on filename (file is probably an URL)
|
||||
@ -7152,6 +7167,7 @@ class TCPDF {
|
||||
$imsize = array($pw, $ph);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($imsize === FALSE) {
|
||||
$this->Error('[Image] Unable to get image: '.$file);
|
||||
}
|
||||
@ -7458,9 +7474,15 @@ class TCPDF {
|
||||
* @since 4.9.016 (2010-04-20)
|
||||
*/
|
||||
protected function _toPNG($image) {
|
||||
// set temporary image file name
|
||||
$tempname = tempnam(K_PATH_CACHE, 'jpg_');
|
||||
// turn off interlaced mode
|
||||
imageinterlace($image, 0);
|
||||
// create temporary PNG image
|
||||
imagepng($image, $tempname);
|
||||
// remove image from memory
|
||||
imagedestroy($image);
|
||||
// get PNG image data
|
||||
$retvars = $this->_parsepng($tempname);
|
||||
// tidy up by removing temporary image
|
||||
unlink($tempname);
|
||||
|
Loading…
Reference in New Issue
Block a user