From 594b05ec61069fa65c32b8f12238ee51e68ba7df Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Fri, 17 Apr 2009 16:18:26 +0200 Subject: [PATCH] 4.6.001 --- CHANGELOG.TXT | 4 + README.TXT | 4 +- doc/classtrees_com-tecnick-tcpdf.html | 2 +- doc/com-tecnick-tcpdf/TCPDF.html | 78 +++++++++---------- doc/com-tecnick-tcpdf/TCPDFBarcode.html | 2 +- doc/com-tecnick-tcpdf/_barcodes.php.html | 2 +- .../_config---tcpdf_config.php.html | 2 +- doc/com-tecnick-tcpdf/_htmlcolors.php.html | 2 +- doc/com-tecnick-tcpdf/_tcpdf.php.html | 6 +- doc/com-tecnick-tcpdf/_unicode_data.php.html | 2 +- doc/elementindex.html | 2 +- doc/elementindex_com-tecnick-tcpdf.html | 2 +- doc/errors.html | 2 +- doc/index.html | 2 +- doc/li_com-tecnick-tcpdf.html | 2 +- tcpdf.php | 42 ++++------ 16 files changed, 76 insertions(+), 80 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 8c9b9c3..99a2674 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,7 @@ +4.6.001 (2009-04-17) + - Spaces between HTML block tags are now automatically removed. + - The bug related to cMargin changes between tables was fixed. + 4.6.000 (2009-04-16) - WARNING: THIS VERSION CHANGES THE BEHAVIOUR OF $x and $y parameters for several TCPDF methods: zero coordinates for $x and $y are now valid coordinates; diff --git a/README.TXT b/README.TXT index 9a9d0a0..427073f 100755 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 4.6.000 -Release date: 2009-04-16 +Version: 4.6.001 +Release date: 2009-04-17 Author: Nicola Asuni Copyright (c) 2001-2009: diff --git a/doc/classtrees_com-tecnick-tcpdf.html b/doc/classtrees_com-tecnick-tcpdf.html index 7dffe11..a12a42d 100644 --- a/doc/classtrees_com-tecnick-tcpdf.html +++ b/doc/classtrees_com-tecnick-tcpdf.html @@ -45,7 +45,7 @@

- Documentation generated on Thu, 16 Apr 2009 18:13:27 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:13 +0200 by phpDocumentor 1.4.1
diff --git a/doc/com-tecnick-tcpdf/TCPDF.html b/doc/com-tecnick-tcpdf/TCPDF.html index b400720..c178add 100644 --- a/doc/com-tecnick-tcpdf/TCPDF.html +++ b/doc/com-tecnick-tcpdf/TCPDF.html @@ -74,7 +74,7 @@ Source Location: /tcpdf.php

Version:

@@ -581,7 +581,7 @@ This is a PHP class for generating PDF documents without requiring external exte author:  Nicola Asuni - info@tecnick.com - version:  4.6.000 + version:  4.6.001 link:  http://www.tcpdf.org @@ -5397,7 +5397,7 @@ $style = -1])
-

method addHTMLVertSpace [line 12477]

+

method addHTMLVertSpace [line 12469]

@@ -5608,7 +5608,7 @@ $k)
-

method addTOC [line 13359]

+

method addTOC [line 13351]

@@ -6398,7 +6398,7 @@ $h)
-

method closeHTMLTagHandler [line 12153]

+

method closeHTMLTagHandler [line 12145]

@@ -6512,7 +6512,7 @@ $prop = array()])
-

method commitTransaction [line 13516]

+

method commitTransaction [line 13508]

@@ -6900,7 +6900,7 @@ $afinish:)
-

method empty_string [line 13562]

+

method empty_string [line 13554]

@@ -7404,7 +7404,7 @@ $pagenum = ''])
-

method getBuffer [line 13042]

+

method getBuffer [line 13034]

@@ -7601,7 +7601,7 @@ $char)
-

method getFontBuffer [line 13202]

+

method getFontBuffer [line 13194]

@@ -7890,7 +7890,7 @@ $v)
-

method getGraphicVars [line 12910]

+

method getGraphicVars [line 12902]

@@ -8100,7 +8100,7 @@ $html)
-

method getHTMLUnitToUnits [line 12632]

+

method getHTMLUnitToUnits [line 12624]

@@ -8166,7 +8166,7 @@ $point)
-

method getImageBuffer [line 13144]

+

method getImageBuffer [line 13136]

@@ -8512,7 +8512,7 @@ $w = 0])
-

method getObjFilename [line 12974]

+

