32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-11-22 21:05:10 +00:00
This commit is contained in:
nicolaasuni 2010-04-15 13:59:15 +02:00
parent 0f5adf2041
commit b7541f04c7
20 changed files with 317 additions and 314 deletions

View File

@ -1,3 +1,6 @@
4.9.013 (2010-04-15)
- Image() method was fixed and improved; $fitonpage parameter was added.
4.9.012 (2010-04-12) 4.9.012 (2010-04-12)
- The hyphenateText() method was added to automatically hyphenate text (see example n. 46). - The hyphenateText() method was added to automatically hyphenate text (see example n. 46).

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 4.9.012 Version: 4.9.013
Release date: 2010-04-12 Release date: 2010-04-15
Author: Nicola Asuni Author: Nicola Asuni
Copyright (c) 2001-2010: Copyright (c) 2001-2010:

View File

@ -55,7 +55,7 @@
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:52 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -5548,7 +5548,7 @@ $frame)</code>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:52 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

File diff suppressed because it is too large Load Diff

View File

@ -296,7 +296,7 @@ $type)</code>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:52 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -1374,7 +1374,7 @@ $type)</code>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:52 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -102,7 +102,7 @@ PHP class to creates array representations for 2D barcodes to be used with TCPDF
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:52 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -102,7 +102,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:52 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -539,7 +539,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -94,7 +94,7 @@ Array of WEB safe colors.<br /><br /><br /><br />
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:52 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -477,7 +477,7 @@ string $string, [int $split_length = 1])</code>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:52 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -79,7 +79,7 @@ This is a PHP class for generating PDF documents without requiring external exte
<td><b>author:</b>&nbsp;&nbsp;</td><td>Nicola Asuni</td> <td><b>author:</b>&nbsp;&nbsp;</td><td>Nicola Asuni</td>
</tr> </tr>
<tr> <tr>
<td><b>version:</b>&nbsp;&nbsp;</td><td>4.9.012</td> <td><b>version:</b>&nbsp;&nbsp;</td><td>4.9.013</td>
</tr> </tr>
<tr> <tr>
<td><b>copyright:</b>&nbsp;&nbsp;</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> <td><b>copyright:</b>&nbsp;&nbsp;</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 @@ unicode data<br /><br /></div>
<div class="tags"> <div class="tags">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border"> <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"> <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>PDF_PRODUCER = 'TCPDF 4.9.012 (http://www.tcpdf.org)'</code> <code>PDF_PRODUCER = 'TCPDF 4.9.013 (http://www.tcpdf.org)'</code>
</td></tr></table> </td></tr></table>
</td></tr></table> </td></tr></table>
@ -121,7 +121,7 @@ unicode data<br /><br /></div>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:53 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -243,7 +243,7 @@ Unicode Include file for TCPDF.<br /><br /><br /><br />
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -1610,7 +1610,7 @@
<dt><b>UniArrSubString</b></dt> <dt><b>UniArrSubString</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodUniArrSubString">TCPDF::UniArrSubString()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Extract a slice of the $uniarr array and return it as string.</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodUniArrSubString">TCPDF::UniArrSubString()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Extract a slice of the $uniarr array and return it as string.</dd>
<dt><b>unichr</b></dt> <dt><b>unichr</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodunichr">TCPDF::unichr()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Returns the unicode caracter specified by UTF-8 code</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodunichr">TCPDF::unichr()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Returns the unicode caracter specified by UTF-8 value</dd>
<dt><b>unicode_data.php</b></dt> <dt><b>unicode_data.php</b></dt>
<dd>procedural page <a href="com-tecnick-tcpdf/_unicode_data.php.html">unicode_data.php</a></dd> <dd>procedural page <a href="com-tecnick-tcpdf/_unicode_data.php.html">unicode_data.php</a></dd>
<dt><b>UTF8ArrayToUniArray</b></dt> <dt><b>UTF8ArrayToUniArray</b></dt>
@ -1784,7 +1784,7 @@
<dt><b>_putannotsobjs</b></dt> <dt><b>_putannotsobjs</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putannotsobjs">TCPDF::_putannotsobjs()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Output annotations objects for all pages.</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putannotsobjs">TCPDF::_putannotsobjs()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Output annotations objects for all pages.</dd>
<dt><b>_putannotsrefs</b></dt> <dt><b>_putannotsrefs</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putannotsrefs">TCPDF::_putannotsrefs()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Output referencees to page annotations</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putannotsrefs">TCPDF::_putannotsrefs()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Output references to page annotations</dd>
<dt><b>_putAPXObject</b></dt> <dt><b>_putAPXObject</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putAPXObject">TCPDF::_putAPXObject()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Put appearance streams XObject used to define annotation's appearance states</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putAPXObject">TCPDF::_putAPXObject()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Put appearance streams XObject used to define annotation's appearance states</dd>
<dt><b>_putbookmarks</b></dt> <dt><b>_putbookmarks</b></dt>
@ -1860,7 +1860,7 @@
<a href="elementindex.html#top">top</a><br> <a href="elementindex.html#top">top</a><br>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:52 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -159,7 +159,7 @@
<dt><b>_putannotsobjs</b></dt> <dt><b>_putannotsobjs</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putannotsobjs">TCPDF::_putannotsobjs()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Output annotations objects for all pages.</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putannotsobjs">TCPDF::_putannotsobjs()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Output annotations objects for all pages.</dd>
<dt><b>_putannotsrefs</b></dt> <dt><b>_putannotsrefs</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putannotsrefs">TCPDF::_putannotsrefs()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Output referencees to page annotations</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putannotsrefs">TCPDF::_putannotsrefs()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Output references to page annotations</dd>
<dt><b>_putAPXObject</b></dt> <dt><b>_putAPXObject</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putAPXObject">TCPDF::_putAPXObject()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Put appearance streams XObject used to define annotation's appearance states</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_putAPXObject">TCPDF::_putAPXObject()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Put appearance streams XObject used to define annotation's appearance states</dd>
<dt><b>_putbookmarks</b></dt> <dt><b>_putbookmarks</b></dt>
@ -1773,7 +1773,7 @@
<dt><b>UniArrSubString</b></dt> <dt><b>UniArrSubString</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodUniArrSubString">TCPDF::UniArrSubString()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Extract a slice of the $uniarr array and return it as string.</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodUniArrSubString">TCPDF::UniArrSubString()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Extract a slice of the $uniarr array and return it as string.</dd>
<dt><b>unichr</b></dt> <dt><b>unichr</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodunichr">TCPDF::unichr()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Returns the unicode caracter specified by UTF-8 code</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodunichr">TCPDF::unichr()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Returns the unicode caracter specified by UTF-8 value</dd>
<dt><b>unicode_data.php</b></dt> <dt><b>unicode_data.php</b></dt>
<dd>procedural page <a href="com-tecnick-tcpdf/_unicode_data.php.html">unicode_data.php</a></dd> <dd>procedural page <a href="com-tecnick-tcpdf/_unicode_data.php.html">unicode_data.php</a></dd>
<dt><b>UTF8ArrayToUniArray</b></dt> <dt><b>UTF8ArrayToUniArray</b></dt>
@ -1889,7 +1889,7 @@
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br> <a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:51 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -35,7 +35,7 @@
<a href="#Post-parsing">Post-parsing</a><br> <a href="#Post-parsing">Post-parsing</a><br>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -64,7 +64,7 @@
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br /> This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:52 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -64,7 +64,7 @@
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br /> This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Mon, 12 Apr 2010 17:23:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 15 Apr 2010 13:58:52 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

