32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-12-01 16:43:53 +00:00
This commit is contained in:
nicolaasuni 2010-08-12 15:16:17 +02:00
parent 48c32bba77
commit 3b27903a25
22 changed files with 274 additions and 253 deletions

View File

@ -1,3 +1,6 @@
5.8.001 (2010-08-12)
- Bug #3043650 "subsetchars incorrectly cached" was fixed.
5.8.000 (2010-08-11) 5.8.000 (2010-08-11)
- A control to avoid bookmarking page 0 was added. - A control to avoid bookmarking page 0 was added.
- addTOC() method now includes support for multicolumn mode. - addTOC() method now includes support for multicolumn mode.

View File

@ -8,8 +8,8 @@ http: sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 5.8.000 Version: 5.8.001
Release date: 2010-08-11 Release date: 2010-08-12
Author: Nicola Asuni Author: Nicola Asuni
Copyright (c) 2002-2010: Copyright (c) 2002-2010:

View File

@ -60,7 +60,7 @@
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Wed, 11 Aug 2010 23:48:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:02 +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

@ -1003,7 +1003,7 @@ $code)</code>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Wed, 11 Aug 2010 23:48:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:03 +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

@ -5551,7 +5551,7 @@ $frame)</code>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Wed, 11 Aug 2010 23:48:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:03 +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

@ -299,7 +299,7 @@ $type)</code>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Wed, 11 Aug 2010 23:48:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:02 +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

@ -1377,7 +1377,7 @@ $type)</code>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Wed, 11 Aug 2010 23:48:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:03 +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

@ -105,7 +105,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 Wed, 11 Aug 2010 23:48:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:02 +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

@ -105,7 +105,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 Wed, 11 Aug 2010 23:48:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:03 +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

@ -542,7 +542,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Wed, 11 Aug 2010 23:48:29 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:09 +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

@ -97,7 +97,7 @@ Array of WEB safe colors.<br /><br /><br /><br />
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Wed, 11 Aug 2010 23:48:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:03 +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

@ -157,7 +157,7 @@ Class to create PDF417 barcode arrays for TCPDF class.<br /><br /><p>PDF417 (ISO
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Wed, 11 Aug 2010 23:48:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:03 +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

@ -480,7 +480,7 @@ string $string, [int $split_length = 1])</code>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Wed, 11 Aug 2010 23:48:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:03 +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

