From b4c68becdeed8e0bcc885f42297d252bb1ea5012 Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Wed, 27 Jan 2010 20:23:46 +0100 Subject: [PATCH] 4.8.029 --- CHANGELOG.TXT | 4 + README.TXT | 4 +- doc/classtrees_com-tecnick-tcpdf.html | 2 +- doc/com-tecnick-tcpdf/TCPDF.html | 80 +++++++++---------- 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 +- examples/example_045.php | 4 +- tcpdf.php | 28 +++---- 17 files changed, 76 insertions(+), 72 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 79c5d8b..fccdd5d 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,7 @@ +4.8.029 (2010-01-27) + - Bug item #2941057 "TOC Error in PDF File Output" was fixed. + - Some text alignment cases were fixed. + 4.8.028 (2010-01-26) - Text alignment for RTL mode was fixed. diff --git a/README.TXT b/README.TXT index 4fcc3ed..2a5756e 100755 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 4.8.028 -Release date: 2010-01-26 +Version: 4.8.029 +Release date: 2010-01-27 Author: Nicola Asuni Copyright (c) 2001-2010: diff --git a/doc/classtrees_com-tecnick-tcpdf.html b/doc/classtrees_com-tecnick-tcpdf.html index ae8b342..7903845 100644 --- a/doc/classtrees_com-tecnick-tcpdf.html +++ b/doc/classtrees_com-tecnick-tcpdf.html @@ -45,7 +45,7 @@

- Documentation generated on Tue, 26 Jan 2010 20:05:37 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:32 +0100 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/TCPDF.html b/doc/com-tecnick-tcpdf/TCPDF.html index a64f767..41c25f5 100644 --- a/doc/com-tecnick-tcpdf/TCPDF.html +++ b/doc/com-tecnick-tcpdf/TCPDF.html @@ -74,7 +74,7 @@ Source Location: /tcpdf.php

Version:

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

method addHTMLVertSpace [line 15102]

+

method addHTMLVertSpace [line 15100]

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

method addTOC [line 16125]

+

method addTOC [line 16124]

@@ -6573,7 +6573,7 @@ $toc_name = 'TOC'])

- Output a Table of Content Index (TOC).

You can override this method to achieve different styles.




+ Output a Table of Content Index (TOC).

After calling this method you have to call addPage() to add other content. You can override this method to achieve different styles.




Tags:

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

method closeHTMLTagHandler [line 14749]

+

method closeHTMLTagHandler [line 14747]

@@ -7662,7 +7662,7 @@ $js = false])
-

method commitTransaction [line 16284]

+

method commitTransaction [line 16282]

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

method deletePage [line 15984]

+

method deletePage [line 15982]

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

method empty_string [line 16338]

+

method empty_string [line 16336]

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

method getBuffer [line 15670]

+

method getBuffer [line 15668]

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

method getFontBuffer [line 15830]

+

method getFontBuffer [line 15828]

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

method getGraphicVars [line 15538]

+

method getGraphicVars [line 15536]

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

method getHTMLUnitToUnits [line 15257]

+

method getHTMLUnitToUnits [line 15255]

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

method getImageBuffer [line 15772]

+

method getImageBuffer [line 15770]

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

method getObjFilename [line 15602]

+

method getObjFilename [line 15600]

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

method getPageBuffer [line 15713]

+

method getPageBuffer [line 15711]

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

method intToRoman [line 15331]

+

method intToRoman [line 15329]

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

method movePage [line 15847]

+

method movePage [line 15845]

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

method objclone [line 16327]

+

method objclone [line 16325]

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

method openHTMLTagHandler [line 14204]

+

method openHTMLTagHandler [line 14202]

@@ -12365,7 +12365,7 @@ $closed)
-

method putHtmlListBullet [line 15396]

+

method putHtmlListBullet [line 15394]

@@ -12584,7 +12584,7 @@ $js = false])
-

method readDiskCache [line 15642]

+

method readDiskCache [line 15640]

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

method rollbackTransaction [line 16298]

+

method rollbackTransaction [line 16296]

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

method SetBooklet [line 15171]

+

method SetBooklet [line 15169]

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

method setBuffer [line 15652]

+

method setBuffer [line 15650]

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

method setFontBuffer [line 15788]

+

method setFontBuffer [line 15786]

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

method setFontSubBuffer [line 15810]

+

method setFontSubBuffer [line 15808]

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

method setGraphicVars [line 15569]

+

method setGraphicVars [line 15567]

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

method setHtmlLinksStyle [line 15242]

+

method setHtmlLinksStyle [line 15240]

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

method setHtmlVSpace [line 15211]

+

method setHtmlVSpace [line 15209]

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

method setImageBuffer [line 15729]

+

method setImageBuffer [line 15727]

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

method setImageSubBuffer [line 15752]

+

method setImageSubBuffer [line 15750]

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

method setListIndentWidth [line 15221]

+

method setListIndentWidth [line 15219]