View File

@ -2,9 +2,9 @@
//============================================================+ //============================================================+
// File name : tcpdf.php // File name : tcpdf.php
// Begin : 2002-08-03 // Begin : 2002-08-03
// Last Update : 2010-04-12 // Last Update : 2010-04-15
// Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org // Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org
// Version : 4.9.012 // Version : 4.9.013
// License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html) // License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Copyright (C) 2002-2010 Nicola Asuni - Tecnick.com S.r.l. // Copyright (C) 2002-2010 Nicola Asuni - Tecnick.com S.r.l.
@ -121,7 +121,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 * @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 * @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL * @license http://www.gnu.org/copyleft/lesser.html LGPL
* @version 4.9.012 * @version 4.9.013
*/ */
/** /**
@ -145,14 +145,14 @@ if (!class_exists('TCPDF', false)) {
/** /**
* define default PDF document producer * define default PDF document producer
*/ */
define('PDF_PRODUCER', 'TCPDF 4.9.012 (http://www.tcpdf.org)'); define('PDF_PRODUCER', 'TCPDF 4.9.013 (http://www.tcpdf.org)');
/** /**
* This is a PHP class for generating PDF documents without requiring external extensions.<br> * 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> * 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 * @name TCPDF
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @version 4.9.012 * @version 4.9.013
* @author Nicola Asuni - info@tecnick.com * @author Nicola Asuni - info@tecnick.com
* @link http://www.tcpdf.org * @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL * @license http://www.gnu.org/copyleft/lesser.html LGPL
@ -4986,8 +4986,8 @@ if (!class_exists('TCPDF', false)) {
} }
/** /**
* Returns the unicode caracter specified by UTF-8 code * Returns the unicode caracter specified by UTF-8 value
* @param int $c UTF-8 code * @param int $c UTF-8 value
* @return Returns the specified character. * @return Returns the specified character.
* @author Miguel Perez, Nicola Asuni * @author Miguel Perez, Nicola Asuni
* @access public * @access public
@ -5058,11 +5058,12 @@ if (!class_exists('TCPDF', 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 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. * @param boolean $fitbox If true scale image dimensions proportionally to fit within the ($w, $h) box.
* @param boolean $hidden if true do not display the image. * @param boolean $hidden if true do not display the image.
* @param boolean $fitonpage if true the image is resized to not exceed page dimensions.
* @return image information * @return image information
* @access public * @access public
* @since 1.1 * @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, $fitbox=false, $hidden=false) { 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, $hidden=false, $fitonpage=false) {
if ($x === '') { if ($x === '') {
$x = $this->x; $x = $this->x;
} }
@ -5098,32 +5099,27 @@ if (!class_exists('TCPDF', false)) {
$w = $h * $pixw / $pixh; $w = $h * $pixw / $pixh;
} }
} }
// resize image proportionally to be contained on a single page
if ($h > $this->h) {
$h = $this->h;
$w = $h * $pixw / $pixh;
}
if ($w > $this->w) {
$w = $this->w;
$h = $w * $pixh / $pixw;
}
// Check whether we need a new page first as this does not fit // Check whether we need a new page first as this does not fit
$prev_x = $this->x; $prev_x = $this->x;
if ($this->checkPageBreak($h, $y)) { if ($this->checkPageBreak($h, $y)) {
// resize image to vertically fit the available space $y = $this->y;
$h = $this->PageBreakTrigger - $y;
$w = $h * $pixw / $pixh;
$y = $this->GetY();// + $this->cMargin;
if ($this->rtl) { if ($this->rtl) {
$x += ($prev_x - $this->x); $x += ($prev_x - $this->x);
} else { } else {
$x += ($this->x - $prev_x); $x += ($this->x - $prev_x);
} }
} }
// resize image proportionally to be contained on a single page // resize image to be contained on a single page
if (($x + $w) > $this->w) { if ($fitonpage) {
$w = $this->w - $x; $ratio_wh = $w / $h;
$h = $w * $pixh / $pixw; if (($y + $h) > $this->PageBreakTrigger) {
$h = $this->PageBreakTrigger - $y;
$w = $h * $ratio_wh;
}
if (($x + $w) > ($this->w - $this->rMargin)) {
$w = $this->w - $this->rMargin - $x;
$h = $w / $ratio_wh;
}
} }
// calculate new minimum dimensions in pixels // calculate new minimum dimensions in pixels
$neww = round($w * $this->k * $dpi / $this->dpi); $neww = round($w * $this->k * $dpi / $this->dpi);
@ -5626,7 +5622,6 @@ if (!class_exists('TCPDF', false)) {
* @see SetY(), GetX(), SetX() * @see SetY(), GetX(), SetX()
*/ */
public function GetY() { public function GetY() {
//Get y position
return $this->y; return $this->y;
} }
@ -5639,7 +5634,6 @@ if (!class_exists('TCPDF', false)) {
* @see GetX(), GetY(), SetY(), SetXY() * @see GetX(), GetY(), SetY(), SetXY()
*/ */
public function SetX($x) { public function SetX($x) {
//Set x position
if ($this->rtl) { if ($this->rtl) {
if ($x >= 0) { if ($x >= 0) {
$this->x = $this->w - $x; $this->x = $this->w - $x;
@ -5702,8 +5696,7 @@ if (!class_exists('TCPDF', false)) {
* @see SetX(), SetY() * @see SetX(), SetY()
*/ */
public function SetXY($x, $y) { public function SetXY($x, $y) {
//Set x and y positions $this->SetY($y, false);
$this->SetY($y);
$this->SetX($x); $this->SetX($x);
} }
@ -6063,7 +6056,7 @@ if (!class_exists('TCPDF', false)) {
} }
/** /**
* Output referencees to page annotations * Output references to page annotations
* @param int $n page number * @param int $n page number
* @access protected * @access protected
* @author Nicola Asuni * @author Nicola Asuni
@ -7313,7 +7306,7 @@ if (!class_exists('TCPDF', false)) {
} }
if (!$this->empty_string($this->keywords)) { if (!$this->empty_string($this->keywords)) {
// Keywords associated with the document. // Keywords associated with the document.
$this->_out('/Keywords '.$this->_textstring($this->keywords)); $this->_out('/Keywords '.$this->_textstring($this->keywords.' TCPDF'));
} }
if (!$this->empty_string($this->creator)) { if (!$this->empty_string($this->creator)) {
// If the document was converted to PDF from another format, the name of the conforming product that created the original document from which it was converted. // If the document was converted to PDF from another format, the name of the conforming product that created the original document from which it was converted.
@ -7321,7 +7314,7 @@ if (!class_exists('TCPDF', false)) {
} }
if (defined('PDF_PRODUCER')) { if (defined('PDF_PRODUCER')) {
// If the document was converted to PDF from another format, the name of the conforming product that converted it to PDF. // If the document was converted to PDF from another format, the name of the conforming product that converted it to PDF.
$this->_out('/Producer '.$this->_textstring(PDF_PRODUCER)); $this->_out('/Producer '.$this->_textstring(PDF_PRODUCER.' (TCPDF)'));
} else { } else {
// default producer // default producer
$this->_out('/Producer '.$this->_textstring('TCPDF')); $this->_out('/Producer '.$this->_textstring('TCPDF'));
@ -12194,8 +12187,8 @@ if (!class_exists('TCPDF', false)) {
* @param float $y ordinate of the top left corner of the rectangle. * @param float $y ordinate of the top left corner of the rectangle.
* @param float $w width of the rectangle. * @param float $w width of the rectangle.
* @param float $h height of the rectangle. * @param float $h height of the rectangle.
* @param array $col1 first color (RGB components). * @param array $col1 first color (Grayscale, RGB or CMYK components).
* @param array $col2 second color (RGB components). * @param array $col2 second color (Grayscale, RGB or CMYK components).
* @param array $coords array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0). * @param array $coords array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0).
* @author Andreas Würmser, Nicola Asuni * @author Andreas Würmser, Nicola Asuni
* @since 3.1.000 (2008-06-09) * @since 3.1.000 (2008-06-09)
@ -12212,8 +12205,8 @@ if (!class_exists('TCPDF', false)) {
* @param float $y ordinate of the top left corner of the rectangle. * @param float $y ordinate of the top left corner of the rectangle.
* @param float $w width of the rectangle. * @param float $w width of the rectangle.
* @param float $h height of the rectangle. * @param float $h height of the rectangle.
* @param array $col1 first color (RGB components). * @param array $col1 first color (Grayscale, RGB or CMYK components).
* @param array $col2 second color (RGB components). * @param array $col2 second color (Grayscale, RGB or CMYK components).
* @param array $coords array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined. * @param array $coords array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined.
* @author Andreas Würmser, Nicola Asuni * @author Andreas Würmser, Nicola Asuni
* @since 3.1.000 (2008-06-09) * @since 3.1.000 (2008-06-09)
@ -17309,6 +17302,7 @@ if (!class_exists('TCPDF', false)) {
$this->columns = array(); $this->columns = array();
if ($numcols < 2) { if ($numcols < 2) {
$numcols = 0; $numcols = 0;
$this->columns = array();
} else { } else {
// maximum column width // maximum column width
$maxwidth = ($this->w - $this->original_lMargin - $this->original_rMargin) / $numcols; $maxwidth = ($this->w - $this->original_lMargin - $this->original_rMargin) / $numcols;
@ -17570,7 +17564,7 @@ if (!class_exists('TCPDF', false)) {
/** /**
* Returns text with soft hyphens. * Returns text with soft hyphens.
* @param string $text text to process * @param string $text text to process
* @param mixed $patterns Array of hypenation patterns or a TEX file containing hypenation patterns. TEX pattrns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/ * @param mixed $patterns Array of hypenation patterns or a TEX file containing hypenation patterns. TEX patterns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/
* @param array $dictionary Array of words to be returned without applying the hyphenation algoritm. * @param array $dictionary Array of words to be returned without applying the hyphenation algoritm.
* @param int $leftmin Minimum number of character to leave on the left of the word without applying the hyphens. * @param int $leftmin Minimum number of character to leave on the left of the word without applying the hyphens.
* @param int $rightmin Minimum number of character to leave on the right of the word without applying the hyphens. * @param int $rightmin Minimum number of character to leave on the right of the word without applying the hyphens.