Changeset 1189 for trunk/lib/tcpdf

Show
Ignore:
Timestamp:
12/01/08 13:45:10 (1 month ago)
Author:
julieni
Message:

periodic update of TcPDF : perfs improved and bugfixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/tcpdf/barcodes.php

    r1148 r1189  
    33// File name   : barcodes.php 
    44// Begin       : 2008-06-09 
    5 // Last Update : 2008-07-16 
    6 // Version     : 1.0.002 
     5// Last Update : 2008-11-17 
     6// Version     : 1.0.003 
    77// License     : GNU LGPL (http://www.gnu.org/copyleft/lesser.html) 
    88//      ---------------------------------------------------------------------------- 
    99//  Copyright (C) 2008  Nicola Asuni - Tecnick.com S.r.l. 
    10 // 
     10//      
    1111//      This program is free software: you can redistribute it and/or modify 
    1212//      it under the terms of the GNU Lesser General Public License as published by 
    1313//      the Free Software Foundation, either version 2.1 of the License, or 
    1414//      (at your option) any later version. 
    15 // 
     15//      
    1616//      This program is distributed in the hope that it will be useful, 
    1717//      but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1818//      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1919//      GNU Lesser General Public License for more details. 
    20 // 
     20//      
    2121//      You should have received a copy of the GNU Lesser General Public License 
    2222//      along with this program.  If not, see <http://www.gnu.org/licenses/>. 
    23 // 
     23//      
    2424//      See LICENSE.TXT file for more information. 
    2525//  ---------------------------------------------------------------------------- 
    2626// 
    27 // Description : PHP class to creates array representations for 
     27// Description : PHP class to creates array representations for  
    2828//               common 1D barcodes to be used with TCPDF. 
    2929// 
     
    6161        */ 
    6262class TCPDFBarcode { 
    63  
     63         
    6464        /** 
    6565         * @var array representation of barcode. 
     
    6767         */ 
    6868        protected $barcode_array; 
    69  
    70         /** 
    71          * This is the class constructor. 
     69                 
     70        /** 
     71         * This is the class constructor.  
    7272         * Return an array representations for common 1D barcodes:<ul> 
    73          * <li>$arrcode["code"] code to be printed on text label</li> 
    74          * <li>$arrcode["maxh"] max bar height</li> 
    75          * <li>$arrcode["maxw"] max bar width</li> 
    76          * <li>$arrcode["bcode"][$k] single bar or space in $k position</li> 
    77          * <li>$arrcode["bcode"][$k]["t"] bar type: true = bar, false = space.</li> 
    78          * <li>$arrcode["bcode"][$k]["w"] bar width in units.</li> 
    79          * <li>$arrcode["bcode"][$k]["h"] bar height in units.</li> 
    80          * <li>$arrcode["bcode"][$k]["p"] bar top position (0 = top, 1 = middle)</li></ul> 
     73         * <li>$arrcode['code'] code to be printed on text label</li> 
     74         * <li>$arrcode['maxh'] max bar height</li> 
     75         * <li>$arrcode['maxw'] max bar width</li> 
     76         * <li>$arrcode['bcode'][$k] single bar or space in $k position</li> 
     77         * <li>$arrcode['bcode'][$k]['t'] bar type: true = bar, false = space.</li> 
     78         * <li>$arrcode['bcode'][$k]['w'] bar width in units.</li> 
     79         * <li>$arrcode['bcode'][$k]['h'] bar height in units.</li> 
     80         * <li>$arrcode['bcode'][$k]['p'] bar top position (0 = top, 1 = middle)</li></ul> 
    8181         * @param string $code code to print 
    8282         * @param string $type type of barcode: <ul><li>C39 : CODE 39</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED with checksum</li><li>I25 : Interleaved 2 of 5</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>POSTNET : POSTNET</li><li>CODABAR : CODABAR</li></ul> 
     
    8585                $this->setBarcode($code, $type); 
    8686        } 
    87  
    88         /** 
     87         
     88        /**  
    8989         * Return an array representations of barcode. 
    9090         * @return array 
     
    9393                return $this->barcode_array; 
    9494        } 
    95  
    96         /** 
     95         
     96        /**  
    9797         * Set the barcode. 
    9898         * @param string $code code to print 
     
    102102        public function setBarcode($code, $type) { 
    103103                switch (strtoupper($type)) { 
    104                         case "C39": { // CODE 39 
     104                        case 'C39': { // CODE 39 
    105105                                $arrcode = $this->barcode_code39($code, false, false); 
    106106                                break; 
    107107                        } 
    108                         case "C39+": { // CODE 39 with checksum 
     108                        case 'C39+': { // CODE 39 with checksum 
    109109                                $arrcode = $this->barcode_code39($code, false, true); 
    110110                                break; 
    111111                        } 
    112                         case "C39E": { // CODE 39 EXTENDED 
     112                        case 'C39E': { // CODE 39 EXTENDED 
    113113                                $arrcode = $this->barcode_code39($code, true, false); 
    114114                                break; 
    115115                        } 
    116                         case "C39E+": { // CODE 39 EXTENDED with checksum 
     116                        case 'C39E+': { // CODE 39 EXTENDED with checksum 
    117117                                $arrcode = $this->barcode_code39($code, true, true); 
    118118                                break; 
    119119                        } 
    120                         case "I25": { // Interleaved 2 of 5 
     120                        case 'I25': { // Interleaved 2 of 5 
    121121                                $arrcode = $this->barcode_i25($code); 
    122122                                break; 
    123123                        } 
    124                         case "C128A": { // CODE 128 A 
    125                                 $arrcode = $this->barcode_c128($code, "A"); 
    126                                 break; 
    127                         } 
    128                         case "C128B": { // CODE 128 B 
    129                                 $arrcode = $this->barcode_c128($code, "B"); 
    130                                 break; 
    131                         } 
    132                         case "C128C": { // CODE 128 C 
    133                                 $arrcode = $this->barcode_c128($code, "C"); 
    134                                 break; 
    135                         } 
    136                         case "EAN13": { // EAN 13 
     124                        case 'C128A': { // CODE 128 A 
     125                                $arrcode = $this->barcode_c128($code, 'A'); 
     126                                break; 
     127                        } 
     128                        case 'C128B': { // CODE 128 B 
     129                                $arrcode = $this->barcode_c128($code, 'B'); 
     130                                break; 
     131                        } 
     132                        case 'C128C': { // CODE 128 C 
     133                                $arrcode = $this->barcode_c128($code, 'C'); 
     134                                break; 
     135                        } 
     136                        case 'EAN13': { // EAN 13 
    137137                                $arrcode = $this->barcode_ean13($code, 13); 
    138138                                break; 
    139139                        } 
    140                         case "UPCA": { // UPC-A 
     140                        case 'UPCA': { // UPC-A 
    141141                                $arrcode = $this->barcode_ean13($code, 12); 
    142142                                break; 
    143143                        } 
    144                         case "POSTNET": { // POSTNET 
     144                        case 'POSTNET': { // POSTNET 
    145145                                $arrcode = $this->barcode_postnet($code); 
    146146                                break; 
    147147                        } 
    148                         case "CODABAR": { // CODABAR 
     148                        case 'CODABAR': { // CODABAR 
    149149                                $arrcode = $this->barcode_codabar($code); 
    150150                                break; 
     
    156156                $this->barcode_array = $arrcode; 
    157157        } 
    158  
     158         
    159159        /** 
    160160         * CODE 39 
     
    209209                $chr['+'] = '121112121'; 
    210210                $chr['%'] = '111212121'; 
    211  
     211                 
    212212                $code = strtoupper($code); 
    213213                if ($extended) { 
     
    223223                } 
    224224                // add start and stop codes 
    225                 $code = "*".$code."*"
    226  
    227                 $bararray = array("code" => $code, "maxw" => 0, "maxh" => 1, "bcode" => array()); 
     225                $code = '*'.$code.'*'
     226                 
     227                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); 
    228228                $k = 0; 
    229229                for($i=0; $i < strlen($code); $i++) { 
     
    240240                                } 
    241241                                $w = $chr[$char]{$j}; 
    242                                 $bararray["bcode"][$k] = array("t" => $t, "w" => $w, "h" => 1, "p" => 0); 
    243                                 $bararray["maxw"] += $w; 
     242                                $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); 
     243                                $bararray['maxw'] += $w; 
    244244                                $k++; 
    245245                        } 
    246                         $bararray["bcode"][$k] = array("t" => false, "w" => 1, "h" => 1, "p" => 0); 
    247                         $bararray["maxw"] += 1; 
     246                        $bararray['bcode'][$k] = array('t' => false, 'w' => 1, 'h' => 1, 'p' => 0); 
     247                        $bararray['maxw'] += 1; 
    248248                        $k++; 
    249249                } 
    250250                return $bararray; 
    251251        } 
    252  
     252         
    253253        /** 
    254254         * Encode a string to be used for CODE 39 Extended mode. 
     
    300300                return $code_ext; 
    301301        } 
    302  
     302         
    303303        /** 
    304304         * Calculate CODE 39 checksum (modulo 43). 
     
    321321                return $chars[$j]; 
    322322        } 
    323  
    324         /** 
    325          * Interleaved 2 of 5 barcodes. 
     323         
     324        /** 
     325         * Interleaved 2 of 5 barcodes.  
    326326         * Contains digits (0 to 9) and encodes the data in the width of both bars and spaces. 
    327327         * @param string $code code to represent. 
     
    343343                $chr['A'] = '11'; 
    344344                $chr['Z'] = '21'; 
    345  
     345                 
    346346                if((strlen($code) % 2) != 0) { 
    347347                        // add leading zero if code-length is odd 
     
    350350                // add start and stop codes 
    351351                $code = 'AA'.strtolower($code).'ZA'; 
    352  
    353                 $bararray = array("code" => $code, "maxw" => 0, "maxh" => 1, "bcode" => array()); 
     352                         
     353                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); 
    354354                $k = 0; 
    355355                for($i=0; $i < strlen($code); $i=$i+2) { 
     
    361361                        } 
    362362                        // create a bar-space sequence 
    363                         $seq = ""
     363                        $seq = ''
    364364                        for($s=0; $s < strlen($chr[$char_bar]); $s++){ 
    365365                                $seq .= $chr[$char_bar]{$s} . $chr[$char_space]{$s}; 
     
    372372                                } 
    373373                                $w = $seq{$j}; 
    374                                 $bararray["bcode"][$k] = array("t" => $t, "w" => $w, "h" => 1, "p" => 0); 
    375                                 $bararray["maxw"] += $w; 
     374                                $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); 
     375                                $bararray['maxw'] += $w; 
    376376                                $k++; 
    377377                        } 
     
    379379                return $bararray; 
    380380        } 
    381  
    382         /** 
    383          * C128 barcodes. 
    384          * 
     381         
     382        /** 
     383         * C128 barcodes.  
     384         *  
    385385         * @param string $code code to represent. 
    386386         * @param string $type barcode type: A, B or C 
     
    388388         * @access protected 
    389389         */ 
    390         protected function barcode_c128($code, $type="B") { 
     390        protected function barcode_c128($code, $type='B') { 
    391391                $chr = array( 
    392392                        '212222', /* 00 */ 
     
    499499                        '200000'        /* END */ 
    500500                ); 
    501                 $keys = ""
     501                $keys = ''
    502502                switch(strtoupper($type)) { 
    503                         case "A": { 
     503                        case 'A': { 
    504504                                $startid = 103; 
    505505                                $keys = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_'; 
     
    509509                                break; 
    510510                        } 
    511                         case "B": { 
     511                        case 'B': { 
    512512                                $startid = 104; 
    513513                                $keys = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'.chr(127); 
    514514                                break; 
    515515                        } 
    516                         case "C": { 
     516                        case 'C': { 
    517517                                $startid = 105; 
    518                                 $keys = ""
     518                                $keys = ''
    519519                                if ((strlen($code) % 2) != 0) { 
    520520                                        //echo "The length of barcode value must be even ($code). You must pad the number with zeros.\n"; 
     
    524524                                        $keys .= chr($i); 
    525525                                } 
    526                                 $new_code = ""
     526                                $new_code = ''
    527527                                for ($i=0; $i < (strlen($code) / 2); $i++) { 
    528528                                        $new_code .= chr(intval($code{(2 * $i)}.$code{(2 * $i + 1)})); 
     
    541541                } 
    542542                $check = ($sum % 103); 
    543  
     543                 
    544544                // add start, check and stop codes 
    545545                $code = chr($startid).$code.chr($check).chr(106).chr(107); 
    546                 $bararray = array("code" => $code, "maxw" => 0, "maxh" => 1, "bcode" => array()); 
     546                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); 
    547547                $k = 0; 
    548548                $len = strlen($code); 
     
    564564                                } 
    565565                                $w = $seq{$j}; 
    566                                 $bararray["bcode"][$k] = array("t" => $t, "w" => $w, "h" => 1, "p" => 0); 
    567                                 $bararray["maxw"] += $w; 
     566                                $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); 
     567                                $bararray['maxw'] += $w; 
    568568                                $k++; 
    569569                        } 
    570570                } 
    571                 return $bararray; 
    572         } 
    573  
     571                return $bararray;               
     572        } 
     573         
    574574        /** 
    575575         * EAN13 and UPC-A barcodes. 
     
    659659                        '9'=>array('A','B','B','A','B','A') 
    660660                ); 
    661  
    662                 $bararray = array("code" => $code, "maxw" => 0, "maxh" => 1, "bcode" => array()); 
     661                 
     662                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); 
    663663                $k = 0; 
    664664                $seq = '101'; 
     
    682682                                        $t = false; // space 
    683683                                } 
    684                                 $bararray["bcode"][$k] = array("t" => $t, "w" => $w, "h" => 1, "p" => 0); 
    685                                 $bararray["maxw"] += $w; 
     684                                $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); 
     685                                $bararray['maxw'] += $w; 
    686686                                $k++; 
    687687                                $w = 0; 
     
    690690                return $bararray; 
    691691        } 
    692  
     692         
    693693        /** 
    694694         * POSTNET barcodes. 
     
    711711                        9 => Array(2,1,2,1,1) 
    712712                ); 
    713                 $bararray = array("code" => $code, "maxw" => 0, "maxh" => 2, "bcode" => array()); 
     713                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array()); 
    714714                $k = 0; 
    715                 $code = str_replace("-", "", $code); 
    716                 $code = str_replace(" ", "", $code); 
     715                $code = str_replace('-', '', $code); 
     716                $code = str_replace(' ', '', $code); 
    717717                $len = strlen($code); 
    718718                // calculate checksum 
     
    724724                        return false; 
    725725                } 
    726                 $code .= "".(10 - ($sum % 10)).""
     726                $code .= ''.(10 - ($sum % 10)).''
    727727                $len = strlen($code); 
    728728                // start bar 
    729                 $bararray["bcode"][$k++] = array("t" => 1, "w" => 1, "h" => 2, "p" => 0); 
    730                 $bararray["bcode"][$k++] = array("t" => 0, "w" => 1, "h" => 2, "p" => 0); 
    731                 $bararray["maxw"] += 2; 
     729                $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 2, 'p' => 0); 
     730                $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0); 
     731                $bararray['maxw'] += 2; 
    732732                for ($i=0; $i < $len; $i++) { 
    733733                        for ($j=0; $j < 5; $j++) { 
    734734                                $h = $barlen[$code{$i}][$j]; 
    735735                                $p = floor(1 / $h); 
    736                                 $bararray["bcode"][$k++] = array("t" => 1, "w" => 1, "h" => $h, "p" => $p); 
    737                                 $bararray["bcode"][$k++] = array("t" => 0, "w" => 1, "h" => 2, "p" => 0); 
    738                                 $bararray["maxw"] += 2; 
     736                                $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p); 
     737                                $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0); 
     738                                $bararray['maxw'] += 2; 
    739739                        } 
    740740                } 
    741741                // end bar 
    742                 $bararray["bcode"][$k++] = array("t" => 1, "w" => 1, "h" => 2, "p" => 0); 
    743                 $bararray["maxw"] += 1; 
     742                $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 2, 'p' => 0); 
     743                $bararray['maxw'] += 1; 
    744744                return $bararray; 
    745745        } 
    746  
     746         
    747747        /** 
    748748         * CODABAR barcodes. 
     
    774774                        'D' => '11122211' 
    775775                ); 
    776  
    777                 $bararray = array("code" => $code, "maxw" => 0, "maxh" => 1, "bcode" => array()); 
     776                 
     777                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); 
    778778                $k = 0; 
    779779                $w = 0; 
    780                 $seq = ""
    781                 $code = "A".strtoupper($code)."A"
     780                $seq = ''
     781                $code = 'A'.strtoupper($code).'A'
    782782                $len = strlen($code); 
    783783                for($i=0; $i < $len; $i++) { 
     
    793793                                } 
    794794                                $w = $seq{$j}; 
    795                                 $bararray["bcode"][$k] = array("t" => $t, "w" => $w, "h" => 1, "p" => 0); 
    796                                 $bararray["maxw"] += $w; 
     795                                $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); 
     796                                $bararray['maxw'] += $w; 
    797797                                $k++; 
    798798                        } 
     
    800800                return $bararray; 
    801801        } 
    802  
     802         
    803803} // end of class 
    804804 
    805805//============================================================+ 
    806 // END OF FILE 
     806// END OF FILE                                                  
    807807//============================================================+ 
    808808?> 
  • trunk/lib/tcpdf/CHANGELOG.TXT

    r1148 r1189  
     14.3.006 (2008-12-01) 
     2        - A regular expression on getHtmlDomArray() to find HTML tags was fixed. 
     3 
     44.3.005 (2008-11-25) 
     5        - makefont.php was fixed. 
     6        - Bug item #2339877 was fixed (false loop condition detected on WriteHTML()). 
     7        - Bug item #2336733 was fixed (lasth value update on Multicell() when border and fill are disabled). 
     8        - Bug item #2342303 was fixed (automatic page-break on Image() and ImageEPS()). 
     9 
     104.3.004 (2008-11-19) 
     11        - Function _textstring() was fixed (bug 2309051). 
     12        - All examples were updated. 
     13 
     144.3.003 (2008-11-18) 
     15        - CID-0 font bug was fixed. 
     16        - Some functions were optimized. 
     17        - Function getGroupPageNoFormatted() was added. 
     18        - Example n. 23 was updated. 
     19 
     204.3.002 (2008-11-17) 
     21        - Bug item #2305518 "CID-0 font don't work with encryption" was fixed. 
     22         
     234.3.001 (2008-11-17) 
     24        - Bug item #2300007 "download mimetype pdf" was fixed. 
     25        - Double quotes were replaced by single quotes to improve PHP performances. 
     26        - A bug relative to HTML cell borders was fixed. 
     27         
     284.3.000 (2008-11-14) 
     29        - The function setOpenCell() was added to set the top/bottom cell sides to be open or closed when the cell cross the page. 
     30        - A bug relative to list items indentation was fixed. 
     31        - A bug relative to borders on HTML tables and Multicell was fixed. 
     32        - A bug relative to rowspanned cells was fixed. 
     33        - A bug relative to html images across pages was fixed. 
     34         
     354.2.009 (2008-11-13) 
     36        - Spaces between li tags are now automatically removed. 
     37         
     384.2.008 (2008-11-12) 
     39        - A bug relative to fill color on next page was fixed. 
     40         
     414.2.007 (2008-11-12) 
     42        - The function setListIndentWidth() was added to set custom indentation widht for HTML lists. 
     43         
     444.2.006 (2008-11-06) 
     45        - A bug relative to HTML justification was fixed. 
     46         
     474.2.005 (2008-11-06) 
     48        - A bug relative to HTML justification was fixed. 
     49        - The methods formatPageNumber() and PageNoFormatted() were added to format page numbers. 
     50        - Default Footer() method was changed to use PageNoFormatted() instead of PageNo(). 
     51        - Example 6 was updated. 
     52         
    1534.2.004 (2008-11-04) 
    254        - Bug item n. 2217039 "filename handling improvement" was fixed. 
    3  
     55         
    4564.2.003 (2008-10-31) 
    557        - Font style bug was fixed. 
    6  
     58         
    7594.2.002 (2008-10-31) 
    860        - Bug item #2210922 (htm element br not work) was fixed. 
    961        - Write() function was improved to support margin changes. 
    10  
     62         
    11634.2.001 (2008-10-30) 
    1264        - setHtmlVSpace($tagvs) function was added to set custom vertical spaces for HTML tags. 
    1365        - writeHTML() function now support margin changes during execution. 
    1466        - Signature of addHTMLVertSpace() function is changed. 
    15  
     67         
    16684.2.000 (2008-10-29) 
    1769        - htmlcolors.php was changed to support class-loaders. 
     
    2779        - Example n. 10 was changed to support RTL mode. 
    2880        - All examples were updated. 
    29  
     81         
    30824.1.004 (2008-10-23) 
    3183        - unicode_data.php was changed to support class-loaders. 
    3284        - Bug item #2186040/2 (writeHTML margin problem) was fixed. 
    33  
     85         
    34864.1.003 (2008-10-22) 
    3587        - Bug item #2185399 was fixed (rowspan and page break). 
    3688        - Bugs item #2186040 was fixed (writeHTML margin problem). 
    3789        - Newline after table was removed. 
    38  
     90         
    39914.1.002 (2008-10-21) 
    4092        - Bug item #2184525 was fixed (rowspan on HTML cell). 
    41  
     93         
    42944.1.001 (2008-10-21) 
    4395        - Support for "start" attribute was added to HTML ordered list. 
     
    4698        - Support for images on HTML lists was improved. 
    4799        - Examples n. 1 and 6 were updated. 
    48  
     100         
    491014.1.000 (2008-10-18) 
    50102        - Page-break bug using HTML content was fixed. 
     
    53105        - Justification alignment is now supported on HTML (see example n. 39). 
    54106        - example_006.php was updated. 
    55  
     107         
    561084.0.033 (2008-10-13) 
    57109        - Bug n. 2157099 was fixed. 
     
    76128        - Infinite loop bug was fixed [Bug item #130309]. 
    77129        - Multicell() problem on Header() was fixed. 
    78  
     130         
    791314.0.028 (2008-09-26) 
    80132        - setLIsymbol() was added to set the LI symbol used on UL lists. 
    81133        - Missing $padding and $encryption_key variables declarations were added [Bug item #2129058]. 
    82  
     134         
    831354.0.027 (2008-09-19) 
    84136        - Bug #2118588 "Undefined offset in tcpdf.php on line 9581" was fixed. 
    85137        - arailunicid0.php font was updated. 
    86138        - The problem of javascript form fields duplication after saving was fixed. 
    87  
     139                 
    881404.0.026 (2008-09-17) 
    89141        - convertHTMLColorToDec() function was improved to support rgb(RR,GG,BB) notation. 
    90142        - The following inline CSS attributes are now supported: text-decoration, color, background-color and font-size names: xx-small, x-small, small, medium, large, x-large, xx-large 
    91143        - Example n. 6 was updated. 
    92  
     144                 
    931454.0.025 (2008-09-15) 
    94146        - _putcidfont0 function was improved to include CJK fonts (Chinese, Japanese, Korean, CJK, Asian fonts) without embedding. 
    95147        - arialunicid0 font was added (see the new example n. 38). 
    96         - The following Unicode to CID-0 tables were added on fonts folder: uni2cid_ak12.php, uni2cid_aj16.php, uni2cid_ag15.php, uni2cid_ac15.php. 
    97  
     148        - The following Unicode to CID-0 tables were added on fonts folder: uni2cid_ak12.php, uni2cid_aj16.php, uni2cid_ag15.php, uni2cid_ac15.php.  
     149                 
    981504.0.024 (2008-09-12) 
    99151        - "stripos" function was replaced with "strpos + strtolower" for backward compatibility with PHP4. 
     
    106158        - Bookmark() function was improved to fix wrong levels. 
    107159        - $lasth changes after header/footer calls were fixed. 
    108  
     160         
    1091614.0.023 (2008-09-05) 
    110162        - Some HTML related problems were fixed. 
    111163        - Image alignment on HTML was changed, now it always defaults to the normal mode (see example_006.php). 
    112  
     164         
    1131654.0.022 (2008-08-28) 
    114166        - Line height on HTML was fixed. 
    115167        - Image inside an HTML cell problem was fixed. 
    116168        - A new "zarbold" persian font was added. 
    117  
     169         
    1181704.0.021 (2008-08-24) 
    119171        - HTTP headers were fixed on Output function(). 
     
    1662184.0.012 (2008-07-24) 
    167219        - Addpage(), Header() and Footer() functions were changed to simplify the implementation of external header/footer functions. 
    168         - The following functions were added: 
     220        - The following functions were added:  
    169221                        setHeader() 
    170222                        setFooter() 
     
    179231                        getHeaderMargin() 
    180232                        getFooterMargin() 
    181  
     233         
    1822344.0.011 (2008-07-23) 
    183235        - Font support was improved. 
     
    2202724.0.002 (2008-07-07) 
    221273        - Bug [2000861] was still unfixed and has been fixed. 
    222  
     274         
    2232754.0.001 (2008-07-05) 
    224276        - Bug [2000861] was fixed. 
     
    238290        - barcodes.php was updated. 
    239291        - All examples were updated. 
    240  
     292         
    241293------------------------------------------------------------ 
    242294 
     
    246298        - Image handling was improved. 
    247299        - All examples were updated. 
    248  
     300         
    2493013.1.000 (2008-06-11) 
    250302        - setPDFVersion() was added to change the default PDF version (currently 1.7). 
     
    265317        - source code cleanup. 
    266318        - All examples were updated and new examples were added. 
    267  
     319         
    2683203.0.015 (2008-06-06) 
    269321        - AddPage() function signature is changed to include page format. 
     
    2963483.0.011 (2008-05-23) 
    297349        - CMYK color support was added to all graphic functions. 
    298         - HTML table support was improved: 
     350        - HTML table support was improved:  
    299351          -- now it's possible to include additional html tags inside a cell; 
    300352          -- colspan attribute was added. 
     
    318370        - AlMohanad (arabic) font was added. 
    319371        - C128 barcode bugs were fixed. 
    320  
     372         
    3213733.0.006 (2008-04-21) 
    322374        - Condition to check negative width values was added. 
     
    336388        - Write() functions now return the number of cells and not the number of lines. 
    337389        - TCPDF is released under LGPL 2.1, or any later version. 
    338  
     390         
    3393913.0.001 (2008-05-28) 
    340392        - _legacyparsejpeg() and _legacyparsepng() were renamed _parsejpeg() and _parsepng(). 
     
    342394        - all examples were updated. 
    343395        - example 27 was added to show various barcodes. 
    344  
     396         
    3453973.0.000 (2008-03-27) 
    346398        - private function pixelsToMillimeters() was changed to public function pixelsToUnits() to fix html image size bug. 
     
    365417        - example_006.php was updated. 
    366418        - private function setUserRights() was added to release user rights on Acrobat Reader (this allows to display forms, see example 14) 
    367  
     419         
    3684202.8.000 (2008-03-20) 
    369421        - Private variables were changed to protected. 
     
    373425        - Text vertical alignment on cells were fixed. 
    374426        - Examples were updated to reflect changes. 
    375  
     427                 
    3764282.7.002 (2008-03-13) 
    377429        - Bug "[1912142] Encrypted PDF created/modified date" was fixed. 
    378  
     430         
    3794312.7.001 (2008-03-10) 
    380432        - Cell justification was fixed for non-unicode mode. 
     
    386438        - Write() speed was improved for non-arabic strings. 
    387439        - Example n. 20 was changed. 
    388  
     440         
    3894412.6.000 (2008-03-07) 
    390442        - various alignments bugs were fixed. 
    391  
     443         
    3924442.5.000 (2008-03-07) 
    393445        - Several bugs were fixed. 
     
    412464        - AddPage() Header() and Footer() were fixed. 
    413465        - Documentation is now available on http://www.tcpdf.org 
    414  
     466         
    4154672.2.003 (2008-03-03) 
    416468        - [1894853] Performance of MultiCell() was improved. 
    417469        - RadioButton and ListBox functions were added. 
    418470        - javascript form functions were rewritten and properties names are changed. The properties function supported by form fields are listed on Possible values are listed on http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf. 
    419  
     471         
    4204722.2.002 (2008-02-28) 
    421473        - [1900495] html images path was fixed. 
     
    425477        - The bug "[1894700] bug with replace relative path" was fixed 
    426478        - Justification was fixed 
    427  
     479         
    4284802.2.000 (2008-02-12) 
    429481        - fixed javascript bug introduced with latest release 
     
    433485        - Bookmank function was added ([1578250] Table of contents). 
    434486        - Javascript and Form fields support was added ([1796359] Form fields). 
    435  
     487         
    4364882.1.001 (2008-02-10) 
    437489        - The bug "[1885776] Race Condition in function justitfy" was fixed. 
    438         - The bug "[1890217] xpdf complains that pdf is incorrect" was fixed. 
     490        - The bug "[1890217] xpdf complains that pdf is incorrect" was fixed.   
    439491 
    4404922.1.000 (2008-01-07) 
     
    495547                        Polygon 
    496548                        RegularPolygon 
    497  
     549                 
    4985502.0.000 (2008-01-04) 
    499551        - RTL (Right-To-Left) languages support was added. Language direction is set using the $l['a_meta_dir'] setting on /configure/language/xxx.php language files. 
     
    522574        - fixed htmlentities conversion. 
    523575        - MultiCell() function returns the number of cells. 
    524  
     576         
    5255771.53.0.TC033 (2007-07-30) 
    526578        - fixed bug 1762550: case sensitive for font files 
     
    5355871.53.0.TC031 (2007-03-20) 
    536588        - ToUnicode CMap were added on _puttruetypeunicode function. Now you may search and copy unicode text. 
    537  
     589         
    5385901.53.0.TC030 (2007-03-06) 
    539591        - fixed bug on PHP4 version. 
    540  
     592         
    5415931.53.0.TC029 (2007-03-06) 
    542594        - DejaVu Fonts were added. 
    543  
     595         
    5445961.53.0.TC028 (2007-03-03) 
    545597        - MultiCell function signature were changed: the $ln parameter were added. Check documentation for further information. 
     
    550602        - $attr['face'] bug were fixed. 
    551603        - K_TCPDF_EXTERNAL_CONFIG control where introduced on /config/tcpdf_config.php to use external configuration files. 
    552  
     604         
    5536051.53.0.TC026 (2006-10-28) 
    554606        - writeHTML function call were fixed on examples. 
     
    557609        - Bugs item #1421290 were fixed (0D - 0A substitution in some characters) 
    558610        - Bugs item #1573174 were fixed (MultiCell documentation) 
    559  
     611         
    5606121.53.0.TC024 (2006-09-26) 
    561613        - getPageHeight() function were fixed (bug 1543476). 
    562614        - fixed missing breaks on closedHTMLTagHandler function (bug 1535263). 
    563615        - fixed extra spaces on Write function (bug 1535262). 
    564  
     616         
    5656171.53.0.TC023 (2006-08-04) 
    566618        - paths to barcode directory were fixed. 
    567619        - documentation were updated. 
    568  
     620         
    5696211.53.0.TC022 (2006-07-16) 
    570         - fixed bug: [ 1516858 ] Probs with PHP autoloader and class_exists() 
     622        - fixed bug: [ 1516858 ] Probs with PHP autoloader and class_exists()  
    571623 
    5726241.53.0.TC021 (2006-07-01) 
    573625        - HTML attributes with whitespaces are now supported (thanks to Nelson Benitez for his support) 
    574  
     626         
    5756271.53.0.TC020 (2006-06-23) 
    576628        - code cleanup 
    577  
     629         
    5786301.53.0.TC019 (2006-05-21) 
    579631        - fixed <strong> and <em> closing tags 
    580  
     632