method getObjFilename [line 12966]

@@ -8622,7 +8622,7 @@ $prefix)
-

method getPageBuffer [line 13085]

+

method getPageBuffer [line 13077]

@@ -9537,7 +9537,7 @@ $script)
-

method intToRoman [line 12703]

+

method intToRoman [line 12695]

@@ -10131,7 +10131,7 @@ $y = ''])
-

method movePage [line 13220]

+

method movePage [line 13212]

@@ -10305,7 +10305,7 @@ $maxh = 0])
-

method objclone [line 13551]

+

method objclone [line 13543]

@@ -10378,7 +10378,7 @@ $object)
-

method openHTMLTagHandler [line 11835]

+

method openHTMLTagHandler [line 11827]

@@ -10815,7 +10815,7 @@ $fill_color = array()])
-

method putHtmlListBullet [line 12768]

+

method putHtmlListBullet [line 12760]

@@ -10992,7 +10992,7 @@ $prop = array()])
-

method readDiskCache [line 13014]

+

method readDiskCache [line 13006]

@@ -11322,7 +11322,7 @@ $length)
-

method rollbackTransaction [line 13529]

+

method rollbackTransaction [line 13521]

@@ -11892,7 +11892,7 @@ $bc = ''])
-

method SetBooklet [line 12546]

+

method SetBooklet [line 12538]

@@ -11943,7 +11943,7 @@ $outer = -1])
-

method setBuffer [line 13024]

+

method setBuffer [line 13016]

@@ -12663,7 +12663,7 @@ $fontfile = ''])
-

method setFontBuffer [line 13160]

+

method setFontBuffer [line 13152]

@@ -12750,7 +12750,7 @@ $size)
-

method setFontSubBuffer [line 13182]

+

method setFontSubBuffer [line 13174]

@@ -12904,7 +12904,7 @@ $fm = 10])
-

method setGraphicVars [line 12941]

+

method setGraphicVars [line 12933]

@@ -13100,7 +13100,7 @@ $hm = 10])
-

method setHtmlLinksStyle [line 12617]

+

method setHtmlLinksStyle [line 12609]

@@ -13145,7 +13145,7 @@ $fontstyle = 'U'])
-

method setHtmlVSpace [line 12586]

+

method setHtmlVSpace [line 12578]

@@ -13184,7 +13184,7 @@ $tagvs)
-

method setImageBuffer [line 13101]

+

method setImageBuffer [line 13093]

@@ -13271,7 +13271,7 @@ $scale)
-

method setImageSubBuffer [line 13124]

+

method setImageSubBuffer [line 13116]

@@ -13665,7 +13665,7 @@ $page = -1])
-

method setListIndentWidth [line 12596]

+

method setListIndentWidth [line 12588]

', $html); - $html = preg_replace('/[\s]*[\s]*/', '', $html); - $html = preg_replace('/[\s]*', $html); + $html = preg_replace('/[\s]+<\/(table|tr|td|th|ul|ol|li)>/', '', $html); + $html = preg_replace('/[\s]+<(tr|td|th|ul|ol|li|br)/', '<\\1', $html); + $html = preg_replace('/<\/(table|tr|td|th|blockquote|dd|div|dt|h1|h2|h3|h4|h5|h6|hr|li|ol|p|ul)>[\s]+<', $html); + $html = preg_replace('/<\/(td|th)>/', '', $html); $html = preg_replace('/<\/table>([\s]*)/', '
@@ -13704,7 +13704,7 @@ $width)
-

method setLIsymbol [line 12506]

+

method setLIsymbol [line 12498]

