32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-11-26 14:26:28 +00:00
This commit is contained in:
nicolaasuni 2011-01-12 21:14:40 +01:00
parent 17f61f4530
commit 18c1a2405f
3 changed files with 85 additions and 67 deletions

View File

@ -1,3 +1,6 @@
5.9.040 (2011-01-12)
- A bug related to empty pages after table was fixed.
5.9.039 (2011-01-12) 5.9.039 (2011-01-12)
- Bug item #3155759 "openssl_random_pseudo_bytes() slow under Windows" was fixed. - Bug item #3155759 "openssl_random_pseudo_bytes() slow under Windows" was fixed.

View File

@ -8,7 +8,7 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 5.9.039 Version: 5.9.040
Release date: 2011-01-12 Release date: 2011-01-12
Author: Nicola Asuni Author: Nicola Asuni

View File

@ -1,7 +1,7 @@
<?php <?php
//============================================================+ //============================================================+
// File name : tcpdf.php // File name : tcpdf.php
// Version : 5.9.039 // Version : 5.9.040
// Begin : 2002-08-03 // Begin : 2002-08-03
// Last Update : 2011-01-12 // Last Update : 2011-01-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
@ -134,7 +134,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p> * Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @author Nicola Asuni * @author Nicola Asuni
* @version 5.9.039 * @version 5.9.040
*/ */
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file. // 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.<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>
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions. * @brief PHP class for generating PDF documents without requiring external extensions.
* @version 5.9.039 * @version 5.9.040
* @author Nicola Asuni - info@tecnick.com * @author Nicola Asuni - info@tecnick.com
*/ */
class TCPDF { class TCPDF {
@ -157,7 +157,7 @@ class TCPDF {
* Current TCPDF version. * Current TCPDF version.
* @private * @private
*/ */
private $tcpdf_version = '5.9.039'; private $tcpdf_version = '5.9.040';
// Protected properties // Protected properties
@ -10761,6 +10761,9 @@ class TCPDF {
$this->_out('0 '.($this->n + 1)); $this->_out('0 '.($this->n + 1));
$this->_out('0000000000 65535 f '); $this->_out('0000000000 65535 f ');
for ($i=1; $i <= $this->n; ++$i) { for ($i=1; $i <= $this->n; ++$i) {
if (!isset($this->offsets[$i]) AND ($i > 1)) {
$this->offsets[$i] = $this->offsets[($i - 1)];
}
$this->_out(sprintf('%010d 00000 n ', $this->offsets[$i])); $this->_out(sprintf('%010d 00000 n ', $this->offsets[$i]));
} }
// TRAILER // TRAILER
@ -21511,10 +21514,20 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$this->cell_padding = $table_el['old_cell_padding']; $this->cell_padding = $table_el['old_cell_padding'];
// reset row height // reset row height
$this->resetLastH(); $this->resetLastH();
if (($this->page == ($this->numpages - 1)) AND ($this->pageopen[$this->numpages]) AND ($this->emptypagemrk[$this->numpages] == $this->pagelen[$this->numpages])) { if (($this->page == ($this->numpages - 1)) AND ($this->pageopen[$this->numpages])) {
$plendiff = ($this->pagelen[$this->numpages] - $this->emptypagemrk[$this->numpages]);
if (($plendiff > 0) AND ($plendiff < 60)) {
$pagediff = substr($this->getPageBuffer($this->numpages), $this->emptypagemrk[$this->numpages], $plendiff);
if (substr($pagediff, 0, 5) == 'BT /F') {
// the difference is only a font setting
$plendiff = 0;
}
}
if ($plendiff == 0) {
// remove last blank page // remove last blank page
$this->deletePage($this->numpages); $this->deletePage($this->numpages);
} }
}
if (isset($this->theadMargins['top'])) { if (isset($this->theadMargins['top'])) {
// restore top margin // restore top margin
$this->tMargin = $this->theadMargins['top']; $this->tMargin = $this->theadMargins['top'];
@ -22924,6 +22937,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
if (isset($this->pageopen[$page])) { if (isset($this->pageopen[$page])) {
unset($this->pageopen[$page]); unset($this->pageopen[$page]);
} }
if ($page < $this->numpages) {
// update remaining pages // update remaining pages
for ($i = $page; $i < $this->numpages; ++$i) { for ($i = $page; $i < $this->numpages; ++$i) {
$j = $i + 1; $j = $i + 1;
@ -22990,6 +23004,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
if (isset($this->pageopen[$this->numpages])) { if (isset($this->pageopen[$this->numpages])) {
unset($this->pageopen[$this->numpages]); unset($this->pageopen[$this->numpages]);
} }
}
--$this->numpages; --$this->numpages;
$this->page = $this->numpages; $this->page = $this->numpages;
// adjust outlines // adjust outlines