diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 6d180ce..e850afe 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,5 +1,8 @@ -6.0.074 (2014-05-03) +6.0.075 (2014-05-05) - Bug #917 "Using realtive Units like ex or em for images distort output in HTML mode" was fixed. + +6.0.074 (2014-05-03) + - Part of Bug #917 "Using realtive Units like ex or em for images distort output in HTML mode" was fixed. - Bug #915 "Problem with SVG Image using Radial Gradients" was fixed. 6.0.073 (2014-04-29) diff --git a/README.TXT b/README.TXT index 859d940..1bae619 100644 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 6.0.074 -Release date: 2014-05-03 +Version: 6.0.075 +Release date: 2014-05-05 Author: Nicola Asuni Copyright (c) 2002-2014: diff --git a/composer.json b/composer.json index b1decd6..13d7cca 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "tecnick.com/tcpdf", - "version": "6.0.074", + "version": "6.0.075", "homepage": "http://www.tcpdf.org/", "type": "library", "description": "TCPDF is a PHP class for generating PDF documents.", diff --git a/include/tcpdf_static.php b/include/tcpdf_static.php index 018e901..7ae5121 100644 --- a/include/tcpdf_static.php +++ b/include/tcpdf_static.php @@ -55,7 +55,7 @@ class TCPDF_STATIC { * Current TCPDF version. * @private static */ - private static $tcpdf_version = '6.0.074'; + private static $tcpdf_version = '6.0.075'; /** * String alias for total number of pages. diff --git a/tcpdf.php b/tcpdf.php index 1be17e3..23f4544 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.0.074 + * @version 6.0.075 */ // 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.
* @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 6.0.074 + * @version 6.0.075 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -17295,10 +17295,10 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: // vertically align image in line if ((!$this->newline) AND ($dom[$key]['value'] == 'img') AND (isset($dom[$key]['height'])) AND ($dom[$key]['height'] > 0)) { // get image height - $imgh = $this->getHTMLUnitToUnits($dom[$key]['height'], 1, 'px'); + $imgh = $this->getHTMLUnitToUnits($dom[$key]['height'], ($dom[$key]['fontsize'] / $this->k), 'px'); $autolinebreak = false; if (!empty($dom[$key]['width'])) { - $imgw = $this->getHTMLUnitToUnits($dom[$key]['width'], 1, 'px', false); + $imgw = $this->getHTMLUnitToUnits($dom[$key]['width'], ($dom[$key]['fontsize'] / $this->k), 'px', false); if (($imgw <= ($this->w - $this->lMargin - $this->rMargin - $this->cell_padding['L'] - $this->cell_padding['R'])) AND ((($this->rtl) AND (($this->x - $imgw) < ($this->lMargin + $this->cell_padding['L']))) OR ((!$this->rtl) AND (($this->x + $imgw) > ($this->w - $this->rMargin - $this->cell_padding['R']))))) { @@ -17364,7 +17364,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $startliney = $this->y; $this->newline = false; } - $this->y += ($this->getCellHeight($curfontsize / $this->k) - ($curfontdescent * $this->cell_height_ratio) - $imgh); + $this->y += ($this->getCellHeight($curfontsize / $this->k) - ($curfontdescent * $this->cell_height_ratio) - $imgh); // DEBUG $minstartliney = min($this->y, $minstartliney); $maxbottomliney = ($startliney + $this->getCellHeight($curfontsize / $this->k)); } @@ -18806,11 +18806,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } $iw = ''; if (isset($tag['width'])) { - $iw = $this->getHTMLUnitToUnits($tag['width'], 1, 'px', false); + $iw = $this->getHTMLUnitToUnits($tag['width'], ($tag['fontsize'] / $this->k), 'px', false); } $ih = ''; if (isset($tag['height'])) { - $ih = $this->getHTMLUnitToUnits($tag['height'], 1, 'px', false); + $ih = $this->getHTMLUnitToUnits($tag['height'], ($tag['fontsize'] / $this->k), 'px', false); } if (($type == 'eps') OR ($type == 'ai')) { $this->ImageEps($tag['attribute']['src'], $xpos, $this->y, $iw, $ih, $imglink, true, $align, '', $border, true); @@ -18825,11 +18825,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: break; } case 'M': { - $this->y = (($this->img_rb_y + $prevy - ($tag['fontsize'] / $this->k)) / 2) ; + $this->y = (($this->img_rb_y + $prevy - ($this->getCellHeight($tag['fontsize'] / $this->k))) / 2); break; } case 'B': { - $this->y = $this->img_rb_y - ($tag['fontsize'] / $this->k); + $this->y = $this->img_rb_y - ($this->getCellHeight($tag['fontsize'] / $this->k) - ($this->getFontDescent($tag['fontname'], $tag['fontstyle'], $tag['fontsize']) * $this->cell_height_ratio)); break; } }