diff --git a/examples/example_045.php b/examples/example_045.php index 00174db..ffa0ace 100755 --- a/examples/example_045.php +++ b/examples/example_045.php @@ -2,7 +2,7 @@ //============================================================+ // File name : example_045.php // Begin : 2008-03-04 -// Last Update : 2009-10-21 +// Last Update : 2010-01-27 // // Description : Example 045 for TCPDF class // Bookmarks and Table of Content @@ -118,6 +118,8 @@ $pdf->SetFont('dejavusans', '', 12); // add table of content at page 1 $pdf->addTOC(1, 'courier', '.', 'INDEX'); +// IMPORTANT: After calling this method you have to call addPage() to add other content. + // --------------------------------------------------------- //Close and output PDF document diff --git a/tcpdf.php b/tcpdf.php index 24d306d..d43c563 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -2,9 +2,9 @@ //============================================================+ // File name : tcpdf.php // Begin : 2002-08-03 -// Last Update : 2010-01-26 +// Last Update : 2010-01-27 // Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org -// Version : 4.8.028 +// Version : 4.8.029 // License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html) // ---------------------------------------------------------------------------- // Copyright (C) 2002-2010 Nicola Asuni - Tecnick.com S.r.l. @@ -128,7 +128,7 @@ * @copyright 2002-2010 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.8.028 + * @version 4.8.029 */ /** @@ -152,14 +152,14 @@ if (!class_exists('TCPDF', false)) { /** * define default PDF document producer */ - define('PDF_PRODUCER', 'TCPDF 4.8.028 (http://www.tcpdf.org)'); + define('PDF_PRODUCER', 'TCPDF 4.8.029 (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.8.028 + * @version 4.8.029 * @author Nicola Asuni - info@tecnick.com * @link http://www.tcpdf.org * @license http://www.gnu.org/copyleft/lesser.html LGPL @@ -13523,7 +13523,7 @@ if (!class_exists('TCPDF', false)) { } elseif (($plalign == 'J') AND ($plalign == $lalign)) { // Justification if ($this->isRTLTextDir()) { - $t_x = $this->lMargin - $this->endlinex; + $t_x = $this->lMargin - $this->endlinex + $this->cMargin; } $one_space_width = $this->GetStringWidth(chr(32)); $no = 0; // spaces without trim @@ -13558,9 +13558,6 @@ if (!class_exists('TCPDF', false)) { $lnstring[4][$kk] = $no; $lnstring[5][$kk] = $ns; } - if ($this->isRTLTextDir()) { - $t_x = $this->lMargin - $this->endlinex - (($no - $ns - 1) * $one_space_width); - } // calculate additional space to add to each space $spacelen = $one_space_width; $spacewidth = ((($tw - $linew) + (($no - $ns) * $spacelen)) / ($ns?$ns:1)) * $this->k; @@ -13797,7 +13794,7 @@ if (!class_exists('TCPDF', false)) { } if (isset($dom[$key]['attribute']['nested']) AND ($dom[$key]['attribute']['nested'] == 'true')) { // add margin for nested tables - $wtmp -= $this->cMargin; // DEBUG + $wtmp -= $this->cMargin; } // table width if (isset($dom[$key]['width'])) { @@ -14046,8 +14043,6 @@ if (!class_exists('TCPDF', false)) { // HTML Link $strrest = $this->addHtmlLink($this->HREF['url'], $dom[$key]['value'], $wfill, true, $this->HREF['color'], $this->HREF['style']); } else { - $ctmpmargin = $this->cMargin; - $this->cMargin = 0; if ($this->rtl) { $this->x -= $this->textindent; } else { @@ -14056,7 +14051,6 @@ if (!class_exists('TCPDF', false)) { // ****** write only until the end of the line and get the rest ****** $strrest = $this->Write($this->lasth, $dom[$key]['value'], '', $wfill, '', false, 0, true, $firstblock); $this->textindent = 0; - $this->cMargin = $ctmpmargin; } if (strlen($strrest) > 0) { // store the remaining string on the previous $key position @@ -14144,6 +14138,7 @@ if (!class_exists('TCPDF', false)) { $tw += ($prevrMargin - $this->rMargin); } $mdiff = abs($tw - $linew); + $t_x = 0; if ($plalign == 'C') { if ($this->rtl) { $t_x = -($mdiff / 2); @@ -14156,8 +14151,11 @@ if (!class_exists('TCPDF', false)) { } elseif (($plalign == 'L') AND ($this->rtl)) { // left alignment on RTL document $t_x = -$mdiff; - } else { + } elseif (($plalign == 'J') AND ($plalign == $lalign)) { + // Justification $t_x = 0; + } else { + $t_x = -$this->cMargin; } if (($t_x != 0) OR ($yshift < 0)) { // shift the line @@ -16113,6 +16111,7 @@ if (!class_exists('TCPDF', false)) { /** * Output a Table of Content Index (TOC). + * After calling this method you have to call addPage() to add other content. * You can override this method to achieve different styles. * @param int $page page number where this TOC should be inserted (leave empty for current page). * @param string $numbersfont set the font for page numbers (please use monospaced font for better alignment). @@ -16257,7 +16256,6 @@ if (!class_exists('TCPDF', false)) { $this->movePage($page_last, $page); } } - $this->SetFont($fontfamily, $fontstyle, $fontsize); } /**
diff --git a/doc/li_com-tecnick-tcpdf.html b/doc/li_com-tecnick-tcpdf.html index 6293254..d7480d3 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.3

