32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-11-25 05:57:32 +00:00

6.0.083 (2014-05-29)

- Bug item #928 "setHtmlVSpace with HR element" was fixed.
This commit is contained in:
nicolaasuni 2014-05-29 19:28:56 +01:00
parent 74c0f6e765
commit d6a2206ab3
5 changed files with 42 additions and 20 deletions

View File

@ -1,3 +1,6 @@
6.0.083 (2014-05-29)
- Bug item #928 "setHtmlVSpace with HR element" was fixed.
6.0.082 (2014-05-23) 6.0.082 (2014-05-23)
- Bug item #926 "test statement instead of assignment used in tcpdf_fonts.php" was fixed. - Bug item #926 "test statement instead of assignment used in tcpdf_fonts.php" was fixed.
- Bug item #925 "924 transparent images bug" was fixed. - Bug item #925 "924 transparent images bug" was fixed.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 6.0.082 Version: 6.0.083
Release date: 2014-05-23 Release date: 2014-05-29
Author: Nicola Asuni Author: Nicola Asuni
Copyright (c) 2002-2014: Copyright (c) 2002-2014:

View File

@ -1,6 +1,6 @@
{ {
"name": "tecnick.com/tcpdf", "name": "tecnick.com/tcpdf",
"version": "6.0.082", "version": "6.0.083",
"homepage": "http://www.tcpdf.org/", "homepage": "http://www.tcpdf.org/",
"type": "library", "type": "library",
"description": "TCPDF is a PHP class for generating PDF documents.", "description": "TCPDF is a PHP class for generating PDF documents.",

View File

@ -55,7 +55,7 @@ class TCPDF_STATIC {
* Current TCPDF version. * Current TCPDF version.
* @private static * @private static
*/ */
private static $tcpdf_version = '6.0.082'; private static $tcpdf_version = '6.0.083';
/** /**
* String alias for total number of pages. * String alias for total number of pages.

View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : tcpdf.php // File name : tcpdf.php
// Version : 6.0.082 // Version : 6.0.083
// Begin : 2002-08-03 // Begin : 2002-08-03
// Last Update : 2014-05-23 // Last Update : 2014-05-29
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com // Author : Nicola Asuni - Tecnick.com LTD - 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)
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -104,7 +104,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 6.0.082 * @version 6.0.083
*/ */
// TCPDF configuration // TCPDF configuration
@ -128,7 +128,7 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.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 6.0.082 * @version 6.0.083
* @author Nicola Asuni - info@tecnick.com * @author Nicola Asuni - info@tecnick.com
*/ */
class TCPDF { class TCPDF {
@ -18682,18 +18682,18 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$cur_h = $this->getCellHeight($this->FontSize); $cur_h = $this->getCellHeight($this->FontSize);
} }
if (isset($this->tagvspaces[$tag['value']][0]['n'])) { if (isset($this->tagvspaces[$tag['value']][0]['n'])) {
$n = $this->tagvspaces[$tag['value']][0]['n']; $on = $this->tagvspaces[$tag['value']][0]['n'];
} elseif (preg_match('/[h][0-9]/', $tag['value']) > 0) { } elseif (preg_match('/[h][0-9]/', $tag['value']) > 0) {
$n = 0.6; $on = 0.6;
} else { } else {
$n = 1; $on = 1;
} }
if ((!isset($this->tagvspaces[$tag['value']])) AND (in_array($tag['value'], array('div', 'dt', 'dd', 'li', 'br')))) { if ((!isset($this->tagvspaces[$tag['value']])) AND (in_array($tag['value'], array('div', 'dt', 'dd', 'li', 'br', 'hr')))) {
$hb = 0; $hb = 0;
} else { } else {
$hb = ($n * $cur_h); $hb = ($on * $cur_h);
} }
if (($this->htmlvspace <= 0) AND ($n > 0)) { if (($this->htmlvspace <= 0) AND ($on > 0)) {
if (isset($parent['fontsize'])) { if (isset($parent['fontsize'])) {
$hbz = (($parent['fontsize'] / $this->k) * $this->cell_height_ratio); $hbz = (($parent['fontsize'] / $this->k) * $this->cell_height_ratio);
} else { } else {
@ -18704,6 +18704,25 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
// fix vertical space after table // fix vertical space after table
$hbz = 0; $hbz = 0;
} }
// closing vertical space
$hbc = 0;
if (isset($this->tagvspaces[$tag['value']][1]['h']) AND ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) {
$pre_h = $this->tagvspaces[$tag['value']][1]['h'];
} elseif (isset($parent['fontsize'])) {
$pre_h = $this->getCellHeight($parent['fontsize'] / $this->k);
} else {
$pre_h = $this->getCellHeight($this->FontSize);
}
if (isset($this->tagvspaces[$tag['value']][1]['n'])) {
$cn = $this->tagvspaces[$tag['value']][1]['n'];
} elseif (preg_match('/[h][0-9]/', $tag['value']) > 0) {
$cn = 0.6;
} else {
$cn = 1;
}
if (isset($this->tagvspaces[$tag['value']][1])) {
$hbc = ($cn * $pre_h);
}
} }
// Opening tag // Opening tag
switch($tag['value']) { switch($tag['value']) {
@ -18760,7 +18779,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
} else { } else {
$hrHeight = $this->GetLineWidth(); $hrHeight = $this->GetLineWidth();
} }
$this->addHTMLVertSpace($hbz, ($hrHeight / 2), $cell, $firsttag); $this->addHTMLVertSpace($hbz, max($hb, ($hrHeight / 2)), $cell, $firsttag);
$x = $this->GetX(); $x = $this->GetX();
$y = $this->GetY(); $y = $this->GetY();
$wtmp = $this->w - $this->lMargin - $this->rMargin; $wtmp = $this->w - $this->lMargin - $this->rMargin;
@ -18776,7 +18795,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$this->SetLineWidth($hrHeight); $this->SetLineWidth($hrHeight);
$this->Line($x, $y, $x + $hrWidth, $y); $this->Line($x, $y, $x + $hrWidth, $y);
$this->SetLineWidth($prevlinewidth); $this->SetLineWidth($prevlinewidth);
$this->addHTMLVertSpace(($hrHeight / 2), 0, $cell, !isset($dom[($key + 1)])); $this->addHTMLVertSpace(max($hbc, ($hrHeight / 2)), 0, $cell, !isset($dom[($key + 1)]));
break; break;
} }
case 'a': { case 'a': {
@ -19334,16 +19353,16 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$pre_h = $this->getCellHeight($this->FontSize); $pre_h = $this->getCellHeight($this->FontSize);
} }
if (isset($this->tagvspaces[$tag['value']][1]['n'])) { if (isset($this->tagvspaces[$tag['value']][1]['n'])) {
$n = $this->tagvspaces[$tag['value']][1]['n']; $cn = $this->tagvspaces[$tag['value']][1]['n'];
} elseif (preg_match('/[h][0-9]/', $tag['value']) > 0) { } elseif (preg_match('/[h][0-9]/', $tag['value']) > 0) {
$n = 0.6; $cn = 0.6;
} else { } else {
$n = 1; $cn = 1;
} }
if ((!isset($this->tagvspaces[$tag['value']])) AND ($tag['value'] == 'div')) { if ((!isset($this->tagvspaces[$tag['value']])) AND ($tag['value'] == 'div')) {
$hb = 0; $hb = 0;
} else { } else {
$hb = ($n * $pre_h); $hb = ($cn * $pre_h);
} }
if ($maxbottomliney > $this->PageBreakTrigger) { if ($maxbottomliney > $this->PageBreakTrigger) {
$hbz = $this->getCellHeight($this->FontSize); $hbz = $this->getCellHeight($this->FontSize);