mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-26 06:17:33 +00:00
4.6.011
This commit is contained in:
parent
f130300b55
commit
751e87d1b8
@ -1,3 +1,6 @@
|
||||
4.6.011 (2009-05-18)
|
||||
- Signature of the Image() method was changed to include the new $fitbox parameter (see source code documentation).
|
||||
|
||||
4.6.010 (2009-05-17)
|
||||
- Image() method was improved: now is possible to specify the maximum dimensions for a constraint box defined by $w and $h parameters, and setting the $resize parameter to null.
|
||||
- <tcpdf> tag indent problem was fixed.
|
||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 4.6.010
|
||||
Release date: 2009-05-17
|
||||
Version: 4.6.011
|
||||
Release date: 2009-05-18
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2001-2009:
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:14 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -74,7 +74,7 @@ Source Location: /tcpdf.php<br /><br />
|
||||
|
||||
<h4>Version:</h4>
|
||||
<ul>
|
||||
<li>4.6.010</li>
|
||||
<li>4.6.011</li>
|
||||
</ul>
|
||||
|
||||
|
||||
@ -588,7 +588,7 @@ This is a PHP class for generating PDF documents without requiring external exte
|
||||
<td><b>author:</b> </td><td>Nicola Asuni - info@tecnick.com</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>version:</b> </td><td>4.6.010</td>
|
||||
<td><b>version:</b> </td><td>4.6.011</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>link:</b> </td><td><a href="http://www.tcpdf.org">http://www.tcpdf.org</a></td>
|
||||
@ -9343,7 +9343,7 @@ $coords)</code>
|
||||
</div>
|
||||
<hr />
|
||||
<a name="methodImage"></a>
|
||||
<h3>method Image <span class="smalllinenumber">[line 4358]</span></h3>
|
||||
<h3>method Image <span class="smalllinenumber">[line 4359]</span></h3>
|
||||
<div class="function">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
@ -9356,13 +9356,14 @@ $w = 0], [float
|
||||
$h = 0], [string
|
||||
$type = ''], [mixed
|
||||
$link = ''], [string
|
||||
$align = ''], [mixed
|
||||
$align = ''], [boolean
|
||||
$resize = false], [int
|
||||
$dpi = 300], [string
|
||||
$palign = ''], [boolean
|
||||
$ismask = false], [mixed
|
||||
$imgmask = false], [mixed
|
||||
$border = 0])</code>
|
||||
$border = 0], [boolean
|
||||
$fitbox = false])</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table><br />
|
||||
|
||||
@ -9428,9 +9429,9 @@ $border = 0])</code>
|
||||
<td>Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="type">mixed </td>
|
||||
<td class="type">boolean </td>
|
||||
<td><b>$resize</b> </td>
|
||||
<td>If false do not resize, if true resize (reduce) the image to fit $w and $h (requires GD library), if null scale image dimensions to fit within the ($w,$h) box proportionally.</td>
|
||||
<td>If true resize (reduce) the image to fit $w and $h (requires GD library).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="type">int </td>
|
||||
@ -9456,6 +9457,11 @@ $border = 0])</code>
|
||||
<td class="type">mixed </td>
|
||||
<td><b>$border</b> </td>
|
||||
<td>Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="type">boolean </td>
|
||||
<td><b>$fitbox</b> </td>
|
||||
<td>If true scale image dimensions proportionally to fit within the ($w, $h) box.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><br />
|
||||
@ -19157,7 +19163,7 @@ $file)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:15 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:05 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -1368,7 +1368,7 @@ $type)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:14 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -96,7 +96,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:14 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -507,7 +507,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:20 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:11 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -88,7 +88,7 @@ Array of WEB safe colors.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:15 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:05 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -73,7 +73,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>4.6.010</td>
|
||||
<td><b>version:</b> </td><td>4.6.011</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>copyright:</b> </td><td>2002-2009 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>
|
||||
@ -104,7 +104,7 @@ unicode data<br /><br /></div>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_PRODUCER = 'TCPDF 4.6.010 (http://www.tcpdf.org)'</code>
|
||||
<code>PDF_PRODUCER = 'TCPDF 4.6.011 (http://www.tcpdf.org)'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
@ -115,7 +115,7 @@ unicode data<br /><br /></div>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:15 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:05 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -237,7 +237,7 @@ Unicode Include file for TCPDF.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:20 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:11 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -1364,7 +1364,7 @@
|
||||
<a href="elementindex.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:14 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -1387,7 +1387,7 @@
|
||||
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:14 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</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 Sun, 17 May 2009 21:39:20 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:11 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -58,7 +58,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.1</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:14 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -58,7 +58,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.1</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 17 May 2009 21:39:14 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
22
tcpdf.php
22
tcpdf.php
@ -2,9 +2,9 @@
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Begin : 2002-08-03
|
||||
// Last Update : 2009-05-17
|
||||
// Last Update : 2009-05-18
|
||||
// Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org
|
||||
// Version : 4.6.010
|
||||
// Version : 4.6.011
|
||||
// License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (C) 2002-2009 Nicola Asuni - Tecnick.com S.r.l.
|
||||
@ -126,7 +126,7 @@
|
||||
* @copyright 2002-2009 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 4.6.010
|
||||
* @version 4.6.011
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -150,14 +150,14 @@ if (!class_exists('TCPDF', false)) {
|
||||
/**
|
||||
* define default PDF document producer
|
||||
*/
|
||||
define('PDF_PRODUCER', 'TCPDF 4.6.010 (http://www.tcpdf.org)');
|
||||
define('PDF_PRODUCER', 'TCPDF 4.6.011 (http://www.tcpdf.org)');
|
||||
|
||||
/**
|
||||
* This is a PHP class for generating PDF documents without requiring external extensions.<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>
|
||||
* @name TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @version 4.6.010
|
||||
* @version 4.6.011
|
||||
* @author Nicola Asuni - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
@ -4345,17 +4345,18 @@ if (!class_exists('TCPDF', false)) {
|
||||
* @param string $type Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension.
|
||||
* @param mixed $link URL or identifier returned by AddLink().
|
||||
* @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>
|
||||
* @param mixed $resize If false do not resize, if true resize (reduce) the image to fit $w and $h (requires GD library), if null scale image dimensions to fit within the ($w,$h) box proportionally.
|
||||
* @param boolean $resize If true resize (reduce) the image to fit $w and $h (requires GD library).
|
||||
* @param int $dpi dot-per-inch resolution used on resize
|
||||
* @param string $palign Allows to center or align the image on the current line. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>
|
||||
* @param boolean $ismask true if this image is a mask, false otherwise
|
||||
* @param mixed $imgmask image object returned by this function or false
|
||||
* @param mixed $border Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
|
||||
* @param boolean $fitbox If true scale image dimensions proportionally to fit within the ($w, $h) box.
|
||||
* @return image information
|
||||
* @access public
|
||||
* @since 1.1
|
||||
*/
|
||||
public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0) {
|
||||
public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false) {
|
||||
if ($x === '') {
|
||||
$x = $this->x;
|
||||
}
|
||||
@ -4383,14 +4384,13 @@ if (!class_exists('TCPDF', false)) {
|
||||
$w = $h * $pixw / $pixh;
|
||||
} elseif ($h <= 0) {
|
||||
$h = $w * $pixh / $pixw;
|
||||
} elseif (($w > 0) AND ($h > 0) AND is_null($resize)) {
|
||||
// scale image dimensions to fit within the ($w, $h) box proportionally without resampling the image
|
||||
if ($pixw >= $pixh) {
|
||||
} elseif ($fitbox AND ($w > 0) AND ($h > 0)) {
|
||||
// scale image dimensions proportionally to fit within the ($w, $h) box
|
||||
if ((($w * $pixh) / ($h * $pixw)) < 1) {
|
||||
$h = $w * $pixh / $pixw;
|
||||
} else {
|
||||
$w = $h * $pixw / $pixh;
|
||||
}
|
||||
$resize = false;
|
||||
}
|
||||
// calculate new minimum dimensions in pixels
|
||||
$neww = round($w * $this->k * $dpi / $this->dpi);
|
||||
|
Loading…
Reference in New Issue
Block a user