@ -82,7 +82,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>5.8.000</td> <td><b>version:</b>&nbsp;&nbsp;</td><td>5.8.001</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>
@ -113,7 +113,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 5.8.000 (http://www.tcpdf.org)'</code> <code>PDF_PRODUCER = 'TCPDF 5.8.001 (http://www.tcpdf.org)'</code>
</td></tr></table> </td></tr></table>
</td></tr></table> </td></tr></table>
@ -124,7 +124,7 @@ unicode data<br /><br /></div>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Wed, 11 Aug 2010 23:48:25 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:04 +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

@ -246,7 +246,7 @@ Unicode data for TCPDF library.<br /><br /><br /><br />
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Wed, 11 Aug 2010 23:48:29 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:09 +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

@ -2038,7 +2038,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 Wed, 11 Aug 2010 23:48:23 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:02 +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

@ -2070,7 +2070,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 Wed, 11 Aug 2010 23:48:23 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:02 +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 Wed, 11 Aug 2010 23:48:29 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:09 +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

@ -67,7 +67,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 Wed, 11 Aug 2010 23:48:23 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:02 +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

@ -67,7 +67,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 Wed, 11 Aug 2010 23:48:23 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Thu, 12 Aug 2010 15:16:02 +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

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : tcpdf.php // File name : tcpdf.php
// Version : 5.8.000 // Version : 5.8.001
// Begin : 2002-08-03 // Begin : 2002-08-03
// Last Update : 2010-08-11 // Last Update : 2010-08-12
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com // 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) // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -126,7 +126,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 5.8.000 * @version 5.8.001
*/ */
/** /**
@ -150,14 +150,14 @@ if (!class_exists('TCPDF', false)) {
/** /**
* define default PDF document producer * define default PDF document producer
*/ */
define('PDF_PRODUCER', 'TCPDF 5.8.000 (http://www.tcpdf.org)'); define('PDF_PRODUCER', 'TCPDF 5.8.001 (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 5.8.000 * @version 5.8.001
* @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
@ -10394,15 +10394,31 @@ if (!class_exists('TCPDF', false)) {
* @since 1.53.0.TC005 (2005-01-05) * @since 1.53.0.TC005 (2005-01-05)
*/ */
protected function UTF8StringToArray($str) { protected function UTF8StringToArray($str) {
if (isset($this->cache_UTF8StringToArray['_'.$str])) { // build a unique string key
$strkey = md5($str);
if (isset($this->cache_UTF8StringToArray[$strkey])) {
// return cached value // return cached value
return($this->cache_UTF8StringToArray['_'.$str]); $chrarray = $this->cache_UTF8StringToArray[$strkey]['s'];
if (!isset($this->cache_UTF8StringToArray[$strkey]['f'][$this->CurrentFont['fontkey']])) {
if ($this->isunicode) {
foreach ($chrarray as $chr) {
// store this char for font subsetting
$this->CurrentFont['subsetchars'][$chr] = true;
}
// update font subsetchars
$this->setFontSubBuffer($this->CurrentFont['fontkey'], 'subsetchars', $this->CurrentFont['subsetchars']);
}
$this->cache_UTF8StringToArray[$strkey]['f'][$this->CurrentFont['fontkey']] = true;
}
return $chrarray;
} }
// check cache size // check cache size
if ($this->cache_size_UTF8StringToArray >= $this->cache_maxsize_UTF8StringToArray) { if ($this->cache_size_UTF8StringToArray >= $this->cache_maxsize_UTF8StringToArray) {
// remove first element // remove first element
array_shift($this->cache_UTF8StringToArray); array_shift($this->cache_UTF8StringToArray);
} }
// new cache array for selected string
$this->cache_UTF8StringToArray[$strkey] = array('s' => array(), 'f' => array());
++$this->cache_size_UTF8StringToArray; ++$this->cache_size_UTF8StringToArray;
if (!$this->isunicode) { if (!$this->isunicode) {
// split string into array of equivalent codes // split string into array of equivalent codes
@ -10412,7 +10428,8 @@ if (!class_exists('TCPDF', false)) {
$strarr[] = ord($str{$i}); $strarr[] = ord($str{$i});
} }
// insert new value on cache // insert new value on cache
$this->cache_UTF8StringToArray['_'.$str] = $strarr; $this->cache_UTF8StringToArray[$strkey]['s'] = $strarr;
$this->cache_UTF8StringToArray[$strkey]['f'][$this->CurrentFont['fontkey']] = true;
return $strarr; return $strarr;
} }
$unichar = -1; // last unicode char $unichar = -1; // last unicode char
@ -10480,7 +10497,8 @@ if (!class_exists('TCPDF', false)) {
// update font subsetchars // update font subsetchars
$this->setFontSubBuffer($this->CurrentFont['fontkey'], 'subsetchars', $this->CurrentFont['subsetchars']); $this->setFontSubBuffer($this->CurrentFont['fontkey'], 'subsetchars', $this->CurrentFont['subsetchars']);
// insert new value on cache // insert new value on cache
$this->cache_UTF8StringToArray['_'.$str] = $unicode; $this->cache_UTF8StringToArray[$strkey]['s'] = $unicode;
$this->cache_UTF8StringToArray[$strkey]['f'][$this->CurrentFont['fontkey']] = true;
return $unicode; return $unicode;
} }
@ -18028,7 +18046,7 @@ if (!class_exists('TCPDF', false)) {
$currentxpos = $xmatches[1]; $currentxpos = $xmatches[1];
$textpos = $currentxpos; $textpos = $currentxpos;
if (($strcount <= $maxkk) AND ($strpiece[2][0] == 'Td')) { if (($strcount <= $maxkk) AND ($strpiece[2][0] == 'Td')) {
$ns += substr_count($lnstring[1][$strcount], $spacestr); $ns = $lnstring[3][$strcount];
if ($this->isRTLTextDir()) { if ($this->isRTLTextDir()) {
$spacew = ($spacewidth * ($nsmax - $ns)); $spacew = ($spacewidth * ($nsmax - $ns));
} }