- Documentation generated on Tue, 26 Jan 2010 20:05:37 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:32 +0100 by phpDocumentor 1.4.3
@@ -15395,7 +15395,7 @@ $width)
-

method setLIsymbol [line 15131]

+

method setLIsymbol [line 15129]

diff --git a/doc/index.html b/doc/index.html index 6293254..d7480d3 100644 --- a/doc/index.html +++ b/doc/index.html @@ -58,7 +58,7 @@ This documentation was generated by phpDocumentor v1.4.3

- Documentation generated on Tue, 26 Jan 2010 20:05:37 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:32 +0100 by phpDocumentor 1.4.3
diff --git a/doc/errors.html b/doc/errors.html index 9176909..281fa0d 100644 --- a/doc/errors.html +++ b/doc/errors.html @@ -35,7 +35,7 @@ Post-parsing

- Documentation generated on Tue, 26 Jan 2010 20:05:40 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:35 +0100 by phpDocumentor 1.4.3
@@ -15488,7 +15488,7 @@ $right = -1])
-

method setOpenCell [line 15231]

+

method setOpenCell [line 15229]

diff --git a/doc/elementindex_com-tecnick-tcpdf.html b/doc/elementindex_com-tecnick-tcpdf.html index e2dfbc4..1699761 100644 --- a/doc/elementindex_com-tecnick-tcpdf.html +++ b/doc/elementindex_com-tecnick-tcpdf.html @@ -1477,7 +1477,7 @@ top

- Documentation generated on Tue, 26 Jan 2010 20:05:37 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:32 +0100 by phpDocumentor 1.4.3
diff --git a/doc/elementindex.html b/doc/elementindex.html index cff387e..fc3d237 100644 --- a/doc/elementindex.html +++ b/doc/elementindex.html @@ -1454,7 +1454,7 @@ top

- Documentation generated on Tue, 26 Jan 2010 20:05:37 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:32 +0100 by phpDocumentor 1.4.3
@@ -15575,7 +15575,7 @@ $resetmargins = false])
-

method setPageBuffer [line 15686]

+

method setPageBuffer [line 15684]

diff --git a/doc/com-tecnick-tcpdf/_unicode_data.php.html b/doc/com-tecnick-tcpdf/_unicode_data.php.html index 5775545..20533d3 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 Tue, 26 Jan 2010 20:05:40 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:35 +0100 by phpDocumentor 1.4.3
@@ -17204,7 +17204,7 @@ $page = ''])
-

method startTransaction [line 16268]

+

method startTransaction [line 16266]

diff --git a/doc/com-tecnick-tcpdf/_tcpdf.php.html b/doc/com-tecnick-tcpdf/_tcpdf.php.html index 85db5e5..9178bfb 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 3c872a7..b9943a1 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 Tue, 26 Jan 2010 20:05:37 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:33 +0100 by phpDocumentor 1.4.3
@@ -17294,7 +17294,7 @@ $page = ''])
-

method swapMargins [line 15187]

+

method swapMargins [line 15185]

diff --git a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html index 55e1b64..aadb79b 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 Tue, 26 Jan 2010 20:05:40 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:35 +0100 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/_barcodes.php.html b/doc/com-tecnick-tcpdf/_barcodes.php.html index 232b5c7..074781d 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 Tue, 26 Jan 2010 20:05:37 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:32 +0100 by phpDocumentor 1.4.3
@@ -18560,7 +18560,7 @@ $code)
-

method writeDiskCache [line 15614]

+

method writeDiskCache [line 15612]

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

- Documentation generated on Tue, 26 Jan 2010 20:05:37 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:32 +0100 by phpDocumentor 1.4.3
@@ -21137,7 +21137,7 @@ $file)

- Documentation generated on Tue, 26 Jan 2010 20:05:37 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:33 +0100 by phpDocumentor 1.4.3
author:  Nicola Asuni
version:  4.8.028version:  4.8.029
copyright:  2002-2010 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.8.028 (http://www.tcpdf.org)' + PDF_PRODUCER = 'TCPDF 4.8.029 (http://www.tcpdf.org)'
@@ -115,7 +115,7 @@ unicode data


- Documentation generated on Tue, 26 Jan 2010 20:05:37 +0100 by phpDocumentor 1.4.3 + Documentation generated on Wed, 27 Jan 2010 20:23:33 +0100 by phpDocumentor 1.4.3