32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-11-17 10:35:11 +00:00
This commit is contained in:
nicolaasuni 2010-08-20 14:33:54 +02:00
parent a3f1c1f9db
commit cc627080c0
22 changed files with 381 additions and 332 deletions

View File

@ -1,3 +1,7 @@
5.8.009 (2010-08-20)
- Internal object numbering was improved.
- Some errors in object encryption were fixed.
5.8.008 (2010-08-19) 5.8.008 (2010-08-19)
- Method write1DBarcode() was changed, check the example n. 27. - Method write1DBarcode() was changed, check the example n. 27.
- Method Footer() was changed to account for barcode changes. - Method Footer() was changed to account for barcode changes.

View File

@ -8,8 +8,8 @@ http: sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 5.8.008 Version: 5.8.009
Release date: 2010-08-19 Release date: 2010-08-20
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 Thu, 19 Aug 2010 22:38:54 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:41 +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 Thu, 19 Aug 2010 22:38:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:42 +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 Thu, 19 Aug 2010 22:38:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:42 +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 Thu, 19 Aug 2010 22:38:54 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:41 +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 Thu, 19 Aug 2010 22:38:54 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:41 +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 Thu, 19 Aug 2010 22:38:54 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:41 +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 Thu, 19 Aug 2010 22:38:54 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:41 +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 Thu, 19 Aug 2010 22:39:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:47 +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 Thu, 19 Aug 2010 22:38:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:42 +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 Thu, 19 Aug 2010 22:38:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:42 +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 Thu, 19 Aug 2010 22:38:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:42 +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.008</td> <td><b>version:</b>&nbsp;&nbsp;</td><td>5.8.009</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.008 (http://www.tcpdf.org)'</code> <code>PDF_PRODUCER = 'TCPDF 5.8.009 (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 Thu, 19 Aug 2010 22:38:56 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:43 +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 Thu, 19 Aug 2010 22:39:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:47 +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

@ -1908,7 +1908,7 @@
<dt><b>_escape</b></dt> <dt><b>_escape</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_escape">TCPDF::_escape()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Add &quot;\&quot; before &quot;\&quot;, &quot;(&quot; and &quot;)&quot;</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_escape">TCPDF::_escape()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Add &quot;\&quot; before &quot;\&quot;, &quot;(&quot; and &quot;)&quot;</dd>
<dt><b>_escapetext</b></dt> <dt><b>_escapetext</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_escapetext">TCPDF::_escapetext()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Format a text string</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_escapetext">TCPDF::_escapetext()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;THIS METHOD IS DEPRECATED</dd>
<dt><b>_freadint</b></dt> <dt><b>_freadint</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_freadint">TCPDF::_freadint()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Read a 4-byte (32 bit) integer from file.</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_freadint">TCPDF::_freadint()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Read a 4-byte (32 bit) integer from file.</dd>
<dt><b>_generateencryptionkey</b></dt> <dt><b>_generateencryptionkey</b></dt>
@ -1919,6 +1919,8 @@
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getBYTE">TCPDF::_getBYTE()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Get BYTE from string (8-bit unsigned integer).</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getBYTE">TCPDF::_getBYTE()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Get BYTE from string (8-bit unsigned integer).</dd>
<dt><b>_getfontpath</b></dt> <dt><b>_getfontpath</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getfontpath">TCPDF::_getfontpath()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Return fonts path</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getfontpath">TCPDF::_getfontpath()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Return fonts path</dd>
<dt><b>_getobj</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getobj">TCPDF::_getobj()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Return the starting object string for the selected object ID.</dd>
<dt><b>_getrawstream</b></dt> <dt><b>_getrawstream</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getrawstream">TCPDF::_getrawstream()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;get raw output stream.</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getrawstream">TCPDF::_getrawstream()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;get raw output stream.</dd>
<dt><b>_getSHORT</b></dt> <dt><b>_getSHORT</b></dt>
@ -2042,7 +2044,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 Thu, 19 Aug 2010 22:38:54 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:41 +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

@ -132,7 +132,7 @@
<dt><b>_escape</b></dt> <dt><b>_escape</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_escape">TCPDF::_escape()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Add &quot;\&quot; before &quot;\&quot;, &quot;(&quot; and &quot;)&quot;</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_escape">TCPDF::_escape()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Add &quot;\&quot; before &quot;\&quot;, &quot;(&quot; and &quot;)&quot;</dd>
<dt><b>_escapetext</b></dt> <dt><b>_escapetext</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_escapetext">TCPDF::_escapetext()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Format a text string</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_escapetext">TCPDF::_escapetext()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;THIS METHOD IS DEPRECATED</dd>
<dt><b>_freadint</b></dt> <dt><b>_freadint</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_freadint">TCPDF::_freadint()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Read a 4-byte (32 bit) integer from file.</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_freadint">TCPDF::_freadint()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Read a 4-byte (32 bit) integer from file.</dd>
<dt><b>_generateencryptionkey</b></dt> <dt><b>_generateencryptionkey</b></dt>
@ -143,6 +143,8 @@
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getBYTE">TCPDF::_getBYTE()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Get BYTE from string (8-bit unsigned integer).</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getBYTE">TCPDF::_getBYTE()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Get BYTE from string (8-bit unsigned integer).</dd>
<dt><b>_getfontpath</b></dt> <dt><b>_getfontpath</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getfontpath">TCPDF::_getfontpath()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Return fonts path</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getfontpath">TCPDF::_getfontpath()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Return fonts path</dd>
<dt><b>_getobj</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getobj">TCPDF::_getobj()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Return the starting object string for the selected object ID.</dd>
<dt><b>_getrawstream</b></dt> <dt><b>_getrawstream</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getrawstream">TCPDF::_getrawstream()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;get raw output stream.</dd> <dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_getrawstream">TCPDF::_getrawstream()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;get raw output stream.</dd>
<dt><b>_getSHORT</b></dt> <dt><b>_getSHORT</b></dt>
@ -2074,7 +2076,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 Thu, 19 Aug 2010 22:38:54 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:41 +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

@ -33,9 +33,13 @@
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top"> <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
<a href="#Post-parsing">Post-parsing</a><br> <a href="#Post-parsing">Post-parsing</a><br>
<a name="tcpdf.php"></a>
<h1>tcpdf.php</h1>
<h2>Warnings:</h2><br>
<b>Warning on line 10327</b> - Unknown tag "@DEPRECATED" used<br>
<div class="credit"> <div class="credit">
<hr /> <hr />
Documentation generated on Thu, 19 Aug 2010 22:39:00 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:47 +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 Thu, 19 Aug 2010 22:38:54 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:41 +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 Thu, 19 Aug 2010 22:38:54 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> Documentation generated on Fri, 20 Aug 2010 14:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div> </div>
</td></tr></table> </td></tr></table>
</td> </td>

136
tcpdf.php
View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : tcpdf.php // File name : tcpdf.php
// Version : 5.8.008 // Version : 5.8.009
// Begin : 2002-08-03 // Begin : 2002-08-03
// Last Update : 2010-08-19 // Last Update : 2010-08-20
// 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.008 * @version 5.8.009
*/ */
/** /**
@ -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.008 (http://www.tcpdf.org)'); define('PDF_PRODUCER', 'TCPDF 5.8.009 (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.008 * @version 5.8.009
* @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
@ -4811,9 +4811,8 @@ if (!class_exists('TCPDF', false)) {
$data = gzcompress($data); $data = gzcompress($data);
$filter = ' /Filter /FlateDecode'; $filter = ' /Filter /FlateDecode';
} }
$this->offsets[$filedata['n']] = $this->bufferlen;
$out = $filedata['n'].' 0 obj'."\n";
$stream = $this->_getrawstream($data, $filedata['n']); $stream = $this->_getrawstream($data, $filedata['n']);
$out = $this->_getobj($filedata['n'])."\n";
$out .= '<< /Type /EmbeddedFile'.$filter.' /Length '.strlen($stream).' >>'; $out .= '<< /Type /EmbeddedFile'.$filter.' /Length '.strlen($stream).' >>';
$out .= ' stream'."\n".$stream."\n".'endstream'; $out .= ' stream'."\n".$stream."\n".'endstream';
$out .= "\n".'endobj'; $out .= "\n".'endobj';
@ -7807,8 +7806,7 @@ if (!class_exists('TCPDF', false)) {
} }
} }
//Pages root //Pages root
$this->offsets[1] = $this->bufferlen; $out = $this->_getobj(1)."\n";
$out = '1 0 obj'."\n";
$out .= '<< /Type /Pages /Kids ['; $out .= '<< /Type /Pages /Kids [';
foreach($this->page_obj_id as $page_obj) { foreach($this->page_obj_id as $page_obj) {
$out .= ' '.$page_obj.' 0 R'; $out .= ' '.$page_obj.' 0 R';
@ -7876,7 +7874,6 @@ if (!class_exists('TCPDF', false)) {
// create annotation object for grouping radiobuttons // create annotation object for grouping radiobuttons
if (isset($this->radiobutton_groups[$n][$pl['txt']]) AND is_array($this->radiobutton_groups[$n][$pl['txt']])) { if (isset($this->radiobutton_groups[$n][$pl['txt']]) AND is_array($this->radiobutton_groups[$n][$pl['txt']])) {
$radio_button_obj_id = $this->radiobutton_groups[$n][$pl['txt']]['n']; $radio_button_obj_id = $this->radiobutton_groups[$n][$pl['txt']]['n'];
$this->offsets[$radio_button_obj_id] = $this->bufferlen;
$annots = '<<'; $annots = '<<';
$annots .= ' /Type /Annot'; $annots .= ' /Type /Annot';
$annots .= ' /Subtype /Widget'; $annots .= ' /Subtype /Widget';
@ -7897,7 +7894,7 @@ if (!class_exists('TCPDF', false)) {
$annots .= ' /V /'.$defval; $annots .= ' /V /'.$defval;
} }
$annots .= ' >>'; $annots .= ' >>';
$this->_out($radio_button_obj_id.' 0 obj'."\n".$annots."\n".'endobj'); $this->_out($this->_getobj($radio_button_obj_id)."\n".$annots."\n".'endobj');
$this->form_obj_id[] = $radio_button_obj_id; $this->form_obj_id[] = $radio_button_obj_id;
// store object id to be used on Parent entry of Kids // store object id to be used on Parent entry of Kids
$this->radiobutton_groups[$n][$pl['txt']] = $radio_button_obj_id; $this->radiobutton_groups[$n][$pl['txt']] = $radio_button_obj_id;
@ -8459,8 +8456,7 @@ if (!class_exists('TCPDF', false)) {
} }
$annots .= '>>'; $annots .= '>>';
// create new annotation object // create new annotation object
$this->offsets[$annot_obj_id] = $this->bufferlen; $this->_out($this->_getobj($annot_obj_id)."\n".$annots."\n".'endobj');
$this->_out($annot_obj_id.' 0 obj'."\n".$annots."\n".'endobj');
if ($formfield AND !isset($this->radiobutton_groups[$n][$pl['txt']])) { if ($formfield AND !isset($this->radiobutton_groups[$n][$pl['txt']])) {
// store reference of form object // store reference of form object
$this->form_obj_id[] = $annot_obj_id; $this->form_obj_id[] = $annot_obj_id;
@ -8481,9 +8477,7 @@ if (!class_exists('TCPDF', false)) {
*/ */
protected function _putAPXObject($w=0, $h=0, $stream='') { protected function _putAPXObject($w=0, $h=0, $stream='') {
$stream = trim($stream); $stream = trim($stream);
++$this->n; $out = $this->_getobj()."\n";
$this->offsets[$this->n] = $this->bufferlen;
$out = $this->n.' 0 obj'."\n";
$out .= '<<'; $out .= '<<';
$out .= ' /Type /XObject'; $out .= ' /Type /XObject';
$out .= ' /Subtype /Form'; $out .= ' /Subtype /Form';
@ -9110,9 +9104,7 @@ if (!class_exists('TCPDF', false)) {
$name = $font['name']; $name = $font['name'];
if ($type == 'core') { if ($type == 'core') {
// standard core font // standard core font
$obj_id = $this->font_obj_ids[$k]; $out = $this->_getobj($this->font_obj_ids[$k])."\n";
$this->offsets[$obj_id] = $this->bufferlen;
$out = $obj_id.' 0 obj'."\n";
$out .= '<</Type /Font'; $out .= '<</Type /Font';
$out .= ' /Subtype /Type1'; $out .= ' /Subtype /Type1';
$out .= ' /BaseFont /'.$name; $out .= ' /BaseFont /'.$name;
@ -9129,9 +9121,7 @@ if (!class_exists('TCPDF', false)) {
$this->_out($out); $this->_out($out);
} elseif (($type == 'Type1') OR ($type == 'TrueType')) { } elseif (($type == 'Type1') OR ($type == 'TrueType')) {
// additional Type1 or TrueType font // additional Type1 or TrueType font
$obj_id = $this->font_obj_ids[$k]; $out = $this->_getobj($this->font_obj_ids[$k])."\n";
$this->offsets[$obj_id] = $this->bufferlen;
$out = $obj_id.' 0 obj'."\n";
$out .= '<</Type /Font'; $out .= '<</Type /Font';
$out .= ' /Subtype /'.$type; $out .= ' /Subtype /'.$type;
$out .= ' /BaseFont /'.$name; $out .= ' /BaseFont /'.$name;
@ -9189,7 +9179,6 @@ if (!class_exists('TCPDF', false)) {
* Adds unicode fonts.<br> * Adds unicode fonts.<br>
* Based on PDF Reference 1.3 (section 5) * Based on PDF Reference 1.3 (section 5)
* @param array $font font data * @param array $font font data
* @return int font object ID
* @access protected * @access protected
* @author Nicola Asuni * @author Nicola Asuni
* @since 1.52.0.TC005 (2005-01-05) * @since 1.52.0.TC005 (2005-01-05)
@ -9205,9 +9194,7 @@ if (!class_exists('TCPDF', false)) {
$fontname .= $font['name']; $fontname .= $font['name'];
// Type0 Font // Type0 Font
// A composite font composed of other fonts, organized hierarchically // A composite font composed of other fonts, organized hierarchically
$obj_id = $this->font_obj_ids[$font['fontkey']]; $out = $this->_getobj($this->font_obj_ids[$font['fontkey']])."\n";
$this->offsets[$obj_id] = $this->bufferlen;
$out = $obj_id.' 0 obj'."\n";
$out .= '<< /Type /Font'; $out .= '<< /Type /Font';
$out .= ' /Subtype /Type0'; $out .= ' /Subtype /Type0';
$out .= ' /BaseFont /'.$fontname; $out .= ' /BaseFont /'.$fontname;
@ -9503,13 +9490,13 @@ if (!class_exists('TCPDF', false)) {
$this->_out('<<'.$filter.'/Length '.strlen($stream).'>> stream'."\n".$stream."\n".'endstream'."\n".'endobj'); $this->_out('<<'.$filter.'/Length '.strlen($stream).'>> stream'."\n".$stream."\n".'endstream'."\n".'endobj');
// CIDFontType2 // CIDFontType2
// A CIDFont whose glyph descriptions are based on TrueType font technology // A CIDFont whose glyph descriptions are based on TrueType font technology
$this->_newobj(); $oid = $this->_newobj();
$out = '<< /Type /Font'; $out = '<< /Type /Font';
$out .= ' /Subtype /CIDFontType2'; $out .= ' /Subtype /CIDFontType2';
$out .= ' /BaseFont /'.$fontname; $out .= ' /BaseFont /'.$fontname;
// A dictionary containing entries that define the character collection of the CIDFont. // A dictionary containing entries that define the character collection of the CIDFont.
$cidinfo = '/Registry '.$this->_datastring($font['cidinfo']['Registry']); $cidinfo = '/Registry '.$this->_datastring($font['cidinfo']['Registry'], $oid);
$cidinfo .= ' /Ordering '.$this->_datastring($font['cidinfo']['Ordering']); $cidinfo .= ' /Ordering '.$this->_datastring($font['cidinfo']['Ordering'], $oid);
$cidinfo .= ' /Supplement '.$font['cidinfo']['Supplement']; $cidinfo .= ' /Supplement '.$font['cidinfo']['Supplement'];
$out .= ' /CIDSystemInfo << '.$cidinfo.' >>'; $out .= ' /CIDSystemInfo << '.$cidinfo.' >>';
$out .= ' /FontDescriptor '.($this->n + 1).' 0 R'; $out .= ' /FontDescriptor '.($this->n + 1).' 0 R';
@ -9573,14 +9560,12 @@ if (!class_exists('TCPDF', false)) {
$out .= "\n".'endobj'; $out .= "\n".'endobj';
$this->_out($out); $this->_out($out);
} }
return $obj_id;
} }
/** /**
* Output CID-0 fonts. * Output CID-0 fonts.
* A Type 0 CIDFont contains glyph descriptions based on the Adobe Type 1 font format * A Type 0 CIDFont contains glyph descriptions based on the Adobe Type 1 font format
* @param array $font font data * @param array $font font data
* @return int font object ID
* @access protected * @access protected
* @author Andrew Whitehead, Nicola Asuni, Yukihiro Nakadaira * @author Andrew Whitehead, Nicola Asuni, Yukihiro Nakadaira
* @since 3.2.000 (2008-06-23) * @since 3.2.000 (2008-06-23)
@ -9610,9 +9595,7 @@ if (!class_exists('TCPDF', false)) {
} else { } else {
$longname = $name; $longname = $name;
} }
$obj_id = $this->font_obj_ids[$font['fontkey']]; $out = $this->_getobj($this->font_obj_ids[$font['fontkey']])."\n";
$this->offsets[$obj_id] = $this->bufferlen;
$out = $obj_id.' 0 obj'."\n";
$out .= '<</Type /Font'; $out .= '<</Type /Font';
$out .= ' /Subtype /Type0'; $out .= ' /Subtype /Type0';
$out .= ' /BaseFont /'.$longname; $out .= ' /BaseFont /'.$longname;
@ -9624,12 +9607,12 @@ if (!class_exists('TCPDF', false)) {
$out .= ' >>'; $out .= ' >>';
$out .= "\n".'endobj'; $out .= "\n".'endobj';
$this->_out($out); $this->_out($out);
$this->_newobj(); $oid = $this->_newobj();
$out = '<</Type /Font'; $out = '<</Type /Font';
$out .= ' /Subtype /CIDFontType0'; $out .= ' /Subtype /CIDFontType0';
$out .= ' /BaseFont /'.$name; $out .= ' /BaseFont /'.$name;
$cidinfo = '/Registry '.$this->_datastring($font['cidinfo']['Registry']); $cidinfo = '/Registry '.$this->_datastring($font['cidinfo']['Registry'], $oid);
$cidinfo .= ' /Ordering '.$this->_datastring($font['cidinfo']['Ordering']); $cidinfo .= ' /Ordering '.$this->_datastring($font['cidinfo']['Ordering'], $oid);
$cidinfo .= ' /Supplement '.$font['cidinfo']['Supplement']; $cidinfo .= ' /Supplement '.$font['cidinfo']['Supplement'];
$out .= ' /CIDSystemInfo <<'.$cidinfo.'>>'; $out .= ' /CIDSystemInfo <<'.$cidinfo.'>>';
$out .= ' /FontDescriptor '.($this->n + 1).' 0 R'; $out .= ' /FontDescriptor '.($this->n + 1).' 0 R';
@ -9651,7 +9634,6 @@ if (!class_exists('TCPDF', false)) {
$s .= '>>'; $s .= '>>';
$s .= "\n".'endobj'; $s .= "\n".'endobj';
$this->_out($s); $this->_out($s);
return $obj_id;
} }
/** /**
@ -9733,7 +9715,7 @@ if (!class_exists('TCPDF', false)) {
* @access protected * @access protected
*/ */
protected function _putresourcedict() { protected function _putresourcedict() {
$out = '2 0 obj'."\n"; $out = $this->_getobj(2)."\n";
$out .= '<< /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'; $out .= '<< /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]';
$out .= ' /Font <<'; $out .= ' /Font <<';
foreach ($this->fontkeys as $fontkey) { foreach ($this->fontkeys as $fontkey) {
@ -9800,14 +9782,11 @@ if (!class_exists('TCPDF', false)) {
$this->_putimages(); $this->_putimages();
$this->_putspotcolors(); $this->_putspotcolors();
$this->_putshaders(); $this->_putshaders();
//Resource dictionary
$this->offsets[2] = $this->bufferlen;
$this->_putresourcedict(); $this->_putresourcedict();
$this->_putbookmarks(); $this->_putbookmarks();
$this->_putEmbeddedFiles(); $this->_putEmbeddedFiles();
$this->_putannotsobjs(); $this->_putannotsobjs();
$this->_putjavascript(); $this->_putjavascript();
// encryption
$this->_putencryption(); $this->_putencryption();
} }
@ -9822,30 +9801,30 @@ if (!class_exists('TCPDF', false)) {
$out = '<<'; $out = '<<';
if (!$this->empty_string($this->title)) { if (!$this->empty_string($this->title)) {
// The document's title. // The document's title.
$out .= ' /Title '.$this->_textstring($this->title); $out .= ' /Title '.$this->_textstring($this->title, $oid);
} }
if (!$this->empty_string($this->author)) { if (!$this->empty_string($this->author)) {
// The name of the person who created the document. // The name of the person who created the document.
$out .= ' /Author '.$this->_textstring($this->author); $out .= ' /Author '.$this->_textstring($this->author, $oid);
} }
if (!$this->empty_string($this->subject)) { if (!$this->empty_string($this->subject)) {
// The subject of the document. // The subject of the document.
$out .= ' /Subject '.$this->_textstring($this->subject); $out .= ' /Subject '.$this->_textstring($this->subject, $oid);
} }
if (!$this->empty_string($this->keywords)) { if (!$this->empty_string($this->keywords)) {
// Keywords associated with the document. // Keywords associated with the document.
$out .= ' /Keywords '.$this->_textstring($this->keywords.' TCP'.'DF'); $out .= ' /Keywords '.$this->_textstring($this->keywords.' TCP'.'DF', $oid);
} }
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.
$out .= ' /Creator '.$this->_textstring($this->creator); $out .= ' /Creator '.$this->_textstring($this->creator, $oid);
} }
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.
$out .= ' /Producer '.$this->_textstring(PDF_PRODUCER.' (TCP'.'DF)'); $out .= ' /Producer '.$this->_textstring(PDF_PRODUCER.' (TCP'.'DF)', $oid);
} else { } else {
// default producer // default producer
$out .= ' /Producer '.$this->_textstring('TCP'.'DF'); $out .= ' /Producer '.$this->_textstring('TCP'.'DF', $oid);
} }
// The date and time the document was created, in human-readable form // The date and time the document was created, in human-readable form
$out .= ' /CreationDate '.$this->_datestring(); $out .= ' /CreationDate '.$this->_datestring();
@ -9884,7 +9863,7 @@ if (!class_exists('TCPDF', false)) {
$out .= ' /PageMode /'.$this->PageMode; $out .= ' /PageMode /'.$this->PageMode;
} }
if (isset($this->l['a_meta_language'])) { if (isset($this->l['a_meta_language'])) {
$out .= ' /Lang '.$this->_textstring($this->l['a_meta_language']); $out .= ' /Lang '.$this->_textstring($this->l['a_meta_language'], $oid);
} }
$out .= ' /Names <<'; $out .= ' /Names <<';
if ((!empty($this->javascript)) OR (!empty($this->js_objects))) { if ((!empty($this->javascript)) OR (!empty($this->js_objects))) {
@ -10065,7 +10044,7 @@ if (!class_exists('TCPDF', false)) {
$out .= ' /P '.$this->page_obj_id[($this->signature_appearance['page'])].' 0 R'; // link to signature appearance page $out .= ' /P '.$this->page_obj_id[($this->signature_appearance['page'])].' 0 R'; // link to signature appearance page
$out .= ' /F 4'; $out .= ' /F 4';
$out .= ' /FT /Sig'; $out .= ' /FT /Sig';
$out .= ' /T '.$this->_textstring('Signature'); $out .= ' /T '.$this->_textstring('Signature', $this->sig_obj_id);
$out .= ' /Ff 0'; $out .= ' /Ff 0';
$out .= ' /V '.($this->sig_obj_id + 1).' 0 R'; $out .= ' /V '.($this->sig_obj_id + 1).' 0 R';
$out .= ' >>'; $out .= ' >>';
@ -10177,12 +10156,26 @@ if (!class_exists('TCPDF', false)) {
* @access protected * @access protected
*/ */
protected function _newobj() { protected function _newobj() {
++$this->n; $this->_out($this->_getobj());
$this->offsets[$this->n] = $this->bufferlen;
$this->_out($this->n.' 0 obj');
return $this->n; return $this->n;
} }
/**
* Return the starting object string for the selected object ID.
* @param int $objid Object ID (leave empty to get a new ID).
* @return string the starting object string
* @access protected
* @since 5.8.009 (2010-08-20)
*/
protected function _getobj($objid='') {
if ($objid === '') {
++$this->n;
$objid = $this->n;
}
$this->offsets[$objid] = $this->bufferlen;
return $objid.' 0 obj';
}
/** /**
* Underline text. * Underline text.
* @param int $x X coordinate * @param int $x X coordinate
@ -10325,7 +10318,9 @@ if (!class_exists('TCPDF', false)) {
} }
/** /**
* THIS METHOD IS DEPRECATED
* Format a text string * Format a text string
* @DEPRECATED
* @param string $s string to escape. * @param string $s string to escape.
* @return string escaped string. * @return string escaped string.
* @access protected * @access protected
@ -13281,14 +13276,14 @@ if (!class_exists('TCPDF', false)) {
$nltags = '/<br[\s]?\/>|<\/(blockquote|dd|dl|div|dt|h1|h2|h3|h4|h5|h6|hr|li|ol|p|pre|ul|tcpdf|table|tr|td)>/si'; $nltags = '/<br[\s]?\/>|<\/(blockquote|dd|dl|div|dt|h1|h2|h3|h4|h5|h6|hr|li|ol|p|pre|ul|tcpdf|table|tr|td)>/si';
foreach ($this->outlines as $i => $o) { foreach ($this->outlines as $i => $o) {
if (isset($this->page_obj_id[($o['p'])])) { if (isset($this->page_obj_id[($o['p'])])) {
$this->_newobj(); $oid = $this->_newobj();
// covert HTML title to string // covert HTML title to string
$title = preg_replace($nltags, "\n", $o['t']); $title = preg_replace($nltags, "\n", $o['t']);
$title = preg_replace("/[\r]+/si", '', $title); $title = preg_replace("/[\r]+/si", '', $title);
$title = preg_replace("/[\n]+/si", "\n", $title); $title = preg_replace("/[\n]+/si", "\n", $title);
$title = strip_tags($title); $title = strip_tags($title);
$title = $this->stringTrim($title); $title = $this->stringTrim($title);
$out = '<</Title '.$this->_textstring($title); $out = '<</Title '.$this->_textstring($title, $oid);
$out .= ' /Parent '.($n + $o['parent']).' 0 R'; $out .= ' /Parent '.($n + $o['parent']).' 0 R';
if (isset($o['prev'])) { if (isset($o['prev'])) {
$out .= ' /Prev '.($n + $o['prev']).' 0 R'; $out .= ' /Prev '.($n + $o['prev']).' 0 R';
@ -13378,9 +13373,9 @@ if (!class_exists('TCPDF', false)) {
$this->_out($out); $this->_out($out);
// default Javascript object // default Javascript object
if (!empty($this->javascript)) { if (!empty($this->javascript)) {
$this->_newobj(); $obj_id = $this->_newobj();
$out = '<< /S /JavaScript'; $out = '<< /S /JavaScript';
$out .= ' /JS '.$this->_textstring($this->javascript); $out .= ' /JS '.$this->_textstring($this->javascript, $obj_id);
$out .= ' >>'; $out .= ' >>';
$out .= "\n".'endobj'; $out .= "\n".'endobj';
$this->_out($out); $this->_out($out);
@ -13388,8 +13383,7 @@ if (!class_exists('TCPDF', false)) {
// additional Javascript objects // additional Javascript objects
if (!empty($this->js_objects)) { if (!empty($this->js_objects)) {
foreach ($this->js_objects as $key => $val) { foreach ($this->js_objects as $key => $val) {
$this->offsets[$key] = $this->bufferlen; $out = $this->_getobj($key)."\n".' << /S /JavaScript /JS '.$this->_textstring($val['js'], $key).' >>'."\n".'endobj';
$out = $key.' 0 obj'."\n".' << /S /JavaScript /JS '.$this->_textstring($val['js']).' >>'."\n".'endobj';
$this->_out($out); $this->_out($out);
} }
} }
@ -14235,11 +14229,13 @@ if (!class_exists('TCPDF', false)) {
if (!isset($popt['mk'])) { if (!isset($popt['mk'])) {
$popt['mk'] = array(); $popt['mk'] = array();
} }
if (!empty($action) AND (is_array($action))) { if (!empty($action)) {
if (is_array($action)) {
$ann_obj_id = ($this->n + 1); $ann_obj_id = ($this->n + 1);
} else { } else {
$ann_obj_id = ($this->n + 2); $ann_obj_id = ($this->n + 2);
} }
}
$popt['mk']['ca'] = $this->_textstring($caption, $ann_obj_id); $popt['mk']['ca'] = $this->_textstring($caption, $ann_obj_id);
$popt['mk']['rc'] = $this->_textstring($caption, $ann_obj_id); $popt['mk']['rc'] = $this->_textstring($caption, $ann_obj_id);
$popt['mk']['ac'] = $this->_textstring($caption, $ann_obj_id); $popt['mk']['ac'] = $this->_textstring($caption, $ann_obj_id);
@ -14364,7 +14360,7 @@ if (!class_exists('TCPDF', false)) {
if ((!$this->sign) OR (!isset($this->signature_data['cert_type']))) { if ((!$this->sign) OR (!isset($this->signature_data['cert_type']))) {
return; return;
} }
$this->_newobj(); $oid = $this->_newobj();
$out = '<< /Type /Sig'; $out = '<< /Type /Sig';
$out .= ' /Filter /Adobe.PPKLite'; $out .= ' /Filter /Adobe.PPKLite';
$out .= ' /SubFilter /adbe.pkcs7.detached'; $out .= ' /SubFilter /adbe.pkcs7.detached';
@ -14405,16 +14401,16 @@ if (!class_exists('TCPDF', false)) {
$out .= ' >>'; $out .= ' >>';
$out .= ' ]'; // end of reference $out .= ' ]'; // end of reference
if (isset($this->signature_data['info']['Name']) AND !$this->empty_string($this->signature_data['info']['Name'])) { if (isset($this->signature_data['info']['Name']) AND !$this->empty_string($this->signature_data['info']['Name'])) {
$out .= ' /Name '.$this->_textstring($this->signature_data['info']['Name']); $out .= ' /Name '.$this->_textstring($this->signature_data['info']['Name'], $oid);
} }
if (isset($this->signature_data['info']['Location']) AND !$this->empty_string($this->signature_data['info']['Location'])) { if (isset($this->signature_data['info']['Location']) AND !$this->empty_string($this->signature_data['info']['Location'])) {
$out .= ' /Location '.$this->_textstring($this->signature_data['info']['Location']); $out .= ' /Location '.$this->_textstring($this->signature_data['info']['Location'], $oid);
} }
if (isset($this->signature_data['info']['Reason']) AND !$this->empty_string($this->signature_data['info']['Reason'])) { if (isset($this->signature_data['info']['Reason']) AND !$this->empty_string($this->signature_data['info']['Reason'])) {
$out .= ' /Reason '.$this->_textstring($this->signature_data['info']['Reason']); $out .= ' /Reason '.$this->_textstring($this->signature_data['info']['Reason'], $oid);
} }
if (isset($this->signature_data['info']['ContactInfo']) AND !$this->empty_string($this->signature_data['info']['ContactInfo'])) { if (isset($this->signature_data['info']['ContactInfo']) AND !$this->empty_string($this->signature_data['info']['ContactInfo'])) {
$out .= ' /ContactInfo '.$this->_textstring($this->signature_data['info']['ContactInfo']); $out .= ' /ContactInfo '.$this->_textstring($this->signature_data['info']['ContactInfo'], $oid);
} }
$out .= ' /M '.$this->_datestring(); $out .= ' /M '.$this->_datestring();
$out .= ' >>'; $out .= ' >>';
@ -14674,9 +14670,9 @@ if (!class_exists('TCPDF', false)) {
*/ */
protected function _putocg() { protected function _putocg() {
$this->n_ocg_print = $this->_newobj(); $this->n_ocg_print = $this->_newobj();
$this->_out('<< /Type /OCG /Name '.$this->_textstring('print').' /Usage << /Print <</PrintState /ON>> /View <</ViewState /OFF>> >> >>'."\n".'endobj'); $this->_out('<< /Type /OCG /Name '.$this->_textstring('print', $this->n_ocg_print).' /Usage << /Print <</PrintState /ON>> /View <</ViewState /OFF>> >> >>'."\n".'endobj');
$this->n_ocg_view = $this->_newobj(); $this->n_ocg_view = $this->_newobj();
$this->_out('<< /Type /OCG /Name '.$this->_textstring('view').' /Usage << /Print <</PrintState /OFF>> /View <</ViewState /ON>> >> >>'."\n".'endobj'); $this->_out('<< /Type /OCG /Name '.$this->_textstring('view', $this->n_ocg_view).' /Usage << /Print <</PrintState /OFF>> /View <</ViewState /ON>> >> >>'."\n".'endobj');
} }
/** /**
@ -16443,6 +16439,10 @@ if (!class_exists('TCPDF', false)) {
foreach ($matches as $key => $block) { foreach ($matches as $key => $block) {
// index 0 contains the CSS selector, index 1 contains CSS properties // index 0 contains the CSS selector, index 1 contains CSS properties
$cssblocks[$key] = explode('{', $block); $cssblocks[$key] = explode('{', $block);
if (!isset($cssblocks[$key][1])) {
// remove empty definitions
unset($cssblocks[$key]);
}
} }
// split groups of selectors (comma-separated list of selectors) // split groups of selectors (comma-separated list of selectors)
foreach ($cssblocks as $key => $block) { foreach ($cssblocks as $key => $block) {