diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index bf521c6..754a088 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,7 @@ +5.9.066 (2011-04-09) + - A bug related to digital signature + encryption was fixed. + - A bug related to encryption + xobject templates was fixed. + 5.9.065 (2011-04-08) - Bug item #3280512 "Text encoding iso-8859-2 crashes" was fixed. diff --git a/README.TXT b/README.TXT index 584550a..d1b4c15 100755 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 5.9.065 -Release date: 2011-04-08 +Version: 5.9.066 +Release date: 2011-04-09 Author: Nicola Asuni Copyright (c) 2002-2011: diff --git a/tcpdf.php b/tcpdf.php index fad23fe..5c3f580 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 5.9.065 + * @version 5.9.066 */ // Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file. @@ -146,7 +146,7 @@ require_once(dirname(__FILE__).'/config/tcpdf_config.php'); * 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.
* @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 5.9.065 + * @version 5.9.066 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -157,7 +157,7 @@ class TCPDF { * Current TCPDF version. * @private */ - private $tcpdf_version = '5.9.065'; + private $tcpdf_version = '5.9.066'; // Protected properties @@ -10489,7 +10489,7 @@ class TCPDF { $out .= ' >>'; } $out .= ' >>'; - $stream = $this->_getrawstream($stream); + $stream = $this->_getrawstream($stream, $data['n']); $out .= ' /Length '.strlen($stream); $out .= ' >>'; $out .= ' stream'."\n".$stream."\n".'endstream'; @@ -15444,7 +15444,8 @@ class TCPDF { if ((!$this->sign) OR (!isset($this->signature_data['cert_type']))) { return; } - $out = $this->_getobj($this->sig_obj_id + 1)."\n"; + $sigobjid = ($this->sig_obj_id + 1); + $out = $this->_getobj($sigobjid)."\n"; $out .= '<< /Type /Sig'; $out .= ' /Filter /Adobe.PPKLite'; $out .= ' /SubFilter /adbe.pkcs7.detached'; @@ -15491,18 +15492,18 @@ class TCPDF { $out .= ' >>'; $out .= ' ]'; // end of reference 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'], $sigobjid); } 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'], $sigobjid); } 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'], $sigobjid); } 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'], $sigobjid); } - $out .= ' /M '.$this->_datestring(); + $out .= ' /M '.$this->_datestring($sigobjid); $out .= ' >>'; $out .= "\n".'endobj'; $this->_out($out);