diff --git a/tcpdf.php b/tcpdf.php index f32d297..8b321e1 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -2,9 +2,9 @@ //============================================================+ // File name : tcpdf.php // Begin : 2002-08-03 -// Last Update : 2009-04-16 +// Last Update : 2009-04-17 // Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org -// Version : 4.6.000 +// Version : 4.6.001 // License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html) // ---------------------------------------------------------------------------- // Copyright (C) 2002-2009 Nicola Asuni - Tecnick.com S.r.l. @@ -122,7 +122,7 @@ * @copyright 2002-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com * @link http://www.tcpdf.org * @license http://www.gnu.org/copyleft/lesser.html LGPL - * @version 4.6.000 + * @version 4.6.001 */ /** @@ -146,14 +146,14 @@ if (!class_exists('TCPDF', false)) { /** * define default PDF document producer */ - define('PDF_PRODUCER', 'TCPDF 4.6.000 (http://www.tcpdf.org)'); + define('PDF_PRODUCER', 'TCPDF 4.6.001 (http://www.tcpdf.org)'); /** * This is a PHP class for generating PDF documents without requiring external extensions.
* 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.
* @name TCPDF * @package com.tecnick.tcpdf - * @version 4.6.000 + * @version 4.6.001 * @author Nicola Asuni - info@tecnick.com * @link http://www.tcpdf.org * @license http://www.gnu.org/copyleft/lesser.html LGPL @@ -10610,7 +10610,7 @@ if (!class_exists('TCPDF', false)) { */ protected function getHtmlDomArray($html) { // remove all unsupported tags (the line below lists all supported tags) - $html = strip_tags($html, '



  • diff --git a/doc/li_com-tecnick-tcpdf.html b/doc/li_com-tecnick-tcpdf.html index bd45a77..ddacc87 100644 --- a/doc/li_com-tecnick-tcpdf.html +++ b/doc/li_com-tecnick-tcpdf.html @@ -58,7 +58,7 @@ This documentation was generated by phpDocumentor v1.4.1

    - Documentation generated on Thu, 16 Apr 2009 18:13:27 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:13 +0200 by phpDocumentor 1.4.1
    @@ -13797,7 +13797,7 @@ $right = -1])
    -

    method setOpenCell [line 12606]

    +

    method setOpenCell [line 12598]

    diff --git a/doc/index.html b/doc/index.html index bd45a77..ddacc87 100644 --- a/doc/index.html +++ b/doc/index.html @@ -58,7 +58,7 @@ This documentation was generated by phpDocumentor v1.4.1

    - Documentation generated on Thu, 16 Apr 2009 18:13:27 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:13 +0200 by phpDocumentor 1.4.1
    diff --git a/doc/errors.html b/doc/errors.html index 263a8b8..bedc833 100644 --- a/doc/errors.html +++ b/doc/errors.html @@ -35,7 +35,7 @@ Post-parsing

    - Documentation generated on Thu, 16 Apr 2009 18:13:32 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:19 +0200 by phpDocumentor 1.4.1
    @@ -13884,7 +13884,7 @@ $resetmargins = false])
    -

    method setPageBuffer [line 13058]

    +

    method setPageBuffer [line 13050]

    diff --git a/doc/elementindex_com-tecnick-tcpdf.html b/doc/elementindex_com-tecnick-tcpdf.html index a21c754..0e4dffb 100644 --- a/doc/elementindex_com-tecnick-tcpdf.html +++ b/doc/elementindex_com-tecnick-tcpdf.html @@ -1373,7 +1373,7 @@ top

    - Documentation generated on Thu, 16 Apr 2009 18:13:26 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:13 +0200 by phpDocumentor 1.4.1
    diff --git a/doc/elementindex.html b/doc/elementindex.html index bc2b817..8858da3 100644 --- a/doc/elementindex.html +++ b/doc/elementindex.html @@ -1350,7 +1350,7 @@ top

    - Documentation generated on Thu, 16 Apr 2009 18:13:26 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:13 +0200 by phpDocumentor 1.4.1
    @@ -15336,7 +15336,7 @@ $page = ''])
    -

    method startTransaction [line 13502]

    +

    method startTransaction [line 13494]

    diff --git a/doc/com-tecnick-tcpdf/_unicode_data.php.html b/doc/com-tecnick-tcpdf/_unicode_data.php.html index 4b51d0a..4b34377 100644 --- a/doc/com-tecnick-tcpdf/_unicode_data.php.html +++ b/doc/com-tecnick-tcpdf/_unicode_data.php.html @@ -237,7 +237,7 @@ Unicode Include file for TCPDF.




    - Documentation generated on Thu, 16 Apr 2009 18:13:32 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:19 +0200 by phpDocumentor 1.4.1
    @@ -15426,7 +15426,7 @@ $page = ''])
    -

    method swapMargins [line 12562]

    +

    method swapMargins [line 12554]

    diff --git a/doc/com-tecnick-tcpdf/_tcpdf.php.html b/doc/com-tecnick-tcpdf/_tcpdf.php.html index e3beef8..64d455c 100644 --- a/doc/com-tecnick-tcpdf/_tcpdf.php.html +++ b/doc/com-tecnick-tcpdf/_tcpdf.php.html @@ -73,7 +73,7 @@ This is a PHP class for generating PDF documents without requiring external exte - + @@ -104,7 +104,7 @@ unicode data

    diff --git a/doc/com-tecnick-tcpdf/_htmlcolors.php.html b/doc/com-tecnick-tcpdf/_htmlcolors.php.html index 1312be4..b848eb4 100644 --- a/doc/com-tecnick-tcpdf/_htmlcolors.php.html +++ b/doc/com-tecnick-tcpdf/_htmlcolors.php.html @@ -88,7 +88,7 @@ Array of WEB safe colors.




    - Documentation generated on Thu, 16 Apr 2009 18:13:27 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:14 +0200 by phpDocumentor 1.4.1
    @@ -16620,7 +16620,7 @@ $code)
    -

    method writeDiskCache [line 12986]

    +

    method writeDiskCache [line 12978]

    diff --git a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html index 6ab25e6..cd33c1f 100644 --- a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html +++ b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html @@ -507,7 +507,7 @@ Configuration file for TCPDF.




    - Documentation generated on Thu, 16 Apr 2009 18:13:32 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:19 +0200 by phpDocumentor 1.4.1
    diff --git a/doc/com-tecnick-tcpdf/_barcodes.php.html b/doc/com-tecnick-tcpdf/_barcodes.php.html index c96f5cf..3844753 100644 --- a/doc/com-tecnick-tcpdf/_barcodes.php.html +++ b/doc/com-tecnick-tcpdf/_barcodes.php.html @@ -96,7 +96,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit

    - Documentation generated on Thu, 16 Apr 2009 18:13:27 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:13 +0200 by phpDocumentor 1.4.1
    @@ -16677,7 +16677,7 @@ $file)
    -

    method writeHTML [line 11016]

    +

    method writeHTML [line 11007]

    diff --git a/doc/com-tecnick-tcpdf/TCPDFBarcode.html b/doc/com-tecnick-tcpdf/TCPDFBarcode.html index 6963457..fc35f40 100644 --- a/doc/com-tecnick-tcpdf/TCPDFBarcode.html +++ b/doc/com-tecnick-tcpdf/TCPDFBarcode.html @@ -1368,7 +1368,7 @@ $type)

    - Documentation generated on Thu, 16 Apr 2009 18:13:27 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:13 +0200 by phpDocumentor 1.4.1
    @@ -18908,7 +18908,7 @@ $file)

    - Documentation generated on Thu, 16 Apr 2009 18:13:27 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:14 +0200 by phpDocumentor 1.4.1
    author:  Nicola Asuni
    version:  4.6.000version:  4.6.001
    copyright:  2002-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
    - PDF_PRODUCER = 'TCPDF 4.6.000 (http://www.tcpdf.org)' + PDF_PRODUCER = 'TCPDF 4.6.001 (http://www.tcpdf.org)'
    @@ -115,7 +115,7 @@ unicode data


    - Documentation generated on Thu, 16 Apr 2009 18:13:27 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 17 Apr 2009 16:18:14 +0200 by phpDocumentor 1.4.1
      '); //replace some blank characters $html = preg_replace('@(\r\n|\r)@', "\n", $html); $repTable = array("\t" => ' ', "\0" => ' ', "\x0B" => ' ', "\\" => "\\\\"); @@ -10627,25 +10627,16 @@ if (!class_exists('TCPDF', false)) { $html = preg_replace("''si", "
    ", $html); */ // remove extra spaces from code - $html = preg_replace('/[\s]*<\/table>[\s]*/', '
    ', $html); - $html = preg_replace('/[\s]*<\/tr>[\s]*/', '
    [\s]*/', '', $html); - $html = preg_replace('/[\s]*/', '', $html); - $html = preg_replace('/<\/td>/', '
    ', $html); $html = preg_replace('/]*)>/xi', '', $html); - $html = preg_replace('/[\s]+
      [\s]*/', '', $html); - $html = preg_replace('/[\s]*<\/ul>[\s]*/', '
    ', $html); - $html = preg_replace('/[\s]*<\/ol>[\s]*/', '', $html); - $html = preg_replace('/[\s]+
    cMargin; if (isset($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'])) { $currentcmargin = $this->getHTMLUnitToUnits($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'], 1, 'px'); } else { @@ -11601,8 +11593,8 @@ if (!class_exists('TCPDF', false)) { $prevLastH = $this->lasth; // ****** write the cell content ****** $this->MultiCell($cellw, $cellh, $cell_content, false, $lalign, false, 2, '', '', true, 0, true); - $this->lasth = $prevLastH; - $this->cMargin = $currentcmargin; + $this->lasth = $prevLastH; + $this->cMargin = $oldmargin; $dom[$trid]['cellpos'][($cellid - 1)]['endx'] = $this->x; // update the end of row position if ($rowspan <= 1) {