32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-12-22 16:38:55 +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)
- Bug item #926 "test statement instead of assignment used in tcpdf_fonts.php" 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
Version: 6.0.082
Release date: 2014-05-23
Version: 6.0.083
Release date: 2014-05-29
Author: Nicola Asuni
Copyright (c) 2002-2014:

View File

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

View File

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

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 6.0.082
// Version : 6.0.083
// 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
// 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>
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 6.0.082
* @version 6.0.083
*/
// 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>
* @package com.tecnick.tcpdf
* @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
*/
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);
}
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) {
$n = 0.6;
$on = 0.6;
} 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;
} 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'])) {
$hbz = (($parent['fontsize'] / $this->k) * $this->cell_height_ratio);
} else {
@ -18704,6 +18704,25 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
// fix vertical space after table
$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
switch($tag['value']) {
@ -18760,7 +18779,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
} else {
$hrHeight = $this->GetLineWidth();
}
$this->addHTMLVertSpace($hbz, ($hrHeight / 2), $cell, $firsttag);
$this->addHTMLVertSpace($hbz, max($hb, ($hrHeight / 2)), $cell, $firsttag);
$x = $this->GetX();
$y = $this->GetY();
$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->Line($x, $y, $x + $hrWidth, $y);
$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;
}
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);
}
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) {
$n = 0.6;
$cn = 0.6;
} else {
$n = 1;
$cn = 1;
}
if ((!isset($this->tagvspaces[$tag['value']])) AND ($tag['value'] == 'div')) {
$hb = 0;
} else {
$hb = ($n * $pre_h);
$hb = ($cn * $pre_h);
}
if ($maxbottomliney > $this->PageBreakTrigger) {
$hbz = $this->getCellHeight($this->FontSize);