30
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-06-04 23:10:46 +00:00
This commit is contained in:
nicolaasuni 2009-05-23 18:33:55 +02:00
parent 751e87d1b8
commit 1b6c34a60e
16 changed files with 219 additions and 217 deletions

View File

@ -1,3 +1,6 @@
4.6.012 (2009-05-23)
- setUserRights() method doesn't work anymore unless you call the setSignature() method with the Adobe private key!
4.6.011 (2009-05-18)
- Signature of the Image() method was changed to include the new $fitbox parameter (see source code documentation).

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 4.6.011
Release date: 2009-05-18
Version: 4.6.012
Release date: 2009-05-23
Author: Nicola Asuni
Copyright (c) 2001-2009:

View File

@ -45,7 +45,7 @@
<div class="credit">
<hr />
Documentation generated on Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

File diff suppressed because it is too large Load Diff

View File

@ -1368,7 +1368,7 @@ $type)</code>
<div class="credit">
<hr />
Documentation generated on Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -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 Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -507,7 +507,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Mon, 18 May 2009 20:13:11 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:46 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -88,7 +88,7 @@ Array of WEB safe colors.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Mon, 18 May 2009 20:13:05 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -73,7 +73,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>
</tr>
<tr>
<td><b>version:</b>&nbsp;&nbsp;</td><td>4.6.011</td>
<td><b>version:</b>&nbsp;&nbsp;</td><td>4.6.012</td>
</tr>
<tr>
<td><b>copyright:</b>&nbsp;&nbsp;</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.011 (http://www.tcpdf.org)'</code>
<code>PDF_PRODUCER = 'TCPDF 4.6.012 (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 Mon, 18 May 2009 20:13:05 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -237,7 +237,7 @@ Unicode Include file for TCPDF.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Mon, 18 May 2009 20:13:11 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:46 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -1364,7 +1364,7 @@
<a href="elementindex.html#top">top</a><br>
<div class="credit">
<hr />
Documentation generated on Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -1387,7 +1387,7 @@
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
<div class="credit">
<hr />
Documentation generated on Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -35,7 +35,7 @@
<a href="#Post-parsing">Post-parsing</a><br>
<div class="credit">
<hr />
Documentation generated on Mon, 18 May 2009 20:13:11 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:46 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -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 Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -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 Mon, 18 May 2009 20:13:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Sat, 23 May 2009 18:33:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -2,9 +2,9 @@
//============================================================+
// File name : tcpdf.php
// Begin : 2002-08-03
// Last Update : 2009-05-18
// Last Update : 2009-05-23
// Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org
// Version : 4.6.011
// Version : 4.6.012
// 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.011
* @version 4.6.012
*/
/**
@ -150,14 +150,14 @@ if (!class_exists('TCPDF', false)) {
/**
* define default PDF document producer
*/
define('PDF_PRODUCER', 'TCPDF 4.6.011 (http://www.tcpdf.org)');
define('PDF_PRODUCER', 'TCPDF 4.6.012 (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.011
* @version 4.6.012
* @author Nicola Asuni - info@tecnick.com
* @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL
@ -3023,7 +3023,7 @@ if (!class_exists('TCPDF', false)) {
//Search existing encodings
$d = 0;
$nb = count($this->diffs);
for($i=1; $i <= $nb; ++$i) {
for ($i=1; $i <= $nb; ++$i) {
if ($this->diffs[$i] == $diff) {
$d = $i;
break;
@ -4751,7 +4751,7 @@ if (!class_exists('TCPDF', false)) {
$img = imagecreatefrompng($file);
$imgalpha = imagecreate($wpx, $hpx);
// generate gray scale pallete
for($c = 0; $c < 256; ++$c) {
for ($c = 0; $c < 256; ++$c) {
ImageColorAllocate($imgalpha, $c, $c, $c);
}
// extract alpha channel
@ -5183,7 +5183,7 @@ if (!class_exists('TCPDF', false)) {
}
$pagegroupnum = 0;
$filter = ($this->compress) ? '/Filter /FlateDecode ' : '';
for($n=1; $n <= $nb; ++$n) {
for ($n=1; $n <= $nb; ++$n) {
$temppage = $this->getPageBuffer($n);
if (!empty($this->pagegroups)) {
if(isset($this->newpagegroup[$n])) {
@ -5283,7 +5283,7 @@ if (!class_exists('TCPDF', false)) {
$this->_out('1 0 obj');
$this->_out('<</Type /Pages');
$kids='/Kids [';
for($i=0; $i < $nb; ++$i) {
for ($i=0; $i < $nb; ++$i) {
$kids .= (3 + (2 * $i)).' 0 R ';
}
$this->_out($kids.']');
@ -5750,7 +5750,7 @@ if (!class_exists('TCPDF', false)) {
$this->_newobj();
$cw = &$font['cw'];
$s = '[';
for($i = 32; $i < 256; ++$i) {
for ($i = 32; $i < 256; ++$i) {
$s .= $cw[$i].' ';
}
$this->_out($s.']');
@ -6059,7 +6059,7 @@ if (!class_exists('TCPDF', false)) {
if (isset($info['trns']) AND is_array($info['trns'])) {
$trns='';
$count_info = count($info['trns']);
for($i=0; $i < $count_info; ++$i) {
for ($i=0; $i < $count_info; ++$i) {
$trns .= $info['trns'][$i].' '.$info['trns'][$i].' ';
}
$this->_out('/Mask ['.$trns.']');
@ -6371,12 +6371,14 @@ if (!class_exists('TCPDF', false)) {
$this->_out('xref');
$this->_out('0 '.($this->n + 1));
$this->_out('0000000000 65535 f ');
for($i=1; $i <= $this->n; ++$i) {
for ($i=1; $i <= $this->n; ++$i) {
$this->_out(sprintf('%010d 00000 n ', $this->offsets[$i]));
}
$this->_out('100000 '.count($this->embeddedfiles));
foreach ($this->embeddedfiles as $filename => $filedata) {
$this->_out(sprintf('%010d 00000 n ', $this->offsets[$filedata['n']]));
if (isset($this->embeddedfiles) AND count($this->embeddedfiles) > 0) {
$this->_out('100000 '.count($this->embeddedfiles));
foreach ($this->embeddedfiles as $filename => $filedata) {
$this->_out(sprintf('%010d 00000 n ', $this->offsets[$filedata['n']]));
}
}
//Trailer
$this->_out('trailer');
@ -6641,7 +6643,7 @@ if (!class_exists('TCPDF', false)) {
// split string into array of equivalent codes
$strarr = array();
$strlen = strlen($str);
for($i=0; $i < $strlen; ++$i) {
for ($i=0; $i < $strlen; ++$i) {
$strarr[] = ord($str{$i});
}
// insert new value on cache
@ -6653,7 +6655,7 @@ if (!class_exists('TCPDF', false)) {
$numbytes = 1; // number of octetc needed to represent the UTF-8 character
$str .= ''; // force $str to be a string
$length = strlen($str);
for($i = 0; $i < $length; ++$i) {
for ($i = 0; $i < $length; ++$i) {
$char = ord($str{$i}); // get one string character at time
if (count($bytes) == 0) { // get starting octect
if ($char <= 0x7F) {
@ -6679,7 +6681,7 @@ if (!class_exists('TCPDF', false)) {
if (count($bytes) == $numbytes) {
// compose UTF-8 bytes to a single unicode value
$char = $bytes[0];
for($j = 1; $j < $numbytes; ++$j) {
for ($j = 1; $j < $numbytes; ++$j) {
$char += ($bytes[$j] << (($numbytes - $j - 1) * 0x06));
}
if ((($char >= 0xD800) AND ($char <= 0xDFFF)) OR ($char >= 0x10FFFF)) {
@ -9300,7 +9302,7 @@ if (!class_exists('TCPDF', false)) {
/*
* Set User's Rights for PDF Reader
* WARNING: This should work only using the Adobe private key with the setSignature() method.
* WARNING: This works only using the Adobe private key with the setSignature() method!.
* Check the PDF Reference 8.7.1 Transform Methods,
* Table 8.105 Entries in the UR transform parameters dictionary
* @param boolean $enable if true enable user's rights on PDF reader
@ -9322,10 +9324,7 @@ if (!class_exists('TCPDF', false)) {
$this->ur_document = $document;
$this->ur_annots = $annots;
$this->ur_form = $form;
$this->ur_signature = $signature;
if ($this->ur) {
$this->setSignature('', '', '', '', 0);
}
$this->ur_signature = $signature;
}
/*
@ -9797,10 +9796,10 @@ if (!class_exists('TCPDF', false)) {
//build the data stream
$this->gradients[$n]['stream'] = '';
$count_patch = count($patch_array);
for($i=0; $i < $count_patch; ++$i) {
for ($i=0; $i < $count_patch; ++$i) {
$this->gradients[$n]['stream'] .= chr($patch_array[$i]['f']); //start with the edge flag as 8 bit
$count_points = count($patch_array[$i]['points']);
for($j=0; $j < $count_points; ++$j) {
for ($j=0; $j < $count_points; ++$j) {
//each point as 16 bit
$patch_array[$i]['points'][$j] = (($patch_array[$i]['points'][$j] - $coords_min) / ($coords_max - $coords_min)) * $bpcd;
if ($patch_array[$i]['points'][$j] < 0) {
@ -9813,7 +9812,7 @@ if (!class_exists('TCPDF', false)) {
$this->gradients[$n]['stream'] .= chr(floor($patch_array[$i]['points'][$j] % 256));
}
$count_cols = count($patch_array[$i]['colors']);
for($j=0; $j < $count_cols; ++$j) {
for ($j=0; $j < $count_cols; ++$j) {
//each color component as 8 bit
$this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['r']);
$this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['g']);
@ -13797,10 +13796,10 @@ if (!class_exists('TCPDF', false)) {
$page_last = $this->getPage();
$numpages = $page_last - $page_first + 1;
if (!$this->empty_string($page)) {
for($p = $page_first; $p <= $page_last; ++$p) {
for ($p = $page_first; $p <= $page_last; ++$p) {
// get page data
$temppage = $this->getPageBuffer($p);
for($n = 1; $n <= $this->numpages; ++$n) {
for ($n = 1; $n <= $this->numpages; ++$n) {
// update page numbers
$k = '{#'.$n.'}';
$ku = '{'.$k.'}';