30
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-05-31 21:30:47 +00:00
This commit is contained in:
nicolaasuni 2010-06-17 09:00:12 +02:00
parent 90b5fe206c
commit 1ee9b7ef7c
23 changed files with 621 additions and 472 deletions

View File

@ -1,3 +1,7 @@
5.3.011 (2010-06-17)
- The method setSignatureAppearance() was added, check the example n. 52.
- Some problems related to font subsetting were fixed.
5.3.010 (2010-06-15)
- Previous release was corrupted.

View File

@ -8,8 +8,8 @@ http: sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 5.3.010
Release date: 2010-06-15
Version: 5.3.011
Release date: 2010-06-17
Author: Nicola Asuni
Copyright (c) 2002-2010:

View File

@ -60,7 +60,7 @@
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -1003,7 +1003,7 @@ $code)</code>
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -5551,7 +5551,7 @@ $frame)</code>
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:07 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 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

View File

@ -299,7 +299,7 @@ $type)</code>
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -1377,7 +1377,7 @@ $type)</code>
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -105,7 +105,7 @@ PHP class to creates array representations for 2D barcodes to be used with TCPDF
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -105,7 +105,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -542,7 +542,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:12 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:07 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -97,7 +97,7 @@ Array of WEB safe colors.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -157,7 +157,7 @@ Class to create PDF417 barcode arrays for TCPDF class.<br /><br /><p>PDF417 (ISO
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -480,7 +480,7 @@ string $string, [int $split_length = 1])</code>
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:07 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</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>
</tr>
<tr>
<td><b>version:</b>&nbsp;&nbsp;</td><td>5.3.010</td>
<td><b>version:</b>&nbsp;&nbsp;</td><td>5.3.011</td>
</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>
@ -113,7 +113,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 5.3.010 (http://www.tcpdf.org)'</code>
<code>PDF_PRODUCER = 'TCPDF 5.3.011 (http://www.tcpdf.org)'</code>
</td></tr></table>
</td></tr></table>
@ -124,7 +124,7 @@ unicode data<br /><br /></div>
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:07 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:02 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -246,7 +246,7 @@ Unicode data for TCPDF library.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:12 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:07 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -1369,6 +1369,8 @@
<dl>
<dt><b>$sign</b></dt>
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$sign">TCPDF::$sign</a><br>&nbsp;&nbsp;&nbsp;&nbsp;If true enables document signing</dd>
<dt><b>$signature_appearance</b></dt>
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$signature_appearance">TCPDF::$signature_appearance</a><br>&nbsp;&nbsp;&nbsp;&nbsp;data for signature appearance</dd>
<dt><b>$signature_data</b></dt>
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$signature_data">TCPDF::$signature_data</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Signature data</dd>
<dt><b>$signature_max_length</b></dt>
@ -1440,11 +1442,11 @@
<dt><b>SetAutoPageBreak</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetAutoPageBreak">TCPDF::SetAutoPageBreak()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm.</dd>
<dt><b>setBarcode</b></dt>
<dd>in file 2dbarcodes.php, method <a href="com-tecnick-tcpdf/TCPDF2DBarcode.html#methodsetBarcode">TCPDF2DBarcode::setBarcode()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the barcode.</dd>
<dt><b>setBarcode</b></dt>
<dd>in file barcodes.php, method <a href="com-tecnick-tcpdf/TCPDFBarcode.html#methodsetBarcode">TCPDFBarcode::setBarcode()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the barcode.</dd>
<dt><b>setBarcode</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetBarcode">TCPDF::setBarcode()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set document barcode.</dd>
<dt><b>setBarcode</b></dt>
<dd>in file 2dbarcodes.php, method <a href="com-tecnick-tcpdf/TCPDF2DBarcode.html#methodsetBarcode">TCPDF2DBarcode::setBarcode()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the barcode.</dd>
<dt><b>SetBooklet</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetBooklet">TCPDF::SetBooklet()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the booklet mode for double-sided pages.</dd>
<dt><b>setBuffer</b></dt>
@ -1577,6 +1579,8 @@
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetRTL">TCPDF::setRTL()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable or disable Right-To-Left language mode</dd>
<dt><b>setSignature</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetSignature">TCPDF::setSignature()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable document signature (requires the OpenSSL Library).</dd>
<dt><b>setSignatureAppearance</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetSignatureAppearance">TCPDF::setSignatureAppearance()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the digital signature appearance (a cliccable rectangle area to get signature properties)</dd>
<dt><b>setSpacesRE</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetSpacesRE">TCPDF::setSpacesRE()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set regular expression to detect withespaces or word separators.</dd>
<dt><b>SetSubject</b></dt>
@ -2020,7 +2024,7 @@
<a href="elementindex.html#top">top</a><br>
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -1567,6 +1567,8 @@
<dl>
<dt><b>$sign</b></dt>
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$sign">TCPDF::$sign</a><br>&nbsp;&nbsp;&nbsp;&nbsp;If true enables document signing</dd>
<dt><b>$signature_appearance</b></dt>
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$signature_appearance">TCPDF::$signature_appearance</a><br>&nbsp;&nbsp;&nbsp;&nbsp;data for signature appearance</dd>
<dt><b>$signature_data</b></dt>
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$signature_data">TCPDF::$signature_data</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Signature data</dd>
<dt><b>$signature_max_length</b></dt>
@ -1638,11 +1640,11 @@
<dt><b>SetAutoPageBreak</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetAutoPageBreak">TCPDF::SetAutoPageBreak()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm.</dd>
<dt><b>setBarcode</b></dt>
<dd>in file 2dbarcodes.php, method <a href="com-tecnick-tcpdf/TCPDF2DBarcode.html#methodsetBarcode">TCPDF2DBarcode::setBarcode()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the barcode.</dd>
<dt><b>setBarcode</b></dt>
<dd>in file barcodes.php, method <a href="com-tecnick-tcpdf/TCPDFBarcode.html#methodsetBarcode">TCPDFBarcode::setBarcode()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the barcode.</dd>
<dt><b>setBarcode</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetBarcode">TCPDF::setBarcode()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set document barcode.</dd>
<dt><b>setBarcode</b></dt>
<dd>in file 2dbarcodes.php, method <a href="com-tecnick-tcpdf/TCPDF2DBarcode.html#methodsetBarcode">TCPDF2DBarcode::setBarcode()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the barcode.</dd>
<dt><b>SetBooklet</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetBooklet">TCPDF::SetBooklet()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the booklet mode for double-sided pages.</dd>
<dt><b>setBuffer</b></dt>
@ -1775,6 +1777,8 @@
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetRTL">TCPDF::setRTL()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable or disable Right-To-Left language mode</dd>
<dt><b>setSignature</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetSignature">TCPDF::setSignature()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable document signature (requires the OpenSSL Library).</dd>
<dt><b>setSignatureAppearance</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetSignatureAppearance">TCPDF::setSignatureAppearance()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the digital signature appearance (a cliccable rectangle area to get signature properties)</dd>
<dt><b>setSpacesRE</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetSpacesRE">TCPDF::setSpacesRE()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set regular expression to detect withespaces or word separators.</dd>
<dt><b>SetSubject</b></dt>
@ -2052,7 +2056,7 @@
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
<div class="credit">
<hr />
Documentation generated on Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</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 Tue, 15 Jun 2010 12:02:12 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:07 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -67,7 +67,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 Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -67,7 +67,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 Tue, 15 Jun 2010 12:02:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 17 Jun 2010 09:00:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_052.php
// Begin : 2009-05-07
// Last Update : 2010-05-20
// Last Update : 2010-06-17
//
// Description : Example 052 for TCPDF class
// Certification Signature (experimental)
@ -100,6 +100,14 @@ $pdf->AddPage();
$text = 'This is a <b color="#FF0000">digitally signed document</b> using the default (example) <b>tcpdf.crt</b> certificate.<br />To validate this signature you have to load the <b color="#006600">tcpdf.fdf</b> on the Arobat Reader to add the certificate to <i>List of Trusted Identities</i>.<br /><br />For more information check the source code of this example and the source code documentation for the <i>setSignature()</i> method.<br /><br /><a href="http://www.tcpdf.org">www.tcpdf.org</a>';
$pdf->writeHTML($text, true, 0, true, 0);
// *** set signature appearance ***
// create content for signature (image and/or text)
$pdf->Image($file='../images/tcpdf_signature.png', $x=180, $y=60, $w=15, $h=15, $type='PNG');
// define active area for signature appearance
$pdf->setSignatureAppearance($x=180, $y=60, $w=15, $h=15);
// ---------------------------------------------------------
//Close and output PDF document

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 5.3.010
// Version : 5.3.011
// Begin : 2002-08-03
// Last Update : 2010-06-15
// Last Update : 2010-06-17
// 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)
// -------------------------------------------------------------------
@ -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
* @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL
* @version 5.3.010
* @version 5.3.011
*/
/**
@ -150,14 +150,14 @@ if (!class_exists('TCPDF', false)) {
/**
* define default PDF document producer
*/
define('PDF_PRODUCER', 'TCPDF 5.3.010 (http://www.tcpdf.org)');
define('PDF_PRODUCER', 'TCPDF 5.3.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 5.3.010
* @version 5.3.011
* @author Nicola Asuni - info@tecnick.com
* @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL
@ -1298,6 +1298,13 @@ if (!class_exists('TCPDF', false)) {
*/
protected $signature_max_length = 11742;
/**
* data for signature appearance
* @access protected
* @since 5.3.011 (2010-06-16)
*/
protected $signature_appearance = array('page' => 1, 'rect' => '0 0 0 0');
/**
* Regular expression used to find blank characters used for word-wrapping.
* @access protected
@ -1819,6 +1826,7 @@ if (!class_exists('TCPDF', false)) {
$this->ur_annots = '/Create/Delete/Modify/Copy/Import/Export';
$this->ur_form = '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate';
$this->ur_signature = '/Modify';
$this->signature_appearance = array('page' => 1, 'rect' => '0 0 0 0');
// set default JPEG quality
$this->jpeg_quality = 75;
// initialize some settings
@ -4446,8 +4454,9 @@ if (!class_exists('TCPDF', false)) {
}
} elseif ($type == 'core') {
$name = $this->CoreFonts[$fontkey];
$subset = false;
} elseif (($type == 'TrueType') OR ($type == 'Type1')) {
// ...
$subset = false;
} elseif ($type == 'TrueTypeUnicode') {
$enc = 'Identity-H';
} else {
@ -7474,7 +7483,7 @@ if (!class_exists('TCPDF', false)) {
}
}
}
if (($n==1) AND $this->sign AND isset($this->signature_data['cert_type'])) {
if ($this->sign AND ($n == $this->signature_appearance['page']) AND isset($this->signature_data['cert_type'])) {
// set reference for signature object
$out .= ' '.$this->sig_annot_ref;
}
@ -8683,7 +8692,7 @@ if (!class_exists('TCPDF', false)) {
//Strip second binary header
$font = substr($font, 0, $info['length1']).substr($font, ($info['length1'] + 6));
}
} elseif ($info['subset'] AND (!$compressed) OR ($compressed AND function_exists('gzcompress'))) {
} elseif ($info['subset'] AND ((!$compressed) OR ($compressed AND function_exists('gzcompress')))) {
if ($compressed) {
// uncompress font
$font = gzuncompress($font);
@ -9376,8 +9385,9 @@ if (!class_exists('TCPDF', false)) {
$this->buffer = &$pdfdoc;
$this->bufferlen = strlen($pdfdoc);
// ---
$out = '<< /Type /Annot /Subtype /Widget /Rect [0 0 0 0]';
$out .= ' /P 3 0 R'; // link to first page object
$out = '<< /Type /Annot /Subtype /Widget';
$out .= ' /Rect ['.$this->signature_appearance['rect'].']';
$out .= ' /P '.$this->page_obj_id[($this->signature_appearance['page'])].' 0 R'; // link to signature appearance page
$out .= ' /FT /Sig';
$out .= ' /T '.$this->_textstring('Signature');
$out .= ' /Ff 0';
@ -13800,6 +13810,30 @@ if (!class_exists('TCPDF', false)) {
$this->signature_data['info'] = $info;
}
/**
* Set the digital signature appearance (a cliccable rectangle area to get signature properties)
* @param float $x Abscissa of the upper-left corner.
* @param float $y Ordinate of the upper-left corner.
* @param float $w Width of the signature area.
* @param float $h Height of the signature area.
* @param int $page option page number (if < 0 the current page is used).
* @access public
* @author Nicola Asuni
* @since 5.3.011 (2010-06-17)
*/
public function setSignatureAppearance($x=0, $y=0, $w=0, $h=0, $page=-1) {
if (($page < 1) OR ($page > $this->numpages)) {
$this->signature_appearance['page'] = $this->page;
} else {
$this->signature_appearance['page'] = intval($page);
}
$a = $x * $this->k;
$b = $this->pagedim[($this->signature_appearance['page'])]['h'] - (($y + $h) * $this->k);
$c = $w * $this->k;
$d = $h * $this->k;
$this->signature_appearance['rect'] = sprintf('%.2F %.2F %.2F %.2F', $a, $b, $a+$c, $b+$d);
}
/**
* Create a new page group.
* NOTE: call this function before calling AddPage()