From e89673a4493e5cac837c59540e452f356529c1e3 Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Fri, 8 Aug 2014 12:41:02 +0100 Subject: [PATCH] 6.0.090 (2014-08-08) - Starting from this version TCPDF is also available in GitHub at https://github.com/tecnickcom/TCPDF - Function getmypid() was removed for better compatibility with shared hosting environments. - Support for pulling SVG stroke opacity value from RGBa color was mergeg [adf006]. - Bug item #951 "HTML Table within TCPDF columns doesnt flow correctly on page break ..." was fixed. --- CHANGELOG.TXT | 6 ++++++ README.TXT | 4 ++-- composer.json | 4 ++-- include/tcpdf_static.php | 13 ++++++------- tcpdf.php | 34 ++++++++++++++++++++++++---------- 5 files changed, 40 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 8511182..ac171c1 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,9 @@ +6.0.090 (2014-08-08) + - Starting from this version TCPDF is also available in GitHub at https://github.com/tecnickcom/TCPDF + - Function getmypid() was removed for better compatibility with shared hosting environments. + - Support for pulling SVG stroke opacity value from RGBa color was mergeg [adf006]. + - Bug item #951 "HTML Table within TCPDF columns doesnt flow correctly on page break ..." was fixed. + 6.0.089 (2014-07-16) - Bug item #948 "bottom line of rowspan cell not work correctly" was fixed. diff --git a/README.TXT b/README.TXT index fd73686..183039d 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.089 -Release date: 2014-07-16 +Version: 6.0.090 +Release date: 2014-08-08 Author: Nicola Asuni Copyright (c) 2002-2014: diff --git a/composer.json b/composer.json index b6bab5e..c6cec5a 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,9 @@ { "name": "tecnick.com/tcpdf", - "version": "6.0.089", + "version": "6.0.090", "homepage": "http://www.tcpdf.org/", "type": "library", - "description": "TCPDF is a PHP class for generating PDF documents.", + "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", "keywords": ["PDF","tcpdf","PDFD32000-2008","qrcode","datamatrix","pdf417","barcodes"], "license": "LGPLv3", "authors": [ diff --git a/include/tcpdf_static.php b/include/tcpdf_static.php index 4fe0bdd..a43c517 100644 --- a/include/tcpdf_static.php +++ b/include/tcpdf_static.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 1.0.002 + * @version 1.0.003 */ /** @@ -46,7 +46,7 @@ * Static methods used by the TCPDF class. * @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 1.0.002 + * @version 1.0.003 * @author Nicola Asuni - info@tecnick.com */ class TCPDF_STATIC { @@ -55,7 +55,7 @@ class TCPDF_STATIC { * Current TCPDF version. * @private static */ - private static $tcpdf_version = '6.0.089'; + private static $tcpdf_version = '6.0.090'; /** * String alias for total number of pages. @@ -1098,7 +1098,7 @@ class TCPDF_STATIC { * @public static */ public static function getObjFilename($type='tmp') { - return tempnam(K_PATH_CACHE, '__tcpdf_'.$type.'_'.md5(getmypid().uniqid('', true).rand().microtime(true)).'_'); + return tempnam(K_PATH_CACHE, '__tcpdf_'.$type.'_'.md5(uniqid('', true).rand().microtime(true)).'_'); } /** @@ -1358,7 +1358,6 @@ class TCPDF_STATIC { } $seed .= uniqid('', true); $seed .= rand(); - $seed .= getmypid(); $seed .= __FILE__; if (isset($_SERVER['REMOTE_ADDR'])) { $seed .= $_SERVER['REMOTE_ADDR']; diff --git a/tcpdf.php b/tcpdf.php index 34ff299..513248e 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.0.089 + * @version 6.0.090 */ // 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.089 + * @version 6.0.090 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -1291,14 +1291,14 @@ class TCPDF { /** * Boolean flag to enable document timestamping with TSA. * @protected - * @since 6.0.089 (2014-06-19) + * @since 6.0.085 (2014-06-19) */ protected $tsa_timestamp = false; /** * Timestamping data. * @protected - * @since 6.0.089 (2014-06-19) + * @since 6.0.085 (2014-06-19) */ protected $tsa_data = array(); @@ -13631,7 +13631,7 @@ class TCPDF { * @param $tsa_cert (string) Specifies the location of TSA certificate for authorization (optional for cURL) * @public * @author Richard Stockinger - * @since 6.0.089 (2014-06-16) + * @since 6.0.090 (2014-06-16) */ public function setTimeStamp($tsa_host='', $tsa_username='', $tsa_password='', $tsa_cert='') { $this->tsa_data = array(); @@ -13659,7 +13659,7 @@ class TCPDF { * @return (string) Timestamped digital signature * @protected * @author Richard Stockinger - * @since 6.0.089 (2014-06-16) + * @since 6.0.090 (2014-06-16) */ protected function applyTSA($signature) { if (!$this->tsa_timestamp) { @@ -19523,11 +19523,22 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } } } + $prev_page = $this->page; $this->setPage($dom[($dom[$key]['parent'])]['endpage']); if ($this->num_columns > 1) { - $this->selectColumn($dom[($dom[$key]['parent'])]['endcolumn']); + if ((($this->current_column == 0) AND ($dom[($dom[$key]['parent'])]['endcolumn'] == ($this->num_columns - 1))) + OR (($this->current_column == $dom[($dom[$key]['parent'])]['endcolumn']) AND ($prev_page < $this->page))) { + // page jump + $this->selectColumn(0); + $dom[($dom[$key]['parent'])]['endcolumn'] = 0; + $dom[($dom[$key]['parent'])]['endy'] = $this->y; + } else { + $this->selectColumn($dom[($dom[$key]['parent'])]['endcolumn']); + $this->y = $dom[($dom[$key]['parent'])]['endy']; + } + } else { + $this->y = $dom[($dom[$key]['parent'])]['endy']; } - $this->y = $dom[($dom[$key]['parent'])]['endy']; if (isset($dom[$table_el]['attribute']['cellspacing'])) { $this->y += $this->getHTMLUnitToUnits($dom[$table_el]['attribute']['cellspacing'], 1, 'px'); } elseif (isset($dom[$table_el]['border-spacing'])) { @@ -22371,6 +22382,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: // find first valid font name foreach ($fontslist as $font) { // replace font variations + $font = preg_replace('/regular$/', '', $font); $font = preg_replace('/italic$/', 'I', $font); $font = preg_replace('/oblique$/', 'I', $font); $font = preg_replace('/bold([I]?)$/', 'B\\1', $font); @@ -23376,6 +23388,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: if ($svgstyle['stroke'] != 'none') { if ($svgstyle['stroke-opacity'] != 1) { $this->setAlpha($svgstyle['stroke-opacity'], 'Normal', $this->alpha['ca'], false); + } elseif (preg_match('/rgba\(\d+%?,\s*\d+%?,\s*\d+%?,\s*(\d+(?:\.\d+)?)\)/i', $svgstyle['stroke'], $rgba_matches)) { + $this->setAlpha($rgba_matches[1], 'Normal', $this->alpha['ca'], false); } $stroke_style = array( 'color' => TCPDF_COLORS::convertHTMLColorToDec($svgstyle['stroke'], $this->spot_colors),