]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20888 lib/tcpdf upgraded to the recent 4.8.014
authorDavid Mudrak <david.mudrak@gmail.com>
Thu, 19 Nov 2009 11:33:08 +0000 (11:33 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Thu, 19 Nov 2009 11:33:08 +0000 (11:33 +0000)
Also renaming README-MOODLE.TXT to readme_moodle.txt according to the
new style.

60 files changed:
lib/tcpdf/2dbarcodes.php
lib/tcpdf/CHANGELOG.TXT
lib/tcpdf/README.TXT
lib/tcpdf/barcodes.php
lib/tcpdf/config/tcpdf_config.php
lib/tcpdf/fonts/.noencode [deleted file]
lib/tcpdf/fonts/freefont-20080323/COPYING [deleted file]
lib/tcpdf/fonts/freefont-20080323/ChangeLog [deleted file]
lib/tcpdf/fonts/freefont-20080323/INSTALL [deleted file]
lib/tcpdf/fonts/freefont-20080323/README [deleted file]
lib/tcpdf/fonts/freefont-20090104/AUTHORS [moved from lib/tcpdf/fonts/freefont-20080323/AUTHORS with 82% similarity]
lib/tcpdf/fonts/freefont-20090104/COPYING [new file with mode: 0644]
lib/tcpdf/fonts/freefont-20090104/CREDITS [moved from lib/tcpdf/fonts/freefont-20080323/CREDITS with 80% similarity]
lib/tcpdf/fonts/freefont-20090104/ChangeLog [new file with mode: 0644]
lib/tcpdf/fonts/freefont-20090104/INSTALL [new file with mode: 0644]
lib/tcpdf/fonts/freefont-20090104/README [new file with mode: 0644]
lib/tcpdf/fonts/freemono.ctg.z
lib/tcpdf/fonts/freemono.php
lib/tcpdf/fonts/freemono.z
lib/tcpdf/fonts/freemonob.ctg.z
lib/tcpdf/fonts/freemonob.php
lib/tcpdf/fonts/freemonob.z
lib/tcpdf/fonts/freemonobi.ctg.z
lib/tcpdf/fonts/freemonobi.php
lib/tcpdf/fonts/freemonobi.z
lib/tcpdf/fonts/freemonoi.ctg.z
lib/tcpdf/fonts/freemonoi.php
lib/tcpdf/fonts/freemonoi.z
lib/tcpdf/fonts/freesans.ctg.z
lib/tcpdf/fonts/freesans.php
lib/tcpdf/fonts/freesans.z
lib/tcpdf/fonts/freesansb.ctg.z
lib/tcpdf/fonts/freesansb.php
lib/tcpdf/fonts/freesansb.z
lib/tcpdf/fonts/freesansbi.ctg.z
lib/tcpdf/fonts/freesansbi.php
lib/tcpdf/fonts/freesansbi.z
lib/tcpdf/fonts/freesansi.ctg.z
lib/tcpdf/fonts/freesansi.php
lib/tcpdf/fonts/freesansi.z
lib/tcpdf/fonts/freeserif.ctg.z
lib/tcpdf/fonts/freeserif.php
lib/tcpdf/fonts/freeserif.z
lib/tcpdf/fonts/freeserifb.ctg.z
lib/tcpdf/fonts/freeserifb.php
lib/tcpdf/fonts/freeserifb.z
lib/tcpdf/fonts/freeserifbi.ctg.z
lib/tcpdf/fonts/freeserifbi.php
lib/tcpdf/fonts/freeserifbi.z
lib/tcpdf/fonts/freeserifi.ctg.z
lib/tcpdf/fonts/freeserifi.php
lib/tcpdf/fonts/freeserifi.z
lib/tcpdf/fonts/readme_moodle.txt [moved from lib/tcpdf/fonts/README-MOODLE.TXT with 100% similarity]
lib/tcpdf/htmlcolors.php
lib/tcpdf/readme_moodle.txt [moved from lib/tcpdf/README-MOODLE.TXT with 60% similarity]
lib/tcpdf/tcpdf.crt [new file with mode: 0644]
lib/tcpdf/tcpdf.fdf [new file with mode: 0644]
lib/tcpdf/tcpdf.pem [deleted file]
lib/tcpdf/tcpdf.php
lib/tcpdf/unicode_data.php

index 13e5fcbcd0a3a673df5a6dd38b48ddcd7bfdaee7..dae9cca3e46c7c94ab8e03f1323ed99b011cbd59 100644 (file)
-<?php\r
-//============================================================+\r
-// File name   : 2dbarcodes.php\r
-// Begin       : 2009-04-07\r
-// Last Update : 2009-04-08\r
-// Version     : 1.0.000\r
-// License     : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)\r
-//     ----------------------------------------------------------------------------\r
-//  Copyright (C) 2008-2009 Nicola Asuni - Tecnick.com S.r.l.\r
-//     \r
-//     This program is free software: you can redistribute it and/or modify\r
-//     it under the terms of the GNU Lesser General Public License as published by\r
-//     the Free Software Foundation, either version 2.1 of the License, or\r
-//     (at your option) any later version.\r
-//     \r
-//     This program is distributed in the hope that it will be useful,\r
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-//     GNU Lesser General Public License for more details.\r
-//     \r
-//     You should have received a copy of the GNU Lesser General Public License\r
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
-//     \r
-//     See LICENSE.TXT file for more information.\r
-//  ----------------------------------------------------------------------------\r
-//\r
-// Description : PHP class to creates array representations for \r
-//               2D barcodes to be used with TCPDF.\r
-//\r
-// Author: Nicola Asuni\r
-//\r
-// (c) Copyright:\r
-//               Nicola Asuni\r
-//               Tecnick.com S.r.l.\r
-//               Via della Pace, 11\r
-//               09044 Quartucciu (CA)\r
-//               ITALY\r
-//               www.tecnick.com\r
-//               info@tecnick.com\r
-//============================================================+\r
-\r
-/**\r
- * PHP class to creates array representations for 2D barcodes to be used with TCPDF.\r
- * @package com.tecnick.tcpdf\r
- * @abstract Functions for generating string representation of 2D barcodes.\r
- * @author Nicola Asuni\r
- * @copyright 2008-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\r
- * @link http://www.tcpdf.org\r
- * @license http://www.gnu.org/copyleft/lesser.html LGPL\r
- * @version 1.0.000\r
- */\r
-\r
-       /**\r
-       * PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org).<br>\r
-       * @name TCPDFBarcode\r
-       * @package com.tecnick.tcpdf\r
-       * @version 1.0.000\r
-       * @author Nicola Asuni\r
-       * @link http://www.tcpdf.org\r
-       * @license http://www.gnu.org/copyleft/lesser.html LGPL\r
-       */\r
-class TCPDF2DBarcode {\r
-       \r
-       /**\r
-        * @var array representation of barcode.\r
-        * @access protected\r
-        */\r
+<?php
+//============================================================+
+// File name   : 2dbarcodes.php
+// Begin       : 2009-04-07
+// Last Update : 2009-08-17
+// Version     : 1.0.000
+// License     : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
+//     ----------------------------------------------------------------------------
+//  Copyright (C) 2008-2009 Nicola Asuni - Tecnick.com S.r.l.
+//     
+//     This program is free software: you can redistribute it and/or modify
+//     it under the terms of the GNU Lesser General Public License as published by
+//     the Free Software Foundation, either version 2.1 of the License, or
+//     (at your option) any later version.
+//     
+//     This program is distributed in the hope that it will be useful,
+//     but WITHOUT ANY WARRANTY; without even the implied warranty of
+//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//     GNU Lesser General Public License for more details.
+//     
+//     You should have received a copy of the GNU Lesser General Public License
+//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//     
+//     See LICENSE.TXT file for more information.
+//  ----------------------------------------------------------------------------
+//
+// Description : PHP class to creates array representations for 
+//               2D barcodes to be used with TCPDF.
+//
+// Author: Nicola Asuni
+//
+// (c) Copyright:
+//               Nicola Asuni
+//               Tecnick.com S.r.l.
+//               Via della Pace, 11
+//               09044 Quartucciu (CA)
+//               ITALY
+//               www.tecnick.com
+//               info@tecnick.com
+//============================================================+
+
+/**
+ * PHP class to creates array representations for 2D barcodes to be used with TCPDF.
+ * @package com.tecnick.tcpdf
+ * @abstract Functions for generating string representation of 2D barcodes.
+ * @author Nicola Asuni
+ * @copyright 2008-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 1.0.000
+ */
+
+       /**
+       * PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org).<br>
+       * @name TCPDFBarcode
+       * @package com.tecnick.tcpdf
+       * @version 1.0.000
+       * @author Nicola Asuni
+       * @link http://www.tcpdf.org
+       * @license http://www.gnu.org/copyleft/lesser.html LGPL
+       */
+class TCPDF2DBarcode {
+       
+       /**
+        * @var array representation of barcode.
+        * @access protected
+        */
        protected $barcode_array;
-       \r
-       /**\r
-        * This is the class constructor. \r
-        * Return an array representations for 2D barcodes:<ul>\r
-        * <li>$arrcode['code'] code to be printed on text label</li>\r
-        * <li>$arrcode['num_rows'] required number of rows</li>\r
-        * <li>$arrcode['num_cols'] required number of columns</li>\r
-        * <li>$arrcode['bcode'][$r][$c] value of the cell is $r row and $c column (0 = transparent, 1 = black)</li></ul>\r
-        * @param string $code code to print\r
-        * @param string $type type of barcode: <ul><li>TEST</li><li>...TO BE IMPLEMENTED</li></ul>\r
-        */\r
-       public function __construct($code, $type) {\r
-               $this->setBarcode($code, $type);\r
-       }\r
-       \r
-       /** \r
-        * Return an array representations of barcode.\r
-        * @return array\r
-        */\r
-       public function getBarcodeArray() {\r
-               return $this->barcode_array;\r
-       }\r
-       \r
-       /** \r
-        * Set the barcode.\r
-        * @param string $code code to print\r
-        * @param string $type type of barcode: <ul><li>TEST</li><li>...TO BE IMPLEMENTED</li></ul>\r
-        * @return array\r
-        */\r
-       public function setBarcode($code, $type) {\r
+       
+       /**
+        * This is the class constructor. 
+        * Return an array representations for 2D barcodes:<ul>
+        * <li>$arrcode['code'] code to be printed on text label</li>
+        * <li>$arrcode['num_rows'] required number of rows</li>
+        * <li>$arrcode['num_cols'] required number of columns</li>
+        * <li>$arrcode['bcode'][$r][$c] value of the cell is $r row and $c column (0 = transparent, 1 = black)</li></ul>
+        * @param string $code code to print
+        * @param string $type type of barcode: <ul><li>TEST</li><li>...TO BE IMPLEMENTED</li></ul>
+        */
+       public function __construct($code, $type) {
+               $this->setBarcode($code, $type);
+       }
+       
+       /** 
+        * Return an array representations of barcode.
+        * @return array
+        */
+       public function getBarcodeArray() {
+               return $this->barcode_array;
+       }
+       
+       /** 
+        * Set the barcode.
+        * @param string $code code to print
+        * @param string $type type of barcode: <ul><li>TEST</li><li>...TO BE IMPLEMENTED</li></ul>
+        * @return array
+        */
+       public function setBarcode($code, $type) {
                $mode = explode(',', $type);
-               switch (strtoupper($mode[0])) {\r
-                       case 'TEST': { // TEST MODE\r
+               switch (strtoupper($mode[0])) {
+                       case 'TEST': { // TEST MODE
                                $this->barcode_array['num_rows'] = 5;
                                $this->barcode_array['num_cols'] = 15;
                                $this->barcode_array['bcode'] = array(
@@ -107,20 +107,20 @@ class TCPDF2DBarcode {
                                        array(0,1,0,0,1,1,0,0,1,1,1,0,0,1,0),
                                        array(0,1,0,0,1,0,0,0,0,0,1,0,0,1,0),
                                        array(0,1,0,0,1,1,1,0,1,1,1,0,0,1,0)
-                               );\r
-                               break;\r
+                               );
+                               break;
                        }
                        
                        // ... Add here real 2D barcodes ...
-                       \r
-                       default: {\r
-                               $this->barcode_array = false;\r
-                       }\r
-               }\r
-       }\r
-} // end of class\r
-\r
-//============================================================+\r
-// END OF FILE                                                 \r
-//============================================================+\r
+                       
+                       default: {
+                               $this->barcode_array = false;
+                       }
+               }
+       }
+} // end of class
+
+//============================================================+
+// END OF FILE                                                 
+//============================================================+
 ?>
index 61d8fe0eefec49359f5eaf828fd119935debb891..0340425a343d4c665606f7b06d564347ec41d227 100644 (file)
@@ -1,3 +1,128 @@
+4.8.014 (2009-11-04)
+       - Bug item #2891316 "writeHTML, underlining replacing spaces" was fixed.
+       - The handling of temporary RTL text direction mode was fixed.
+       
+4.8.013 (2009-10-26)
+       - Bug item #2884729 "Problem with word-wrap and hyphen" was fixed.
+       
+4.8.012 (2009-10-23)
+       - Table cell alignments for RTL booklet mode were fixed.
+       - Images and barcode alignments for booklet mode were fixed.
+       
+4.8.011 (2009-10-22)
+       - DejaVu fonts were updated to latest version.
+       
+4.8.010 (2009-10-21)
+       - Bookmark for TOC page was added.
+       - Signature of addTOC() method is changed.
+       - Bookmarks are now automatically sorted by page and Y position.
+       - Example n. 45 was updated.
+       - Example n. 55 was added to display all charactes available on core fonts.
+       
+4.8.009 (2009-09-30)
+       - Compatibility with PHP 5.3 was improved.
+       - All examples were updated.
+       - Index file for examples was added.
+       
+4.8.008 (2009-09-29)
+       - Example 49 was updated.
+       - Underline and linethrough now works with cell stretching mode.
+       
+4.8.007 (2009-09-23)
+       - Infinite loop problem caused by nobr attribute was fixed.
+       
+4.8.006 (2009-09-23)
+       - Bug item #2864522 "No images if DOCUMENT_ROOT=='/'" was fixed.
+       - Support for text-indent CSS attribute was added.
+       - Method rollbackTransaction() was changed to support self-reassigment of previous object (check source code documentation).
+       - Support for the HTML "nobr" attribute was added to avoid splitting a table or a table row on two pages (i.e.: <tr nobr="true">...</tr>).
+
+4.8.005 (2009-09-17)
+       - A bug relative to multiple transformations and annotations was fixed.
+
+4.8.004 (2009-09-16)
+       - A bug on _putannotsrefs() method was fixed.
+
+4.8.003 (2009-09-15)
+       - Bug item #2858754 "Division by zero" was fixed.
+       - A bug relative to HTML list items was fixed.
+       - A bug relative to form fields on multiple pages was fixed.
+       - PolyLine() method was added (see example n. 12).
+       - Signature of Polygon() method was changed.
+
+4.8.002 (2009-09-12)
+       - A problem related to CID-0 fonts offset was fixed: if the $cw[1] entry on the CID-0 font file is not defined, then a CID keys offset is introduced.
+
+4.8.001 (2009-09-09)
+       - The appearance streams (AP) for anotations form fields was fixed (see examples n. 14 and 54).
+       - Radiobuttons were fixed.
+
+4.8.000 (2009-09-07)
+       - This version includes some support for Forms fields (see example n. 14) and XHTML forms (see example n. 54).
+       - The following methods were changed to work without JavaScript: TextField(), RadioButton(), ListBox(), ComboBox(), CheckBox(), Button().
+       - Support for Widget annotations was improved.
+       - Alignment of annotation objects was fixed (examples 36 and 41 were updated).
+       - addJavascriptObject() method was added.
+       - Signature of Image() method was changed.
+       - htmlcolors.php file was updated.
+
+--------------------------------------------------------------------------------
+
+4.7.003 (2009-09-03)
+       - Support for TCPDF methods on HTML was improved (see example n. 49).
+       
+4.7.002 (2009-09-02)
+       - Bug item #2848892 "writeHTML + table: Gaps between rows" was fixed.
+       - JavaScript support was fixed (see example n. 53).
+       
+4.7.001 (2009-08-30)
+       - The Polygon() and Arrow() methods were fixed and improved (see example n. 12).
+       
+4.7.000 (2009-08-29)
+       - This is a major release.
+       - Some procedures were internally optimized.
+       - The problem of mixed signature and annotations was fixed (example n. 52).
+       
+4.6.030 (2009-08-29)
+       - IMPORTANT: percentages on table cell widths are now relative to the full table width (as in standard HTML).
+       - Various minor bugs were fixed.
+       - Example n. 52 (digital signature) was updated.
+       
+4.6.029 (2009-08-26)
+       - PHP4 version was fixed.
+
+4.6.028 (2009-08-25)
+       - Signature algorithm was finally fixed (see example n. 52).
+
+4.6.027 (2009-08-24)
+       - TCPDF now supports unembedded TrueTypeUnicode Fonts (just comment the $file entry on the fonts' php file.
+
+4.6.026 (2009-08-21)
+       - Bug #2841693 "Problem with MultiCell and ishtml and justification" was fixed.
+       - Signature functions were improved but not yet fixed (tcpdf.crt and example n. 52 were updated).
+
+4.6.025 (2009-08-17)
+       - Carriage returns (\r) were removed from source code.
+       - Problem related to set_magic_quotes_runtime() depracated was fixed.
+
+4.6.024 (2009-08-07)
+       - Bug item #2833556 "justification using other units than mm" was fixed.
+       - Documentation was fixed/updated.
+
+4.6.023 (2009-08-02)
+       - Bug item #2830537 "MirrorH can show mask for transparent PNGs" was fixed.
+
+4.6.022 (2009-07-24)
+       - A bug relative to single line printing when using WriteHTMLCell() was fixed.
+       - Signature support were improved but is still experimental.
+       - Fonts Free and Dejavu were updated to latest versions.
+
+4.6.021 (2009-07-20)
+       - Bug item #2824015 "XHTML Ampersand &amp; in hyperlink bug" was fixed.
+       - Bug item #2824036 "Image as hyperlink in table, text displaced at page break" was fixed.
+       - Links alignment on justified text was fixed.
+       - Unicode "\u" modifier was added to re_spaces variable by default.
+       
 4.6.020 (2009-07-16)
        - Bug item #2821921 "issue in example 18" was fixed.
        - Signature of SetRTL() method was changed.
        - removed commercial fonts for licensing issue.\r
        - Bitstream Vera Fonts were added (http://www.bitstream.com/font_rendering/products/dev_fonts/vera.html).\r
        - Now the AddFont and SetFont functions returns the basic font if the styled version do not exist.\r
-\r
+
+EOF ----------------------------------------------------------------------------
index dd573aabb560eb33678e1c8fd3a6969b05e32241..af9db5262b77a23c02de8d74f5107abdac97ecfb 100755 (executable)
@@ -8,9 +8,9 @@ http://sourceforge.net/donate/index.php?group_id=128076
 ------------------------------------------------------------\r
 \r
 Name: TCPDF\r
-Version: 4.6.020\r
-Release date: 2009-07-16\r
-Author:        Nicola Asuni \r
+Version: 4.8.014\r
+Release date: 2009-11-04\r
+Author:        Nicola Asuni\r
        \r
 Copyright (c) 2001-2009:\r
        Nicola Asuni\r
@@ -35,9 +35,9 @@ Main Features:
 //     * supports UTF-8 Unicode and Right-To-Left languages;
 //     * supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;\r
 //     * supports document encryption;\r
-//     * includes methods to publish some XHTML code;\r
+//     * includes methods to publish some XHTML code, including forms;\r
 //     * includes graphic (geometric) and transformation methods;\r
-//     * includes Javascript and forms support;\r
+//     * includes Javascript and Forms support;\r
 //     * includes a method to print various barcode formats: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS;
 //     * includes methods to set Bookmarks and print a Table of Content;
 //     * includes methods to move and delete pages;\r
@@ -53,6 +53,7 @@ Main Features:
 //     * supports page compression (requires zlib extension);
 //  * supports text hyphenation.
 //  * supports transactions to UNDO commands.\r
+//  * supports signature certifications.
 \r
 Installation (full instructions on http://www.tcpdf.org):\r
        1. copy the folder on your Web server\r
index 1279c2e7457084bf83b6b2f4073416e0e0d10ce8..c8595957938ff4bab0b20a7839edd84ee26f6f7c 100644 (file)
-<?php\r
-//============================================================+\r
-// File name   : barcodes.php\r
-// Begin       : 2008-06-09\r
-// Last Update : 2009-04-15\r
-// Version     : 1.0.008\r
-// License     : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)\r
-//     ----------------------------------------------------------------------------\r
-//  Copyright (C) 2008-2009 Nicola Asuni - Tecnick.com S.r.l.\r
-//     \r
-//     This program is free software: you can redistribute it and/or modify\r
-//     it under the terms of the GNU Lesser General Public License as published by\r
-//     the Free Software Foundation, either version 2.1 of the License, or\r
-//     (at your option) any later version.\r
-//     \r
-//     This program is distributed in the hope that it will be useful,\r
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-//     GNU Lesser General Public License for more details.\r
-//     \r
-//     You should have received a copy of the GNU Lesser General Public License\r
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
-//     \r
-//     See LICENSE.TXT file for more information.\r
-//  ----------------------------------------------------------------------------\r
-//\r
-// Description : PHP class to creates array representations for \r
-//               common 1D barcodes to be used with TCPDF.\r
-//\r
-// Author: Nicola Asuni\r
-//\r
-// (c) Copyright:\r
-//               Nicola Asuni\r
-//               Tecnick.com S.r.l.\r
-//               Via della Pace, 11\r
-//               09044 Quartucciu (CA)\r
-//               ITALY\r
-//               www.tecnick.com\r
-//               info@tecnick.com\r
-//============================================================+\r
-\r
-/**\r
- * PHP class to creates array representations for common 1D barcodes to be used with TCPDF.\r
- * @package com.tecnick.tcpdf\r
- * @abstract Functions for generating string representation of common 1D barcodes.\r
- * @author Nicola Asuni\r
- * @copyright 2008-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\r
- * @link http://www.tcpdf.org\r
- * @license http://www.gnu.org/copyleft/lesser.html LGPL\r
- * @version 1.0.008\r
- */\r
-\r
-       /**\r
-       * PHP class to creates array representations for common 1D barcodes to be used with TCPDF (http://www.tcpdf.org).<br>\r
-       * @name TCPDFBarcode\r
-       * @package com.tecnick.tcpdf\r
-       * @version 1.0.008\r
-       * @author Nicola Asuni\r
-       * @link http://www.tcpdf.org\r
-       * @license http://www.gnu.org/copyleft/lesser.html LGPL\r
-       */\r
-class TCPDFBarcode {\r
-       \r
-       /**\r
-        * @var array representation of barcode.\r
-        * @access protected\r
-        */\r
-       protected $barcode_array;\r
-               \r
-       /**\r
-        * This is the class constructor. \r
-        * Return an array representations for common 1D barcodes:<ul>\r
-        * <li>$arrcode['code'] code to be printed on text label</li>\r
-        * <li>$arrcode['maxh'] max bar height</li>\r
-        * <li>$arrcode['maxw'] max bar width</li>\r
-        * <li>$arrcode['bcode'][$k] single bar or space in $k position</li>\r
-        * <li>$arrcode['bcode'][$k]['t'] bar type: true = bar, false = space.</li>\r
-        * <li>$arrcode['bcode'][$k]['w'] bar width in units.</li>\r
-        * <li>$arrcode['bcode'][$k]['h'] bar height in units.</li>\r
-        * <li>$arrcode['bcode'][$k]['p'] bar top position (0 = top, 1 = middle)</li></ul>\r
-        * @param string $code code to print\r
-        * @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extention</li><li>EAN5 : 5-Digits UPC-Based Extention</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>\r
-        */\r
-       public function __construct($code, $type) {\r
-               $this->setBarcode($code, $type);\r
-       }\r
-       \r
-       /** \r
-        * Return an array representations of barcode.\r
-        * @return array\r
-        */\r
-       public function getBarcodeArray() {\r
-               return $this->barcode_array;\r
-       }\r
-       \r
-       /** \r
-        * Set the barcode.\r
-        * @param string $code code to print\r
-        * @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extention</li><li>EAN5 : 5-Digits UPC-Based Extention</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>\r
-        * @return array\r
-        */\r
-       public function setBarcode($code, $type) {\r
-               switch (strtoupper($type)) {\r
-                       case 'C39': { // CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.\r
-                               $arrcode = $this->barcode_code39($code, false, false);\r
-                               break;\r
-                       }\r
-                       case 'C39+': { // CODE 39 with checksum\r
-                               $arrcode = $this->barcode_code39($code, false, true);\r
-                               break;\r
-                       }\r
-                       case 'C39E': { // CODE 39 EXTENDED\r
-                               $arrcode = $this->barcode_code39($code, true, false);\r
-                               break;\r
-                       }\r
-                       case 'C39E+': { // CODE 39 EXTENDED + CHECKSUM\r
-                               $arrcode = $this->barcode_code39($code, true, true);\r
-                               break;\r
-                       }
-                       case 'C93': { // CODE 93 - USS-93\r
-                               $arrcode = $this->barcode_code93($code);\r
-                               break;\r
-                       }\r
-                       case 'S25': { // Standard 2 of 5\r
-                               $arrcode = $this->barcode_s25($code, false);\r
-                               break;\r
-                       }\r
-                       case 'S25+': { // Standard 2 of 5 + CHECKSUM\r
-                               $arrcode = $this->barcode_s25($code, true);\r
-                               break;\r
-                       }\r
-                       case 'I25': { // Interleaved 2 of 5\r
-                               $arrcode = $this->barcode_i25($code, false);\r
-                               break;\r
-                       }\r
-                       case 'I25+': { // Interleaved 2 of 5 + CHECKSUM\r
-                               $arrcode = $this->barcode_i25($code, true);\r
-                               break;\r
-                       }\r
-                       case 'C128A': { // CODE 128 A\r
-                               $arrcode = $this->barcode_c128($code, 'A');\r
-                               break;\r
-                       }\r
-                       case 'C128B': { // CODE 128 B\r
-                               $arrcode = $this->barcode_c128($code, 'B');\r
-                               break;\r
-                       }\r
-                       case 'C128C': { // CODE 128 C\r
-                               $arrcode = $this->barcode_c128($code, 'C');\r
-                               break;\r
-                       }
-                       case 'EAN2': { // 2-Digits UPC-Based Extention\r
-                               $arrcode = $this->barcode_eanext($code, 2);\r
-                               break;\r
-                       }
-                       case 'EAN5': { // 5-Digits UPC-Based Extention\r
-                               $arrcode = $this->barcode_eanext($code, 5);\r
-                               break;\r
-                       }
-                       case 'EAN8': { // EAN 8\r
-                               $arrcode = $this->barcode_eanupc($code, 8);\r
-                               break;\r
-                       }\r
-                       case 'EAN13': { // EAN 13\r
-                               $arrcode = $this->barcode_eanupc($code, 13);\r
-                               break;\r
-                       }\r
-                       case 'UPCA': { // UPC-A\r
-                               $arrcode = $this->barcode_eanupc($code, 12);\r
-                               break;\r
-                       }\r
-                       case 'UPCE': { // UPC-E\r
-                               $arrcode = $this->barcode_eanupc($code, 6);\r
-                               break;\r
-                       }
-                       case 'MSI': { // MSI (Variation of Plessey code)\r
-                               $arrcode = $this->barcode_msi($code, false);\r
-                               break;\r
-                       }
-                       case 'MSI+': { // MSI + CHECKSUM (modulo 11)\r
-                               $arrcode = $this->barcode_msi($code, true);\r
-                               break;\r
-                       }\r
-                       case 'POSTNET': { // POSTNET\r
-                               $arrcode = $this->barcode_postnet($code, false);\r
-                               break;\r
-                       }
-                       case 'PLANET': { // PLANET\r
-                               $arrcode = $this->barcode_postnet($code, true);\r
-                               break;\r
-                       }
-                       case 'RMS4CC': { // RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)\r
-                               $arrcode = $this->barcode_rms4cc($code, false);\r
-                               break;\r
-                       }
-                       case 'KIX': { // KIX (Klant index - Customer index)\r
-                               $arrcode = $this->barcode_rms4cc($code, true);\r
-                               break;\r
-                       }
-                       case 'IMB': { // IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200\r
-                               $arrcode = $this->barcode_imb($code);\r
-                               break;\r
-                       }\r
-                       case 'CODABAR': { // CODABAR\r
-                               $arrcode = $this->barcode_codabar($code);\r
-                               break;\r
-                       }
-                       case 'CODE11': { // CODE 11\r
-                               $arrcode = $this->barcode_code11($code);\r
-                               break;\r
-                       }
-                       case 'PHARMA': { // PHARMACODE\r
-                               $arrcode = $this->barcode_pharmacode($code);\r
-                               break;\r
-                       }
-                       case 'PHARMA2T': { // PHARMACODE TWO-TRACKS\r
-                               $arrcode = $this->barcode_pharmacode2t($code);\r
-                               break;\r
-                       }\r
-                       default: {\r
-                               $this->barcode_array = false;\r
-                       }\r
-               }\r
-               $this->barcode_array = $arrcode;\r
-       }\r
-       \r
-       /**\r
+<?php
+//============================================================+
+// File name   : barcodes.php
+// Begin       : 2008-06-09
+// Last Update : 2009-08-26
+// Version     : 1.0.009
+// License     : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
+//     ----------------------------------------------------------------------------
+//  Copyright (C) 2008-2009 Nicola Asuni - Tecnick.com S.r.l.
+//     
+//     This program is free software: you can redistribute it and/or modify
+//     it under the terms of the GNU Lesser General Public License as published by
+//     the Free Software Foundation, either version 2.1 of the License, or
+//     (at your option) any later version.
+//     
+//     This program is distributed in the hope that it will be useful,
+//     but WITHOUT ANY WARRANTY; without even the implied warranty of
+//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//     GNU Lesser General Public License for more details.
+//     
+//     You should have received a copy of the GNU Lesser General Public License
+//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//     
+//     See LICENSE.TXT file for more information.
+//  ----------------------------------------------------------------------------
+//
+// Description : PHP class to creates array representations for 
+//               common 1D barcodes to be used with TCPDF.
+//
+// Author: Nicola Asuni
+//
+// (c) Copyright:
+//               Nicola Asuni
+//               Tecnick.com S.r.l.
+//               Via della Pace, 11
+//               09044 Quartucciu (CA)
+//               ITALY
+//               www.tecnick.com
+//               info@tecnick.com
+//============================================================+
+
+/**
+ * PHP class to creates array representations for common 1D barcodes to be used with TCPDF.
+ * @package com.tecnick.tcpdf
+ * @abstract Functions for generating string representation of common 1D barcodes.
+ * @author Nicola Asuni
+ * @copyright 2008-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 1.0.008
+ */
+
+       /**
+       * PHP class to creates array representations for common 1D barcodes to be used with TCPDF (http://www.tcpdf.org).<br>
+       * @name TCPDFBarcode
+       * @package com.tecnick.tcpdf
+       * @version 1.0.008
+       * @author Nicola Asuni
+       * @link http://www.tcpdf.org
+       * @license http://www.gnu.org/copyleft/lesser.html LGPL
+       */
+class TCPDFBarcode {
+       
+       /**
+        * @var array representation of barcode.
+        * @access protected
+        */
+       protected $barcode_array;
+               
+       /**
+        * This is the class constructor. 
+        * Return an array representations for common 1D barcodes:<ul>
+        * <li>$arrcode['code'] code to be printed on text label</li>
+        * <li>$arrcode['maxh'] max bar height</li>
+        * <li>$arrcode['maxw'] max bar width</li>
+        * <li>$arrcode['bcode'][$k] single bar or space in $k position</li>
+        * <li>$arrcode['bcode'][$k]['t'] bar type: true = bar, false = space.</li>
+        * <li>$arrcode['bcode'][$k]['w'] bar width in units.</li>
+        * <li>$arrcode['bcode'][$k]['h'] bar height in units.</li>
+        * <li>$arrcode['bcode'][$k]['p'] bar top position (0 = top, 1 = middle)</li></ul>
+        * @param string $code code to print
+        * @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extention</li><li>EAN5 : 5-Digits UPC-Based Extention</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
+        */
+       public function __construct($code, $type) {
+               $this->setBarcode($code, $type);
+       }
+       
+       /** 
+        * Return an array representations of barcode.
+        * @return array
+        */
+       public function getBarcodeArray() {
+               return $this->barcode_array;
+       }
+       
+       /** 
+        * Set the barcode.
+        * @param string $code code to print
+        * @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extention</li><li>EAN5 : 5-Digits UPC-Based Extention</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
+        * @return array
+        */
+       public function setBarcode($code, $type) {
+               switch (strtoupper($type)) {
+                       case 'C39': { // CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
+                               $arrcode = $this->barcode_code39($code, false, false);
+                               break;
+                       }
+                       case 'C39+': { // CODE 39 with checksum
+                               $arrcode = $this->barcode_code39($code, false, true);
+                               break;
+                       }
+                       case 'C39E': { // CODE 39 EXTENDED
+                               $arrcode = $this->barcode_code39($code, true, false);
+                               break;
+                       }
+                       case 'C39E+': { // CODE 39 EXTENDED + CHECKSUM
+                               $arrcode = $this->barcode_code39($code, true, true);
+                               break;
+                       }
+                       case 'C93': { // CODE 93 - USS-93
+                               $arrcode = $this->barcode_code93($code);
+                               break;
+                       }
+                       case 'S25': { // Standard 2 of 5
+                               $arrcode = $this->barcode_s25($code, false);
+                               break;
+                       }
+                       case 'S25+': { // Standard 2 of 5 + CHECKSUM
+                               $arrcode = $this->barcode_s25($code, true);
+                               break;
+                       }
+                       case 'I25': { // Interleaved 2 of 5
+                               $arrcode = $this->barcode_i25($code, false);
+                               break;
+                       }
+                       case 'I25+': { // Interleaved 2 of 5 + CHECKSUM
+                               $arrcode = $this->barcode_i25($code, true);
+                               break;
+                       }
+                       case 'C128A': { // CODE 128 A
+                               $arrcode = $this->barcode_c128($code, 'A');
+                               break;
+                       }
+                       case 'C128B': { // CODE 128 B
+                               $arrcode = $this->barcode_c128($code, 'B');
+                               break;
+                       }
+                       case 'C128C': { // CODE 128 C
+                               $arrcode = $this->barcode_c128($code, 'C');
+                               break;
+                       }
+                       case 'EAN2': { // 2-Digits UPC-Based Extention
+                               $arrcode = $this->barcode_eanext($code, 2);
+                               break;
+                       }
+                       case 'EAN5': { // 5-Digits UPC-Based Extention
+                               $arrcode = $this->barcode_eanext($code, 5);
+                               break;
+                       }
+                       case 'EAN8': { // EAN 8
+                               $arrcode = $this->barcode_eanupc($code, 8);
+                               break;
+                       }
+                       case 'EAN13': { // EAN 13
+                               $arrcode = $this->barcode_eanupc($code, 13);
+                               break;
+                       }
+                       case 'UPCA': { // UPC-A
+                               $arrcode = $this->barcode_eanupc($code, 12);
+                               break;
+                       }
+                       case 'UPCE': { // UPC-E
+                               $arrcode = $this->barcode_eanupc($code, 6);
+                               break;
+                       }
+                       case 'MSI': { // MSI (Variation of Plessey code)
+                               $arrcode = $this->barcode_msi($code, false);
+                               break;
+                       }
+                       case 'MSI+': { // MSI + CHECKSUM (modulo 11)
+                               $arrcode = $this->barcode_msi($code, true);
+                               break;
+                       }
+                       case 'POSTNET': { // POSTNET
+                               $arrcode = $this->barcode_postnet($code, false);
+                               break;
+                       }
+                       case 'PLANET': { // PLANET
+                               $arrcode = $this->barcode_postnet($code, true);
+                               break;
+                       }
+                       case 'RMS4CC': { // RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
+                               $arrcode = $this->barcode_rms4cc($code, false);
+                               break;
+                       }
+                       case 'KIX': { // KIX (Klant index - Customer index)
+                               $arrcode = $this->barcode_rms4cc($code, true);
+                               break;
+                       }
+                       case 'IMB': { // IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
+                               $arrcode = $this->barcode_imb($code);
+                               break;
+                       }
+                       case 'CODABAR': { // CODABAR
+                               $arrcode = $this->barcode_codabar($code);
+                               break;
+                       }
+                       case 'CODE11': { // CODE 11
+                               $arrcode = $this->barcode_code11($code);
+                               break;
+                       }
+                       case 'PHARMA': { // PHARMACODE
+                               $arrcode = $this->barcode_pharmacode($code);
+                               break;
+                       }
+                       case 'PHARMA2T': { // PHARMACODE TWO-TRACKS
+                               $arrcode = $this->barcode_pharmacode2t($code);
+                               break;
+                       }
+                       default: {
+                               $this->barcode_array = false;
+                               $arrcode = false;
+                               break;
+                       }
+               }
+               $this->barcode_array = $arrcode;
+       }
+       
+       /**
         * CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
-        * General-purpose code in very wide use world-wide\r
-        * @param string $code code to represent.\r
-        * @param boolean $checksum if true add a checksum to the code\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
-       protected function barcode_code39($code, $extended=false, $checksum=false) {\r
-               $chr['0'] = '111221211';\r
-               $chr['1'] = '211211112';\r
-               $chr['2'] = '112211112';\r
-               $chr['3'] = '212211111';\r
-               $chr['4'] = '111221112';\r
-               $chr['5'] = '211221111';\r
-               $chr['6'] = '112221111';\r
-               $chr['7'] = '111211212';\r
-               $chr['8'] = '211211211';\r
-               $chr['9'] = '112211211';\r
-               $chr['A'] = '211112112';\r
-               $chr['B'] = '112112112';\r
-               $chr['C'] = '212112111';\r
-               $chr['D'] = '111122112';\r
-               $chr['E'] = '211122111';\r
-               $chr['F'] = '112122111';\r
-               $chr['G'] = '111112212';\r
-               $chr['H'] = '211112211';\r
-               $chr['I'] = '112112211';\r
-               $chr['J'] = '111122211';\r
-               $chr['K'] = '211111122';\r
-               $chr['L'] = '112111122';\r
-               $chr['M'] = '212111121';\r
-               $chr['N'] = '111121122';\r
-               $chr['O'] = '211121121';\r
-               $chr['P'] = '112121121';\r
-               $chr['Q'] = '111111222';\r
-               $chr['R'] = '211111221';\r
-               $chr['S'] = '112111221';\r
-               $chr['T'] = '111121221';\r
-               $chr['U'] = '221111112';\r
-               $chr['V'] = '122111112';\r
-               $chr['W'] = '222111111';\r
-               $chr['X'] = '121121112';\r
-               $chr['Y'] = '221121111';\r
-               $chr['Z'] = '122121111';\r
-               $chr['-'] = '121111212';\r
-               $chr['.'] = '221111211';\r
-               $chr[' '] = '122111211';\r
-               $chr['$'] = '121212111';\r
-               $chr['/'] = '121211121';\r
-               $chr['+'] = '121112121';\r
+        * General-purpose code in very wide use world-wide
+        * @param string $code code to represent.
+        * @param boolean $checksum if true add a checksum to the code
+        * @return array barcode representation.
+        * @access protected
+        */
+       protected function barcode_code39($code, $extended=false, $checksum=false) {
+               $chr['0'] = '111221211';
+               $chr['1'] = '211211112';
+               $chr['2'] = '112211112';
+               $chr['3'] = '212211111';
+               $chr['4'] = '111221112';
+               $chr['5'] = '211221111';
+               $chr['6'] = '112221111';
+               $chr['7'] = '111211212';
+               $chr['8'] = '211211211';
+               $chr['9'] = '112211211';
+               $chr['A'] = '211112112';
+               $chr['B'] = '112112112';
+               $chr['C'] = '212112111';
+               $chr['D'] = '111122112';
+               $chr['E'] = '211122111';
+               $chr['F'] = '112122111';
+               $chr['G'] = '111112212';
+               $chr['H'] = '211112211';
+               $chr['I'] = '112112211';
+               $chr['J'] = '111122211';
+               $chr['K'] = '211111122';
+               $chr['L'] = '112111122';
+               $chr['M'] = '212111121';
+               $chr['N'] = '111121122';
+               $chr['O'] = '211121121';
+               $chr['P'] = '112121121';
+               $chr['Q'] = '111111222';
+               $chr['R'] = '211111221';
+               $chr['S'] = '112111221';
+               $chr['T'] = '111121221';
+               $chr['U'] = '221111112';
+               $chr['V'] = '122111112';
+               $chr['W'] = '222111111';
+               $chr['X'] = '121121112';
+               $chr['Y'] = '221121111';
+               $chr['Z'] = '122121111';
+               $chr['-'] = '121111212';
+               $chr['.'] = '221111211';
+               $chr[' '] = '122111211';
+               $chr['$'] = '121212111';
+               $chr['/'] = '121211121';
+               $chr['+'] = '121112121';
                $chr['%'] = '111212121';
-               $chr['*'] = '121121211';\r
-               \r
-               $code = strtoupper($code);\r
-               if ($extended) {\r
-                       // extended mode\r
-                       $code = $this->encode_code39_ext($code);\r
-               }\r
-               if ($code === false) {\r
-                       return false;\r
-               }\r
-               if ($checksum) {\r
-                       // checksum\r
-                       $code .= $this->checksum_code39($code);\r
-               }\r
-               // add start and stop codes\r
-               $code = '*'.$code.'*';\r
-               \r
-               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());\r
+               $chr['*'] = '121121211';
+               
+               $code = strtoupper($code);
+               if ($extended) {
+                       // extended mode
+                       $code = $this->encode_code39_ext($code);
+               }
+               if ($code === false) {
+                       return false;
+               }
+               if ($checksum) {
+                       // checksum
+                       $code .= $this->checksum_code39($code);
+               }
+               // add start and stop codes
+               $code = '*'.$code.'*';
+               
+               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
                $k = 0;
-               $clen = strlen($code);\r
-               for ($i = 0; $i < $clen; ++$i) {\r
-                       $char = $code{$i};\r
-                       if(!isset($chr[$char])) {\r
-                               // invalid character\r
-                               return false;\r
-                       }\r
-                       for ($j = 0; $j < 9; ++$j) {\r
-                               if (($j % 2) == 0) {\r
-                                       $t = true; // bar\r
-                               } else {\r
-                                       $t = false; // space\r
-                               }\r
-                               $w = $chr[$char]{$j};\r
-                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);\r
-                               $bararray['maxw'] += $w;\r
-                               ++$k;\r
-                       }\r
-                       $bararray['bcode'][$k] = array('t' => false, 'w' => 1, 'h' => 1, 'p' => 0);\r
-                       $bararray['maxw'] += 1;\r
-                       ++$k;\r
-               }\r
-               return $bararray;\r
-       }\r
-       \r
-       /**\r
-        * Encode a string to be used for CODE 39 Extended mode.\r
-        * @param string $code code to represent.\r
-        * @return encoded string.\r
-        * @access protected\r
-        */\r
-       protected function encode_code39_ext($code) {\r
-               $encode = array(\r
-                       chr(0) => '%U', chr(1) => '$A', chr(2) => '$B', chr(3) => '$C',\r
-                       chr(4) => '$D', chr(5) => '$E', chr(6) => '$F', chr(7) => '$G',\r
-                       chr(8) => '$H', chr(9) => '$I', chr(10) => '$J', chr(11) => '£K',\r
-                       chr(12) => '$L', chr(13) => '$M', chr(14) => '$N', chr(15) => '$O',\r
-                       chr(16) => '$P', chr(17) => '$Q', chr(18) => '$R', chr(19) => '$S',\r
-                       chr(20) => '$T', chr(21) => '$U', chr(22) => '$V', chr(23) => '$W',\r
-                       chr(24) => '$X', chr(25) => '$Y', chr(26) => '$Z', chr(27) => '%A',\r
-                       chr(28) => '%B', chr(29) => '%C', chr(30) => '%D', chr(31) => '%E',\r
-                       chr(32) => ' ', chr(33) => '/A', chr(34) => '/B', chr(35) => '/C',\r
-                       chr(36) => '/D', chr(37) => '/E', chr(38) => '/F', chr(39) => '/G',\r
-                       chr(40) => '/H', chr(41) => '/I', chr(42) => '/J', chr(43) => '/K',\r
-                       chr(44) => '/L', chr(45) => '-', chr(46) => '.', chr(47) => '/O',\r
-                       chr(48) => '0', chr(49) => '1', chr(50) => '2', chr(51) => '3',\r
-                       chr(52) => '4', chr(53) => '5', chr(54) => '6', chr(55) => '7',\r
-                       chr(56) => '8', chr(57) => '9', chr(58) => '/Z', chr(59) => '%F',\r
-                       chr(60) => '%G', chr(61) => '%H', chr(62) => '%I', chr(63) => '%J',\r
-                       chr(64) => '%V', chr(65) => 'A', chr(66) => 'B', chr(67) => 'C',\r
-                       chr(68) => 'D', chr(69) => 'E', chr(70) => 'F', chr(71) => 'G',\r
-                       chr(72) => 'H', chr(73) => 'I', chr(74) => 'J', chr(75) => 'K',\r
-                       chr(76) => 'L', chr(77) => 'M', chr(78) => 'N', chr(79) => 'O',\r
-                       chr(80) => 'P', chr(81) => 'Q', chr(82) => 'R', chr(83) => 'S',\r
-                       chr(84) => 'T', chr(85) => 'U', chr(86) => 'V', chr(87) => 'W',\r
-                       chr(88) => 'X', chr(89) => 'Y', chr(90) => 'Z', chr(91) => '%K',\r
-                       chr(92) => '%L', chr(93) => '%M', chr(94) => '%N', chr(95) => '%O',\r
-                       chr(96) => '%W', chr(97) => '+A', chr(98) => '+B', chr(99) => '+C',\r
-                       chr(100) => '+D', chr(101) => '+E', chr(102) => '+F', chr(103) => '+G',\r
-                       chr(104) => '+H', chr(105) => '+I', chr(106) => '+J', chr(107) => '+K',\r
-                       chr(108) => '+L', chr(109) => '+M', chr(110) => '+N', chr(111) => '+O',\r
-                       chr(112) => '+P', chr(113) => '+Q', chr(114) => '+R', chr(115) => '+S',\r
-                       chr(116) => '+T', chr(117) => '+U', chr(118) => '+V', chr(119) => '+W',\r
-                       chr(120) => '+X', chr(121) => '+Y', chr(122) => '+Z', chr(123) => '%P',\r
-                       chr(124) => '%Q', chr(125) => '%R', chr(126) => '%S', chr(127) => '%T');\r
+               $clen = strlen($code);
+               for ($i = 0; $i < $clen; ++$i) {
+                       $char = $code{$i};
+                       if(!isset($chr[$char])) {
+                               // invalid character
+                               return false;
+                       }
+                       for ($j = 0; $j < 9; ++$j) {
+                               if (($j % 2) == 0) {
+                                       $t = true; // bar
+                               } else {
+                                       $t = false; // space
+                               }
+                               $w = $chr[$char]{$j};
+                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
+                               $bararray['maxw'] += $w;
+                               ++$k;
+                       }
+                       $bararray['bcode'][$k] = array('t' => false, 'w' => 1, 'h' => 1, 'p' => 0);
+                       $bararray['maxw'] += 1;
+                       ++$k;
+               }
+               return $bararray;
+       }
+       
+       /**
+        * Encode a string to be used for CODE 39 Extended mode.
+        * @param string $code code to represent.
+        * @return encoded string.
+        * @access protected
+        */
+       protected function encode_code39_ext($code) {
+               $encode = array(
+                       chr(0) => '%U', chr(1) => '$A', chr(2) => '$B', chr(3) => '$C',
+                       chr(4) => '$D', chr(5) => '$E', chr(6) => '$F', chr(7) => '$G',
+                       chr(8) => '$H', chr(9) => '$I', chr(10) => '$J', chr(11) => '£K',
+                       chr(12) => '$L', chr(13) => '$M', chr(14) => '$N', chr(15) => '$O',
+                       chr(16) => '$P', chr(17) => '$Q', chr(18) => '$R', chr(19) => '$S',
+                       chr(20) => '$T', chr(21) => '$U', chr(22) => '$V', chr(23) => '$W',
+                       chr(24) => '$X', chr(25) => '$Y', chr(26) => '$Z', chr(27) => '%A',
+                       chr(28) => '%B', chr(29) => '%C', chr(30) => '%D', chr(31) => '%E',
+                       chr(32) => ' ', chr(33) => '/A', chr(34) => '/B', chr(35) => '/C',
+                       chr(36) => '/D', chr(37) => '/E', chr(38) => '/F', chr(39) => '/G',
+                       chr(40) => '/H', chr(41) => '/I', chr(42) => '/J', chr(43) => '/K',
+                       chr(44) => '/L', chr(45) => '-', chr(46) => '.', chr(47) => '/O',
+                       chr(48) => '0', chr(49) => '1', chr(50) => '2', chr(51) => '3',
+                       chr(52) => '4', chr(53) => '5', chr(54) => '6', chr(55) => '7',
+                       chr(56) => '8', chr(57) => '9', chr(58) => '/Z', chr(59) => '%F',
+                       chr(60) => '%G', chr(61) => '%H', chr(62) => '%I', chr(63) => '%J',
+                       chr(64) => '%V', chr(65) => 'A', chr(66) => 'B', chr(67) => 'C',
+                       chr(68) => 'D', chr(69) => 'E', chr(70) => 'F', chr(71) => 'G',
+                       chr(72) => 'H', chr(73) => 'I', chr(74) => 'J', chr(75) => 'K',
+                       chr(76) => 'L', chr(77) => 'M', chr(78) => 'N', chr(79) => 'O',
+                       chr(80) => 'P', chr(81) => 'Q', chr(82) => 'R', chr(83) => 'S',
+                       chr(84) => 'T', chr(85) => 'U', chr(86) => 'V', chr(87) => 'W',
+                       chr(88) => 'X', chr(89) => 'Y', chr(90) => 'Z', chr(91) => '%K',
+                       chr(92) => '%L', chr(93) => '%M', chr(94) => '%N', chr(95) => '%O',
+                       chr(96) => '%W', chr(97) => '+A', chr(98) => '+B', chr(99) => '+C',
+                       chr(100) => '+D', chr(101) => '+E', chr(102) => '+F', chr(103) => '+G',
+                       chr(104) => '+H', chr(105) => '+I', chr(106) => '+J', chr(107) => '+K',
+                       chr(108) => '+L', chr(109) => '+M', chr(110) => '+N', chr(111) => '+O',
+                       chr(112) => '+P', chr(113) => '+Q', chr(114) => '+R', chr(115) => '+S',
+                       chr(116) => '+T', chr(117) => '+U', chr(118) => '+V', chr(119) => '+W',
+                       chr(120) => '+X', chr(121) => '+Y', chr(122) => '+Z', chr(123) => '%P',
+                       chr(124) => '%Q', chr(125) => '%R', chr(126) => '%S', chr(127) => '%T');
                $code_ext = '';
-               $clen = strlen($code);\r
-               for ($i = 0 ; $i < $clen; ++$i) {\r
-                       if (ord($code{$i}) > 127) {\r
-                               return false;\r
-                       }\r
-                       $code_ext .= $encode[$code{$i}];\r
-               }\r
-               return $code_ext;\r
-       }\r
-       \r
-       /**\r
-        * Calculate CODE 39 checksum (modulo 43).\r
-        * @param string $code code to represent.\r
-        * @return char checksum.\r
-        * @access protected\r
-        */\r
-       protected function checksum_code39($code) {\r
-               $chars = array(\r
-                       '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\r
-                       'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',\r
-                       'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',\r
-                       'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%');\r
+               $clen = strlen($code);
+               for ($i = 0 ; $i < $clen; ++$i) {
+                       if (ord($code{$i}) > 127) {
+                               return false;
+                       }
+                       $code_ext .= $encode[$code{$i}];
+               }
+               return $code_ext;
+       }
+       
+       /**
+        * Calculate CODE 39 checksum (modulo 43).
+        * @param string $code code to represent.
+        * @return char checksum.
+        * @access protected
+        */
+       protected function checksum_code39($code) {
+               $chars = array(
+                       '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+                       'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
+                       'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
+                       'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%');
                $sum = 0;
-               $clen = strlen($code);\r
-               for ($i = 0 ; $i < $clen; ++$i) {\r
-                       $k = array_keys($chars, $code{$i});\r
-                       $sum += $k[0];\r
-               }\r
-               $j = ($sum % 43);\r
-               return $chars[$j];\r
-       }\r
-       \r
-       /**\r
+               $clen = strlen($code);
+               for ($i = 0 ; $i < $clen; ++$i) {
+                       $k = array_keys($chars, $code{$i});
+                       $sum += $k[0];
+               }
+               $j = ($sum % 43);
+               return $chars[$j];
+       }
+       
+       /**
         * CODE 93 - USS-93
-        * Compact code similar to Code 39\r
-        * @param string $code code to represent.\r
+        * Compact code similar to Code 39
+        * @param string $code code to represent.
         * @param boolean $checksum if true add a checksum to the code
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
+        * @return array barcode representation.
+        * @access protected
+        */
        protected function barcode_code93($code) {
                $chr['0'] = '131112';
                $chr['1'] = '111213';
@@ -449,92 +451,92 @@ class TCPDFBarcode {
                $chr[129] = '311121'; // (/)
                $chr[130] = '122211'; // (+)
                $chr[131] = '312111'; // (%)
-               $chr['*'] = '111141';\r
+               $chr['*'] = '111141';
                $code = strtoupper($code);
-               $encode = array(\r
-                       chr(0) => chr(131).'U', chr(1) => chr(128).'A', chr(2) => chr(128).'B', chr(3) => chr(128).'C',\r
-                       chr(4) => chr(128).'D', chr(5) => chr(128).'E', chr(6) => chr(128).'F', chr(7) => chr(128).'G',\r
-                       chr(8) => chr(128).'H', chr(9) => chr(128).'I', chr(10) => chr(128).'J', chr(11) => '£K',\r
-                       chr(12) => chr(128).'L', chr(13) => chr(128).'M', chr(14) => chr(128).'N', chr(15) => chr(128).'O',\r
-                       chr(16) => chr(128).'P', chr(17) => chr(128).'Q', chr(18) => chr(128).'R', chr(19) => chr(128).'S',\r
-                       chr(20) => chr(128).'T', chr(21) => chr(128).'U', chr(22) => chr(128).'V', chr(23) => chr(128).'W',\r
-                       chr(24) => chr(128).'X', chr(25) => chr(128).'Y', chr(26) => chr(128).'Z', chr(27) => chr(131).'A',\r
-                       chr(28) => chr(131).'B', chr(29) => chr(131).'C', chr(30) => chr(131).'D', chr(31) => chr(131).'E',\r
-                       chr(32) => ' ', chr(33) => chr(129).'A', chr(34) => chr(129).'B', chr(35) => chr(129).'C',\r
-                       chr(36) => chr(129).'D', chr(37) => chr(129).'E', chr(38) => chr(129).'F', chr(39) => chr(129).'G',\r
-                       chr(40) => chr(129).'H', chr(41) => chr(129).'I', chr(42) => chr(129).'J', chr(43) => chr(129).'K',\r
-                       chr(44) => chr(129).'L', chr(45) => '-', chr(46) => '.', chr(47) => chr(129).'O',\r
-                       chr(48) => '0', chr(49) => '1', chr(50) => '2', chr(51) => '3',\r
-                       chr(52) => '4', chr(53) => '5', chr(54) => '6', chr(55) => '7',\r
-                       chr(56) => '8', chr(57) => '9', chr(58) => chr(129).'Z', chr(59) => chr(131).'F',\r
-                       chr(60) => chr(131).'G', chr(61) => chr(131).'H', chr(62) => chr(131).'I', chr(63) => chr(131).'J',\r
-                       chr(64) => chr(131).'V', chr(65) => 'A', chr(66) => 'B', chr(67) => 'C',\r
-                       chr(68) => 'D', chr(69) => 'E', chr(70) => 'F', chr(71) => 'G',\r
-                       chr(72) => 'H', chr(73) => 'I', chr(74) => 'J', chr(75) => 'K',\r
-                       chr(76) => 'L', chr(77) => 'M', chr(78) => 'N', chr(79) => 'O',\r
-                       chr(80) => 'P', chr(81) => 'Q', chr(82) => 'R', chr(83) => 'S',\r
-                       chr(84) => 'T', chr(85) => 'U', chr(86) => 'V', chr(87) => 'W',\r
-                       chr(88) => 'X', chr(89) => 'Y', chr(90) => 'Z', chr(91) => chr(131).'K',\r
-                       chr(92) => chr(131).'L', chr(93) => chr(131).'M', chr(94) => chr(131).'N', chr(95) => chr(131).'O',\r
-                       chr(96) => chr(131).'W', chr(97) => chr(130).'A', chr(98) => chr(130).'B', chr(99) => chr(130).'C',\r
-                       chr(100) => chr(130).'D', chr(101) => chr(130).'E', chr(102) => chr(130).'F', chr(103) => chr(130).'G',\r
-                       chr(104) => chr(130).'H', chr(105) => chr(130).'I', chr(106) => chr(130).'J', chr(107) => chr(130).'K',\r
-                       chr(108) => chr(130).'L', chr(109) => chr(130).'M', chr(110) => chr(130).'N', chr(111) => chr(130).'O',\r
-                       chr(112) => chr(130).'P', chr(113) => chr(130).'Q', chr(114) => chr(130).'R', chr(115) => chr(130).'S',\r
-                       chr(116) => chr(130).'T', chr(117) => chr(130).'U', chr(118) => chr(130).'V', chr(119) => chr(130).'W',\r
-                       chr(120) => chr(130).'X', chr(121) => chr(130).'Y', chr(122) => chr(130).'Z', chr(123) => chr(131).'P',\r
+               $encode = array(
+                       chr(0) => chr(131).'U', chr(1) => chr(128).'A', chr(2) => chr(128).'B', chr(3) => chr(128).'C',
+                       chr(4) => chr(128).'D', chr(5) => chr(128).'E', chr(6) => chr(128).'F', chr(7) => chr(128).'G',
+                       chr(8) => chr(128).'H', chr(9) => chr(128).'I', chr(10) => chr(128).'J', chr(11) => '£K',
+                       chr(12) => chr(128).'L', chr(13) => chr(128).'M', chr(14) => chr(128).'N', chr(15) => chr(128).'O',
+                       chr(16) => chr(128).'P', chr(17) => chr(128).'Q', chr(18) => chr(128).'R', chr(19) => chr(128).'S',
+                       chr(20) => chr(128).'T', chr(21) => chr(128).'U', chr(22) => chr(128).'V', chr(23) => chr(128).'W',
+                       chr(24) => chr(128).'X', chr(25) => chr(128).'Y', chr(26) => chr(128).'Z', chr(27) => chr(131).'A',
+                       chr(28) => chr(131).'B', chr(29) => chr(131).'C', chr(30) => chr(131).'D', chr(31) => chr(131).'E',
+                       chr(32) => ' ', chr(33) => chr(129).'A', chr(34) => chr(129).'B', chr(35) => chr(129).'C',
+                       chr(36) => chr(129).'D', chr(37) => chr(129).'E', chr(38) => chr(129).'F', chr(39) => chr(129).'G',
+                       chr(40) => chr(129).'H', chr(41) => chr(129).'I', chr(42) => chr(129).'J', chr(43) => chr(129).'K',
+                       chr(44) => chr(129).'L', chr(45) => '-', chr(46) => '.', chr(47) => chr(129).'O',
+                       chr(48) => '0', chr(49) => '1', chr(50) => '2', chr(51) => '3',
+                       chr(52) => '4', chr(53) => '5', chr(54) => '6', chr(55) => '7',
+                       chr(56) => '8', chr(57) => '9', chr(58) => chr(129).'Z', chr(59) => chr(131).'F',
+                       chr(60) => chr(131).'G', chr(61) => chr(131).'H', chr(62) => chr(131).'I', chr(63) => chr(131).'J',
+                       chr(64) => chr(131).'V', chr(65) => 'A', chr(66) => 'B', chr(67) => 'C',
+                       chr(68) => 'D', chr(69) => 'E', chr(70) => 'F', chr(71) => 'G',
+                       chr(72) => 'H', chr(73) => 'I', chr(74) => 'J', chr(75) => 'K',
+                       chr(76) => 'L', chr(77) => 'M', chr(78) => 'N', chr(79) => 'O',
+                       chr(80) => 'P', chr(81) => 'Q', chr(82) => 'R', chr(83) => 'S',
+                       chr(84) => 'T', chr(85) => 'U', chr(86) => 'V', chr(87) => 'W',
+                       chr(88) => 'X', chr(89) => 'Y', chr(90) => 'Z', chr(91) => chr(131).'K',
+                       chr(92) => chr(131).'L', chr(93) => chr(131).'M', chr(94) => chr(131).'N', chr(95) => chr(131).'O',
+                       chr(96) => chr(131).'W', chr(97) => chr(130).'A', chr(98) => chr(130).'B', chr(99) => chr(130).'C',
+                       chr(100) => chr(130).'D', chr(101) => chr(130).'E', chr(102) => chr(130).'F', chr(103) => chr(130).'G',
+                       chr(104) => chr(130).'H', chr(105) => chr(130).'I', chr(106) => chr(130).'J', chr(107) => chr(130).'K',
+                       chr(108) => chr(130).'L', chr(109) => chr(130).'M', chr(110) => chr(130).'N', chr(111) => chr(130).'O',
+                       chr(112) => chr(130).'P', chr(113) => chr(130).'Q', chr(114) => chr(130).'R', chr(115) => chr(130).'S',
+                       chr(116) => chr(130).'T', chr(117) => chr(130).'U', chr(118) => chr(130).'V', chr(119) => chr(130).'W',
+                       chr(120) => chr(130).'X', chr(121) => chr(130).'Y', chr(122) => chr(130).'Z', chr(123) => chr(131).'P',
                        chr(124) => chr(131).'Q', chr(125) => chr(131).'R', chr(126) => chr(131).'S', chr(127) => chr(131).'T');
                $code_ext = '';
                $clen = strlen($code);
-               for ($i = 0 ; $i < $clen; ++$i) {\r
-                       if (ord($code{$i}) > 127) {\r
-                               return false;\r
-                       }\r
-                       $code_ext .= $encode[$code{$i}];\r
-               }\r
-               // checksum\r
-               $code .= $this->checksum_code93($code);\r
-               // add start and stop codes\r
-               $code = '*'.$code.'*';\r
-               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());\r
+               for ($i = 0 ; $i < $clen; ++$i) {
+                       if (ord($code{$i}) > 127) {
+                               return false;
+                       }
+                       $code_ext .= $encode[$code{$i}];
+               }
+               // checksum
+               $code .= $this->checksum_code93($code);
+               // add start and stop codes
+               $code = '*'.$code.'*';
+               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
                $k = 0;
-               $clen = strlen($code);\r
-               for ($i = 0; $i < $clen; ++$i) {\r
-                       $char = $code{$i};\r
-                       if(!isset($chr[$char])) {\r
-                               // invalid character\r
-                               return false;\r
-                       }\r
-                       for ($j = 0; $j < 6; ++$j) {\r
-                               if (($j % 2) == 0) {\r
-                                       $t = true; // bar\r
-                               } else {\r
-                                       $t = false; // space\r
-                               }\r
-                               $w = $chr[$char]{$j};\r
-                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);\r
-                               $bararray['maxw'] += $w;\r
-                               ++$k;\r
-                       }\r
-               }
-               $bararray['bcode'][$k] = array('t' => true, 'w' => 1, 'h' => 1, 'p' => 0);\r
-               $bararray['maxw'] += 1;\r
-               ++$k;           \r
-               return $bararray;\r
+               $clen = strlen($code);
+               for ($i = 0; $i < $clen; ++$i) {
+                       $char = $code{$i};
+                       if(!isset($chr[$char])) {
+                               // invalid character
+                               return false;
+                       }
+                       for ($j = 0; $j < 6; ++$j) {
+                               if (($j % 2) == 0) {
+                                       $t = true; // bar
+                               } else {
+                                       $t = false; // space
+                               }
+                               $w = $chr[$char]{$j};
+                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
+                               $bararray['maxw'] += $w;
+                               ++$k;
+                       }
+               }
+               $bararray['bcode'][$k] = array('t' => true, 'w' => 1, 'h' => 1, 'p' => 0);
+               $bararray['maxw'] += 1;
+               ++$k;           
+               return $bararray;
        }
-       \r
-       /**\r
-        * Calculate CODE 93 checksum (modulo 47).\r
-        * @param string $code code to represent.\r
-        * @return string checksum code.\r
-        * @access protected\r
-        */\r
-       protected function checksum_code93($code) {\r
-               $chars = array(\r
-                       '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\r
-                       'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',\r
-                       'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',\r
-                       'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%');\r
+       
+       /**
+        * Calculate CODE 93 checksum (modulo 47).
+        * @param string $code code to represent.
+        * @return string checksum code.
+        * @access protected
+        */
+       protected function checksum_code93($code) {
+               $chars = array(
+                       '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+                       'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
+                       'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
+                       'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%');
                // translate special characters
                $code = strtr($code, chr(128).chr(129).chr(130).chr(131), '$/+%');      
                $len = strlen($code);
@@ -564,51 +566,51 @@ class TCPDFBarcode {
                        }
                }
                $check %= 47;
-               $k = $chars[$check];\r
-               return $c.$k;\r
-       }\r
-       \r
-       /**\r
-        * Checksum for standard 2 of 5 barcodes.\r
-        * @param string $code code to process.\r
-        * @return int checksum.\r
-        * @access protected\r
-        */\r
+               $k = $chars[$check];
+               return $c.$k;
+       }
+       
+       /**
+        * Checksum for standard 2 of 5 barcodes.
+        * @param string $code code to process.
+        * @return int checksum.
+        * @access protected
+        */
        protected function checksum_s25($code) {
                $len = strlen($code);
-               $sum = 0;\r
-               for ($i = 0; $i < $len; $i+=2) {\r
-                       $sum += $code{$i};\r
-               }
-               $sum *= 3;\r
-               for ($i = 1; $i < $len; $i+=2) {\r
-                       $sum += ($code{$i});\r
-               }\r
-               $r = $sum % 10;\r
-               if($r > 0) {\r
-                       $r = (10 - $r);\r
+               $sum = 0;
+               for ($i = 0; $i < $len; $i+=2) {
+                       $sum += $code{$i};
+               }
+               $sum *= 3;
+               for ($i = 1; $i < $len; $i+=2) {
+                       $sum += ($code{$i});
+               }
+               $r = $sum % 10;
+               if($r > 0) {
+                       $r = (10 - $r);
                }
                return $r;
        }
        
-       /**\r
+       /**
         * MSI.
-        * Variation of Plessey code, with similar applications \r
-        * Contains digits (0 to 9) and encodes the data only in the width of bars.\r
+        * Variation of Plessey code, with similar applications 
+        * Contains digits (0 to 9) and encodes the data only in the width of bars.
         * @param string $code code to represent.
-        * @param boolean $checksum if true add a checksum to the code (modulo 11)\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
-       protected function barcode_msi($code, $checksum=false) {\r
-               $chr['0'] = '100100100100';\r
-               $chr['1'] = '100100100110';\r
-               $chr['2'] = '100100110100';\r
-               $chr['3'] = '100100110110';\r
-               $chr['4'] = '100110100100';\r
-               $chr['5'] = '100110100110';\r
-               $chr['6'] = '100110110100';\r
-               $chr['7'] = '100110110110';\r
+        * @param boolean $checksum if true add a checksum to the code (modulo 11)
+        * @return array barcode representation.
+        * @access protected
+        */
+       protected function barcode_msi($code, $checksum=false) {
+               $chr['0'] = '100100100100';
+               $chr['1'] = '100100100110';
+               $chr['2'] = '100100110100';
+               $chr['3'] = '100100110110';
+               $chr['4'] = '100110100100';
+               $chr['5'] = '100110100110';
+               $chr['6'] = '100110110100';
+               $chr['7'] = '100110110110';
                $chr['8'] = '110100100100';
                $chr['9'] = '110100100110';
                $chr['A'] = '110100110100';
@@ -636,360 +638,360 @@ class TCPDFBarcode {
                        $code .= $check;
                }
                $seq = '110'; // left guard
-               $clen = strlen($code);\r
+               $clen = strlen($code);
                for ($i = 0; $i < $clen; ++$i) {
-                       $digit = $code{$i};\r
-                       if (!isset($chr[$digit])) {\r
-                               // invalid character\r
-                               return false;\r
+                       $digit = $code{$i};
+                       if (!isset($chr[$digit])) {
+                               // invalid character
+                               return false;
                        }
                        $seq .= $chr[$digit];
                }               
                $seq .= '1001'; // right guard
                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
-               return $this->binseq_to_array($seq, $bararray);\r
+               return $this->binseq_to_array($seq, $bararray);
        }
-       \r
-       /**\r
+       
+       /**
         * Standard 2 of 5 barcodes.
-        * Used in airline ticket marking, photofinishing\r
-        * Contains digits (0 to 9) and encodes the data only in the width of bars.\r
+        * Used in airline ticket marking, photofinishing
+        * Contains digits (0 to 9) and encodes the data only in the width of bars.
         * @param string $code code to represent.
-        * @param boolean $checksum if true add a checksum to the code\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
-       protected function barcode_s25($code, $checksum=false) {\r
-               $chr['0'] = '10101110111010';\r
-               $chr['1'] = '11101010101110';\r
-               $chr['2'] = '10111010101110';\r
-               $chr['3'] = '11101110101010';\r
-               $chr['4'] = '10101110101110';\r
-               $chr['5'] = '11101011101010';\r
-               $chr['6'] = '10111011101010';\r
-               $chr['7'] = '10101011101110';\r
+        * @param boolean $checksum if true add a checksum to the code
+        * @return array barcode representation.
+        * @access protected
+        */
+       protected function barcode_s25($code, $checksum=false) {
+               $chr['0'] = '10101110111010';
+               $chr['1'] = '11101010101110';
+               $chr['2'] = '10111010101110';
+               $chr['3'] = '11101110101010';
+               $chr['4'] = '10101110101110';
+               $chr['5'] = '11101011101010';
+               $chr['6'] = '10111011101010';
+               $chr['7'] = '10101011101110';
                $chr['8'] = '10101110111010';
-               $chr['9'] = '10111010111010';\r
+               $chr['9'] = '10111010111010';
                if ($checksum) {
                        // add checksum
                        $code .= $this->checksum_s25($code);
                }
-               if((strlen($code) % 2) != 0) {\r
-                       // add leading zero if code-length is odd\r
-                       $code = '0'.$code;\r
+               if((strlen($code) % 2) != 0) {
+                       // add leading zero if code-length is odd
+                       $code = '0'.$code;
                }
                $seq = '11011010';
-               $clen = strlen($code);\r
+               $clen = strlen($code);
                for ($i = 0; $i < $clen; ++$i) {
-                       $digit = $code{$i};\r
-                       if (!isset($chr[$digit])) {\r
-                               // invalid character\r
-                               return false;\r
+                       $digit = $code{$i};
+                       if (!isset($chr[$digit])) {
+                               // invalid character
+                               return false;
                        }
                        $seq .= $chr[$digit];
                }               
                $seq .= '1101011';
                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
-               return $this->binseq_to_array($seq, $bararray);\r
+               return $this->binseq_to_array($seq, $bararray);
        }
-       \r
-       /**\r
-        * Convert binary barcode sequence to TCPDF barcode array\r
+       
+       /**
+        * Convert binary barcode sequence to TCPDF barcode array
         * @param string $seq barcode as binary sequence
-        * Ã²param array $bararray TCPDF barcode array to fill up\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
+        * Ã²param array $bararray TCPDF barcode array to fill up
+        * @return array barcode representation.
+        * @access protected
+        */
        protected function binseq_to_array($seq, $bararray) {
-               $len = strlen($seq);\r
+               $len = strlen($seq);
                $w = 0;
-               $k = 0;\r
-               for ($i = 0; $i < $len; ++$i) {\r
-                       $w += 1;\r
-                       if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq{$i} != $seq{($i+1)}))) {\r
-                               if ($seq{$i} == '1') {\r
-                                       $t = true; // bar\r
-                               } else {\r
-                                       $t = false; // space\r
-                               }\r
-                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);\r
-                               $bararray['maxw'] += $w;\r
-                               ++$k;\r
-                               $w = 0;\r
-                       }\r
+               $k = 0;
+               for ($i = 0; $i < $len; ++$i) {
+                       $w += 1;
+                       if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
+                               if ($seq{$i} == '1') {
+                                       $t = true; // bar
+                               } else {
+                                       $t = false; // space
+                               }
+                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
+                               $bararray['maxw'] += $w;
+                               ++$k;
+                               $w = 0;
+                       }
                }
                return $bararray;
        }
-       \r
-       /**\r
+       
+       /**
         * Interleaved 2 of 5 barcodes.
-        * Compact numeric code, widely used in industry, air cargo\r
-        * Contains digits (0 to 9) and encodes the data in the width of both bars and spaces.\r
-        * @param string $code code to represent.\r
-        * @param boolean $checksum if true add a checksum to the code\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
-       protected function barcode_i25($code, $checksum=false) {\r
-               $chr['0'] = '11221';\r
-               $chr['1'] = '21112';\r
-               $chr['2'] = '12112';\r
-               $chr['3'] = '22111';\r
-               $chr['4'] = '11212';\r
-               $chr['5'] = '21211';\r
-               $chr['6'] = '12211';\r
-               $chr['7'] = '11122';\r
-               $chr['8'] = '21121';\r
-               $chr['9'] = '12121';\r
-               $chr['A'] = '11';\r
+        * Compact numeric code, widely used in industry, air cargo
+        * Contains digits (0 to 9) and encodes the data in the width of both bars and spaces.
+        * @param string $code code to represent.
+        * @param boolean $checksum if true add a checksum to the code
+        * @return array barcode representation.
+        * @access protected
+        */
+       protected function barcode_i25($code, $checksum=false) {
+               $chr['0'] = '11221';
+               $chr['1'] = '21112';
+               $chr['2'] = '12112';
+               $chr['3'] = '22111';
+               $chr['4'] = '11212';
+               $chr['5'] = '21211';
+               $chr['6'] = '12211';
+               $chr['7'] = '11122';
+               $chr['8'] = '21121';
+               $chr['9'] = '12121';
+               $chr['A'] = '11';
                $chr['Z'] = '21';
                if ($checksum) {
                        // add checksum
                        $code .= $this->checksum_s25($code);
                }
-               if((strlen($code) % 2) != 0) {\r
-                       // add leading zero if code-length is odd\r
-                       $code = '0'.$code;\r
-               }\r
-               // add start and stop codes\r
-               $code = 'AA'.strtolower($code).'ZA';\r
-                       \r
-               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());\r
+               if((strlen($code) % 2) != 0) {
+                       // add leading zero if code-length is odd
+                       $code = '0'.$code;
+               }
+               // add start and stop codes
+               $code = 'AA'.strtolower($code).'ZA';
+                       
+               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
                $k = 0;
-               $clen = strlen($code);\r
-               for ($i = 0; $i < $clen; $i = ($i + 2)) {\r
-                       $char_bar = $code{$i};\r
-                       $char_space = $code{$i+1};\r
-                       if((!isset($chr[$char_bar])) OR (!isset($chr[$char_space]))) {\r
-                               // invalid character\r
-                               return false;\r
-                       }\r
-                       // create a bar-space sequence\r
+               $clen = strlen($code);
+               for ($i = 0; $i < $clen; $i = ($i + 2)) {
+                       $char_bar = $code{$i};
+                       $char_space = $code{$i+1};
+                       if((!isset($chr[$char_bar])) OR (!isset($chr[$char_space]))) {
+                               // invalid character
+                               return false;
+                       }
+                       // create a bar-space sequence
                        $seq = '';
-                       $chrlen = strlen($chr[$char_bar]);\r
-                       for ($s = 0; $s < $chrlen; $s++){\r
-                               $seq .= $chr[$char_bar]{$s} . $chr[$char_space]{$s};\r
-                       }
-                       $seqlen = strlen($seq);\r
-                       for ($j = 0; $j < $seqlen; ++$j) {\r
-                               if (($j % 2) == 0) {\r
-                                       $t = true; // bar\r
-                               } else {\r
-                                       $t = false; // space\r
-                               }\r
-                               $w = $seq{$j};\r
-                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);\r
-                               $bararray['maxw'] += $w;\r
-                               ++$k;\r
-                       }\r
-               }\r
-               return $bararray;\r
-       }\r
-       \r
-       /**\r
-        * C128 barcodes. \r
-        * Very capable code, excellent density, high reliability; in very wide use world-wide\r
-        * @param string $code code to represent.\r
-        * @param string $type barcode type: A, B or C\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
-       protected function barcode_c128($code, $type='B') {\r
-               $chr = array(\r
-                       '212222', /* 00 */\r
-                       '222122', /* 01 */\r
-                       '222221', /* 02 */\r
-                       '121223', /* 03 */\r
-                       '121322', /* 04 */\r
-                       '131222', /* 05 */\r
-                       '122213', /* 06 */\r
-                       '122312', /* 07 */\r
-                       '132212', /* 08 */\r
-                       '221213', /* 09 */\r
-                       '221312', /* 10 */\r
-                       '231212', /* 11 */\r
-                       '112232', /* 12 */\r
-                       '122132', /* 13 */\r
-                       '122231', /* 14 */\r
-                       '113222', /* 15 */\r
-                       '123122', /* 16 */\r
-                       '123221', /* 17 */\r
-                       '223211', /* 18 */\r
-                       '221132', /* 19 */\r
-                       '221231', /* 20 */\r
-                       '213212', /* 21 */\r
-                       '223112', /* 22 */\r
-                       '312131', /* 23 */\r
-                       '311222', /* 24 */\r
-                       '321122', /* 25 */\r
-                       '321221', /* 26 */\r
-                       '312212', /* 27 */\r
-                       '322112', /* 28 */\r
-                       '322211', /* 29 */\r
-                       '212123', /* 30 */\r
-                       '212321', /* 31 */\r
-                       '232121', /* 32 */\r
-                       '111323', /* 33 */\r
-                       '131123', /* 34 */\r
-                       '131321', /* 35 */\r
-                       '112313', /* 36 */\r
-                       '132113', /* 37 */\r
-                       '132311', /* 38 */\r
-                       '211313', /* 39 */\r
-                       '231113', /* 40 */\r
-                       '231311', /* 41 */\r
-                       '112133', /* 42 */\r
-                       '112331', /* 43 */\r
-                       '132131', /* 44 */\r
-                       '113123', /* 45 */\r
-                       '113321', /* 46 */\r
-                       '133121', /* 47 */\r
-                       '313121', /* 48 */\r
-                       '211331', /* 49 */\r
-                       '231131', /* 50 */\r
-                       '213113', /* 51 */\r
-                       '213311', /* 52 */\r
-                       '213131', /* 53 */\r
-                       '311123', /* 54 */\r
-                       '311321', /* 55 */\r
-                       '331121', /* 56 */\r
-                       '312113', /* 57 */\r
-                       '312311', /* 58 */\r
-                       '332111', /* 59 */\r
-                       '314111', /* 60 */\r
-                       '221411', /* 61 */\r
-                       '431111', /* 62 */\r
-                       '111224', /* 63 */\r
-                       '111422', /* 64 */\r
-                       '121124', /* 65 */\r
-                       '121421', /* 66 */\r
-                       '141122', /* 67 */\r
-                       '141221', /* 68 */\r
-                       '112214', /* 69 */\r
-                       '112412', /* 70 */\r
-                       '122114', /* 71 */\r
-                       '122411', /* 72 */\r
-                       '142112', /* 73 */\r
-                       '142211', /* 74 */\r
-                       '241211', /* 75 */\r
-                       '221114', /* 76 */\r
-                       '413111', /* 77 */\r
-                       '241112', /* 78 */\r
-                       '134111', /* 79 */\r
-                       '111242', /* 80 */\r
-                       '121142', /* 81 */\r
-                       '121241', /* 82 */\r
-                       '114212', /* 83 */\r
-                       '124112', /* 84 */\r
-                       '124211', /* 85 */\r
-                       '411212', /* 86 */\r
-                       '421112', /* 87 */\r
-                       '421211', /* 88 */\r
-                       '212141', /* 89 */\r
-                       '214121', /* 90 */\r
-                       '412121', /* 91 */\r
-                       '111143', /* 92 */\r
-                       '111341', /* 93 */\r
-                       '131141', /* 94 */\r
-                       '114113', /* 95 */\r
-                       '114311', /* 96 */\r
-                       '411113', /* 97 */\r
-                       '411311', /* 98 */\r
-                       '113141', /* 99 */\r
-                       '114131', /* 100 */\r
-                       '311141', /* 101 */\r
-                       '411131', /* 102 */\r
-                       '211412', /* 103 START A */\r
-                       '211214', /* 104 START B  */\r
-                       '211232', /* 105 START C  */\r
-                       '233111', /* STOP */\r
-                       '200000'  /* END */\r
-               );\r
-               $keys = '';\r
-               switch(strtoupper($type)) {\r
-                       case 'A': {\r
-                               $startid = 103;\r
-                               $keys = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_';\r
-                               for ($i = 0; $i < 32; ++$i) {\r
-                                       $keys .= chr($i);\r
-                               }\r
-                               break;\r
-                       }\r
-                       case 'B': {\r
-                               $startid = 104;\r
-                               $keys = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'.chr(127);\r
-                               break;\r
-                       }\r
-                       case 'C': {\r
-                               $startid = 105;\r
-                               $keys = '';\r
-                               if ((strlen($code) % 2) != 0) {\r
-                                       // The length of barcode value must be even ($code). You must pad the number with zeros\r
-                                       return false;\r
-                               }\r
-                               for ($i = 0; $i <= 99; ++$i) {\r
-                                       $keys .= chr($i);\r
-                               }\r
+                       $chrlen = strlen($chr[$char_bar]);
+                       for ($s = 0; $s < $chrlen; $s++){
+                               $seq .= $chr[$char_bar]{$s} . $chr[$char_space]{$s};
+                       }
+                       $seqlen = strlen($seq);
+                       for ($j = 0; $j < $seqlen; ++$j) {
+                               if (($j % 2) == 0) {
+                                       $t = true; // bar
+                               } else {
+                                       $t = false; // space
+                               }
+                               $w = $seq{$j};
+                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
+                               $bararray['maxw'] += $w;
+                               ++$k;
+                       }
+               }
+               return $bararray;
+       }
+       
+       /**
+        * C128 barcodes. 
+        * Very capable code, excellent density, high reliability; in very wide use world-wide
+        * @param string $code code to represent.
+        * @param string $type barcode type: A, B or C
+        * @return array barcode representation.
+        * @access protected
+        */
+       protected function barcode_c128($code, $type='B') {
+               $chr = array(
+                       '212222', /* 00 */
+                       '222122', /* 01 */
+                       '222221', /* 02 */
+                       '121223', /* 03 */
+                       '121322', /* 04 */
+                       '131222', /* 05 */
+                       '122213', /* 06 */
+                       '122312', /* 07 */
+                       '132212', /* 08 */
+                       '221213', /* 09 */
+                       '221312', /* 10 */
+                       '231212', /* 11 */
+                       '112232', /* 12 */
+                       '122132', /* 13 */
+                       '122231', /* 14 */
+                       '113222', /* 15 */
+                       '123122', /* 16 */
+                       '123221', /* 17 */
+                       '223211', /* 18 */
+                       '221132', /* 19 */
+                       '221231', /* 20 */
+                       '213212', /* 21 */
+                       '223112', /* 22 */
+                       '312131', /* 23 */
+                       '311222', /* 24 */
+                       '321122', /* 25 */
+                       '321221', /* 26 */
+                       '312212', /* 27 */
+                       '322112', /* 28 */
+                       '322211', /* 29 */
+                       '212123', /* 30 */
+                       '212321', /* 31 */
+                       '232121', /* 32 */
+                       '111323', /* 33 */
+                       '131123', /* 34 */
+                       '131321', /* 35 */
+                       '112313', /* 36 */
+                       '132113', /* 37 */
+                       '132311', /* 38 */
+                       '211313', /* 39 */
+                       '231113', /* 40 */
+                       '231311', /* 41 */
+                       '112133', /* 42 */
+                       '112331', /* 43 */
+                       '132131', /* 44 */
+                       '113123', /* 45 */
+                       '113321', /* 46 */
+                       '133121', /* 47 */
+                       '313121', /* 48 */
+                       '211331', /* 49 */
+                       '231131', /* 50 */
+                       '213113', /* 51 */
+                       '213311', /* 52 */
+                       '213131', /* 53 */
+                       '311123', /* 54 */
+                       '311321', /* 55 */
+                       '331121', /* 56 */
+                       '312113', /* 57 */
+                       '312311', /* 58 */
+                       '332111', /* 59 */
+                       '314111', /* 60 */
+                       '221411', /* 61 */
+                       '431111', /* 62 */
+                       '111224', /* 63 */
+                       '111422', /* 64 */
+                       '121124', /* 65 */
+                       '121421', /* 66 */
+                       '141122', /* 67 */
+                       '141221', /* 68 */
+                       '112214', /* 69 */
+                       '112412', /* 70 */
+                       '122114', /* 71 */
+                       '122411', /* 72 */
+                       '142112', /* 73 */
+                       '142211', /* 74 */
+                       '241211', /* 75 */
+                       '221114', /* 76 */
+                       '413111', /* 77 */
+                       '241112', /* 78 */
+                       '134111', /* 79 */
+                       '111242', /* 80 */
+                       '121142', /* 81 */
+                       '121241', /* 82 */
+                       '114212', /* 83 */
+                       '124112', /* 84 */
+                       '124211', /* 85 */
+                       '411212', /* 86 */
+                       '421112', /* 87 */
+                       '421211', /* 88 */
+                       '212141', /* 89 */
+                       '214121', /* 90 */
+                       '412121', /* 91 */
+                       '111143', /* 92 */
+                       '111341', /* 93 */
+                       '131141', /* 94 */
+                       '114113', /* 95 */
+                       '114311', /* 96 */
+                       '411113', /* 97 */
+                       '411311', /* 98 */
+                       '113141', /* 99 */
+                       '114131', /* 100 */
+                       '311141', /* 101 */
+                       '411131', /* 102 */
+                       '211412', /* 103 START A */
+                       '211214', /* 104 START B  */
+                       '211232', /* 105 START C  */
+                       '233111', /* STOP */
+                       '200000'  /* END */
+               );
+               $keys = '';
+               switch(strtoupper($type)) {
+                       case 'A': {
+                               $startid = 103;
+                               $keys = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_';
+                               for ($i = 0; $i < 32; ++$i) {
+                                       $keys .= chr($i);
+                               }
+                               break;
+                       }
+                       case 'B': {
+                               $startid = 104;
+                               $keys = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'.chr(127);
+                               break;
+                       }
+                       case 'C': {
+                               $startid = 105;
+                               $keys = '';
+                               if ((strlen($code) % 2) != 0) {
+                                       // The length of barcode value must be even ($code). You must pad the number with zeros
+                                       return false;
+                               }
+                               for ($i = 0; $i <= 99; ++$i) {
+                                       $keys .= chr($i);
+                               }
                                $new_code = '';
-                               $hclen = (strlen($code) / 2);\r
-                               for ($i = 0; $i < $hclen; ++$i) {\r
-                                       $new_code .= chr(intval($code{(2 * $i)}.$code{(2 * $i + 1)}));\r
-                               }\r
-                               $code = $new_code;\r
-                               break;\r
-                       }\r
-                       default: {\r
-                               return false;\r
-                       }\r
-               }\r
-               // calculate check character\r
+                               $hclen = (strlen($code) / 2);
+                               for ($i = 0; $i < $hclen; ++$i) {
+                                       $new_code .= chr(intval($code{(2 * $i)}.$code{(2 * $i + 1)}));
+                               }
+                               $code = $new_code;
+                               break;
+                       }
+                       default: {
+                               return false;
+                       }
+               }
+               // calculate check character
                $sum = $startid;
-               $clen = strlen($code);\r
-               for ($i = 0; $i < $clen; ++$i) {\r
-                       $sum +=  (strpos($keys, $code{$i}) * ($i+1));\r
-               }\r
-               $check = ($sum % 103);\r
-               // add start, check and stop codes\r
-               $code = chr($startid).$code.chr($check).chr(106).chr(107);\r
-               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());\r
-               $k = 0;\r
-               $len = strlen($code);\r
-               for ($i = 0; $i < $len; ++$i) {\r
-                       $ck = strpos($keys, $code{$i});\r
-                       if (($i == 0) OR ($i > ($len-4))) {\r
+               $clen = strlen($code);
+               for ($i = 0; $i < $clen; ++$i) {
+                       $sum +=  (strpos($keys, $code{$i}) * ($i+1));
+               }
+               $check = ($sum % 103);
+               // add start, check and stop codes
+               $code = chr($startid).$code.chr($check).chr(106).chr(107);
+               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
+               $k = 0;
+               $len = strlen($code);
+               for ($i = 0; $i < $len; ++$i) {
+                       $ck = strpos($keys, $code{$i});
+                       if (($i == 0) OR ($i > ($len-4))) {
                                $char_num = ord($code{$i});
-                               $seq = $chr[$char_num];\r
-                       } elseif(($ck >= 0) AND isset($chr[$ck])) {\r
-                                       $seq = $chr[$ck];\r
-                       } else {\r
-                               // invalid character\r
-                               return false;\r
-                       }\r
-                       for ($j = 0; $j < 6; ++$j) {\r
-                               if (($j % 2) == 0) {\r
-                                       $t = true; // bar\r
-                               } else {\r
-                                       $t = false; // space\r
-                               }\r
-                               $w = $seq{$j};\r
-                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);\r
-                               $bararray['maxw'] += $w;\r
-                               ++$k;\r
-                       }\r
-               }\r
-               return $bararray;               \r
-       }\r
-       \r
-       /**\r
+                               $seq = $chr[$char_num];
+                       } elseif(($ck >= 0) AND isset($chr[$ck])) {
+                                       $seq = $chr[$ck];
+                       } else {
+                               // invalid character
+                               return false;
+                       }
+                       for ($j = 0; $j < 6; ++$j) {
+                               if (($j % 2) == 0) {
+                                       $t = true; // bar
+                               } else {
+                                       $t = false; // space
+                               }
+                               $w = $seq{$j};
+                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
+                               $bararray['maxw'] += $w;
+                               ++$k;
+                       }
+               }
+               return $bararray;               
+       }
+       
+       /**
         * EAN13 and UPC-A barcodes.
         * EAN13: European Article Numbering international retail product code
         * UPC-A: Universal product code seen on almost all retail products in the USA and Canada
-        * UPC-E: Short version of UPC symbol\r
-        * @param string $code code to represent.\r
-        * @param string $len barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
+        * UPC-E: Short version of UPC symbol
+        * @param string $code code to represent.
+        * @param string $len barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A
+        * @return array barcode representation.
+        * @access protected
+        */
        protected function barcode_eanupc($code, $len=13) {
                $upce = false;
                if ($len == 6) {
@@ -997,34 +999,34 @@ class TCPDFBarcode {
                        $upce = true; // UPC-E mode
                }
                $data_len = $len - 1;
-               //Padding\r
+               //Padding
                $code = str_pad($code, $data_len, '0', STR_PAD_LEFT);
                $code_len = strlen($code);
                // calculate check digit
-               $sum_a = 0;\r
-               for ($i = 1; $i < $data_len; $i+=2) {\r
-                       $sum_a += $code{$i};\r
+               $sum_a = 0;
+               for ($i = 1; $i < $data_len; $i+=2) {
+                       $sum_a += $code{$i};
                }
                if ($len > 12) {
                        $sum_a *= 3;
                }
-               $sum_b = 0;\r
-               for ($i = 0; $i < $data_len; $i+=2) {\r
-                       $sum_b += ($code{$i});\r
+               $sum_b = 0;
+               for ($i = 0; $i < $data_len; $i+=2) {
+                       $sum_b += ($code{$i});
                }
                if ($len < 13) {
                        $sum_b *= 3;
-               }\r
-               $r = ($sum_a + $sum_b) % 10;\r
-               if($r > 0) {\r
-                       $r = (10 - $r);\r
-               }\r
+               }
+               $r = ($sum_a + $sum_b) % 10;
+               if($r > 0) {
+                       $r = (10 - $r);
+               }
                if ($code_len == $data_len) {
-                       // add check digit\r
-                       $code .= $r;\r
+                       // add check digit
+                       $code .= $r;
                } elseif ($r !== intval($code{$data_len})) {
-                       // wrong checkdigit\r
-                       return false;\r
+                       // wrong checkdigit
+                       return false;
                }
                if ($len == 12) {
                        // UPC-A
@@ -1053,138 +1055,138 @@ class TCPDFBarcode {
                                        }
                                }
                        }
-               }\r
-               //Convert digits to bars\r
-               $codes = array(\r
-                       'A'=>array( // left odd parity\r
-                               '0'=>'0001101',\r
-                               '1'=>'0011001',\r
-                               '2'=>'0010011',\r
-                               '3'=>'0111101',\r
-                               '4'=>'0100011',\r
-                               '5'=>'0110001',\r
-                               '6'=>'0101111',\r
-                               '7'=>'0111011',\r
-                               '8'=>'0110111',\r
-                               '9'=>'0001011'),\r
-                       'B'=>array( // left even parity\r
-                               '0'=>'0100111',\r
-                               '1'=>'0110011',\r
-                               '2'=>'0011011',\r
-                               '3'=>'0100001',\r
-                               '4'=>'0011101',\r
-                               '5'=>'0111001',\r
-                               '6'=>'0000101',\r
-                               '7'=>'0010001',\r
-                               '8'=>'0001001',\r
-                               '9'=>'0010111'),\r
-                       'C'=>array( // right\r
-                               '0'=>'1110010',\r
-                               '1'=>'1100110',\r
-                               '2'=>'1101100',\r
-                               '3'=>'1000010',\r
-                               '4'=>'1011100',\r
-                               '5'=>'1001110',\r
-                               '6'=>'1010000',\r
-                               '7'=>'1000100',\r
-                               '8'=>'1001000',\r
-                               '9'=>'1110100')\r
-               );\r
-               $parities = array(\r
-                       '0'=>array('A','A','A','A','A','A'),\r
-                       '1'=>array('A','A','B','A','B','B'),\r
-                       '2'=>array('A','A','B','B','A','B'),\r
-                       '3'=>array('A','A','B','B','B','A'),\r
-                       '4'=>array('A','B','A','A','B','B'),\r
-                       '5'=>array('A','B','B','A','A','B'),\r
-                       '6'=>array('A','B','B','B','A','A'),\r
-                       '7'=>array('A','B','A','B','A','B'),\r
-                       '8'=>array('A','B','A','B','B','A'),\r
-                       '9'=>array('A','B','B','A','B','A')\r
+               }
+               //Convert digits to bars
+               $codes = array(
+                       'A'=>array( // left odd parity
+                               '0'=>'0001101',
+                               '1'=>'0011001',
+                               '2'=>'0010011',
+                               '3'=>'0111101',
+                               '4'=>'0100011',
+                               '5'=>'0110001',
+                               '6'=>'0101111',
+                               '7'=>'0111011',
+                               '8'=>'0110111',
+                               '9'=>'0001011'),
+                       'B'=>array( // left even parity
+                               '0'=>'0100111',
+                               '1'=>'0110011',
+                               '2'=>'0011011',
+                               '3'=>'0100001',
+                               '4'=>'0011101',
+                               '5'=>'0111001',
+                               '6'=>'0000101',
+                               '7'=>'0010001',
+                               '8'=>'0001001',
+                               '9'=>'0010111'),
+                       'C'=>array( // right
+                               '0'=>'1110010',
+                               '1'=>'1100110',
+                               '2'=>'1101100',
+                               '3'=>'1000010',
+                               '4'=>'1011100',
+                               '5'=>'1001110',
+                               '6'=>'1010000',
+                               '7'=>'1000100',
+                               '8'=>'1001000',
+                               '9'=>'1110100')
+               );
+               $parities = array(
+                       '0'=>array('A','A','A','A','A','A'),
+                       '1'=>array('A','A','B','A','B','B'),
+                       '2'=>array('A','A','B','B','A','B'),
+                       '3'=>array('A','A','B','B','B','A'),
+                       '4'=>array('A','B','A','A','B','B'),
+                       '5'=>array('A','B','B','A','A','B'),
+                       '6'=>array('A','B','B','B','A','A'),
+                       '7'=>array('A','B','A','B','A','B'),
+                       '8'=>array('A','B','A','B','B','A'),
+                       '9'=>array('A','B','B','A','B','A')
                );
                $upce_parities = array();
-               $upce_parities[0] = array(\r
-                       '0'=>array('B','B','B','A','A','A'),\r
-                       '1'=>array('B','B','A','B','A','A'),\r
-                       '2'=>array('B','B','A','A','B','A'),\r
-                       '3'=>array('B','B','A','A','A','B'),\r
-                       '4'=>array('B','A','B','B','A','A'),\r
-                       '5'=>array('B','A','A','B','B','A'),\r
-                       '6'=>array('B','A','A','A','B','B'),\r
-                       '7'=>array('B','A','B','A','B','A'),\r
-                       '8'=>array('B','A','B','A','A','B'),\r
-                       '9'=>array('B','A','A','B','A','B')\r
+               $upce_parities[0] = array(
+                       '0'=>array('B','B','B','A','A','A'),
+                       '1'=>array('B','B','A','B','A','A'),
+                       '2'=>array('B','B','A','A','B','A'),
+                       '3'=>array('B','B','A','A','A','B'),
+                       '4'=>array('B','A','B','B','A','A'),
+                       '5'=>array('B','A','A','B','B','A'),
+                       '6'=>array('B','A','A','A','B','B'),
+                       '7'=>array('B','A','B','A','B','A'),
+                       '8'=>array('B','A','B','A','A','B'),
+                       '9'=>array('B','A','A','B','A','B')
                );
-               $upce_parities[1] = array(\r
-                       '0'=>array('A','A','A','B','B','B'),\r
-                       '1'=>array('A','A','B','A','B','B'),\r
-                       '2'=>array('A','A','B','B','A','B'),\r
-                       '3'=>array('A','A','B','B','B','A'),\r
-                       '4'=>array('A','B','A','A','B','B'),\r
-                       '5'=>array('A','B','B','A','A','B'),\r
-                       '6'=>array('A','B','B','B','A','A'),\r
-                       '7'=>array('A','B','A','B','A','B'),\r
-                       '8'=>array('A','B','A','B','B','A'),\r
-                       '9'=>array('A','B','B','A','B','A')\r
-               );\r
-               $k = 0;\r
+               $upce_parities[1] = array(
+                       '0'=>array('A','A','A','B','B','B'),
+                       '1'=>array('A','A','B','A','B','B'),
+                       '2'=>array('A','A','B','B','A','B'),
+                       '3'=>array('A','A','B','B','B','A'),
+                       '4'=>array('A','B','A','A','B','B'),
+                       '5'=>array('A','B','B','A','A','B'),
+                       '6'=>array('A','B','B','B','A','A'),
+                       '7'=>array('A','B','A','B','A','B'),
+                       '8'=>array('A','B','A','B','B','A'),
+                       '9'=>array('A','B','B','A','B','A')
+               );
+               $k = 0;
                $seq = '101'; // left guard bar
                if ($upce) {
                        $bararray = array('code' => $upce_code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
                        $p = $upce_parities[$code{1}][$r];
-                       for ($i = 0; $i < 6; ++$i) {\r
-                               $seq .= $codes[$p[$i]][$upce_code{$i}];\r
+                       for ($i = 0; $i < 6; ++$i) {
+                               $seq .= $codes[$p[$i]][$upce_code{$i}];
                        }
                        $seq .= '010101'; // right guard bar
                } else {
                        $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
                        $half_len = ceil($len / 2);
-                       if ($len == 8) {\r
-                               for ($i = 0; $i < $half_len; ++$i) {\r
-                                       $seq .= $codes['A'][$code{$i}];\r
+                       if ($len == 8) {
+                               for ($i = 0; $i < $half_len; ++$i) {
+                                       $seq .= $codes['A'][$code{$i}];
                                }
                        } else {
                                $p = $parities[$code{0}];
-                               for ($i = 1; $i < $half_len; ++$i) {\r
-                                       $seq .= $codes[$p[$i-1]][$code{$i}];\r
+                               for ($i = 1; $i < $half_len; ++$i) {
+                                       $seq .= $codes[$p[$i-1]][$code{$i}];
                                }
-                       }\r
-                       $seq .= '01010'; // center guard bar\r
-                       for ($i = $half_len; $i < $len; ++$i) {\r
-                               $seq .= $codes['C'][$code{$i}];\r
-                       }\r
+                       }
+                       $seq .= '01010'; // center guard bar
+                       for ($i = $half_len; $i < $len; ++$i) {
+                               $seq .= $codes['C'][$code{$i}];
+                       }
                        $seq .= '101'; // right guard bar
-               }\r
-               $clen = strlen($seq);\r
-               $w = 0;\r
-               for ($i = 0; $i < $clen; ++$i) {\r
-                       $w += 1;\r
-                       if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq{$i} != $seq{($i+1)}))) {\r
-                               if ($seq{$i} == '1') {\r
-                                       $t = true; // bar\r
-                               } else {\r
-                                       $t = false; // space\r
-                               }\r
-                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);\r
-                               $bararray['maxw'] += $w;\r
-                               ++$k;\r
-                               $w = 0;\r
-                       }\r
-               }\r
-               return $bararray;\r
-       }\r
-       \r
-       /**\r
+               }
+               $clen = strlen($seq);
+               $w = 0;
+               for ($i = 0; $i < $clen; ++$i) {
+                       $w += 1;
+                       if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
+                               if ($seq{$i} == '1') {
+                                       $t = true; // bar
+                               } else {
+                                       $t = false; // space
+                               }
+                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
+                               $bararray['maxw'] += $w;
+                               ++$k;
+                               $w = 0;
+                       }
+               }
+               return $bararray;
+       }
+       
+       /**
         * UPC-Based Extentions
         * 2-Digit Ext.: Used to indicate magazines and newspaper issue numbers
-        * 5-Digit Ext.: Used to mark suggested retail price of books\r
-        * @param string $code code to represent.\r
-        * @param string $len barcode type: 2 = 2-Digit, 5 = 5-Digit\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
+        * 5-Digit Ext.: Used to mark suggested retail price of books
+        * @param string $code code to represent.
+        * @param string $len barcode type: 2 = 2-Digit, 5 = 5-Digit
+        * @return array barcode representation.
+        * @access protected
+        */
        protected function barcode_eanext($code, $len=5) {
-               //Padding\r
+               //Padding
                $code = str_pad($code, $len, '0', STR_PAD_LEFT);
                // calculate check digit
                if ($len == 2) {
@@ -1195,150 +1197,150 @@ class TCPDFBarcode {
                } else {
                        return false;
                }
-               //Convert digits to bars\r
-               $codes = array(\r
-                       'A'=>array( // left odd parity\r
-                               '0'=>'0001101',\r
-                               '1'=>'0011001',\r
-                               '2'=>'0010011',\r
-                               '3'=>'0111101',\r
-                               '4'=>'0100011',\r
-                               '5'=>'0110001',\r
-                               '6'=>'0101111',\r
-                               '7'=>'0111011',\r
-                               '8'=>'0110111',\r
-                               '9'=>'0001011'),\r
-                       'B'=>array( // left even parity\r
-                               '0'=>'0100111',\r
-                               '1'=>'0110011',\r
-                               '2'=>'0011011',\r
-                               '3'=>'0100001',\r
-                               '4'=>'0011101',\r
-                               '5'=>'0111001',\r
-                               '6'=>'0000101',\r
-                               '7'=>'0010001',\r
-                               '8'=>'0001001',\r
-                               '9'=>'0010111')\r
+               //Convert digits to bars
+               $codes = array(
+                       'A'=>array( // left odd parity
+                               '0'=>'0001101',
+                               '1'=>'0011001',
+                               '2'=>'0010011',
+                               '3'=>'0111101',
+                               '4'=>'0100011',
+                               '5'=>'0110001',
+                               '6'=>'0101111',
+                               '7'=>'0111011',
+                               '8'=>'0110111',
+                               '9'=>'0001011'),
+                       'B'=>array( // left even parity
+                               '0'=>'0100111',
+                               '1'=>'0110011',
+                               '2'=>'0011011',
+                               '3'=>'0100001',
+                               '4'=>'0011101',
+                               '5'=>'0111001',
+                               '6'=>'0000101',
+                               '7'=>'0010001',
+                               '8'=>'0001001',
+                               '9'=>'0010111')
                );
                $parities = array();
-               $parities[2] = array(\r
-                       '0'=>array('A','A'),\r
-                       '1'=>array('A','B'),\r
-                       '2'=>array('B','A'),\r
-                       '3'=>array('B','B')\r
+               $parities[2] = array(
+                       '0'=>array('A','A'),
+                       '1'=>array('A','B'),
+                       '2'=>array('B','A'),
+                       '3'=>array('B','B')
                );
-               $parities[5] = array(\r
-                       '0'=>array('B','B','A','A','A'),\r
-                       '1'=>array('B','A','B','A','A'),\r
-                       '2'=>array('B','A','A','B','A'),\r
-                       '3'=>array('B','A','A','A','B'),\r
-                       '4'=>array('A','B','B','A','A'),\r
-                       '5'=>array('A','A','B','B','A'),\r
-                       '6'=>array('A','A','A','B','B'),\r
-                       '7'=>array('A','B','A','B','A'),\r
-                       '8'=>array('A','B','A','A','B'),\r
-                       '9'=>array('A','A','B','A','B')\r
+               $parities[5] = array(
+                       '0'=>array('B','B','A','A','A'),
+                       '1'=>array('B','A','B','A','A'),
+                       '2'=>array('B','A','A','B','A'),
+                       '3'=>array('B','A','A','A','B'),
+                       '4'=>array('A','B','B','A','A'),
+                       '5'=>array('A','A','B','B','A'),
+                       '6'=>array('A','A','A','B','B'),
+                       '7'=>array('A','B','A','B','A'),
+                       '8'=>array('A','B','A','A','B'),
+                       '9'=>array('A','A','B','A','B')
                );      
                $p = $parities[$len][$r];
                $seq = '1011'; // left guard bar
                $seq .= $codes[$p[0]][$code{0}];
                for ($i = 1; $i < $len; ++$i) {
-                       $seq .= '01'; // separator\r
-                       $seq .= $codes[$p[$i]][$code{$i}];\r
+                       $seq .= '01'; // separator
+                       $seq .= $codes[$p[$i]][$code{$i}];
                }
                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
-               return $this->binseq_to_array($seq, $bararray);\r
+               return $this->binseq_to_array($seq, $bararray);
        }
-       \r
-       /**\r
+       
+       /**
         * POSTNET and PLANET barcodes.
-        * Used by U.S. Postal Service for automated mail sorting\r
-        * @param string $code zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD.\r
+        * Used by U.S. Postal Service for automated mail sorting
+        * @param string $code zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD.
         * @param boolean $planet if true print the PLANET barcode, otherwise print POSTNET
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
-       protected function barcode_postnet($code, $planet=false) {\r
+        * @return array barcode representation.
+        * @access protected
+        */
+       protected function barcode_postnet($code, $planet=false) {
                // bar lenght
                if ($planet) {
-                       $barlen = Array(\r
-                               0 => Array(1,1,2,2,2),\r
-                               1 => Array(2,2,2,1,1),\r
-                               2 => Array(2,2,1,2,1),\r
-                               3 => Array(2,2,1,1,2),\r
-                               4 => Array(2,1,2,2,1),\r
-                               5 => Array(2,1,2,1,2),\r
-                               6 => Array(2,1,1,2,2),\r
-                               7 => Array(1,2,2,2,1),\r
-                               8 => Array(1,2,2,1,2),\r
-                               9 => Array(1,2,1,2,2)\r
+                       $barlen = Array(
+                               0 => Array(1,1,2,2,2),
+                               1 => Array(2,2,2,1,1),
+                               2 => Array(2,2,1,2,1),
+                               3 => Array(2,2,1,1,2),
+                               4 => Array(2,1,2,2,1),
+                               5 => Array(2,1,2,1,2),
+                               6 => Array(2,1,1,2,2),
+                               7 => Array(1,2,2,2,1),
+                               8 => Array(1,2,2,1,2),
+                               9 => Array(1,2,1,2,2)
                        );
                } else {
-                       $barlen = Array(\r
-                               0 => Array(2,2,1,1,1),\r
-                               1 => Array(1,1,1,2,2),\r
-                               2 => Array(1,1,2,1,2),\r
-                               3 => Array(1,1,2,2,1),\r
-                               4 => Array(1,2,1,1,2),\r
-                               5 => Array(1,2,1,2,1),\r
-                               6 => Array(1,2,2,1,1),\r
-                               7 => Array(2,1,1,1,2),\r
-                               8 => Array(2,1,1,2,1),\r
-                               9 => Array(2,1,2,1,1)\r
+                       $barlen = Array(
+                               0 => Array(2,2,1,1,1),
+                               1 => Array(1,1,1,2,2),
+                               2 => Array(1,1,2,1,2),
+                               3 => Array(1,1,2,2,1),
+                               4 => Array(1,2,1,1,2),
+                               5 => Array(1,2,1,2,1),
+                               6 => Array(1,2,2,1,1),
+                               7 => Array(2,1,1,1,2),
+                               8 => Array(2,1,1,2,1),
+                               9 => Array(2,1,2,1,1)
                        );
-               }\r
-               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array());\r
-               $k = 0;\r
-               $code = str_replace('-', '', $code);\r
-               $code = str_replace(' ', '', $code);\r
+               }
+               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array());
+               $k = 0;
+               $code = str_replace('-', '', $code);
+               $code = str_replace(' ', '', $code);
                $len = strlen($code);
-               // calculate checksum\r
-               $sum = 0;\r
-               for ($i = 0; $i < $len; ++$i) {\r
-                       $sum += intval($code{$i});\r
+               // calculate checksum
+               $sum = 0;
+               for ($i = 0; $i < $len; ++$i) {
+                       $sum += intval($code{$i});
                }
                $chkd = ($sum % 10);
                if($chkd > 0) {
                        $chkd = (10 - $chkd);
                }
-               $code .= $chkd;\r
-               $len = strlen($code);\r
-               // start bar\r
-               $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 2, 'p' => 0);\r
-               $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);\r
-               $bararray['maxw'] += 2;\r
-               for ($i = 0; $i < $len; ++$i) {\r
-                       for ($j = 0; $j < 5; ++$j) {\r
-                               $h = $barlen[$code{$i}][$j];\r
-                               $p = floor(1 / $h);\r
-                               $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p);\r
-                               $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);\r
-                               $bararray['maxw'] += 2;\r
-                       }\r
-               }\r
-               // end bar\r
-               $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 2, 'p' => 0);\r
-               $bararray['maxw'] += 1;\r
-               return $bararray;\r
-       }\r
-       \r
-       /**\r
+               $code .= $chkd;
+               $len = strlen($code);
+               // start bar
+               $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 2, 'p' => 0);
+               $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);
+               $bararray['maxw'] += 2;
+               for ($i = 0; $i < $len; ++$i) {
+                       for ($j = 0; $j < 5; ++$j) {
+                               $h = $barlen[$code{$i}][$j];
+                               $p = floor(1 / $h);
+                               $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p);
+                               $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);
+                               $bararray['maxw'] += 2;
+                       }
+               }
+               // end bar
+               $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 2, 'p' => 0);
+               $bararray['maxw'] += 1;
+               return $bararray;
+       }
+       
+       /**
         * RMS4CC - CBC - KIX
         * RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - KIX (Klant index - Customer index)
-        * RM4SCC is the name of the barcode symbology used by the Royal Mail for its Cleanmail service.\r
+        * RM4SCC is the name of the barcode symbology used by the Royal Mail for its Cleanmail service.
         * @param string $code code to print
         * @param boolean $kix if true prints the KIX variation (doesn't use the start and end symbols, and the checksum) - in this case the house number must be sufficed with an X and placed at the end of the code.
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
-       protected function barcode_rms4cc($code, $kix=false) {\r
+        * @return array barcode representation.
+        * @access protected
+        */
+       protected function barcode_rms4cc($code, $kix=false) {
                $notkix = !$kix;
                // bar mode
                // 1 = pos 1, length 2
                // 2 = pos 1, length 3
                // 3 = pos 2, length 1
                // 4 = pos 2, length 2
-               $barmode = array(\r
+               $barmode = array(
                        '0' => array(3,3,2,2),
                        '1' => array(3,4,1,2),
                        '2' => array(3,4,2,1),
@@ -1374,14 +1376,14 @@ class TCPDFBarcode {
                        'W' => array(1,2,4,3),
                        'X' => array(2,1,3,4),
                        'Y' => array(2,1,4,3),
-                       'Z' => array(2,2,3,3)           \r
+                       'Z' => array(2,2,3,3)           
                );
                $code = strtoupper($code);
-               $len = strlen($code);\r
+               $len = strlen($code);
                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 3, 'bcode' => array());
                if ($notkix) {
                        // table for checksum calculation (row,col)
-                       $checktable = array(\r
+                       $checktable = array(
                                '0' => array(1,1),
                                '1' => array(1,2),
                                '2' => array(1,3),
@@ -1417,7 +1419,7 @@ class TCPDFBarcode {
                                'W' => array(0,3),
                                'X' => array(0,4),
                                'Y' => array(0,5),
-                               'Z' => array(0,0)\r
+                               'Z' => array(0,0)
                        );
                        $row = 0;
                        $col = 0;
@@ -1432,13 +1434,13 @@ class TCPDFBarcode {
                        ++$len;
                }
                $k = 0;
-               if ($notkix) {\r
-                       // start bar\r
-                       $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 2, 'p' => 0);\r
-                       $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);\r
+               if ($notkix) {
+                       // start bar
+                       $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 2, 'p' => 0);
+                       $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);
                        $bararray['maxw'] += 2;
-               }\r
-               for ($i = 0; $i < $len; ++$i) {\r
+               }
+               for ($i = 0; $i < $len; ++$i) {
                        for ($j = 0; $j < 4; ++$j) {
                                switch ($barmode[$code{$i}][$j]) {
                                        case 1: {
@@ -1461,85 +1463,85 @@ class TCPDFBarcode {
                                                $h = 2;
                                                break;
                                        }
-                               }\r
-                               $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p);\r
-                               $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);\r
-                               $bararray['maxw'] += 2;\r
-                       }\r
-               }
-               if ($notkix) {\r
-                       // stop bar\r
-                       $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 3, 'p' => 0);\r
+                               }
+                               $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p);
+                               $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);
+                               $bararray['maxw'] += 2;
+                       }
+               }
+               if ($notkix) {
+                       // stop bar
+                       $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 3, 'p' => 0);
                        $bararray['maxw'] += 1;
-               }\r
-               return $bararray;\r
+               }
+               return $bararray;
        }
-       \r
-       /**\r
+       
+       /**
         * CODABAR barcodes.
-        * Older code often used in library systems, sometimes in blood banks\r
-        * @param string $code code to represent.\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
-       protected function barcode_codabar($code) {\r
-               $chr = array(\r
-                       '0' => '11111221',\r
-                       '1' => '11112211',\r
-                       '2' => '11121121',\r
-                       '3' => '22111111',\r
-                       '4' => '11211211',\r
-                       '5' => '21111211',\r
-                       '6' => '12111121',\r
-                       '7' => '12112111',\r
-                       '8' => '12211111',\r
-                       '9' => '21121111',\r
-                       '-' => '11122111',\r
-                       '$' => '11221111',\r
-                       ':' => '21112121',\r
-                       '/' => '21211121',\r
-                       '.' => '21212111',\r
-                       '+' => '11222221',\r
-                       'A' => '11221211',\r
-                       'B' => '12121121',\r
-                       'C' => '11121221',\r
-                       'D' => '11122211'\r
-               );\r
-               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());\r
-               $k = 0;\r
-               $w = 0;\r
-               $seq = '';\r
-               $code = 'A'.strtoupper($code).'A';\r
-               $len = strlen($code);\r
-               for ($i = 0; $i < $len; ++$i) {\r
-                       if (!isset($chr[$code{$i}])) {\r
-                               return false;\r
-                       }\r
-                       $seq = $chr[$code{$i}];\r
-                       for ($j = 0; $j < 8; ++$j) {\r
-                               if (($j % 2) == 0) {\r
-                                       $t = true; // bar\r
-                               } else {\r
-                                       $t = false; // space\r
-                               }\r
-                               $w = $seq{$j};\r
-                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);\r
-                               $bararray['maxw'] += $w;\r
-                               ++$k;\r
-                       }\r
-               }\r
-               return $bararray;\r
-       }\r
-       \r
-       /**\r
+        * Older code often used in library systems, sometimes in blood banks
+        * @param string $code code to represent.
+        * @return array barcode representation.
+        * @access protected
+        */
+       protected function barcode_codabar($code) {
+               $chr = array(
+                       '0' => '11111221',
+                       '1' => '11112211',
+                       '2' => '11121121',
+                       '3' => '22111111',
+                       '4' => '11211211',
+                       '5' => '21111211',
+                       '6' => '12111121',
+                       '7' => '12112111',
+                       '8' => '12211111',
+                       '9' => '21121111',
+                       '-' => '11122111',
+                       '$' => '11221111',
+                       ':' => '21112121',
+                       '/' => '21211121',
+                       '.' => '21212111',
+                       '+' => '11222221',
+                       'A' => '11221211',
+                       'B' => '12121121',
+                       'C' => '11121221',
+                       'D' => '11122211'
+               );
+               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
+               $k = 0;
+               $w = 0;
+               $seq = '';
+               $code = 'A'.strtoupper($code).'A';
+               $len = strlen($code);
+               for ($i = 0; $i < $len; ++$i) {
+                       if (!isset($chr[$code{$i}])) {
+                               return false;
+                       }
+                       $seq = $chr[$code{$i}];
+                       for ($j = 0; $j < 8; ++$j) {
+                               if (($j % 2) == 0) {
+                                       $t = true; // bar
+                               } else {
+                                       $t = false; // space
+                               }
+                               $w = $seq{$j};
+                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
+                               $bararray['maxw'] += $w;
+                               ++$k;
+                       }
+               }
+               return $bararray;
+       }
+       
+       /**
         * CODE11 barcodes.
-        * Used primarily for labeling telecommunications equipment\r
-        * @param string $code code to represent.\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
-       protected function barcode_code11($code) {\r
-               $chr = array(\r
+        * Used primarily for labeling telecommunications equipment
+        * @param string $code code to represent.
+        * @return array barcode representation.
+        * @access protected
+        */
+       protected function barcode_code11($code) {
+               $chr = array(
                        '0' => '111121',
                        '1' => '211121',
                        '2' => '121121',
@@ -1551,12 +1553,12 @@ class TCPDFBarcode {
                        '8' => '211211',
                        '9' => '211111',
                        '-' => '112111',
-                       'S' => '112211'\r
-               );\r
-               \r
-               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());\r
-               $k = 0;\r
-               $w = 0;\r
+                       'S' => '112211'
+               );
+               
+               $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
+               $k = 0;
+               $w = 0;
                $seq = '';
                $len = strlen($code);
                // calculate check digit C
@@ -1600,39 +1602,39 @@ class TCPDFBarcode {
                        $check %= 11;
                        $code .= $check;
                        ++$len;
-               }\r
-               $code = 'S'.$code.'S';\r
-               $len += 3;\r
-               for ($i = 0; $i < $len; ++$i) {\r
-                       if (!isset($chr[$code{$i}])) {\r
-                               return false;\r
-                       }\r
-                       $seq = $chr[$code{$i}];\r
-                       for ($j = 0; $j < 6; ++$j) {\r
-                               if (($j % 2) == 0) {\r
-                                       $t = true; // bar\r
-                               } else {\r
-                                       $t = false; // space\r
-                               }\r
-                               $w = $seq{$j};\r
-                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);\r
-                               $bararray['maxw'] += $w;\r
-                               ++$k;\r
-                       }\r
-               }\r
-               return $bararray;\r
+               }
+               $code = 'S'.$code.'S';
+               $len += 3;
+               for ($i = 0; $i < $len; ++$i) {
+                       if (!isset($chr[$code{$i}])) {
+                               return false;
+                       }
+                       $seq = $chr[$code{$i}];
+                       for ($j = 0; $j < 6; ++$j) {
+                               if (($j % 2) == 0) {
+                                       $t = true; // bar
+                               } else {
+                                       $t = false; // space
+                               }
+                               $w = $seq{$j};
+                               $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
+                               $bararray['maxw'] += $w;
+                               ++$k;
+                       }
+               }
+               return $bararray;
        }
        
-       /**\r
-        * Pharmacode\r
-        * Contains digits (0 to 9)\r
-        * @param string $code code to represent.\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
+       /**
+        * Pharmacode
+        * Contains digits (0 to 9)
+        * @param string $code code to represent.
+        * @return array barcode representation.
+        * @access protected
+        */
        protected function barcode_pharmacode($code) {
                $seq = '';
-               $code = intval($code);\r
+               $code = intval($code);
                while ($code > 0) {
                        if (($code % 2) == 0) {
                                $seq .= '11100';
@@ -1646,16 +1648,16 @@ class TCPDFBarcode {
                $seq = substr($seq, 0, -2);
                $seq = strrev($seq);
                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
-               return $this->binseq_to_array($seq, $bararray);\r
+               return $this->binseq_to_array($seq, $bararray);
        }
        
-       /**\r
-        * Pharmacode two-track\r
-        * Contains digits (0 to 9)\r
-        * @param string $code code to represent.\r
-        * @return array barcode representation.\r
-        * @access protected\r
-        */\r
+       /**
+        * Pharmacode two-track
+        * Contains digits (0 to 9)
+        * @param string $code code to represent.
+        * @return array barcode representation.
+        * @access protected
+        */
        protected function barcode_pharmacode2t($code) {
                $seq = '';
                $code = intval($code);
@@ -1700,29 +1702,29 @@ class TCPDFBarcode {
                                        break;
                                }
                        }
-                       $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p);\r
-                       $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);\r
+                       $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p);
+                       $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);
                        $bararray['maxw'] += 2;
                }
                unset($bararray['bcode'][($k - 1)]);
                --$bararray['maxw'];
-               return $bararray;\r
+               return $bararray;
        }
        
-       \r
+       
        /**
         * IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
-        * (requires PHP bcmath extension) \r
+        * (requires PHP bcmath extension) 
         * Intelligent Mail barcode is a 65-bar code for use on mail in the United States.
         * The fields are described as follows:<ul><li>The Barcode Identifier shall be assigned by USPS to encode the presort identification that is currently printed in human readable form on the optional endorsement line (OEL) as well as for future USPS use. This shall be two digits, with the second digit in the range of 0–4. The allowable encoding ranges shall be 00–04, 10–14, 20–24, 30–34, 40–44, 50–54, 60–64, 70–74, 80–84, and 90–94.</li><li>The Service Type Identifier shall be assigned by USPS for any combination of services requested on the mailpiece. The allowable encoding range shall be 000http://it2.php.net/manual/en/function.dechex.php–999. Each 3-digit value shall correspond to a particular mail class with a particular combination of service(s). Each service program, such as OneCode Confirm and OneCode ACS, shall provide the list of Service Type Identifier values.</li><li>The Mailer or Customer Identifier shall be assigned by USPS as a unique, 6 or 9 digit number that identifies a business entity. The allowable encoding range for the 6 digit Mailer ID shall be 000000- 899999, while the allowable encoding range for the 9 digit Mailer ID shall be 900000000-999999999.</li><li>The Serial or Sequence Number shall be assigned by the mailer for uniquely identifying and tracking mailpieces. The allowable encoding range shall be 000000000–999999999 when used with a 6 digit Mailer ID and 000000-999999 when used with a 9 digit Mailer ID. e. The Delivery Point ZIP Code shall be assigned by the mailer for routing the mailpiece. This shall replace POSTNET for routing the mailpiece to its final delivery point. The length may be 0, 5, 9, or 11 digits. The allowable encoding ranges shall be no ZIP Code, 00000–99999,  000000000–999999999, and 00000000000–99999999999.</li></ul>
         * @param string $code code to print, separate the ZIP (routing code) from the rest using a minus char '-' (BarcodeID_ServiceTypeID_MailerID_SerialNumber-RoutingCode)
-        * @return array barcode representation.\r
+        * @return array barcode representation.
         * @access protected
-        */\r
+        */
        protected function barcode_imb($code) {
-               $asc_chr = array(4,0,2,6,3,5,1,9,8,7,1,2,0,6,4,8,2,9,5,3,0,1,3,7,4,6,8,9,2,0,5,1,9,4,3,8,6,7,1,2,4,3,9,5,7,8,3,0,2,1,4,0,9,1,7,0,2,4,6,3,7,1,9,5,8);\r
+               $asc_chr = array(4,0,2,6,3,5,1,9,8,7,1,2,0,6,4,8,2,9,5,3,0,1,3,7,4,6,8,9,2,0,5,1,9,4,3,8,6,7,1,2,4,3,9,5,7,8,3,0,2,1,4,0,9,1,7,0,2,4,6,3,7,1,9,5,8);
                $dsc_chr = array(7,1,9,5,8,0,2,4,6,3,5,8,9,7,3,0,6,1,7,4,6,8,9,2,5,1,7,5,4,3,8,7,6,0,2,5,4,9,3,0,1,6,8,2,0,4,5,9,6,7,5,2,6,3,8,5,1,9,8,7,4,0,2,6,3);
-               $asc_pos = array(3,0,8,11,1,12,8,11,10,6,4,12,2,7,9,6,7,9,2,8,4,0,12,7,10,9,0,7,10,5,7,9,6,8,2,12,1,4,2,0,1,5,4,6,12,1,0,9,4,7,5,10,2,6,9,11,2,12,6,7,5,11,0,3,2);\r
+               $asc_pos = array(3,0,8,11,1,12,8,11,10,6,4,12,2,7,9,6,7,9,2,8,4,0,12,7,10,9,0,7,10,5,7,9,6,8,2,12,1,4,2,0,1,5,4,6,12,1,0,9,4,7,5,10,2,6,9,11,2,12,6,7,5,11,0,3,2);
                $dsc_pos = array(2,10,12,5,9,1,5,4,3,9,11,5,10,1,6,3,4,1,10,0,2,11,8,6,1,12,3,8,6,4,4,11,0,6,1,9,11,5,3,7,3,10,7,11,8,2,10,3,5,8,0,3,12,11,8,4,5,1,3,0,7,12,9,8,10);
                $code_arr = explode('-', $code);
                $tracking_number = $code_arr[0];
@@ -1809,7 +1811,7 @@ class TCPDFBarcode {
                $k = 0;
                $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 3, 'bcode' => array());
                for ($i = 0; $i < 65; ++$i) {
-                       $asc = (($characters[$asc_chr[$i]] & pow(2, $asc_pos[$i])) > 0);\r
+                       $asc = (($characters[$asc_chr[$i]] & pow(2, $asc_pos[$i])) > 0);
                        $dsc = (($characters[$dsc_chr[$i]] & pow(2, $dsc_pos[$i])) > 0);
                        if ($asc AND $dsc) {
                                // full bar (F)
@@ -1828,13 +1830,13 @@ class TCPDFBarcode {
                                $p = 1;
                                $h = 1;
                        }
-                       $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p);\r
-                       $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);\r
+                       $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p);
+                       $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);
                        $bararray['maxw'] += 2;
                }
                unset($bararray['bcode'][($k - 1)]);
-               --$bararray['maxw'];\r
-               return $bararray;\r
+               --$bararray['maxw'];
+               return $bararray;
        }
        
        /**
@@ -1881,9 +1883,9 @@ class TCPDFBarcode {
        /**
         * Intelligent Mail Barcode calculation of Frame Check Sequence
         * @param string $code_arr array of hexadecimal values (13 bytes holding 102 bits right justified).
-        * @return int 11 bit Frame Check Sequence as integer (decimal base)\r
+        * @return int 11 bit Frame Check Sequence as integer (decimal base)
         * @access protected
-        */\r
+        */
        protected function imb_crc11fcs($code_arr) {
                $genpoly = 0x0F35; // generator polynomial
                $fcs = 0x07FF; // Frame Check Sequence
@@ -1917,9 +1919,9 @@ class TCPDFBarcode {
        /**
         * Reverse unsigned short value
         * @param int $num value to reversr
-        * @return int reversed value\r
+        * @return int reversed value
         * @access protected
-        */\r
+        */
        protected function imb_reverse_us($num) {
                $rev = 0;
                for ($i = 0; $i < 16; ++$i) {
@@ -1934,43 +1936,43 @@ class TCPDFBarcode {
         * generate Nof13 tables used for Intelligent Mail Barcode
         * @param int $n is the type of table: 2 for 2of13 table, 5 for 5of13table
         * @param int $size size of table (78 for n=2 and 1287 for n=5)
-        * @return array requested table\r
+        * @return array requested table
         * @access protected
-        */\r
+        */
        protected function imb_tables($n, $size) {
                $table = array();
-               $lli = 0; // LUT lower index\r
-               $lui = $size - 1; // LUT upper index\r
-               for ($count = 0; $count < 8192; ++$count) {\r
-                       $bit_count = 0;\r
+               $lli = 0; // LUT lower index
+               $lui = $size - 1; // LUT upper index
+               for ($count = 0; $count < 8192; ++$count) {
+                       $bit_count = 0;
                        for ($bit_index = 0; $bit_index < 13; ++$bit_index) {
                                $bit_count += intval(($count & (1 << $bit_index)) != 0);
                        }
-                       // if we don't have the right number of bits on, go on to the next value\r
-                       if ($bit_count == $n) {\r
+                       // if we don't have the right number of bits on, go on to the next value
+                       if ($bit_count == $n) {
                                $reverse = ($this->imb_reverse_us($count) >> 3);
                                // if the reverse is less than count, we have already visited this pair before
                                if ($reverse >= $count) {
                                        // If count is symmetric, place it at the first free slot from the end of the list.
-                                       // Otherwise, place it at the first free slot from the beginning of the list AND place $reverse ath the next free slot from the beginning of the list\r
-                                       if ($reverse == $count) {\r
-                                               $table[$lui] = $count;\r
-                                               --$lui;\r
-                                       } else {\r
-                                               $table[$lli] = $count;\r
-                                               ++$lli;\r
-                                               $table[$lli] = $reverse;\r
-                                               ++$lli;\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
+                                       // Otherwise, place it at the first free slot from the beginning of the list AND place $reverse ath the next free slot from the beginning of the list
+                                       if ($reverse == $count) {
+                                               $table[$lui] = $count;
+                                               --$lui;
+                                       } else {
+                                               $table[$lli] = $count;
+                                               ++$lli;
+                                               $table[$lli] = $reverse;
+                                               ++$lli;
+                                       }
+                               }
+                       }
+               }
                return $table;
        }
-       \r
-} // end of class\r
-\r
-//============================================================+\r
-// END OF FILE                                                 \r
-//============================================================+\r
+       
+} // end of class
+
+//============================================================+
+// END OF FILE                                                 
+//============================================================+
 ?>
index ee66d751279d68748aff0d1ab50428d239861dc7..88c30ec46c566118a54c4d23001b04fe34854573 100755 (executable)
-<?php\r
-//============================================================+\r
-// File name   : tcpdf_config.php\r
-// Begin       : 2004-06-11\r
-// Last Update : 2009-04-20\r
-//\r
-// Description : Configuration file for TCPDF.\r
-//\r
-// Author: Nicola Asuni\r
-//\r
-// (c) Copyright:\r
-//               Nicola Asuni\r
-//               Tecnick.com s.r.l.\r
-//               Via Della Pace, 11\r
-//               09044 Quartucciu (CA)\r
-//               ITALY\r
-//               www.tecnick.com\r
-//               info@tecnick.com\r
-//============================================================+\r
-\r
-/**\r
- * Configuration file for TCPDF.\r
- * @author Nicola Asuni\r
- * @copyright 2004-2008 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com\r
- * @package com.tecnick.tcpdf\r
- * @version 4.0.014\r
- * @link http://tcpdf.sourceforge.net\r
- * @license http://www.gnu.org/copyleft/lesser.html LGPL\r
- * @since 2004-10-27\r
- */\r
-\r
-// If you define the constant K_TCPDF_EXTERNAL_CONFIG, the following settings will be ignored.\r
-\r
-if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {\r
-       \r
-       // DOCUMENT_ROOT fix for IIS Webserver\r
-       if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {\r
-               if(isset($_SERVER['SCRIPT_FILENAME'])) {\r
-                       $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));\r
-               } elseif(isset($_SERVER['PATH_TRANSLATED'])) {\r
-                       $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));\r
-               }       else {\r
-                       // define here your DOCUMENT_ROOT path if the previous fails\r
-                       $_SERVER['DOCUMENT_ROOT'] = '/var/www';\r
-               }\r
-       }\r
-       \r
-       // Automatic calculation for the following K_PATH_MAIN constant\r
-       $k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));\r
-       if (substr($k_path_main, -1) != '/') {\r
-               $k_path_main .= '/';\r
-       }\r
-       \r
-       /**\r
-        * Installation path (/var/www/tcpdf/).\r
-        * By default it is automatically calculated but you can also set it as a fixed string to improve performances.\r
-        */\r
-       define ('K_PATH_MAIN', $k_path_main);\r
-       \r
-       // Automatic calculation for the following K_PATH_URL constant\r
-       if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {\r
-               if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {\r
-                       $k_path_url = 'https://';\r
-               } else {\r
-                       $k_path_url = 'http://';\r
-               }\r
-               $k_path_url .= $_SERVER['HTTP_HOST'];\r
-               $k_path_url .= str_replace( '\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));\r
-       }\r
-       \r
-       /**\r
-        * URL path to tcpdf installation folder (http://localhost/tcpdf/).\r
-        * By default it is automatically calculated but you can also set it as a fixed string to improve performances.\r
-        */\r
-       define ('K_PATH_URL', $k_path_url);\r
-       \r
-       /**\r
-        * path for PDF fonts\r
-        * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts\r
-        */\r
-       define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');\r
-       \r
-       /**\r
-        * cache directory for temporary files (full path)\r
-        */\r
-       define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');\r
-       \r
-       /**\r
-        * cache directory for temporary files (url path)\r
-        */\r
-       define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');\r
-       \r
-       /**\r
-        *images directory\r
-        */\r
-       define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');\r
-       \r
-       /**\r
-        * blank image\r
-        */\r
-       define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');\r
-       \r
-       /**\r
-        * page format\r
-        */\r
-       define ('PDF_PAGE_FORMAT', 'A4');\r
-       \r
-       /**\r
-        * page orientation (P=portrait, L=landscape)\r
-        */\r
-       define ('PDF_PAGE_ORIENTATION', 'P');\r
-       \r
-       /**\r
-        * document creator\r
-        */\r
-       define ('PDF_CREATOR', 'TCPDF');\r
-       \r
-       /**\r
-        * document author\r
-        */\r
-       define ('PDF_AUTHOR', 'TCPDF');\r
-       \r
-       /**\r
-        * header title\r
-        */\r
-       define ('PDF_HEADER_TITLE', 'TCPDF Example');\r
-       \r
-       /**\r
-        * header description string\r
-        */\r
-       define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");\r
-       \r
-       /**\r
-        * image logo\r
-        */\r
-       define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');\r
-       \r
-       /**\r
-        * header logo image width [mm]\r
-        */\r
-       define ('PDF_HEADER_LOGO_WIDTH', 30);\r
-       \r
-       /**\r
-        *  document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]\r
-        */\r
-       define ('PDF_UNIT', 'mm');\r
-       \r
-       /**\r
-        * header margin\r
-        */\r
-       define ('PDF_MARGIN_HEADER', 5);\r
-       \r
-       /**\r
-        * footer margin\r
-        */\r
-       define ('PDF_MARGIN_FOOTER', 10);\r
-       \r
-       /**\r
-        * top margin\r
-        */\r
-       define ('PDF_MARGIN_TOP', 27);\r
-       \r
-       /**\r
-        * bottom margin\r
-        */\r
-       define ('PDF_MARGIN_BOTTOM', 25);\r
-       \r
-       /**\r
-        * left margin\r
-        */\r
-       define ('PDF_MARGIN_LEFT', 15);\r
-       \r
-       /**\r
-        * right margin\r
-        */\r
-       define ('PDF_MARGIN_RIGHT', 15);\r
-       \r
-       /**\r
-        * default main font name\r
-        */\r
-       define ('PDF_FONT_NAME_MAIN', 'helvetica');\r
-       \r
-       /**\r
-        * default main font size\r
-        */\r
-       define ('PDF_FONT_SIZE_MAIN', 10);\r
-       \r
-       /**\r
-        * default data font name\r
-        */\r
+<?php
+//============================================================+
+// File name   : tcpdf_config.php
+// Begin       : 2004-06-11
+// Last Update : 2009-09-30
+//
+// Description : Configuration file for TCPDF.
+//
+// Author: Nicola Asuni
+//
+// (c) Copyright:
+//               Nicola Asuni
+//               Tecnick.com s.r.l.
+//               Via Della Pace, 11
+//               09044 Quartucciu (CA)
+//               ITALY
+//               www.tecnick.com
+//               info@tecnick.com
+//============================================================+
+
+/**
+ * Configuration file for TCPDF.
+ * @author Nicola Asuni
+ * @copyright 2004-2008 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
+ * @package com.tecnick.tcpdf
+ * @version 4.0.014
+ * @link http://tcpdf.sourceforge.net
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL
+ * @since 2004-10-27
+ */
+
+// If you define the constant K_TCPDF_EXTERNAL_CONFIG, the following settings will be ignored.
+
+if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
+       
+       // DOCUMENT_ROOT fix for IIS Webserver
+       if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
+               if(isset($_SERVER['SCRIPT_FILENAME'])) {
+                       $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
+               } elseif(isset($_SERVER['PATH_TRANSLATED'])) {
+                       $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
+               }       else {
+                       // define here your DOCUMENT_ROOT path if the previous fails
+                       $_SERVER['DOCUMENT_ROOT'] = '/var/www';
+               }
+       }
+       
+       // Automatic calculation for the following K_PATH_MAIN constant
+       $k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
+       if (substr($k_path_main, -1) != '/') {
+               $k_path_main .= '/';
+       }
+       
+       /**
+        * Installation path (/var/www/tcpdf/).
+        * By default it is automatically calculated but you can also set it as a fixed string to improve performances.
+        */
+       define ('K_PATH_MAIN', $k_path_main);
+       
+       // Automatic calculation for the following K_PATH_URL constant
+       if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
+               if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
+                       $k_path_url = 'https://';
+               } else {
+                       $k_path_url = 'http://';
+               }
+               $k_path_url .= $_SERVER['HTTP_HOST'];
+               $k_path_url .= str_replace( '\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));
+       }
+       
+       /**
+        * URL path to tcpdf installation folder (http://localhost/tcpdf/).
+        * By default it is automatically calculated but you can also set it as a fixed string to improve performances.
+        */
+       define ('K_PATH_URL', $k_path_url);
+       
+       /**
+        * path for PDF fonts
+        * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
+        */
+       define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
+       
+       /**
+        * cache directory for temporary files (full path)
+        */
+       define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
+       
+       /**
+        * cache directory for temporary files (url path)
+        */
+       define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
+       
+       /**
+        *images directory
+        */
+       define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
+       
+       /**
+        * blank image
+        */
+       define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
+       
+       /**
+        * page format
+        */
+       define ('PDF_PAGE_FORMAT', 'A4');
+       
+       /**
+        * page orientation (P=portrait, L=landscape)
+        */
+       define ('PDF_PAGE_ORIENTATION', 'P');
+       
+       /**
+        * document creator
+        */
+       define ('PDF_CREATOR', 'TCPDF');
+       
+       /**
+        * document author
+        */
+       define ('PDF_AUTHOR', 'TCPDF');
+       
+       /**
+        * header title
+        */
+       define ('PDF_HEADER_TITLE', 'TCPDF Example');
+       
+       /**
+        * header description string
+        */
+       define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
+       
+       /**
+        * image logo
+        */
+       define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
+       
+       /**
+        * header logo image width [mm]
+        */
+       define ('PDF_HEADER_LOGO_WIDTH', 30);
+       
+       /**
+        *  document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
+        */
+       define ('PDF_UNIT', 'mm');
+       
+       /**
+        * header margin
+        */
+       define ('PDF_MARGIN_HEADER', 5);
+       
+       /**
+        * footer margin
+        */
+       define ('PDF_MARGIN_FOOTER', 10);
+       
+       /**
+        * top margin
+        */
+       define ('PDF_MARGIN_TOP', 27);
+       
+       /**
+        * bottom margin
+        */
+       define ('PDF_MARGIN_BOTTOM', 25);
+       
+       /**
+        * left margin
+        */
+       define ('PDF_MARGIN_LEFT', 15);
+       
+       /**
+        * right margin
+        */
+       define ('PDF_MARGIN_RIGHT', 15);
+       
+       /**
+        * default main font name
+        */
+       define ('PDF_FONT_NAME_MAIN', 'helvetica');
+       
+       /**
+        * default main font size
+        */
+       define ('PDF_FONT_SIZE_MAIN', 10);
+       
+       /**
+        * default data font name
+        */
        define ('PDF_FONT_NAME_DATA', 'helvetica');
-       \r
-       /**\r
-        * default data font size\r
-        */\r
+       
+       /**
+        * default data font size
+        */
        define ('PDF_FONT_SIZE_DATA', 8);
-       \r
-       /**\r
-        * default monospaced font name\r
-        */\r
-       define ('PDF_FONT_MONOSPACED', 'courier');\r
-       \r
-       /**\r
-        * ratio used to adjust the conversion of pixels to user units\r
-        */\r
-       define ('PDF_IMAGE_SCALE_RATIO', 1);\r
-       \r
-       /**\r
-        * magnification factor for titles\r
-        */\r
-       define('HEAD_MAGNIFICATION', 1.1);\r
-       \r
-       /**\r
-        * height of cell repect font height\r
-        */\r
-       define('K_CELL_HEIGHT_RATIO', 1.25);\r
-       \r
-       /**\r
-        * title magnification respect main font size\r
-        */\r
-       define('K_TITLE_MAGNIFICATION', 1.3);\r
-       \r
-       /**\r
-        * reduction factor for small font\r
-        */\r
-       define('K_SMALL_RATIO', 2/3);\r
-}\r
-\r
-//============================================================+\r
-// END OF FILE                                                 \r
-//============================================================+\r
+       
+       /**
+        * default monospaced font name
+        */
+       define ('PDF_FONT_MONOSPACED', 'courier');
+       
+       /**
+        * ratio used to adjust the conversion of pixels to user units
+        */
+       define ('PDF_IMAGE_SCALE_RATIO', 1);
+       
+       /**
+        * magnification factor for titles
+        */
+       define('HEAD_MAGNIFICATION', 1.1);
+       
+       /**
+        * height of cell repect font height
+        */
+       define('K_CELL_HEIGHT_RATIO', 1.25);
+       
+       /**
+        * title magnification respect main font size
+        */
+       define('K_TITLE_MAGNIFICATION', 1.3);
+       
+       /**
+        * reduction factor for small font
+        */
+       define('K_SMALL_RATIO', 2/3);
+}
+
+//============================================================+
+// END OF FILE                                                 
+//============================================================+
 ?>
diff --git a/lib/tcpdf/fonts/.noencode b/lib/tcpdf/fonts/.noencode
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/lib/tcpdf/fonts/freefont-20080323/COPYING b/lib/tcpdf/fonts/freefont-20080323/COPYING
deleted file mode 100644 (file)
index 7f1c9b6..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-                   GNU GENERAL PUBLIC LICENSE
-                      Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                          51 Franklin Street, Fifth Floor,
-                          Boston, MA 02110-13017, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                           Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-\f
-                   GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-\f
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-\f
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-\f
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                           NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                    END OF TERMS AND CONDITIONS
-\f
-           How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) 19yy  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) 19yy name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/lib/tcpdf/fonts/freefont-20080323/ChangeLog b/lib/tcpdf/fonts/freefont-20080323/ChangeLog
deleted file mode 100644 (file)
index 1e4c96c..0000000
+++ /dev/null
@@ -1,1823 +0,0 @@
-$Id$
-
-2008-03-23  Steve White
-       * sfd/FreeSerif.sfd:
-       Last of Find Problems -> ATT
-       'mark' Latin lookup: afii10026 is in 'cyrl', also afii10074
-       Upper and lower Cyrillic i.  Just removed mark from both letters.
-
-       'half' Bengali lookup Khanda_Ta is in 'bng2'. Added bng2 to lookup
-       Added TtTable etc
-
-       Clean-up of Points too Close through to end of font.
-       This episode completes the paths/points clean-up of Serif.
-       But note: many ranges, esp. Ethiopic, Japanese, and Indic, have way
-       too many points, resulting in lumpiness.
-
-       At this point, FontForge can convert splines to quadratic, auto-hint,
-       and auto-instrument without segfault.
-
-       * Makefile, sfd/Makefile, tools/GenerateTrueType:
-       Alterations to build process: added a Makefile, and made to work
-       on my system.  Now auto-hints before generating TrueType.
-
-2008-03-22  Steve White
-       * sfd/FreeSans.sfd:
-       Lots of additions of math characters.  Should complete for
-       LaTeX 2e, except for extensible brackets.
-
-2008-03-21  Steve White
-       * sfd/*.sfd:
-       Regularized stacking of accents in Latin Extended Additional
-       Changed name of 00B5 from 'mu' to 'micro',
-               2206 from 'Delta' to 'Delta.math',
-               0308 from 'diaerisis' to 'diaerisiscomb'
-
-       * sfd/FreeMono.sfd:
-       additions to IPA
-
-       * sfd/FreeMonoBoldOblique.sfd:
-       Moved dotlessj from Corporate Use,
-       Deleted commaaccent there
-       Fixed mis-named glyphs tcommaaccent, Tcommaaccent
-       Changed name of 030A from 'dieresis' to 'ringcomb'
-
-       * sfd/FreeSans.sfd:
-       Added some arrows, and a couple of blackboard bold characters
-
-       Several characters in U+F600 Corporate Use range
-               dotlessj, onefitted, commaaccent
-
-               dotlessj referred to by: jcircumflex, uni01F0:  
-               renamed it to uFFFF, re-linked others by hand
-
-               commaaccent
-                       http://diacritics.typo.cz/index.php?id=9
-               should be u+0326 but wasn't linked to anything 
-
-       * sfd/FreeSansBold.sfd:
-       U+0617 etc: read glyphs "4GWglm". It should be Arabic.  Deleted
-
-       * sfd/FreeSansBold.sfd, FreeSansOblique.sfd,FreeSansBoldOblique.sfd:
-       removed bogus glyphs for 200C 200D, ZWJ and ZWNJ
-
-       * sfd/FreeSerif.sfd:
-       Split lookup for ligatures in latin into two classes;
-       ff, ffl, fl which are appropriate for all languages,
-       and fi, ffi, which are not appropriate in Turkish (due to distinction
-       between short and long i)
-       Needs to be done for other faces.
-
-       Filled set of extensible brackets in Miscellaneous Technical
-
-       Think IPA is now complete.
-       
-2008-03-18  Steve White
-       * sfd/FreeSans.sfd:
-       clean-up of all path issues and points too close
-
-2008-03-18  Steve White
-       * sfd/FreeSans.sfd:
-       Something was causing crashing effects in Windows.  Cleanup of
-       problems eventually made it go away.  Now works well.
-
-       Cleaned up many "points too close"
-
-       Cleaned up all ATT problems, of which there were many and various.
-
-       # Incorrectly labelled zero-width joiner used in a ligature
-
-       # Incorrect substitution of dotlessi and dotlessj with i and j was
-         somehow connected with FontForge crash.  Attemts to remove the
-         substitution would damage a 'ccmp' table; subsequent changes would
-         result in FontForge crashing on save, and truncating the sfd file. 
-         Surgically removed with vi.
-
-       # A couple of Indic lookups had incorrect script DFLT; one had 'latn'.
-
-       # Don't understand why there are scripts named
-               dev2 bng2 grj2 gur2 when there are already deva beng gurj guru
-         But anyway, lots of 'vatu' 'pres' 'haln' and 'liga' lookups contained
-         characters in the '2' scripts but were lablled only for the 'non-2' 
-         ones.  Added the '2' scripts to all these lookups. Suspect a mistake.
-
-       Note: several of these problems are repeated in other Sans faces.
-
-2008-03-16  Steve White
-       * sfd/FreeMono.sfd:
-       cleanup of many path problems "points too close"
-
-       strove to make accents Latin Extended range legible at small sizes
-
-       named some unnamed characters; removed a duplicate
-
-       At this point, all fonts are passing FontForge Validate.
-
-2008-03-15  Steve White
-       * sfd/FreeSerif.sfd: CJK punctuation: made some of the very high
-       glyphs smaller (under 900EM)
-       The brackets in Sans were very ugly, and not even Sans-serif.
-       Serif: added extensible square brackets, diddled with integral
-       corrected direction of some added glyphs
-
-       Several bugs having to do with missing glyphs in Tamil range.
-       Also a buggy ligature in Devangari.
-
-       Shortened names of many lookup tables
-
-       Futzt with some combining diacriticals
-
-       Added extensible square brackets.
-
-       * sfd/FreeSans.sfd: Changed names of a bunch of glyphs with invalid
-       TrueType names, in range 0x1025f+ (not real Unicode).
-       Took pains to retain information contained in the names.
-       Wonder if these glyphs have ever been of any use.
-
-       CJK Punctuation: brackets were hand-drawn and very ugly.  Improved.
-
-       * sfd/*.sfd:
-       Set OS/2 Metrics back to absolute 900/300.  Offsets are not 
-       interpreted uniformly.
-
-       cleanup of many path problems up to extrema and self-intersecting
-
-       Ordered PS Blue values.
-
-2008-03-14  Steve White
-       * sfd/FreeSerif.sfd:
-               got rid of mixed references and contours
-               cleanup of many path problems "points too close"
-
-               Started clean-up to satisfy FontForge Validate
-
-               Changed names of three glyphs in the
-               Tamil ligatures range...all clearly bugs. 
-       * sfd/FreeSans.sfd:
-               added slanted-hyphen
-
-       * sfd/*.sfd:
-               unified OS/2 Metrics
-               added Grid Fit
-
-2008-03-13  Steve White
-       * sfd/FreeSans.sfd: Rearranged PS BluesValues so they were in
-               increasing order, Made all 20 in width. 
-
-2008-03-12  Steve White
-       * sfd/FreeSans.sfd, FreeMono.sfd: added TrueType hinting tables.
-               Fixed glyphs that didn't convert well to quadratics
-               Got rid of mixed contours and refs
-
-       * sfd/FreeSerifBold.sfd: cleanup of path problems
-
-2008-03-11  Steve White
-       * sfd/FreeMonoOblique.sfd: cleanup of path problems
-
-2008-03-09  Steve White
-       * sfd/FreeSerif.sfd: corrected L-dot
-               further cleanup of path/ref problems
-
-               Found several ligatures that referred to a missing glyph "ZWJ".
-               Took this to mean the "zero width joiner" u+200D
-
-       * sfd/*.sfd:
-               changed OS/2 metrics to be absolute 900/300
-
-       * sfd/FreeSerifItalic.sfd: Added Greek lunate epsilon
-
-       * sfd/FreeMono.sfd: many additions in math range
-               reduced size of binary union, intersection, vee, wedge
-               corrected empty set
-               corrected logical 'assert' relations, etc. 22a2-22af
-               efforts to make Math glyphs legible at small point sizes
-
-       * sfd/FreeSans.sfd: added Greek lunate epsilon and rho symbol
-               unstacked more stacked diacriticals
-
-               further cleanup of path/reference problems
-
-2008-03-08  Steve White
-       * sfd/FreeSans.sfd, FreeSerif.sfd:
-               Added some "n-ary" Math operators
-
-       * sfd/FreeSerif.sfd: Further clean-up of path problems...up to
-       Ethiopic
-
-       Started adding and correcting Math operators for LaTeX 2e
-
-               Corrected n-ary union, intersection, and spikes to be larger
-               than the binary operators
-
-               Made (many of) the operators based on + - = to use those
-               symbols directly (by reference or copying).
-
-               Added lunate epsilon
-               Corrected empty set
-
-               tightened up spacing of some other technical characters
-               worked on some more math operators involving =
-
-               triangle
-               several arrows
-               Supplemental Arrows-A
-
-       * sfd/FreeSans.sfd: Clean-up of font paths
-               open self-intersecting outermost-clockwise missing-extrema
-               also flipped references (unlinked)
-
-               Added Greek lunate epsilon and rho symbol
-
-2008-03-06  Steve White
-       * sfd/FreeSerif.sfd: Shortened and thickened the combining hook mark,
-       U+0309, to make more like Unicode samples.
-       Also see (bug #22499) un-stacked incorrectly stacked accents
-
-2008-03-05  Steve White
-       * sfd/FreeSerif.sfd: vertical lines: combining diacritical marks
-       corrected 0300 030D 0329 0348 (were rendered as straight apostrophes)
-       Spacing Modifier letters added 02C8 02CC 
-               02B9 02Ba prime and double-prime
-       Fixed positioning U+1EC8, 9, I with hook above
-
-2008-03-03  Steve White
-       * sfd/FreeSerif.sfd: TT strings updates.
-               updated Copyright to 2008
-               Added Vendor URL as the Savannah freefont site
-       * sfd/FreeMono.sfd: A standard pangram as the Sample Text for Russian
-               It reads: In the thickets of the South once there was a citrus
-               ...--yes, but a fake specimen!
-       * sfd/*.sfd: Set the OS/2 Sup/Sub settings, which by default looked
-               like random trash.
-
-2008-03-02  Steve White
-       * sfd/FreeSerif.sfd: began cleanup of problems given by FontForge
-       "Find Problems" feature.  (bug #22454)
-               
-2008-03-01  Steve White
-       * sfd/FreeSerif.sfd: made Arabic work for text display (bug #22329)
-               Added required contextual replacement tables,
-               Made a few missing characters,
-       * sfd/*.sfd: Removde all back layers from glyphs that had them.
-
-2008-02-27  Steve White
-       * sfd/FreeSans.sfd: filled in Combining Diacriticals
-       * sfd/FreeSerif.sfd: shifted whole Arabic range down by 200EM.
-
-2008-02-26  Steve White
-       * sfd/FreeSerif.sfd: enabled DPOS table.
-
-2008-02-24  Steve White
-       * sfd/*.sfd: Much fiddling with the "combining diacriticals"
-               range 0300-036F.  Made to align with medium-size lowercase
-               preceding character if not using DPOS table.
-
-2008-02-23  Steve White
-       * sfd/FreeSerif.sfd, FreeSans.sfd, FreeMono.sfd: (bug #21784) Filled
-       in set of HTML 4 Character Entities.
-
-       * sfd/FreeSerif.sfd, FreeSans.sfd, FreeMono.sfd: (bug  #18413)
-       undertie too low -- went on to tidy other similar characters in
-       Combining Diacriticals range.
-       
-2008-02-21  Steve White
-       * sfd/*.sfd: Moved capital Greek letters with tonos so tonos doesn't
-       cover preceding letter (bug #12798)
-
-       * sfd/FreeSerif.sfd, FreeSans.sfd: (bug #13370) made extended
-       integrals to line up.
-       
-2008-02-20  Steve White
-       * sfd/*.sfd: started removing glyphs with back layers (printing bug)
-       * sfd/*.sfd: adjusted vulgar fractions (bug #17756)
-       * sfd/*.sfd: adjusted numerical superscripts (bug #20278)
-
-2008-02-18  Steve White
-       * sfd/FreeSerif.sfd: Offset Hiragana and Katakana ranges (bug #22326)
-       * sfd/FreeSerif.sfd: U+30FB, KATAKANA MIDDLE DOT to be full width
-                               (bug #18326)
-
-       * sfd/FreeSerif.sfd: Re-promoted
-               ff ffi ffl fi fl
-               as standard ligatures in Latin.
-
-2008-02-17  Steve White
-       * sfd/*.sfd: committed to FontForge Spline Font Database (SFD) 2
-       format.
-       
-2008-02-10  Steve White
-       * sfd/*.sfd: brought into line with Debian ttf-freefont
-       Deleted a couple of patches, and applied those applied to Debian.
-
-2006-09-20  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * INSTALL: added installation procedure for MacOS X, courtesy
-       Philipp Kempgen.
-
-2006-05-04  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd: deleted Russian sample text, which did not
-       conform to UTF-7.
-
-2006-04-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd: corrected U+10D3.
-
-       * sfd/FreeSans.sfd: ligature U+FB06 (LATIN SMALL LIGATURE S T)
-       changed from mandatory ("liga") to discretionary ("dlig") (bug
-       #16253).
-
-       * sfd/FreeMono.sfd: deleted incomplete glyph U+FB06 (LATIN SMALL
-       LIGATURE S T); deleted U+FB00, U+FB01, U+FB02, U+FB05 as
-       ligatures (bug #16253).
-
-       * sfd/FreeMonoOblique.sfd, sfd/FreeMonoBoldOblique.sfd: added
-       U+FB00; deleted U+FB01, U+FB02 as ligatures (bug #16253).
-
-       * sfd/FreeMonoBold.sfd: deleted U+FB00, U+FB01, U+FB02 as
-       ligatures (bug #16253).
-       
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
-       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
-       sfd/FreeSerifBoldItalic.sfd: added Georgian letters, donated by
-       Gia Shervashidze
-
-2006-02-22  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd: ligature U+FB4F
-       changed from mandatory ("liga") to discretionary ("dlig"). This is
-       respons to Bug#349657: [bug #15792] Freefont Alef and Lamed
-       combine
-
-2006-02-21  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifBold.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd,
-       sfd/FreeSansBold.sfd: ligature U+FB4F changed from mandatory
-       ("liga") to discretionary ("dlig"). This is respons to Bug#349657:
-       [bug #15792] Freefont Alef and Lamed combine
-
-       * sfd/FreeSerif.sfd: corrected bug#275759: [bug #15790] FreeSerif
-       glyphs for U+2198/U+2199 were reversed.
-
-2006-02-15  Denis Jacquerye <moyogo@gmail.com>
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, 
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeMonoBold.sfd: removed ij 
-       and IJ ligatures.
-
-2006-02-10  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd: added small Georgian letters (mkhedruli),
-       donated by Gia Shervashidze
-
-       * AUTHORS: Added Gia Shervashidze
-
-       * CREDITS: Added Gia Shervashidze
-
-2006-01-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * notes/maintenance.txt: Added information on the Makefile now
-       used; username for FTP login is anonymous.
-
-       * sfd/FreeSansBold.sfd: added U+0569, U+0571, U+0579, U+057B,
-       U+0586. Armenian small letters completed.
-       
-       * sfd/FreeSerif.sfd: added U+0297, U+02AD-02AF. IPA Extensions
-       section is now complete. Copied a dozen of glyphs from Omega IPA
-       to Phonetic Extension section.
-
-2006-01-25  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: added U+01A, U+01A3, U+01A6, U+01B2, U+01BA,
-       U+01BB, U+01BE, U+01BF.
-       
-       * sfd/FreeSans.sfd: aligned small Armenian letters to x-height in
-       response to bug #15480. Armenian in Free Sans needs a major
-       cleanup.
-
-2006-01-24  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd: changed U+0452, U+045B. Cleanup: U+0460,
-       U+0461, U+04Bc, U+04BD, U+0508.
-
-       * sfd/FreeSansOblique.sfd: replaced accented chars in Latin-1 and
-       Latin Extended-B sections with references, where possible.
-
-       * sfd/FreeSerif.sfd: changed U+0285.
-
-2006-01-23  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: added U+0195, U+01AA, U+0297, U+03D7,
-       U+03F0. Several flipped references replaced by outlines.
-
-       * sfd/FreeSansOblique.sfd: Latin Extended-B section more or less
-       brought in sync with FreeSans.
-
-       * sfd/FreeMonoBoldOblique.sfd: added glyphs from FreeMonoBold in
-       the Latin Extended-B and IPA Extensions sections.
-
-       * sfd/FreeSerifBold.sfd: Added U+0224, U+0225. Changed U+01B7,
-       U+01B8, U+04E0, U+0452, U+045B. Replaced accented characters in
-       the Cyrillic region with references.
-
-2006-01-21  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: added U+0255, U+0264, U+0277, U+0286,
-       U+029D. Changed U+0261. Deleted spurious glyphs in the control
-       code area.
-
-2006-01-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: replaced Hardip Pannu Singh's Gurmukhi with
-       AnmolUni by Kulbir Singh Thind.
-
-2006-01-17  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSansBold.sfd: Added U+018D, U+0194, U+01B5, U+01B6,
-       U+01BE, U+0262, U+02A2.
-       
-       * sfd/FreeSansBold.sfd: Changed U+0261 in order to distinguish it
-       from U+0067. Changed U+0251, U+0252.
-       
-       * sfd/FreeSerifBold.sfd: Small changes in the Cyrillic
-       section. Added U+0183, U+018C.
-       
-       * sfd/FreeSans.sfd: Added U+2045, U+2046.
-       
-       * sfd/FreeSansBold.sfd: Filled in the Gurkmukhi part with the
-       AnmolUni-Bold by Kulbir Singh Thind. Also some minor corrections
-       in the Cyrillic part.
-
-       * CREDITS: Added Kulbir Singh Thind.
-
-       * AUTHORS: Added Kulbir Singh Thind.
-       
-2006-01-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd: Thomas Ridgeway's Tamil characters replaced
-       by the ones released by the Samyak font project.
-
-       * CREDITS: Added Pravin Satpute, Bageshri Salvi, Rahul Bhalerao
-       and Sandeep Shedmake
-
-       * AUTHORS: Added Pravin Satpute, Bageshri Salvi, Rahul Bhalerao
-       and Sandeep Shedmake
-
-2006-01-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSansBold.sfd, sfd/FreeMonoBoldOblique.sfd: minor changes.
-
-2006-01-05  Denis Jacquerye <moyogo@gmail.com>
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
-       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
-       sfd/FreeSerifBoldItalic.sfd: added cedi sign U+20B5, Ghanaian
-       currency
-
-2005-12-29  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: minor cleanup in the Gujarati part.
-
-2005-12-22  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: Devanagari and Gujarati parts cleared; once
-       again merged with Gargi 1.9 and Padmaa 0.6, this time correctly so
-       that the anchor points survived the merger.
-
-2005-12-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: added U+0577.
-
-2005-12-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: added U+0559, U+055F, U+2024.
-
-       * sfd/FreeSansBold.sfd: added U+056E, U+0573.
-
-2005-12-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: Merged with Gargi 1.9 and Padmaa 0.6,
-       courtesy Monika Shah and Sonali Sonania from C-DAC, Mumbai.
-
-       * CREDITS: Added Monika Shah and Sonali Sonania.
-
-       * AUTHORS: Added Monika Shah and Sonali Sonania.
-       
-2005-12-13  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - Removed Sinhala glyphs.
-
-       * sfd/FreeSerif.sfd - Added Sinhala glyphs, formerly in FreeSans.
-
-2005-12-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd: added U+20AF, U+211E. Changed U+20AC (EURO
-       SIGN).
-       
-       * tools/freefont-ttf.spec: Added specification file for building
-       RPM package, courtesy Rok Papez.
-
-       * sfd/FreeSerifBold.sfd: added more glyphs from Txfonts to the
-       Arrows and Mathematical Symbols ranges.
-
-       * sfd/FreeSerifBoldItalic.sfd: added U+03F5 from Txfonts.
-
-2005-12-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: added U+0567, U+056A, U+056C, U+0582.
-       
-       * sfd/FreeSerifBold.sfd: copied Box Drawing range from FreeSans.
-
-       * sfd/FreeSerifBold.sfd: added glyphs from Txfonts to the Arrows
-       and Mathematical Symbols ranges.
-       
-       * sfd/FreeSerif.sfd: added U+2259-225A, U+22BA, U+2308-230B,
-       U+2322-2323. Cyrillic composite characters replaced with
-       references.
-
-2005-12-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifBold.sfd: added U+025A, U+025D, U+026B, U+029B,
-       U+02AE, U+02AF, U+02DE.
-       
-       * sfd/FreeSerifBold.sfd: updated Hebrew part with Drugulin font
-       from the Culmus project.
-
-       * sfd/FreeSerif.sfd: added U+207A-207C, U+208A-208C, U+2215-2216.
-       
-       * sfd/FreeSans.sfd: added U+2320 TOP HALF INTEGRAL, U+23AE
-       INTEGRAL EXTENSION, U+2321 BOTTOM HALF INTEGRAL (bug #13370).
-       
-2005-12-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifBold.sfd: added U+0294-0296, U+02A1-02A2. Started
-       adding "below" anchors. Performed hinting on characters that were
-       not hinted "en masse".
-
-2005-12-06  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: fixed some more metrics problems in the
-       Extended Greek area; performed hinting on characters that were not
-       hinted "en masse".
-       
-       * Makefile: clean also signature files.
-
-       * sfd/FreeMonoBoldOblique.sfd, sfd/FreeMonoBold.sfd: cosmetic
-       changes; cleaning background of referenced composed characters.
-
-2005-12-05  Panayotis Katsaloulis  <panayotis@panayotis.com>
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
-       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
-       sfd/FreeSerifBoldItalic.sfd: Some changes to the greek glyphs,
-       mostly having to do with "tonos" (accent)
-
-2005-12-05  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: minor cosmetic changes.
-
-       * sfd/FreeSans.sfd: adjusted widths of characters in the Extended
-       Greek range; accents are not any more considerably overhanging on
-       the left side. Added U+1EDA-1EE3, U+1EE8-1EF1.
-       
-       * sfd/FreeSans.sfd: continued working on Extended Greek range;
-       metrics still not finished.
-
-2005-12-03  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd: fixed combined Greek accents (bug
-       #12800). Width of characters still need to be adjusted as in
-       FreeSerif.
-
-       * sfd/FreeSerif.sfd: fixed positions of Greek accents (bug #12798).
-
-       * CREDITS: Added Panayotis Katsaloulis.
-
-       * AUTHORS: Added Panayotis Katsaloulis.
-
-       * Makefile: minor changes; now creating also a tarfile with sfds.
-
-2005-12-01  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifItalic.sfd: added U+0183, U+018C, U+01C0, U+01C1,
-       U+01C3, U+01E0, U+01E1, U+01F8, U+01F9.
-       
-       * Makefile: created a Makefile to assist building.
-
-       * README: an update.
-
-       * COPYING: added GNU General Public License, version 2.
-
-       * tools/GenerateTrueType: wrote a FontForge script for conversion
-       to TrueType.
-
-       * sfd/FreeSerif.sfd: merged with SolaimanLipi Bangla OpenType font
-       from www.ekushey.org, courtesy Solaiman Karim.
-
-       * sfd/FreeSerifItalic.sfd: merged with SolaimanLipi Bangla
-       OpenType font from www.ekushey.org, slanted by 15.5 degrees.
-
-       * sfd/FreeSans.sfd: merged with Rupali Bangla OpenType font from
-       www.ekushey.org
-
-       * sfd/FreeSansOblique.sfd: merged with Rupali Bangla OpenType font from
-       www.ekushey.org, slanted by 12 degrees.
-
-       * CREDITS: added Solaiman Karim
-
-       * AUTHORS: added Solaiman Karim
-
-2005-11-30  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd: merged with the Rachana Normal.
-
-       * AUTHORS: added K.H. Hussain and R. Chitrajan
-
-       * CREDITS: added K.H. Hussain and R. Chitrajan
-
-2005-11-23  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - cleaned some background images.
-
-       * sfd/FreeSans.sfd - added U+01A0-01A1, U+01AF-01B0, U+026E,
-       U+028F, U+0291, U+02A3-02A5, U+031B. Modified U+0198.
-
-2005-11-22  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - added U+2504-250B.
-
-       * sfd/FreeSans.sfd - added U+2591-25A1, U+25A3-25A5, U+25AA, U+25AC.
-
-       * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd - added U+0263.
-       
-2005-11-21  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - corrected positions of some Greek diacritics
-       on page 0x1F.
-
-       * sfd/FreeMonoOblique.sfd - working on bringing it in sync with
-       FreeMono.sfd.
-
-       * sfd/FreeSerifBoldItalic.sfd - applied the sequence suggested by
-       Werner Lemberg for reducing redundant points. Added a couple of
-       glyphs in the IPA Extensions region.
-
-       * sfd/FreeSansBold.sfd - added U+0574, U+0576. Removed overlaps.
-       
-2005-11-20  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - added U+02AA-02AC, U+02B0-02B2.
-
-2005-11-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - added U+01B7-01B9, U+0196, U+019A, U+01C3,
-       U+0224-0225, U+025E, U+029A, U+2422. Changed U+0184-0185, U+0192,
-       U+01B4, U+0282, U+0284.
-       
-2005-11-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - added U+02EE, U+207F.
-
-       * sfd/FreeSans.sfd - started Box Drawing area.
-
-2005-11-17  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifBold.sfd - added glyphs from the Omega project to
-       Latin Extended-B, IPA Extensions and Greek ranges.
-
-       * sfd/FreeSerifBoldItalic.sfd - added glyphs from the Omega
-       project to Latin Extended-B, IPA Extensions and Greek ranges.
-
-       * sfd/FreeSerifItalic.sfd - added glyphs from the Omega
-       project to Latin Extended-B, IPA Extensions and Greek ranges.
-
-       * sfd/FreeSerifItalic.sfd - added U+018B, U+025C, U+0265, U+026F,
-       U+0279, U+0287, U+028C-028E, U+029E.
-
-       * sfd/FreeSerifBoldItalic.sfd - added U+1EDA-1EE3, U+1EE8-1EF1,
-       U+2190-219B, U+219E-21A8, U+21B9-21BA, U+21C4-21CA, U+21E4-21E5,
-       U+2669-266F. MES-1 compliant.
-       
-       * sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSansOblique.sfd,
-       sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd,
-       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
-       sfd/FreeSerifBoldItalic.sfd - added U+FFFD.
-
-       * sfd/FreeSerif.sfd - removed overlaps in Latin Extended-B and IPA
-       Extensions ranges.
-       
-2005-11-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifItalic.sfd - applied the sequence suggested by
-        Werner Lemberg for reducing redundant points.
-
-       * sfd/papers/eurotex2003/freefont.tex,
-       sfd/papers/eurotex2003/freefont.bib - Revised version, sent back
-       by Karl Berry on 20050110, that should match the one published in
-       TUGboat.
-
-       * sfd/FreeSerifItalic.sfd - started added accent anchors. Added a
-       handful of Greek letters from Omega font collection.
-
-       * sfd/FreeSerif.sfd - added a handful of letters in the Latin
-       Extended-B and IPA Extension ranges from the Omega font collection.
-
-2005-11-16  Denis Jacquerye <moyogo@gmail.com>
-
-       * sfd/FreeSerif.sfd - moved U+0263 to U+0264; added U+0263
-
-       * sfd/FreeSerifItalic.sfd - fixe U+01EE; added U+01B7-U+01B9
-
-2005-11-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - Made small Greek letters the same height as
-       Latin and Cyrillic ones and replaced them with references, where
-       applicable.
-
-       * sfd/FreeSerif.sfd - replaced Greek letters with references,
-       where applicable. Added U+03D7, U+03F0-03F2.
-
-       * sfd/FreeSerif.sfd - added U+0255, U+025A, U+025D, U+025F,
-       U+0262-0263, U+026B-026C, U+0274, U+0276-0277, U+028F, U+0291,
-       U+029D.
-
-       * sfd/FreeMonoOblique.sfd - applied the sequence suggested by
-       Werner Lemberg for reducing redundant points. Added U+F6BE.
-
-       * sfd/FreeSansOblique.sfd - applied the sequence suggested by
-       Werner Lemberg for reducing redundant points.
-
-       * sfd/FreeSans.sfd - changed U+01A5.
-
-2005-11-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - applied the sequence suggested by Werner
-       Lemberg for reducing redundant points. Replaced accented glyphs in
-       the Latin-1 and Latin Extended-A areas with references. Made
-       capital Greek letters the same height as Latin and Cyrillic ones
-       and replaced them with references, where applicable.
-
-2005-11-15  Denis Jacquerye <moyog@gmail.com>
-
-       * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, 
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeSansOblique.sfd - fixed 
-       U+026A, it was a dotlessi and therefore like U+0069 when 
-       accented.
-
-2005-11-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMonoBold.sfd - corrected Greek tonos (slanted instead of
-       a vertical line).
-
-       * sfd/FreeMonoBoldOblique.sfd - applied the sequence suggested by
-       Werner Lemberg for reducing redundant points. Replaced accented
-       glyphs in the Latin-1 and Latin Extended-A areas with references.
-
-2005-11-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
-       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
-       sfd/FreeSerifBoldItalic.sfd - Added 2005 in copyright info.
-
-       * sfd/FreeSansBoldOblique.sfd - applied the sequence suggested by
-       Werner Lemberg for reducing redundant points. Replaced accented
-       glyphs in the Latin-1 area with references.
-
-       * sfd/FreeSansBoldOblique.sfd - added U+0180, U+0184, U+0185,
-       U+0195, U+01A0-01A2, U+01AF-01B0, U+025E, U+026E, U+0292,
-       U+0294-0296, U+029A, U+02A1, U+2126-2127, U+2190-219B,
-       U+219E-21A8, U+21C4-21CA, U+2669-266F. MES-1 compliant.
-
-       * sfd/FreeMono.sfd - Replaced accented glyphs in the Greek and
-       Cyrillic areas with references.
-
-       * sfd/FreeMonoBold.sfd - applied the sequence suggested by Werner
-       Lemberg for reducing redundant points. Replaced accented glyphs in
-       the Latin-1 and Latin Extended-A areas with references.
-
-2005-11-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - applied the sequence suggested by Werner
-       Lemberg for reducing redundant points.
-              
-       * sfd/FreeSansBold.sfd - added U+219A, U+219B, U+2669-266F.
-
-       * sfd/FreeSerifBold.sfd - added U+2669-266F.
-
-2005-11-12  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSansBold.sfd - added U+0180, U+0181, U+0183, U+0187,
-       U+0188, U+018A, U+018C, U+018D, U+0193, U+019C, U+01A0, U+01A1,
-       U+01AC, U+01AF, U+01B0, U+025C, U+0260, U+026E, U+0277, U+0281,
-       U+0284.
-
-2005-11-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSansBold.sfd - added U+195, U+1A6, U+025E, U+026E,
-       U+029A, U+0313, U+0314, U+0342, U+0344, U+0345. Started adding
-       accent anchors.
-
-       * sfd/FreeMono.sfd - applied the sequence for reducing redundant
-       points, suggested by Werner Lemberg.
-
-       * sfd/FreeMono.sfd - corrected Greek letters (using tonos instead
-       of a vertical line). Added U+026E, U+F6BE. Accented characters in
-       Latin 1, Latin Extended A and partly Latin Extended B replaced by
-       references.
-
-       * sfd/FreeSerifBold.sfd - applied the sequence for reducing
-       redundant points, suggested by Werner Lemberg. Added U+01A5,
-       U+02A0, U+2190-219B, U+219E-21A8, U+21B8, U+21B9, U+21C4-21CA,
-       U+21E4, U+21E5.
-       
-2005-11-10  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSansOblique - changed U+0192, U+01A5; added U+01C0-01C3.
-
-       * sfd/FreeSansBold.sfd - replaced glyphs with references in the
-       Cyrillic area. Removed U+04A8, U+04A9. Added U+04C5, U+04C6,
-       U+04C9, U+04CA, U+04CD, U+04CE, U+0535, U+053F, U+0546, U+0565,
-       U+0584, U+0587, U+0589.
-
-2005-11-10  Denis Jacquerye <moyogo@gmail.com>
-
-       * sfd/FreeSans.sfd - added U+028A-U+028B
-
-       * sfd/FreeSansOblique - added U+028A-U+028B, U+0276, 
-       U+0292, U+0294-U+0296, U+0298-U+0299 and U+029B; fixed some 
-       other glyphs
-
-2005-11-10  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - added U+01A6. Simplified outlines in the
-       ASCII range.
-
-       * sfd/FreeSansBold.sfd - added U+00A0, U+00AD, U+0531, U+2126,
-       U+2190-2199, U+219E-21A8, U+21C4-21CA.
-
-       * sfd/FreeSansBold.sfd - applied the sequence for reducing
-       redundant points, suggested by Werner Lemberg. Added automatically
-       constructed accented characters in page 0x1E.
-
-2005-11-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - added U+0183, U+018C.     
-       
-       * sfd/FreeSans.sfd - added U+1EA2, U+1EA3, U+1EA8, U+1EA9, U+1EB2,
-       U+1EB3, U+1EBA, U+1EBB, U+1EC2, U+1EC3, U+1EC8, U+1EC9, U+1ECE,
-       U+1ECF, U+1ED4, U+1ED5, U+1EE6, U+1EE7, U+1EF6, U+1EF7, U+220A,
-       U+220B, U+220D, U+2272, U+2273, U+2282, U+2283.
-
-       * sfd/FreeSerifItalic.sfd - changed U+03D5.
-
-       * sfd/FreeSerifBoldItalic.sfd - changed U+03C6; added U+2070,
-       U+2075-2079, U+207F, U+2080, U+2085-2089, U+2155-217F.
-
-       * sfd/FreeSerif.sfd - added U+0184, U+0185, U+018D, U+0195,
-       U+0197, U+019A, U+019B, U+01A0, U+01A1, U+01AC, U+01B5, U+01B6,
-       U+01C0, U+01C1, U+01C3, U+01F6, U+0294-0296, U+1E9A, U+1EDA-1EE3,
-       U+1EE8-1EF1.
-
-2005-11-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSansBold.sfd - added U+0562, U+056D. U+0575.
-
-       * sfd/FreeMono.sfd - added U+0589.
-
-2005-11-06  Primoz Peterlin  <peterlin@localhost.localdomain>
-
-       * sfd/FreeSans.sfd - added U+0278, U+03D5, U+2248. Corrected
-       U+2071, U+222E, U+2242, U+2243 in response to bug reports
-       http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276118
-       http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276120
-
-       * sfd/FreeMono.sfd - added U+2227, U+2228, U+2262. Corrected
-       U+2299-229D in response to bug report
-       http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276121
-
-       * sfd/FreeMonoBold.sfd - added U+2010, U+2012 in response to bug
-       report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=289032
-       Swapped U+03C6 (Greek small letter phi) and U+03D5 (Greek phi
-       symbol) in order to conform to Unicode standard. Simplified glyph
-       shapes in ASCII range. Started adding "above" and "below" anchors.
-       
-2005-11-05  Primoz Peterlin  <peterlin@localhost.localdomain>
-
-       * sfd/FreeSerif.sfd - accented letters in Latin Extended-A
-       replaced by references wherever possible.
-
-       * sfd/FreeSerif.sfd - added U+0180, U+0181, U+0187, U+0188,
-       U+018A, U+0193, U+019C, U+01A4, U+01A5, U+01A7, U+01A8, U+01AF,
-       U+01B0, U+026E, U+0270, U+0278, U+0280, U+0281, U+028B, U+0299,
-       U+029C, U+029F.
-       
-2005-11-03  Primoz Peterlin  <peterlin@localhost.localdomain>
-
-       * sfd/FreeSansBold.sfd - added U+0180, U+0184, U+0185, U+0192,
-       U+019B, U+01A0-01A2, U+01AF, U+01B0, U+01EE, U+01EF, U+0292,
-       U+0294-0296, U+02A1, U+0532, U+054C, U+057C, U+222B. Changed
-       U+014B, U+01A5, U+01B4, U+03BB.
-
-       * sfd/FreeSans.sfd - added U+04C5, U+04C6, U+04C9, U+04CA, U+04D,
-       U+04CE.
-
-       * sfd/FreeSansBold.sfd - cleaner Arabic outlines. Added U+01E4,
-       U+01E5.
-
-2005-11-02  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSansBold.sfd - started Armenian; added U+0538, U+0542,
-       U+0544, U+0548, U+054D, U+054F, U+0550, U+0553, U+0555, U+0561,
-       U+0563, U+0564, U+0566, U+0568 U+056B, U+056F, U+0570, U+0572,
-       U+0578, U+057A, U+057D-057F, U+0580, U+0581, U+0583, U+0585.
-
-       * sfd/FreeMono.sfd - swapped U+03C6 (Greek small letter phi) and
-       U+03D5 (Greek phi symbol) in order to conform to Unicode standard.
-       Added U+04C5, U+04C6, U+04C9, U+04CA, U+04D, U+04CE.
-       
-2005-11-01  Primoz Peterlin  <peterlin@localhost.localdomain>
-
-       * sfd/FreeSansBold.sfd - modified U+019C.
-
-       * sfd/FreeSansBoldOblique.sfd - added U+00A0, U+00AD, U+019C,
-       U+01B7, U+01B8, U+0275, U+0278, U+0298, U+2012, U+2015,
-       U+2070-207F, U+2080-208E, U+2153-217F, U+2213, U+2215.
-
-2005-10-31  Primoz Peterlin  <peterlin@localhost.localdomain>
-
-       * sfd/FreeSerif.sfd - added U+0199, U+01AB, U+0265, U+0282,
-       U+0288, U+028C-028E, U+0290, U+029E, U+02A0.
-
-2005-10-28  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifBold.sfd - added U+019E, U+01AB, U+01AD, U+01B1,
-       U+0256, U+025F, U+0265, U+0269, U+026F, U+0270, U+0279-027F,
-       U+0282, U+0287, U+0288, U+028C-028E, U+0290.
-
-       * sfd/FreeSerifBold.sfd - added U+2070, U+2075-2079, U+2080,
-       U+2085-2089, U+2153-215E, U+2113-2115, U+2119.
-
-       * sfd/FreeSerifBold.sfd - added U+0199, U+019B, U+01B8, U+01B9,
-       U+01BE, U+01C0, U+0262, U+0274, U+0278, U+0280, U+028F, U+0298,
-       U+0299, U+029C, U+029E, U+029F, U+2012, U+2015, U+2016, U+2129,
-       U+2217.
-       
-2005-10-27  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - added U+018D, U+0194, U+019B, U+019C, U+01B5,
-       U+01B6, U+0295, U+0296, U+029B, U+02A2, U+0472, U+0473, U+2114,
-       U+2119.
-
-       * sfd/FreeSerifItalic.sfd - minor cleanup in the superscript range
-       (U+2070-2079).
-
-       * sfd/FreeSansBold.sfd - added subscripts and superscripts
-       (U+2070-208F), completed fractions (U+2152-215F) and Roman
-       numerals (U+2160-217F).
-
-       * sfd/FreeSerifBold.sfd - added U+018B, U+018E, U+018F, U+0191,
-       U+019D, U+01A7, U+01A8, U+01AE, U+0253, U+0266, U+0267, U+026A,
-       U+0271-0273, U+0283, U+0285.
-       
-2005-10-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - added "above" anchors to selected Cyrillic
-       characters. Added U+0294, U+02A1.
-
-       * sfd/FreeMono.sfd - added U+2011, U+2012, U+203B, U+204A, U+2071,
-       U+2129, U+2232, U+2233. Changed and/or corrected U+2106, U+211E,
-       U+2126, U+2127, U+2153-215F, U+2202.
-
-       * sfd/FreeMono.sfd - a try to imitate Denis' work on adding
-       anchors by adding "above" anchor to a couple of basic Latin
-       characters.
-
-       * sfd/FreeSansBold.sfd - added U+0278, U+0298. Cleaned up outlines
-       of most Greek letters. 
-
-       * sfd/FreeSansBold.sfd - Added U+2010-2012, U+2015, U+2032,
-       U+203C, U+2047-2049.
-
-       * sfd/FreeSans.sfd - Added U+01C0-01C2, U+0276, U+0292,
-       U+0298. Changed U+0251, U+0294, U+02A1.
-       
-2005-10-25  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifItalic.sfd - added U+00A0, U+00AD, U+2010-2012,
-       U+2015, U+2126, U+2127, U+2153-215E, U+2160-217F, U+2190-2193,
-       U+2669-266F. FreeSerifItalic is now MES-1 compliant.
-
-       * sfd/FreeSerif.sfd - added U+0191, U+019D, U+01AE, U+027E,
-       U+027F, U+0283, U+0285.
-
-       * sfd/FreeSerif.sfd - added U+019E, U+01AD, U+01B8, U+01B9,
-       U+0253, U+0256, U+0257, U+025C, U+0260, U+0266, U+0267, U+0269,
-       U+026D, U+0271-0273, U+0279-027D.
-       
-       * sfd/FreeSerifBoldItalic.sfd - added U+00A0, U+00AD, U+2010-2012,
-       U+2015, U+2032-2034, U+203C, U+2047-204A, U+2074, U+2081-2084,
-       U+2126, U+2153, U+2154, U+215F, U+2215.  Corrected positions of
-       diacritics on U+0200-0217.
-
-       * sfd/FreeSansOblique.sfd, sfd/FreeSans.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeMonoBoldOblique.sfd,
-       sfd/FreeMonoBold.sfd, sfd/FreeSerifItalic.sfd,
-       sfd/FreeSerifBold.sfd sfd/FreeSerifBoldItalic.sfd - brought in
-       sync with Valek Filipov's urw-fonts-1.0.7pre41.
-
-       * sfd/FreeSansOblique.sfd - added U+00A0, U+2011-2012, U+2015,
-       U+2070, U+2071, U+2074-2079, U+2080-2089, U+2126, U+2153-215F,
-       U+2190-2195, U+2215, U+266A. FreeSansOblique is now MES-1
-       compliant.
-       
-2005-10-24 Denis Jacquerye <moyogo@altern.org>
-       
-       * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, 
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd - added 
-       ccmp for i and j to be substituted with dotless i or j when 
-       followed by above diacritic
-
-2005-10-24  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - added U+2011, U+2012, U+2015. FreeSans is now
-       MES-1 conformant.
-
-2005-10-23 Denis Jacquerye <moyogo@gmail.com>
-
-       * sfd/FreeSans.sfd - added above, below, abovemk and belowmk 
-       anchors for diacritics placement to many Basic Latin characters, 
-       some Latin Extented A and B, and some IPA characters; fixed a 
-       couple of precomposed characters to have diacritics at the same 
-       height as similar characters.
-
-2005-10-21  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - added U+02B9, U+02BA, U+02CD, U+2017,
-       U+2036, U+2037, U+203C, U+203E, U+2047-204A.
-
-2005-10-20  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifBold.sfd - added U+0182, U+0189, U+0192, U+019F,
-       U+01A9, U+01B7, U+01C4-01CC, U+01E0-1E2, U+01F0-01F3, U+F6BE.
-       Corrected position of diacritics on U+0200-0217.
-
-       * sfd/FreeSerif.sfd - added U+00A0, U+00AD, U+0182, U+0189,
-       U+018B, U+018E, U+018F, U+0192, U+019F, U+01A9, U+01B1, U+01B7,
-       U+01DD, U+2010-2013, U+2015. FreeSerif is now MES-1 conformant.
-
-2005-10-19 Denis Jacquerye <moyogo@gmail.com>
-
-       * sfd/FreeSerif.sfd - added U+0268, U+026A, U+0289, U+0292; and 
-       anchor "above" to more base glyphs.
-
-       * sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd, 
-       sfd/FreeSerifBoldItalic.sfd - added U+0250-0252, U+0258-0259, 
-       U+0261, U+0268, U+026A, U+0279, U+0289
-
-       * sfd/FreeSerifBold.sfd - added anchor "above" to marks 
-       U+0300-0314, and to base glyphs (vowels).
-
-2005-10-18 Denis Jacquerye <moyogo@gmail.com>
-
-       * sfd/FreeSerif.sfd - added anchor "above" to marks U+0300-0314, 
-       and bases vowel of the U+0041-007A range, U+00E6, U+0186, U+0190, 
-       U+0254 and U+025B; fixed Latin-1 Supplement block accented glyphs 
-       to use references.
-
-2005-10-17  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSansBold.sfd - added U+01B7, U+01B8, U+0275.
-
-2005-10-16 Denis Jacquerye <moyogo@gmail.com>
-       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - added some Latin 
-       Extended-B African letters: U+0181, U+018A, U+0197-0198, U+01A4, 
-       U+01AC, U+01B1, U+01B3-01B4;
-
-       * sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd - added Latin 
-       Extended-B U+0187, 018E-018F, U+0191, U+0193, U+0197-0199, 
-       U+019D-019F, U+01AB-01AE; correcting width of non-space 
-       Combining Diacrtical Marks; added more glyphs to IPA Extensions 
-       to match non Bold
-       
-       * sfd/FreeSansBoldOblique.sfd - added many accented glyphs to
-       Latin Extended-B
-
-2005-10-15 Denis Jacquerye <moyogo@gmail.com>
-       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - added IPA Extensions
-       U+0262,U+0274,U+0280-0281, U+0299, U+029F, and Spacing Modifier
-       Letters U+02C9-02CB; fixed U+0287,029E height to baseline; added
-       stroke to U+0268
-
-       * sfd/FreeSansOblique.sfd - fixed skew on U+027F
-
-       * sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd - added to Latin
-       Extended-B U+01A7-01A8, IPA Extensions U+0251-0253, U+0256-0257,
-       U+0261, U+0265-026A, U+026F-0273, U+0289, U+028C-028E
-
-       * sfd/FreeSansBoldOblique.sfd - added to Latin extended-B U+0189,
-       U+01A8, U+01B1, U+0283, U+02C9 and Spacing Modifiers U+02C9-02CB
-       
-2005-10-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSansBold.sfd - Added a couple of composite glyphs,
-       mostly in the IPA and Latin Extended B ranges.
-
-2005-10-13 Denis Jacquerye <moyogo@gmail.com>
-
-       * FreeSans.sfd - removed overlap and simplified U+0187, 0191, 
-       0193, 01A5, 01AE, 0260, 0271, 0272, 0273, 027B; fixed diacritics 
-       placement on U+0200-0217; fixed glyph for U+0283 to correct esh 
-       without stroke; added U+025F and fixed U+025F from it; fixed 
-       height of glyph at U+0285; arranged U+027E,027F to make more 
-       distinguishable from U+0072.
-
-       * FreeSansOblique.sfd - added the corrected or new glyphs from 
-       FreeSans; diacritics on U+200-0217 will need height readjustements.
-
-       * FreeSansBold.sfd, FreeSansBoldOblique.sfd - added U+0186, 0190, 
-       0250, 0254, 0258, 0259, 025B, 025C
-
-2005-10-13  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Minor changes: U+22A2, U+22A3, U+22A6, U+23AE.
-       Added U+0250, U+0251, U+0258, U+0259, U+0275.
-
-       * sfd/FreeSerifItalic.sfd - Added glyphs U+222B-U+222F, U+2320,
-       U+2321. Fixed diacritics on U+0200-U+0217.
-
-2005-10-12 Denis Jacquerye <moyogo@gmail.com>
-
-       * sfd/FreeSerif.sfd - Corrected diacritics position on 
-       U+01D5-01D9,01DB,01EA-01ED,0200-0217 and U+022A.
-       
-       * sfd/FreeSerif.sfd, sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd,
-       sfd/FreeSerifBoldItalic.sfd - added U+0186,0190,0254 and U+025B.
-       
-2005-10-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Fixed bug #13399 (glyphs for U+0360 and
-       U+0361 were swapped).
-       
-       * sfd/FreeSerif.sfd - Attempt to correct bug #13370: INTEGRAL
-       EXTENSION does not align with TOP/BOTTOM HALF INTEGRAL; added
-       glyph U+23AE.
-       
-2005-05-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Corrected shapes for Cross of Lorraine and
-       Cross of Jerusalem.
-
-2005-04-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSansBold.sfd - Added some combining accents, just to
-       test the a version of FontForge.
-
-2003-12-05  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Some composite Latin characters rebuilt, as
-       they had accents 600 points to the left due to changes on October
-       2. Some other minor changes in the mathematics area.
-
-2003-10-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMonoOblique.sfd, sfd/FreeSerifBoldItalic.sfd,
-       FreeSerifItalic.sfd - applied Josef Segur's corrections from
-       Oct. 5.
-
-2003-10-02  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Abbas Izad's contributed Arabic/Farsi
-       characters added.
-       
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
-       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
-       sfd/FreeSerifBoldItalic.sfd - Combining characters (U+0300 -
-       U+036F) moved left, so that they have negative horizontal values
-       and zero advance width.
-
-2003-09-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd - Started working
-       on super- and subscripts. 
-
-2003-09-12  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd, sfd/FreeSerif.sfd - Added some missing
-        Hiragana and Katakana characters.
-
-       * sfd/FreeSansBold.sfd - Cleared background characters in Latin
-       Extended-A. Added some automatically constructed characters in
-       Latin Extended-B. Started with superscripts and subscripts.
-
-       * sfd/FreeSans.sfd - Subscript numerals (U+2080-U+2089) completed.
-       
-2003-05-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Thai characters po pla and bo baimai
-       swapped; Thai character fongman corrected; all courtesy Theppitak
-       Karoonboonyanan.
-
-2003-05-17  Panayotis Katsaloulis  <panayotis@panayotis.com>
-
-       * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd,
-       sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - Full support
-       of all ancient greek glyphs
-
-2003-05-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * tools/KerningNumerals.pl - A Perl script for moving kerning
-       information from ASCII numerals (U+0030...) to characters in the
-       Adobe corporate use area (U+F6xx).
-
-       * sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd,
-       sfd/FreeSansBoldOblique.sfd - Created kerned numerals in the Adobe
-       corporate use area (U+F6xx) and moved kerning information from
-       ASCII numerals to the kerned numerals.
-
-2003-05-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - First approximation of super- and subscript
-       numerals and vulgar fractions.
-
-       * sfd/FreeSerif.sfd - Super- and subscript numerals complete,
-       vulgar fractions completed and redone as references rather than
-       outlines.
-
-2003-05-12  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Clean-up of the Cyrillic letters added on
-       March 27; super- and subscripts, vulgar fractions.
-
-2003-05-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMonoBold.sfd - Added a couple of characters to
-       the Latin Extended-B area and the IPA extensions area.
-
-2003-05-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifBoldItalic.sfd - Added a couple of characters to
-       the Latin Extended-B area.
-
-       * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd,
-       sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - ASCII
-       numerals now monospaced; kerned numerals moved to Adobe corporate
-       use area
-       (U+F6xx).
-
-2003-05-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Roman numerals now more complete.
-
-       * sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd - Accented
-       characters added in the Latin Extended-B area.
-
-       * sfd/FreeSans.sfd - Greek accents added in the Greek Extended
-       area, characters added in the Latin Extended-B area, Roman
-       numerals added.
-
-       * sfd/FreeMonoOblique.sfd - Kerning pairs removed (what were they
-       doing in a monospaced font, anyway?).
-
-       * sfd/FreeMonoBoldOblique.sfd - Additions in Latin Extended-B and
-       Basic Greek.
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd, sfd/FreeMonoOblique.sfd,
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd,
-       sfd/FreeSansBoldOblique.sfd - Major cleanup (fixed widths, open
-       paths, path directions (clockwise/counter-clockwise), points
-       rounded to integer values; outlines simplified etc.)
-
-2003-05-06  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * tools/OS2UnicodeRange - A simple script to display OS/2 Unicode
-       range table in TrueType fonts.
-
-       * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd - ASCII numerals now
-       monospaced; kerned numerals moved to Adobe corporate use area
-       (U+F6xx). FreeSans is done, FreeSansBold half-way.
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
-       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
-       sfd/FreeSerifBoldItalic.sfd - Added 2003 in copyright info.
-
-2003-03-27  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Cyrillic and Cyrillic Supplement blocks
-       brought to conformance with Unicode 3.2, courtesy Daniel Shurovich
-       Chirkov.
-
-2003-03-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - somewhat wider
-       germandbls (U+00DF), due to complaints by Walter Schmidt.
-
-2003-03-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - Added Sinhala glyphs from the Tipitaka
-       project <http://www.metta.lk>, recoded to Unicode by Noah Levitt.
-
-2003-02-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - Minor changes on mathematical operators.
-
-2003-02-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - minor cleanup of glyph backgrounds; changed
-       integral signs (U+222B - U+2230)
-
-2003-02-05  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - added a couple of glyphs in the IPA and
-       African Latin ranges.
-
-2003-01-30  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd - Corrected Maltese Hbar (U+0126)
-       and/or hbar (U+0127).
-
-2003-01-28  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerifItalic.sfd - Corrected Maltese hbar (U+0127).
-
-2002-12-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * tools/ConvertFont - PfaEdit script for converting SFD files to
-       TrueType fonts.
-
-       * sfd/FreeSans.sfd - Added Tamil and Kannada glyphs from the
-       Akruti Indic fonts.
-
-2002-12-17  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - Added Devanagari and Gujarati glyphs from the
-       Akruti Indic fonts.
-
-       * www/index.html - Added information on Rogier van Dalen's tools.
-
-       * AUTHORS - Added M.S. Sridhar.
-
-       * CREDITS - Correct spelling of Culmus project. Added M.S. Sridhar.
-
-2002-12-06  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Added Braille glyphs, courtesy Vyacheslav
-       Dikonov.
-
-       * sfd/FreeSans.sfd - Added Unicode Syriac glyphs, courtesy
-       Vyacheslav Dikonov.
-
-2002-10-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * www/index.html - Added information on the availability of the
-       Debian GNU/Linux package.
-
-       * sfd/FreeSerif.sfd, sfd/FreeSans.sfd - added some kern pairs
-       beyond Latin-1 area.
-
-       * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd,
-       sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - re-introduced
-       all the emtpy glyph slots (changes from Sep 23 made PfaEdit
-       crash). 
-
-2002-09-23  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd,
-       sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - imported
-       kerning information from the URW++ AFM files
-
-2002-09-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoOblique.sfd - updated Hebrew parts to comply with
-       Culmus v0.6.
-
-       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansOblique.sfd - Added Danilo Segan's Serbian Cyrillic
-       glyphs; updated Hebrew parts to comply with Culmus v0.6.
-
-2002-09-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoOblique.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansOblique.sfd - Updated Cyrillic part to match
-       Filippov's 1.0.7pre14
-
-       * sfd/FreeSansOblique.sfd - added Sam Stepanyan's Armenian glyphs
-       from FreeSans (skewed for 12 degrees).
-
-2002-09-06  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd,
-       sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd - Added Maxim
-       Iorsh's Hebrew characters.
-
-2002-08-29  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd,
-       sfd/FreeMonoBold.sfd, sfd/FreeMonoOblique.sfd - Added Maxim
-       Iorsh's Hebrew characters.
-
-       * AUTHORS, CREDITS - Added Maxim Iorsh as author.
-
-2002-08-28  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * www/index.html - Added information of Microsoft's withdrawal of
-       freely available Unicode TrueType fonts
-
-       * www/resources.html - Added link to Maxim Iorsh's Culmus project.
-       
-2002-07-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Added a couple of characters (Arrows area).
-
-2002-06-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Applied Michalis Kabrianis's patch concerning
-       perispomeni in Greek politoniko.
-
-2002-05-23  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Applied Michalis Kabrianis's patch concerning
-       psili in Greek politoniko. Also added two working variants of
-       chars in the IPA range.
-
-2002-05-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, sfd/FreeSerif.sfd,
-       sfd/FreeSerifBold.sfd - Deleted explicit ".notdef" character with
-       no contours.
-
-2002-05-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
-       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
-       sfd/FreeSerifBoldItalic.sfd - The new version of PfaEdit saves
-       correctly formed Panose and LineGap lines.
-
-       * sfd/FreeSansBoldOblique.sfd - Filled-in the missing TTFWidth and
-       TTFWeight values.
-
-2002-05-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - Added diacritics to the Spacing Modifier
-       Letters and Combining Diacritical Marks areas. Added composed
-       glyphs to the Latin Extended-B area.
-
-2002-05-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
-       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
-       sfd/FreeSerifBoldItalic.sfd - Updated Panose information with data
-       provided by Josef W. Segur. Updated TTF headers with English and
-       Slovenian text.
-
-2002-04-30  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMonoBold.sfd - Working on Greek small letters. Several
-       minor changes (lower carons etc.)
-
-2002-04-29  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * FreeMonoBoldOblique.sfd - Started adding Greek.
-
-       * sfd/FreeMonoBold.sfd - Added glyphs in the Geometrical Shapes
-       and Miscellaneous Symbols area. Harmonizing Greek with Latin. Done
-       with capitals.
-
-       * sfd/FreeMono.sfd - Deleted the explicit .notdef character. Added
-       one glyph to the Geometrical Shapes area, which is now completed;
-       added three glyphs to the Miscellaneous Symbols area. Harmonizing
-       Greek with Latin. Done with the capitals.
-
-2002-04-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - Adjusted accent positions on several glyphs
-       in the Latin Extended-A area.
-
-2002-04-25  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMonoBold.sfd - Box Drawing area completed. Added a
-       couple of glyphs in the Geometrical Shapes area.
-
-       * sfd/FreeMono.sfd - Small corrections in the Box Drawing area.
-
-2002-04-24  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Box Drawing area completed.
-
-2002-04-23  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * tools/WGL4.lst - corrected.
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd - Working on Box Drawing
-       area.
-
-2002-04-22  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd - Working on Latin
-       Extended-B and Greek.
-
-2002-04-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Somewhat cleaner chess figures.
-
-       * tools/MES-2.txt, tools/MES-2.lst - Corrected list (it is not
-       203C-203E, it is 203C and 203E).
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
-       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
-       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
-       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
-       sfd/FreeSerifBoldItalic.sfd - Changed "Family Name" from Free to
-       FreeSerif, FreeSans and FreeMono, as appropriate. Changed Font
-       Modifiers from MonoBold etc. to Bold, Italic, Oblique, BoldOblique
-       and BoldItalic.
-
-2002-04-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
-       sfd/FreeMonoBoldOblique.sfd - Corrected metrics; now all character
-       widths are set to 600.
-
-2002-04-17  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Corrected glyphs in the Box Drawing area and
-       Block Elements area, which should extend through the ascender *and
-       descender* height.
-
-       * sfd/FreeMonoBold.sfd - Continued working on harmonizing Greek
-       letters with Latin and Cyrillic.
-
-       * sfd/FreeMonoBold.sfd - Added some box drawing characters.
-
-2002-04-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * www/design-notes.html - Updated notes on stroke width for
-       symbols in Free Mono Bold.
-
-       * sfd/FreeMono.sfd - Added a handful of characters in the
-       Miscellaneous Symbols area.
-
-       * sfd/FreeMonoBoldOblique.sfd - Added subscripts, superscripts and
-       vulgar fractions.
-
-       * sfd/FreeMonoBold.sfd - Started harmonizing Greek letters with
-       Latin and Cyrillic.
-
-       * sfd/FreeMonoBold.sfd - Added subscripts, superscripts and vulgar
-       fractions.
-
-2002-04-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * www/design-notes.html - Updated notes on super-/subscripts in
-       Free Mono Bold. Separate subsections for Free Mono regular and
-       Free Mono Bold.
-
-2002-04-12  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Added Ethiopian glyphs, converted from the
-       Metafont sources from TGI, Universität Hamburg (authors Berhanu
-       Beyene, Prof. Dr. Manfred Kudlek, Olaf Kummer, and Jochen
-       Metzinger) using Szabo's TeXtrace and retouched using
-       PfaEdit. Ethiopian metafonts are released under GNU GPL,
-       <http://www.informatik.uni-hamburg.de/TGI/mitarbeiter/wimis/kummer/ethiop_eng.html>.
-
-       * sfd/FreeMonoBold.sfd - Added 40 characters, mostly in the Latin
-       Extended-B and IPA Extensions areas.
-
-2002-04-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Added a handful of characters in the Latin
-       Extended-B, IPA Extensions, Currency Symbols and Miscellaneous
-       Symbols areas.
-
-2002-04-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Correcting accent positioning in the Extended
-       Greek area; adding a couple of characters here and there. Still 20
-       characters short of MES-2 conformance.
-
-2002-04-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Added some characters in the Arrows area;
-       more or less completed Extended Greek area (accents still need to
-       be fine-tuned).
-
-2002-04-05  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Modern non-Russian Cyrilic mostly completed.
-
-       * sfd/FreeMonoOblique.sfd - Synchronized with FreeMono.
-
-       * sfd/FreeSerif.sfd - Added Thomas Ridgeway's Tamil characters
-       (converted from Metafont and edited somehwat).
-       
-2002-04-04  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMonoOblique.sfd - Armenian letters added.
-
-       * sfd/FreeMonoBold.sfd - Serbian Cyrillic letters dje, tshe, lje
-       and nje corrected.
-
-       * sfd/FreeMono.sfd - Serbian Cyrillic letters dje and tshe
-       corrected. Some other non-Russian Cyrillic letters modified and
-       "welded together".
-
-2002-04-03  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Added more or less complete Armenian
-       area. The glyphs are a tidied-up version based on the Armenian
-       Courier on the <http://www.cilicia.com/armo8.html>. Now we have
-       1673 characters.
-
-2002-03-28  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Added some mathematical symbols.
-
-2002-03-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSans.sfd - took H.S. Pannu's Gurmukhi from FreeSerif. It
-       actually fits to FreeSans much better. It seems I'll have to look
-       for another Gurmukhi font with modulated stroke for FreeSerif.
-
-       * sfd/FreeSerifItalic.sfd - replaced existing Hebrew glyphs by
-       those from FreeSerif (slanted for 15.5 degrees).
-
-       * sfd/FreeSerif.sfd - Added dotted Hebrew letters. Changed barred H.
-
-       * sfd/FreeMono.sfd - Completed vulgar fractions; minor changes in
-       Greek; added some mathematical operators.
-
-       * sfd/FreeMonoBold.sfd - added 12 characters to Latin Extended-B
-       and IPA Extensions areas (total 984).
-
-2002-03-25  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMonoBold.sfd - started adding Latin Extended-B and IPA
-       Extensions.
-
-       * sfd/FreeMono.sfd - Minor cosmetic changes; cleaning up Greek
-       (removing redundant control points), added some non-European
-       Cyrillic glyphs as a test.
-
-2002-03-22  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - Some minor modifications; letters in Latin
-       Extended-B area "welded" together.
-
-2002-03-20  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * www/index.html - finally linked the resources and design notes
-       pages.
-
-       * www/design-notes.html - added scaling information for super- and
-       subscript numerals in FreeMono.
-
-2002-03-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - the Latin Extended-B and IPA Extension area
-       characters moved from FreeMono and skewed for 12 degrees.
-
-2002-03-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - added a dozen or two of new characters, in
-       particular in the Latin Extended-B and IPA Extension area.
-
-2002-03-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - added a dozen of two of new characters, in
-       particular in the IPA Extension area.
-
-       * www/design-notes.html - Corrected data for x-height in FreeMono;
-       information on constructing small caps.
-
-2002-03-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeMono.sfd - added three smiley characters to the
-       Miscallaneous Symbols area.
-
-2002-03-10  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Anshuman Pandey has only converted Gurmukhi
-       from TrueType to Metafont; the original author of Gurkmukhi font
-       is Hardip Singh Pannu <http://members.aol.com/hspannu/punjabi.html>.
-       Got the permission from him to include the Gurmukhi glyph set.
-
-2002-03-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Added some more glyphs in the Mathematical
-       Symbols area to a total number of 3374.
-
-2002-03-06  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Added a basic Gurmukhi set.
-
-       * www/design-notes.html - started a page on design notes
-
-       * sfd/FreeMono.sfd - realized that glyphs in the Box Drawing area
-       and Block Elements area should extend through the ascender *and
-       descender* height, and corrected it.
-
-       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd - added some musical
-       glyphs, linking "no-break space" to space, "soft hyphen" to
-       hyphen-minus etc.
-
-2002-03-05  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * tools/WGL4.lst - Added Windows Glyph List 4.0
-
-       * tools/LigatureList.pl - Wrote a Perl script, which lists the
-       GSUB list (ligature list) of a OpenType font.
-
-       * sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd,
-       sfd/FreeSerifItalic.sfd - auxilliary Hebrew glyphs added. They are
-       too light compared with Latin and will be substituted with better
-       ones.
-
-2002-03-04  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Added some more glyphs to the Mathematical
-       Operators area (page 0x22).
-
-       * sfd/FreeSerif.sfd - Incomplete and fragmentary support for
-       Devanagari, originating from Harsh Kumar's Shusha fonts was
-       replaced by Frans Velthuis' Devanagari metafont, now maintained by
-       Anshuman Pandey <apandey@u.washington.edu> and available under
-       GPL. Until I figure out how to provide glyph substitution table in
-       OpenType, only the Unicode part is there.
-
-2002-02-28  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * ChangeLog file created
-
-       * sfd/FreeSerif.sfd - Added some Telugu glyphs to page 0x0C,
-       courtesy  Prasad A. Chodavarapu <http://chaitanya.bhaavana.net/fonts/>
-
-       * sfd/FreeSerif.sfd - Added some glyphs to the Miscellaneous
-       Symbols page (0x26).
-       
-2002-02-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * mailing lists freefont-announce and freefont-bugs created
-
-2002-02-25  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/FreeSerif.sfd - Added a couple of glyphs in Mathematics
-       Operators area.
-
-       * sfd/FreeMono.sfd 
-       - Added some more glyphs, in particular in the Mathematical
-       Operators section.
-       - Changed FamilyName to Free, FontName to FreeMono, and Full name
-       to "Free Monospaced".
-
-2002-02-20  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * sfd/ directory added containing FreeSerif, FreeSans and FreeMono
-       families.
-
-       * tools/ directory added containing lists with characters required
-       for MES (Multilinguag European Subset) compliance.
-
-       * tools/mes-list-expand.pl created - a Perl script for expanding MES
-       ranges into simple one-char-per-line format
-
-       * tools/CheckConformance.pl created - a Perl script for checking
-       conformance of a font file with a given coded character set
-
-       * homepage <http://www.freesoftware.fsf.org/freefont/> created
-
-2002-02-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
-
-       * freefont (Free UCS Scalable Fonts) project approved on
-       savannah.gnu.org: <http://savannah.gnu.org/projects/freefont/>
diff --git a/lib/tcpdf/fonts/freefont-20080323/INSTALL b/lib/tcpdf/fonts/freefont-20080323/INSTALL
deleted file mode 100644 (file)
index e08bcdb..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-
-               Installing the Free UCS outline fonts
-               =====================================
-
-1. UNIX/GNU/Linux/BSD Systems
-
-The rather awkward "UNIX/GNU/Linux/BSD" agglomeration is used to
-denote any system capable of running XFree86 server with FreeType
-<http://www.freetype.org/>, a high-quality free font rasterizer.
-
-1.1 KDE local installation
-
-Users of KDE can install .ttf files on a per-user basis using the KDE 
-Control Center module "kcmfontinst", which may appear in the menu as
-
-       Settings -> System Administration -> Font Installer
-
-This is especially helpful for developers and testers.
-
-1.2 Debian GNU/Linux
-
-Users of Debian GNU/Linux system will probably want to use the
-pre-packed Debian package, as available from the Debian site, 
-<http://packages.debian.org/unstable/x11/ttf-freefont.html>, or
-any of its mirrors. You can install them by issuing the command
-
-apt-get install ttf-freefont
-
-
-1.3 The rough way
-
-1) Fetch the freefont-ttf.tar.gz package with Free UCS outline fonts
-   in the TrueType format.
-
-2) Unpack TrueType fonts into a suitable directory,
-   e.g. /usr/local/share/fonts/default/TrueType/
-
-3) If you have chosen any other directory, make sure the directory you
-   used to install the fonts is listed in the path searched by the X
-   Font Server. Append the directory to the "catalogue=" in the
-   /etc/X11/fs/config.
-
-4) Run ttmkfdir in the directory where you unpacked the fonts.
-
-
-2. Microsoft Windows 95/98/NT/2000/XP
-
-   Probably something like Windows Vista:
-
-   Microsoft Windows Vista
-      * From Start menu, open Control Panels
-      * drag-n-drop font files onto Fonts control panel
-        may get dialog saying
-        "Windows needs your permission to continue"
-        * click Continue
-
-
-3. MacOS X
-
-Installing on Mac OS X requires moving the .ttf files to either
-/Library/Fonts/ or ~/Library/Fonts/ depending on whether they should be
-available to all users on your system or just to yourself.
-
-$Id$
diff --git a/lib/tcpdf/fonts/freefont-20080323/README b/lib/tcpdf/fonts/freefont-20080323/README
deleted file mode 100644 (file)
index a3f7ddf..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
--*-text-*-
-
-Summary: This project aims to provide a set of free scalable (i.e., OpenType)
-fonts covering the ISO 10646/Unicode UCS (Universal Character Set).
-
-
-WHY DO WE NEED FREE SCALABLE UCS FONTS?
-
-A large number of free software users switched from free X11 bitmapped
-fonts to proprietary Microsoft TrueType fonts, as
-a) they used to be freely downloaded from Microsoft Typography page
-<http://www.microsoft.com/typography/free.htm>,
-b) they contain a decent subset of the ISO 10646 UCS (Universal Character Set),
-c) they are high-quality, well hinted scalable TrueType fonts, and
-d) Freetype <http://www.freetype.org/>, a free, high quality TrueType font
-renderer been integrated into the latest release of XFree86,
-the free X11 server.
-
-Building a dependence on non-free software, even a niche one like fonts,
-is dangerous.  Microsoft TrueType core fonts are not free, they are just
-costless.  For now, at least.  Citing the TrueType core fonts for the Web
-FAQ <http://www.microsoft.com/typography/faq/faq8.htm>:
-"You may only redistribute the fonts in their original form (.exe or
-.sit.hqx) and with their original file name from your Web site or
-intranet site.  You must not supply the fonts, or any derivative fonts
-based on them, in any form that adds value to commercial products,
-such as CD-ROM or disk based multimedia programs, application software
-or utilities."  As of August 2002, however, the fonts are not anymore
-available from the Microsoft Web site, which makes the situation clearer.
-
-Aren't there any free high-quality scalable fonts?  Yes, there are.
-The Bitstream Vera fonts were made public, and are now maintained as
-the DejaVu fonts family.
-URW++, a German digital type foundry, released their own version of the
-35 PostScript Type 1 core fonts under GPL as their donation to the
-Ghostscript project <http://www.ghostscript.com>. 
-The Wadalab Kanji committee has produced Type 1 font files with thousands of
-filigree Japanese glyphs <http://gps.tanaka.ecc.u-tokyo.ac.jp/wadalabfont/>.
-Yannis Haralambous has drawn beautiful glyphs for the Omega typesetting
-system <http://omega.enstb.org/>. 
-And so on.  Scattered around the Internet there are numerous other free
-resources for other national scripts, many of them aiming to be a suitable
-match for Latin fonts like Times or Helvetica.
-
-
-WHAT DO WE PLAN TO ACHIEVE, AND HOW?
-
-Our aim is to collect available resources, fill in the missing pieces,
-and provide a set of free high-quality scalable (OpenType) UCS fonts,
-released under GNU General Public License.
-
-Free UCS scalable fonts will cover the following character sets
-
-* ISO 8859 parts 1-15
-* CEN MES-3 European Unicode Subset
-  http://www.evertype.com/standards/iso10646/pdf/cwa13873.pdf
-* IBM/Microsoft code pages 437, 850, 852, 1250, 1252 and more
-* Microsoft/Adobe Windows Glyph List 4 (WGL4)
-  http://www.microsoft.com/typography/otspec/WGL4.htm
-* KOI8-R and KOI8-RU
-* DEC VT100 graphics symbols
-* International Phonetic Alphabet
-* Arabic, Hebrew, Armenian, Georgian, Ethiopian, Thai and Lao alphabets,
-  including Arabic presentation forms A/B
-* Japanese Katakana and Hiragana
-* mathematical symbols, including the whole TeX repertoire of symbols
-* APL symbols
-  etc.
-
-A free outline font editor, George Williams's FontForge
-<http://fontforge.sourceforge.net/> will be used for creating new glyphs.
-Rogier van Dalen's TrueType/OpenType utilities
-http://home.kabelfoon.nl/~slam/fonts/
-will be used for instructing TrueType fonts and compiling OpenType tables.
-
-DESIGN ISSUES
-
-Which font shapes should be made? As historical style terms like
-Renaissance or Baroque letterforms cannot be applied beyond
-Latin/Cyrillic/Greek scripts to any greater extent than Kufi or Nashki
-can be applied beyond Arabic script, a smaller subset of styles will
-be made: one monospaced - FreeMono - and two proportional (one with
-uniform stroke - FreeSans - and one with modulated - FreeSerif)
-will be made at the start.
-
-These minimal style requirements allow the typefaces to preserve
-the same characteristic spirit regardless of the scripts, so that the
-font will be a harmonic unity. Some design notes on individual typefaces
-are available.
-
-In the beginning, however, we don't believe that TrueType hinting will
-be good enough to compete with either the hand-crafted bitmapped fonts at
-small sizes, or with commercial TrueType fonts.
-
-
-LICENSING
-
-Free UCS scalable fonts is free software; you can redistribute it
-and/or modify it under the terms of the GNU General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The fonts are distributed in the hope that they will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.
-
-As a special exception, if you create a document which uses this font,
-and embed this font or unaltered portions of this font into the
-document, this font does not by itself cause the resulting document to
-be covered by the GNU General Public License. This exception does not
-however invalidate any other reasons why the document might be covered
-by the GNU General Public License. If you modify this font, you may
-extend this exception to your version of the font, but you are not
-obligated to do so. If you do not wish to do so, delete this exception
-statement from your version.
-
-
-WHAT DO THE FILE SUFFIXES MEAN?
-
-The files with .sfd (Spline Font Database) are in FontForge's native
-format.  Please use these if you plan to modify the font files.
-FontForge can export these to mostly any existing font file format.
-
-TrueType fonts for immediate consumption are the files with the .ttf
-(TrueType Font) suffix.  You can use them directly, e.g. with the X
-font server.
-
-The files with .ps (PostScript) suffix are not font files at all -
-they are merely PostScript files with glyph tables, which can be used
-for overview, which glyphs are contained in which font file.
-
-You may have noticed the lack of PostScript Type 1 (.pfa/.pfb) font files.
-Type 1 format does not support large (> 256) encoding vectors, so they
-can not be used with ISO 10646 encoding.  If your printer supports it,
-you can use Type 0 format, though.  Please use FontForge for conversion
-to Type 0.
-
-
-Primoz Peterlin, <primoz.peterlin@biofiz.mf.uni-lj.si>
-update by Steve White <stevan.white@googlemail.com>
-
-Free UCS scalable fonts: http://savannah.gnu.org/projects/freefont/
-$Id$
similarity index 82%
rename from lib/tcpdf/fonts/freefont-20080323/AUTHORS
rename to lib/tcpdf/fonts/freefont-20090104/AUTHORS
index 006f1e6f90f4e5424c7baf750f36f86551c4fbe7..ee800a48ca6389169dd6c9d1475d1e66d5abe8bb 100644 (file)
@@ -1,7 +1,8 @@
 -*- mode:text; coding:utf-8; -*-
-$Id$
+                        GNU FreeFont Authors
+                        ====================
 
-The free UCS scalable font collection is being maintained by
+The FreeFont collection is being maintained by
        Steve White <stevan.white AT googlemail.com>
 The folowing list cites the other contributors that contributed to
 particular ISO 10646 blocks.
@@ -33,6 +34,7 @@ particular ISO 10646 blocks.
 
        Arrows                                  (U+2190-U+21FF)
        Mathematical Symbols                    (U+2200-U+22FF)
+       Mathematical Alphanumeric Symbols       (U+1D400-U+1D7FF)
 
 * Valek Filippov <frob AT df.ru>
 
@@ -171,7 +173,6 @@ particular ISO 10646 blocks.
        Malayalam                               (U+0D00-U+0D7F)
        Tamil                                   (U+0B80-U+0BFF)
 
-
 * Kulbir Singh Thind
 
        Gurmukhi                                (U+0A00-U+0A7F)
@@ -180,9 +181,28 @@ particular ISO 10646 blocks.
 
         Georgian                               (U+10A0-U+10FF)
 
+* Daniel Johnson
+
+       Cherokee                                (U+13A0-U+13FF)
+
+* George Douros
+
+       Gothic                                  (U+10330-U+1034F)
+       Phoenecian                              (U+10900-U+1091F)
+       Byzantine Musical Symbols               (U+1D000-U+1D0FF)
+       Western Musical Symbols                 (U+1D100-U+1D1DF)
+       Mathematical Alphanumeric Symbols       (U+1D400-U+1D7FF)
+       Mah Jong Tiles                          (U+1F000-U+1F02B)
+       Dominoes                                (U+1F030-U+1F093)
+
+* Steve White <stevan_white AT gmail.com>
+       Coptic                                  (U+2C80-U+2CFF)
+
 * Primož Peterlin <primoz.peterlin AT biofiz.mf.uni-lj.si>
-  maintained FreeFont for several years, and is to be thanked for 
-  all the work he did.
+  maintained FreeFont for several years, and is thanked for all his work.
 
 Please see the CREDITS file for details on who contributed particular
 subsets of the glyphs in font files.
+
+--------------------------------------------------------------------------
+$Id$
diff --git a/lib/tcpdf/fonts/freefont-20090104/COPYING b/lib/tcpdf/fonts/freefont-20090104/COPYING
new file mode 100644 (file)
index 0000000..94a9ed0
--- /dev/null
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
similarity index 80%
rename from lib/tcpdf/fonts/freefont-20080323/CREDITS
rename to lib/tcpdf/fonts/freefont-20090104/CREDITS
index c5a9e0faa53b9405fb5e1cf542a0b2f109fb5d32..67188b03c0abdb43e2530d18c0b708e1a2c4f3b3 100644 (file)
@@ -1,8 +1,8 @@
 -*- mode:text; coding:utf-8; -*-
-$Id$
+                         GNU FreeFont Credits
+                         ====================
 
-This file lists the contributors and contributions to the free UCS
-scalable font project.
+This file lists contributors and contributions to the GNU FreeFont project.
 
 
 * URW++ Design & Development GmbH <http://www.urwpp.de/>
@@ -23,25 +23,22 @@ under the terms of GNU General Public License (GPL).
 * Yannis Haralambous <yannis.haralambous AT enst-bretagne.fr> and John
   Plaice <plaice AT omega.cse.unsw.edu.au>
 
-Yannis Haralambous and John Plaice are the authors of Omega
-typesetting system, <http://omega.cse.unsw.edu.au/>. Omega is an
-extension of TeX. Its first release, aims primarily at improving TeX's
-multilingual abilities. In Omega all characters and pointers into
-data-structures are 16-bit wide, instead of 8-bit, thereby eliminating
-many of the trivial limitations of TeX. Omega also allows multiple
-input and output character sets, and uses programmable filters to
-translate from one encoding to another, to perform contextual
-analysis, etc. Internally, Omega uses the universal 16-bit Unicode
-standard character set, based on ISO-10646. These improvements not
-only make it a lot easier for TeX users to cope with multiple or
-complex languages, like Arabic, Indic, Khmer, Chinese, Japanese or
-Korean, in one document, but will also form the basis for future
-developments in other areas, such as native color support and
-hypertext features. ... Fonts for UT1 (omlgc family) and UT2 (omah
-family) are under development: these fonts are in PostScript format
-and visually close to Times and Helvetica font families. (from the
-Omega WWW site). Omega fonts are available subject to GPL
-<http://www.ctan.org/tex-archive/help/Catalogue/entries/omegafonts.html>.
+Yannis Haralambous and John Plaice are the authors of Omega typesetting
+system, <http://omega.enstb.org/>. Omega is an extension of TeX.
+Its first release, aims primarily at improving TeX's multilingual abilities.
+In Omega all characters and pointers into data-structures are 16-bit wide,
+instead of 8-bit, thereby eliminating many of the trivial limitations of TeX.
+Omega also allows multiple input and output character sets, and uses
+programmable filters to translate from one encoding to another, to perform
+contextual analysis, etc. Internally, Omega uses the universal 16-bit Unicode
+standard character set, based on ISO-10646. These improvements not only make
+it a lot easier for TeX users to cope with multiple or complex languages,
+like Arabic, Indic, Khmer, Chinese, Japanese or Korean, in one document, but
+will also form the basis for future developments in other areas, such as
+native color support and hypertext features. ... Fonts for UT1 (omlgc family)
+and UT2 (omah family) are under development: these fonts are in PostScript
+format and visually close to Times and Helvetica font families. 
+Omega fonts are available subject to GPL
 
        Latin Extended-B                        (U+0180-U+024F)
        IPA Extensions                          (U+0250-U+02AF)
@@ -53,13 +50,13 @@ Omega WWW site). Omega fonts are available subject to GPL
        Arabic Presentation Forms-A             (U+FB50-U+FDFF)
        Arabic Presentation Forms-B             (U+FE70-U+FEFF)
 
+Current info: <http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=omega>
 
 * Valek Filippov <frob AT df.ru>
 
 Valek Filippov added Cyrillic glyphs and composite Latin Extended A to
-the whole set of the abovementioned URW set of 35 PostScript core
-fonts, <ftp://ftp.gnome.ru/fonts/urw/>. The fonts are available under
-GPL.
+the whole set of the abovementioned URW set of 35 PostScript core fonts,
+<ftp://ftp.gnome.ru/fonts/urw/>. The fonts are available under GPL.
 
        Latin Extended-A                        (U+0100-U+017F)
        Cyrillic                                (U+0400-U+04FF)
@@ -92,9 +89,8 @@ etc. would result in too thick math symbols, in my opinion. In the TX
 fonts, these glyphs are thinner than those of original Times
 fonts. That is, the rule thickness of these glyphs is around 85% of
 that of the Times fonts, but still thicker than that of the CM fonts."
-TX fonts are are distributed under the GNU public license
-(GPL). Pointers to their location are available on
-<http://www.utdallas.edu/~ryoung/txfonts/>.
+TX fonts are are distributed under the GNU public license (GPL). 
+<http://www.ctan.org/tex-archive/fonts/txfonts/>.
 
        Arrows                                  (U+2190-U+21FF)
        Mathematical Symbols                    (U+2200-U+22FF)
@@ -119,10 +115,10 @@ version. You can also send comments etc to the above address."
 * Yannis Haralambous and Virach Sornlertlamvanich
 
 In 1999, Yannis Haralambous and Virach Sornlertlamvanich made a set of
-glyphs covering the Thai national standard NF3, in both upright and
+glyphs covering the Thai national standard Nf3, in both upright and
 slanted shape. The collection of glyphs have been made part of GNU
-intlfonts 1.2 package and is available on
-<ftp://ftp.gnu.org/pub/gnu/intlfonts/> under GPL.
+intlfonts 1.2 package and is available under the GPL at
+<ftp://ftp.gnu.org/pub/gnu/intlfonts/>.
 
        Thai                                    (U+0E00-U+0E7F)
 
@@ -336,8 +332,7 @@ a set of TTF fonts for nine Indian scripts (Devanagari, Gujarati,
 Telugu, Tamil, Malayalam, Kannada, Bengali, Oriya, and Gurumukhi)
 under the GNU General Public License (GPL). You can download the fonts
 from the Free Software Foundation of India WWW site
-(http://www.gnu.org.in/software/software.html#akruti) or from the
-Akruti website.
+(http://www.gnu.org.in/akruti-fonts/) or from the Akruti website.
 
 For any further information or assistance regarding these fonts,
 please contact mssridhar AT vsnl.com.
@@ -386,18 +381,21 @@ Latin Extended-B and IPA Extensions ranges.
 
 * K.H. Hussain <hussain AT kfri.org> and R. Chitrajan
 
-`Rachana' in Malayalam means `to write', `to create'. Rachana Akshara
-Vedi, a team of socially committed information technology
-professionals and philologists, has applied developments in computer
-technology and desktop publishing to resurrect the Malayalam language
-from the disorder, fragmentation and degeneration it had suffered
-since the attempt to adapt the Malayalam script for using with a
-regular mechanical typewriter, which took place in
-1967-69. K.H. Hussein at the Kerala Forest Research Institute has
-released "Rachana Normal" fonts with approximately 900 glyphs required
+`Rachana' in Malayalam means `to write', `to create'. Rachana Akshara Vedi,
+a team of socially committed information technology professionals and
+philologists, has applied developments in computer technology and desktop
+publishing to resurrect the Malayalam language from the disorder,
+fragmentation and degeneration it had suffered since the attempt to adapt
+the Malayalam script for using with a regular mechanical typewriter, which
+took place in 1967-69. K.H. Hussein at the Kerala Forest Research Institute
+has released "Rachana Normal" fonts with approximately 900 glyphs required
 to typeset traditional Malayalam. R. Chitrajan apparently encoded the
 glyphs in the OpenType table.
 
+In 2008, the Malayalam ranges in FreeSerif were updated under the advise 
+and supervision of Hiran Venugopalan of Swathanthra Malayalam Computing,
+to reflect the revised edition Rachana_04.
+
        Malayalam                               (U+0D00-U+0D7F)
 
 
@@ -406,7 +404,7 @@ glyphs in the OpenType table.
        Bengali                                 (U+0980-U+09FF)
 
 Solaiman Karim has developed several OpenType Bangla fonts and
-released them under GNU GPL on www.ekushey.org.
+released them under GNU GPL on <http://www.ekushey.org>.
 
 
 * Sonali Sonania <sonalisonania AT gmail.com> and Monika Shah
@@ -481,9 +479,50 @@ created the following UCS blocks:
        Block Elements                          (U+2580-U+259F)
        Geometrical Shapes                      (U+25A0-U+25FF)
 
+* Mark Williamson
+
+Made the MPH 2 Damase font, from which 
+       Hanunóo                                 (U+1720-U+173F)
+       Buginese                                (U+1A00-U+1A1F)
+       Tai Le                                  (U+1950-U+197F)
+       Ugaritic                                (U+10380-U+1039F)
+       Old Persian                             (U+103A0-U+103DF)
+
+* Jacob Poon
+
+Submitted a very thorough survey of glyph problems and other suggestions.
+
+* Alexey Kryukov
+
+Made the TemporaLCGUni fonts, based on the URW++ fonts, from which at one 
+point FreeSerif Cyrillic, and some of the Greek, was drawn.  He also provided
+valuable direction about Cyrillic and Greek typesetting.
+
+* George Douros
+
+The creator of several fonts focusing on ancient scripts and symbols.
+Many of the glyphs are created by making outlines from scanned images
+of ancient sources.
+
+       Aegean:   Phoenecian
+       Analecta: Gothic                        (U+10330-U+1034F)
+       Musical:  Byzantine & Western                  
+       Unicode:  many Miscellaneous Symbols, Miscellaneous Technical,
+                 supplemental Symbols, and Mathematical Alphanumeric symbols,
+                 Mah Jong, and the outline of the Domino.
+
+* Daniel Johnson
+
+Created by hand a Cherokee range specially for FreeFont to be "in line with
+the classic Cherokee typefaces used in 19th century printing", but also to
+fit well with ranges previously in FreeFont.
+       Cherokee                                (U+13A0-U+13FF)
 
 Notes:
 
 *: The glyph collection looks license-compatible, but its author has
-   not yet replied and agreed on his/her work being used in part of
+   not yet replied and agreed on their work being used in part of
    this glyph collection.
+
+--------------------------------------------------------------------------
+$Id$
diff --git a/lib/tcpdf/fonts/freefont-20090104/ChangeLog b/lib/tcpdf/fonts/freefont-20090104/ChangeLog
new file mode 100644 (file)
index 0000000..9ab101b
--- /dev/null
@@ -0,0 +1,4525 @@
+$Id$
+2009-01-04 Stevan_White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Added 2009 to copyright dates
+
+       * AUTHORS, CREDITS:
+
+       Removed Glagolitic range author
+
+       * FreeSans.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Added some TrueType names
+
+2009-01-01 Stevan_White
+       * FreeSerif.sfd:
+
+       Removde Glagolitic range, since have not (yet) received OK from author.
+       
+       Added some TrueType Names
+
+2008-12-31 Stevan_White
+       * COPYING:
+
+       Updated license to GPL v3
+
+2008-12-30 Stevan_White
+       * FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Oblique versions of Daniel Johnson's Cherokee.
+
+       * FreeSerifBold.sfd:
+
+       Cherokee Bold range from Daniel Johnson.
+
+2008-12-27 Stevan_White
+       * isMonoMono.py:
+
+       900 EM -> 800
+
+       * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd:
+
+       Made glyphs to lie between -200 and 800 EM
+
+       * isMonoMono.py:
+
+       check that glyphs lie in vertical bounding boxes
+
+       * FreeMono.sfd, FreeSerif.sfd:
+
+       Extensible bracket characters didn't exactly line up.  Fixed.
+       Mono: a couple of glyphs had gotten out of their bounding boxes again.
+
+2008-12-26 Stevan_White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Final pre-release cleanup
+
+       * FreeSerif.sfd:
+
+       Buginese vowel u was misnamed
+
+       * FreeMono.sfd:
+
+       Yatcyrillic somehow was a mark character ... fixed
+
+       * FreeSans.sfd, FreeSansOblique.sfd:
+
+       Had to un-link references in
+               Sans: uni02B2, uni02B5
+               SansOblique: uni0363
+       because validation of the TTF file said the glyph
+               "is drawn in wrong direction"
+       I would have preferred to have understand this...
+
+       * Makefile:
+
+       Added quick test for FontForge version.
+
+       * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd:
+
+       Removed kerning tables (?? what were they doing here anyway??)
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Kerning tables for Thai.
+       Handles one common case: short letter followed by a tall one with
+       an overhang to the left.
+
+2008-12-25 Stevan_White
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       More putzing with kerning tables
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Copied kerning classes
+               Serif -> SerifBold
+               SerifItalic -> SerifBoldItalic
+               Sans -> SansOblique SansBold SansBoldOblique
+       Some associated naming of characters, etc
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Additions and correction in Spacing Modifier letters and IPA Extensions
+
+2008-12-23 Stevan_White
+       * FreeSerif.sfd:
+
+       Applied patch to Cherokee range
+
+2008-12-20 Stevan_White
+       * FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Fixed kern classes that end in space (crashes FontForge)
+
+       * FreeSerifItalic.sfd, FreeSerif.sfd:
+
+       kerning
+
+2008-12-19 Stevan_White
+       * FreeSerifItalic.sfd:
+
+       kerning
+
+       * FreeSerif.sfd:
+
+       kerning
+       Some adjustments to Glagolitc spacing, mark positioning
+
+2008-12-18 Stevan_White
+       * FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       kerning
+
+2008-12-17 Stevan_White
+       * FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       kerning
+
+2008-12-11 Stevan_White
+       * FreeSans.sfd, FreeSerif.sfd:
+
+       kerning
+
+2008-12-10 Stevan_White
+       * FreeSans.sfd, FreeSansBold.sfd:
+
+       kerning
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd:
+
+       kerning
+
+2008-12-09 Stevan_White
+       * FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       kerning
+
+2008-12-08 Stevan_White
+       * FreeSansOblique.sfd:
+
+       Slanted small final sigma.  Remedies
+       bug #24993: U+03C2 "Greek small letter final sigma" not slanted in
+       Free Sans Oblique
+       https://savannah.gnu.org/bugs/index.php?24993
+
+2008-12-07 Stevan_White
+       * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       kerning, etc
+
+2008-12-06 Stevan_White
+       * FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd:
+
+       kerning
+       Tweek in Sans having to do with addition of Latin Extended
+
+2008-12-05 Stevan_White
+       * FreeSansBold.sfd, FreeSansBoldOblique.sfd:
+
+       Tweeks to Latin Extended Additional
+
+       * FreeSansBoldOblique.sfd:
+
+       Added Latin Extended Additional range
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Extra space at end of kern class names has bad effect on FornForge
+       script that try to run through kern classes.  Some FontForge call
+       corrupts memory.
+       Got rid of extra space.
+
+2008-12-02 Stevan_White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Replaced U+0387 GREEK ANO TELEIA with top dot of colon.
+       See bug #24987: U+0387 GREEK ANO TELEIA too low
+       https://savannah.gnu.org/bugs/index.php?24987
+
+       * FreeSerif.sfd:
+
+       more kerning in Cyrillic (broke into two tables of classes)
+
+2008-12-01 Stevan_White
+       * FreeSerif.sfd:
+
+       tweeks to kernin
+
+       * FreeSerifBoldItalic.sfd:
+
+       kerning
+
+2008-11-30 Stevan_White
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Kerning for Latin and Cyrillic fairly complete in Serif faces.
+       Complete in sense that it looks pretty good under Pango for
+               English French German Spanish Polish Czech Latvian
+       But have not done Vietnamese (will require many more entries).
+       I adjust roman and italic, then copy tables by hand to bold and
+       bolditalic.
+       Misgiving: bolditalic is much too crammed
+       Overall, I may have over-kerned.  (A difficult temptation to master.)
+
+       * FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       kerning
+
+       * FreeSans.sfd, FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       kerning
+       In Serif, modified widths of some extended latin glyphs
+
+2008-11-29 Stevan_White
+       * FreeSerif.sfd:
+
+       Broke Latin kerning subtable into four, hoping it will be easier to
+       understand and maintain.
+
+       * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd,
+       FreeSerifItalic.sfd, FreeSerifBold.sfd, FreeSansOblique.sfd,
+       FreeSans.sfd:
+
+       kerninig
+
+2008-11-28 Stevan_White
+       * FreeSans.sfd, FreeSerif.sfd:
+
+       more kerning;
+       made guillemot narrower
+
+       * FreeSansOblique.sfd, FreeSerif.sfd:
+
+       previous commit was incomplete
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Adjusted width of single quotes (and apostrophe) to be "punctuation width"
+       More fiddling with kerning.
+
+2008-11-27 Stevan_White
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd:
+
+       much fiddling with kerning
+
+2008-11-26 Stevan_White
+       * FreeSerifBold.sfd:
+
+       Basic kerning, named main Cyrillic letters
+
+       * FreeSerifItalic.sfd:
+
+       Basic Cyrillic kerning
+
+       * FreeSerif.sfd:
+
+       Tweeks to Cyrillic kerning
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd, Makefile:
+
+       Much fiddling with kerning, tables, and generating fonts whose kerning
+       tables work with OpenOffice.
+
+2008-11-24 Stevan_White
+       * FreeSerif.sfd:
+
+       regularized padding in Miscellaneous symbols.
+       At least within related ranges tried to make similar.
+       Made to validate
+
+2008-11-23 Stevan_White
+       * FreeSerif.sfd:
+
+       Filled out Miscellaneous Symbols.  Used George Douros' Unicode font.
+       Completed Miscellaneous Symbols, with some drawings from George Douros'
+       Unicode Symbols, and some of mine.
+
+       * FreeMono.sfd, FreeMonoOblique.sfd:
+
+       Replaced Greek Exteded psili and dasia with scaled versions of the
+       "bent quote" mark.  I think it's distinctive enough, but not so silly.
+       
+       Remedies bug #22997: Mono: Greek Extended psili is ugly
+       https://savannah.gnu.org/bugs/?22997
+
+       * FreeSerif.sfd:
+
+       Made some recycling symbols
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Finished with Hebrew Pointed letters in all faces.
+
+2008-11-22 Stevan_White
+       * FreeSans.sfd:
+
+       Fiddled with Hebrew Pointed letters
+
+       * FreeSerifItalic.sfd:
+
+       Marks for Vietnamese
+
+       * FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Letter pe had strange thick middle ear that looked awful.  lamed had ben
+       bumped at some point.  Fixed.  Adjusted some of the points.
+
+2008-11-21 Stevan_White
+       * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       repairs to Pointed Hebrew
+
+       * FreeSerif.sfd:
+
+       Numeral line positioning marks for Gothic
+
+       * FreeSerifItalic.sfd:
+
+       Added Combining Marks for Symbols (some question about obliqueness of
+       some symbols)
+       Cleaned up some empty glyphs in Pointed Hebrew.
+
+2008-11-20 Stevan_White
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Provided Hebrew pointed letters, with lookups, for all Serif faces.
+
+2008-11-19 Stevan_White
+       * FreeSerifBoldItalic.sfd:
+
+       renamed Hebrew lookups
+
+       * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Completed Hebrew in Bold faces.
+
+       * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       More tweeks to Hebrew points
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Adjustments corrections and additions to Hebrew points
+
+2008-11-18 Stevan_White
+       * FreeSansBold.sfd:
+
+       Cleaned out a lot of ridiculous kernings
+
+2008-11-17 Stevan_White
+       * FreeSansBoldOblique.sfd:
+
+       fiddled with Armenian ligatures
+
+       * FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Added Armenian (with ligatures) to BoldOblique
+       Fiddled with character spacing
+
+2008-11-16 Stevan_White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Added U+01f9 and paragraph end marker to Georgian
+       Fiddled with Armenian ligatures
+
+2008-11-15 Stevan_White
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Another pass at letter spacing in Cyrillic. 
+       Also went through ancient letters.
+       
+       Added Georgian paragraph separator 10FB
+       Added Georgian turned gan 10F9 (because it was easy)
+
+       Re-worked letter spacing through modern Cyrillic range.
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd:
+
+       Letter spacing
+
+2008-11-14 Stevan_White
+       * FreeSerif.sfd:
+
+       Added several characters to Cyrillic Extended-B
+
+       * FreeSansBold.sfd, FreeSansBoldOblique.sfd:
+
+       Made Cyrillic hooked e U+04BC-F to look less goofy.
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Based on assertion on Pechatnyj Dvor's web site, Cyrillic Fita
+       U+0472-3 and "Barred O" U+04E8-9 are different styles the same letter,
+       and the fact that the tilde in the O never looked good in Sans, I
+       made them all barred O's.
+
+       * FreeSerif.sfd:
+
+       Added Cyrillic Yn, yn (U+a65e-f)
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Synced up Cyrillic and Combining Diacritics ranges,
+       Couple of tweeks in Gujarati to make TT validate
+
+       * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Changes to older Cyrillic letters, in response to further information.
+       Made omegas, omegas with titlo, and OT to all be of the same size and
+       shape in Serif.
+       Un-linked Cyrillic Psi and psi from Greek, made squarer versions.
+       
+       Some more Cyrillic diacritical marks in Sans.  Re-worked U+04bc-f .
+       Experimenting with mark positioning for Cyrillic
+
+2008-11-12 Stevan_White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Strove to make Euro look more like the EC logo design, while making
+       glyph fit better with the design of its face.  Bug #3576: Euro design
+               https://savannah.gnu.org/bugs/?23576
+
+       * FreeSans.sfd, FreeSerif.sfd:
+
+       Adjustments mostly to GPOS tables having to do with Vietnamese marks.
+       The WAZU Vietnamese test page looks pretty good in Sans now.
+       Still not thrilled with below-dot when it appears with a mark over
+       e.g. U+0102. Pango positions one or the other but not both.
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Extensive modification of GPOS lookup tables for mark positioning.
+       I think they're now all functional (except styled Mono faces have none).
+       Also added lots of marks to faces that didn't have them, and also
+       fiddled with Combining Diacritical Marks.
+
+2008-11-10 Stevan_White
+       * FreeSerif.sfd:
+
+       Made one combining mark really combining
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Made a few combining characters to be zero-width in Mono,
+       Added them to other styles.
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Figured out why below marks in Thai weren't working in the lowest
+       letters.  I think Pango and other font renderers ignore 'blwm'. 
+       However, 'mark' works.
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Tweeks to Thai marks
+
+2008-11-09 Stevan_White
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Several bugfixes in Thai, mostly having to do with mark placement and
+       ligatures.  Implemented ru-saraaa and lu-saraaa with ligatures.
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       added and named dottedcircle (used by Pango to render
+       combining mark base)
+
+       * FreeSerif.sfd:
+
+       Tweeks to Coptic, after viewing more papyrus samples and web pages.
+
+       * FreeSerif.sfd:
+
+       Weight of Coptic small letters made to match that of Latin and Greek ones.
+
+2008-11-08 Stevan_White
+       * FreeSerif.sfd:
+
+       Made Coptic to comply better with
+               http://www.wazu.jp/gallery/Test_Coptic.html
+       Made a flourish at foot of letters with long diagonal.
+
+       More tweeks to Coptic; put in a mark lookup table.
+       
+       Note: for small letters I made scaled references to captials.
+       Results in those letters looking quite light next to the capitals and
+       next to small Latin letters.  Also, there are a few variant forms for
+       capitals (Unicode samples don't show this).  It would be good to
+       re-work
+
+       Added Coptic alphabet in u+2C80-2CB1 and u+03E2-u+03EF, drawn/built by
+       me, based on Unicode samples, TeX font copte, and scans at WikiPedia.
+
+2008-11-07 Stevan_White
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Further tweeks to dieresis in Greek and Cyrillic
+
+       * FreeSerif.sfd:
+
+       replaced Greek I dieresis with references, tweeked height of dieresis.
+
+2008-11-04 Stevan_White
+       * FreeSerif.sfd:
+
+       Added a few Cyrillic Extended-B letters seen in web pages while looking
+       for Glagolitic text.
+
+       * FreeMono.sfd, FreeMonoOblique.sfd:
+
+       Added a few old Cyrillic characters.
+
+       * FreeSerif.sfd:
+
+       Several corrections and tweeks to Glagolitic.
+       Still missing six slots from Unicode, but don't see them in the TeX
+       fonts.
+       On the other hand, several on-line Glagolitic pages (bibles etc) don't
+       seem to use these.  Maybe it's OK as-is.
+
+2008-11-03 Stevan_White
+       * FreeSerif.sfd:
+
+       Added lowercase range to Glagolitic, as a facile scaling of the
+       uppercase.
+
+       Added letter to Glagolitic, scaled range.
+
+2008-11-02 Stevan_White
+       * FreeSerif.sfd:
+
+       Replaced fraktur bold from Mathematical Alphanumeric Symbols with that
+       from TX Fonts by Young Ryu.
+       One concern: letter k is damaged (in both medium and bold).  I just
+       hacked something up.
+       
+       Added Glagolitic "round type" font (Croation capitols only) from the
+       collection of Croatian fonts for LaTeX by Darko Zubrinić
+       ftp://ftp.dante.de/tex-archive/languages/croatian/
+       http://www.tug.org/TUGboat/Articles/tb17-1/tb50zubr.pdf
+       
+       Several letters are missing besides the small letters.
+
+       * FreeSerifBoldItalic.sfd:
+
+       A couple of Thai references got obliqued twice.
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       By popular demand, removed 'ears' from Greek Upsilon and Psi.
+       Copied resulting glyphs to Serif Mathematical Alphanumeric Symbols.
+
+       * FreeSerif.sfd:
+
+       Some pointwise cleanup of main Tamil range
+
+       Tried some things with lookups.  Didn't make much headway.
+
+2008-11-01 Stevan_White
+       * FreeMono.sfd:
+
+       somehow made a letter with wrong width
+
+       * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Added similar lookups and ligatures to Thai ranges.
+
+       * FreeSerif.sfd:
+
+       Lookups now work no worse than those for other Thai fonts, at least
+       in Pango.  Still perplexed by behaviour of "Required" lookups.
+
+       For Thai, made ligatures and lookups for yoying and thothan combined
+       with a lower vowel.  These work well.
+       Attempted looksups for saraaa with ru and lu, and for saraam. 
+       Not working.
+
+       Cleaned up a few of the Bengali ligatures
+
+       * FreeSerifBold.sfd:
+
+       Tweek Thai
+
+2008-10-31 Stevan_White
+       * FreeSerif.sfd:
+
+       Fixed ligatures and mark positioning for Hanunóo.
+       Problem with ligatures: Gnome pango doesn't do 'rlig', only 'liga'
+
+       * FreeSerifItalic.sfd:
+
+       Changed lookup table scripts for Devanagari and Bengali.
+       Find Problems -> ATT found several problems showing lookups acting on
+       glyphs that weren't listed in the script ranges, including dev2, bng2
+       (why not deva and beng, I don't know).
+       
+       danda and doubledanda of Devanagari I understand are to be shared among
+       Indic scripts.  So included bng2 and dev2 in the 'aalt' table for those.
+       
+       The 'init' and 'half' tables for Bengali made active for bng2.
+       
+       The 'locl' table for Bengali didn't do anything I could see: It mapped
+       the Devanagari danda to itself, and the doubledanda to itself.  Deleted.
+
+       Cleaned up some kern tables.
+       adjustments of under 5 EM are invisible.  Some others I just didn't like.
+       Some were putting a letter beneath another, with is wrong.
+
+       * FreeSerifBoldItalic.sfd:
+
+       Added Thai
+
+       * FreeSerifBold.sfd, FreeSerifItalic.sfd:
+
+       Changes to mark positioning lookups, esp. in Italic.
+       Widened numerals in Bold
+
+2008-10-27 Stevan_White
+       * FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Tweeks regarding Armenian and lookups
+
+       * FreeSansBold.sfd:
+
+       Added Armenian ligatures FB13-FB17 with lookups
+       Also made a historical ligature ('hlig') table for u+0587.
+       
+       Toward bug #15183: missing characters from Armenian range
+       https://savannah.gnu.org/bugs/index.php?15183
+
+       * FreeSansOblique.sfd:
+
+       Added Armenian ligatures, lookups.  Cleaned up contours.
+
+       * FreeSans.sfd:
+
+       Added 5 Armenian ligatures to U+FB13 â€“ FB17, and made corresponding
+       'liga' lookup.  Found there one ligature u+0587 that according to
+               http://en.wikipedia.org/wiki/Armenian_alphabet
+       
+       "in new orthography the Ö‡ character is not a typographical ligature anymore, and must never be treated as such. It is a distinct letter and has its place in the new alphabetic sequence."
+       So moved this out of the 'liga' lookup and into a new 'hlig' lookup.
+
+2008-10-26 Stevan_White
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd:
+
+       Lots of improvements to Thai.
+       Completely revised letter spacing in Italic, and fiddled with combining
+       marks in all.
+       Still aren't working quite right, especially in Italic.
+       Still need to work over digits (in Bold they aren't even bold yet)
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd:
+
+       Bold Thai : added (painstakingly) constructed glyphs, lookups
+       roman Thai: tweeks
+       Italic Thai: tweeks (Note this still has multiple problems)
+
+2008-10-25 Stevan_White
+       * FreeSerif.sfd:
+
+       WAZU says
+       http://www.wazu.jp/gallery/Fonts_Hanunoo.html
+       
+       MPH 2B Damase doesn't support the consonant-vowel ligatures necessary
+       to render Buhid writing.
+       
+       OK, so I made 'mark' lookups for combining marks and a bunch of
+       ligatures in an 'rlig' lookup.  The latter still not working:
+       don't know why.
+       
+       Made page to match the example of the combining forms at
+       http://www.omniglot.com/writing/hanunoo.htm
+
+2008-10-24 Stevan_White
+       * FreeSerif.sfd:
+
+       Removed some marks from Mathematical Alphanumeric Symbols
+
+       * FreeSerif.sfd:
+
+       Tweeked combining marks for Vietnamese.  Made to satisfy
+               WAZU JAPAN Comprehensive Unicode Test Page for Vietnamese
+               http://www.wazu.jp/gallery/Test_Vietnamese.html
+       Could still use some tweeking...
+
+       * FreeSerif.sfd:
+
+       Added marks for composition of Vietnamese
+
+       * FreeMono.sfd, FreeSerif.sfd:
+
+       Put "below" combining mark on lots of vowels and derivatives,
+       for Vietnamese.
+       Named a bunch of composit Latin, expecting to make substitutions.
+
+2008-10-23 Stevan_White
+       * FreeSerif.sfd:
+
+       Thai spacing alterations based on advice of a native speaker.
+
+2008-10-22 Stevan_White
+       * FreeSerif.sfd:
+
+       re-named Thai lookups according to order
+
+2008-10-21 Stevan_White
+       * FreeSans.sfd:
+
+       Cleanup of glyphs in Gujarati, Devanagari.
+       
+       Note:  Serious problem with Sans GPOS abvm in Devanagari
+       "'abvm' Above Base Mark in Devanagari subtable" "gujr-0"
+       But all the characters that list gujr-0 are in Gujarati.
+       Not sure how this got broken or how to fix it.
+
+       * FreeSerif.sfd:
+
+       Fiddled with Thai mark positioning: passes my tests now OK.
+       Made a few more references in Math Symbols; more regularization of
+       stroke.
+
+       * FreeSerif.sfd:
+
+       Added mark class for Vietnamese "horn"
+       Several references made in General Punctuation, Arrows
+
+       * FreeMono.sfd:
+
+       added some Combining Diacritical Marks
+
+2008-10-20 Stevan_White
+       * FreeSerif.sfd:
+
+       Made some references from serifed Latin capitals to Greek counterparts.
+
+       * FreeSerif.sfd:
+
+       Made a few repeated glyphs into references in Musical Symbols
+
+2008-10-19 Stevan_White
+       * FreeSerif.sfd:
+
+       Moved several glypns from Mathematical Alphanumeric Symbols to
+       Letterlike Symbols.
+       Couple tweeks in Mathematical Symbols.
+
+       * FreeMono.sfd, FreeSerif.sfd:
+
+       Fiddling with Mathematical Symbols.
+       In Serif, trying to make stroke width more consistent.
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd:
+
+       Added some Greek symbols in Mono and Sans to make a little more regular
+       and correspond better with TeX.
+       Tweek of serif.
+
+       * FreeSansBold.sfd:
+
+       a few more improvements.
+       
+       One problem with the Mathematical Alphanumeric area is, one must
+       remember to change it any time another face is altered...
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerifBold.sfd:
+
+       Several improvements and additions to Sans faces (mostly in Greek) from
+       experience of pasting into FreeSerif Mathematical Alphanumeric Symbols.
+
+       * FreeSerif.sfd:
+
+       Replaced most of Mathematical Alphanumeric Symbols
+               roman italic bold (latin and greek)
+               gothic italic bold (latin and greek)
+               typewriter
+               and numerals
+       with glyphs from FreeFont.  These were scaled to uniform height.
+       
+       Remains: Blackboard Bold, Fraktur, Calligraphic, Script
+
+       * FreeSerif.sfd:
+
+       Tidied lookup table names for Malayalam
+
+       * FreeSerif.sfd:
+
+       Applied Malayalam patch from Hiran Venugopalan
+
+       * FreeMono.sfd:
+
+       Added/corrected many Mathematical Symbols
+
+       * FreeSansOblique.sfd:
+
+       more IPA
+
+2008-10-18 Stevan_White
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Made lots more IPA and Phonetic Extensions
+       Note: fontforge is reporting an error in a few glyphs made by scaling
+       another, that the glyphs are drawn in the wrong direction--only in
+       TrueType though.  Suspect a FontForge bug.
+
+       Added several Combining Diacritical Marks
+
+2008-10-17 Stevan_White
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Made several Spacing Modifier Letters, Combining Diacritical Marks,
+       and IPA and Phonetic Extensions
+
+2008-10-16 Stevan_White
+       * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Added some Superscripts and Subscripts
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Finished off Superscripts and subscripts
+
+       Completed General Punctuation for Mono faces
+
+       Added some General Punctuation
+
+2008-10-15 Stevan_White
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       more Letterlike Symbols, Currency Symbols
+
+       * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Made some Combining Diacritical Marks for Symbols, Letterlike Symbols
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Added some General Punctuation
+
+2008-10-14 Stevan_White
+       * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Added double slanted hyphen, made General Punctuaton Supplement like
+       Serif's
+
+       * FreeSansBoldOblique.sfd:
+
+       Filled out Greek Extended
+
+       * FreeMono.sfd, FreeSerifItalic.sfd:
+
+       fixes to last 2 commits
+
+       * FreeSerifItalic.sfd:
+
+       Last character to General Punctuation
+
+       * FreeMono.sfd:
+
+       Built some Enclosed Alphanumerics (1-10)
+
+       * FreeSerif.sfd:
+
+       Copied in Daniel Johnson's changes to Cherokee.
+
+2008-10-12 Stevan_White
+       * FreeSerif.sfd:
+
+       Included Daniel Johnson's Cherokee glyphs.
+
+2008-10-05 Stevan_White
+       * FreeMono.sfd:
+
+       Further corrections to diaresis in Cyrillic -- legibility in small sizes
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd, FreeSerif.sfd:
+
+       Regularized placement of diaresis in Cyrillic
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Added same set of glyphs to Cyrillic Supplement
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Added some of the easier letters from Cyrillic Supplement
+
+2008-10-04 Stevan_White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSerifItalic.sfd:
+
+       Finished high Cyrillic range for MonoBold and MonoBoldOblique.
+       (Remaining: historic ranges, Cyrillic extensions)
+       Tweeked others.
+
+       * FreeMonoBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Serif*Italic: Added last Abkhazian letters to Cyrillic
+       MonoBold: tweek
+
+2008-10-03 Stevan_White
+       * FreeMono.sfd, FreeMonoOblique.sfd, FreeSerif.sfd, FreeSerifBoldItalic.sfd:
+
+       Mono: Some additions to historic letters
+
+       * FreeSerif.sfd:
+
+       Added some punctuation and combining numeric marks from
+       Cyrillic Extended B
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Various technical tweeks, mostly concerning recent additions.
+       Also did a bit more "Points too close" and "irrelevant control points".
+       Cyrillic millions redesign meant could not maintain use of refrences
+       for it.
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       More high Cyrillic
+       Included old Cyrillic millions combining mark in Sans, changed design
+       in Serif
+
+2008-10-02 Stevan_White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       More high Cyrillic
+
+       * FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBoldItalic.sfd:
+
+       More high Cyrillic glyphs
+
+       * FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       More glyphs in high Cyrillic.  Remains only some whose form I'm unsure
+       of in italic.
+
+       * FreeSerifBoldItalic.sfd:
+
+       More glyphs in higher Cyrillic range
+
+       * FreeSerifItalic.sfd:
+
+       Same process of tightening el, em, ge (but a P.S. to previous commit:
+       also did ya, ze for SerifBold.)
+
+       * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       BoldItalic:  Tightened up spacing on left of el, em, ge (could go
+       farther, but it is partly a problem with glyph design...
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       More additions to Cyrillic.  Finished SerifBold except for Nivkh
+       additions.
+       Used references on number combining forms.
+
+2008-09-30 Stevan_White
+       * FreeSerif.sfd:
+
+       Added four (obsolete) Chuvash letters to Cyrillic Supplement
+       - completing it.
+
+2008-09-29 Stevan_White
+       * FreeSerif.sfd:
+
+       Greek adjustments
+       Adjusted spacing of kappa slightly
+       Got rid of ears on Psi, following similar request for Upsilon.
+
+2008-09-28 Stevan_White
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Adding and fiddling with Spacing Modifiers and Combining Diacriticals
+
+       * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Revisions of several Combining Diacritical marks
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       A few Combining Diacriticals and Spacing Modifiers
+
+       MonoBoldOblique: Primarily filling out Spacing Modifier Letters
+       others: little fixes found along the way
+
+2008-09-27 Stevan_White
+       * FreeSerif.sfd:
+
+       Replaced Malayalam range with that from Rachana_04 found on
+       Swathanthra Malayalam Computing project page
+               http://savannah.nongnu.org/projects/smc/
+       Besides scaling and converting to cubic, performed much clean-up of
+       glyphs, added an r2 character, and re-named a bunch of characters.
+
+2008-09-22 Stevan_White
+       * FreeSerif.sfd:
+
+       Filled in as much of Phonetic Extensions as I could without artistic
+       abilities.
+       Note 1D48-9 are not references due to apparent FontForge bug, that says
+       scaled references go in wrong direction.
+
+       * FreeSerif.sfd:
+
+       Cleaup of some Bengali glyphs.
+       Note many of the ligatures remain very very messy.
+
+       * Makefile:
+
+       added more validations
+       made to work with GenerateOpenType
+
+       * FreeSerif.sfd:
+
+       Built two more easy Phonetic Extensions
+
+       * FreeSerif.sfd:
+
+       Built some Phonetic Extensions letters, those with middle tilde
+
+2008-09-21 Stevan_White
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Added lots of Spacing Modifier Letters and Combining Diacritical Marks.
+
+       * FreeMono.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSerif.sfd:
+
+       Wrote script to check if glyph encodings were in stated ranges, fixed
+       most discrepancies.
+       
+       There were a bunch of incompletely deleted characters in several faces.
+       
+       Sans: found several other problems in the process
+       # Tamil
+       Four slots labelled 0BDA-D have glyphs, not in Unicode.  also 0BE1
+       I think they are misplaced; added 0010 to each of them
+       
+       # Devanagari
+       Slot labelled U+093B is not in Unicode--can't find glyph: deleted
+       likewise 094F (may have been meant to be 0954)
+       0955, 0973-0976
+       
+       0954 should be a combining mark, but it appears on the wrong side of 0.
+       0971 was just wrong--made into simple dot.
+       0972 is also wrong--made my own Candra A.
+       
+       # Gujarati
+       Slots labelled 0AE4-5 are not in Unicode; seem not to belong at all.
+       Deleted.  2800 is a dup of 2790.  Deleted
+       
+       Serif: phillipine_double u1736 was misplaced
+       
+       A bunch of the Math Alphanumeric symbols are empty in the standard,
+       because they're represented elsewhere.  These should be deleted
+       First need to make style consistent with existing symbols.
+
+       * FreeSerif.sfd:
+
+       Applied patch from Daniel J
+       Remedies bug
+               FreeSerif: Missing glyphs with palatal hook
+               https://savannah.gnu.org/bugs/index.php?24298
+       Adding several letters to Phoenetic Extensions range U+1D80-BF
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Made four characters U+200C-F to be zero-width
+       Remedy to bug #23593: Mono 0-width chars: zero-width or space?
+               https://savannah.gnu.org/bugs/index.php?23593
+
+       * FreeSerif.sfd:
+
+       Made Mahjong tiles to take up less space using references
+       Cleaned up several validation problems
+
+2008-09-19 Stevan_White
+       * FreeSerif.sfd:
+
+       Added several Hebrew Alphabetic Presentation Forms (some easy ones), to
+       make its coverage the same as Serif Bold.
+
+       * FreeSerifBold.sfd:
+
+       Re-encoded.
+       Deleted several glyphs in Hebrew Alphabetic Presentation Forms that
+       didn't correspond valid Unicode
+
+       * FreeMonoBold.sfd, FreeSans.sfd, FreeSerifItalic.sfd:
+
+       Ran script to find mis-numbered glyphs.  Several were simply typos,
+       some offset by one.
+
+       * FreeSansOblique.sfd:
+
+       Numerous cases of glyphs in Private Use area incorrectly assigned
+       Unicode numbers and names.  Gave all -1 for Unicode and named like
+       "slot.XXXX".
+
+       * FreeSerif.sfd:
+
+       Adapted Mahjong Tiles from George Douros' Unicode Symbols font.
+
+       * FreeSerif.sfd:
+
+       Added Domino Tiles.  Domino outline is copied from George Douros'
+       Unicode Symbols, but the rest I preferred to do with references.
+
+2008-09-18 Stevan_White
+       * FreeSerif.sfd:
+
+       Adapted Mathematical Alphanumeric Symbols from George Douros' Unicode
+       Symbols font.
+
+       * FreeMonoBoldOblique.sfd:
+
+       This one got away from me--I don't know what I did.
+       Looks like some small contour edits.
+
+       * FreeSansBoldOblique.sfd:
+
+       Fixed one mis-numberd character in Latin Extended-B
+
+       * FreeSerifBold.sfd, FreeSerifItalic.sfd:
+
+       Fixed several mis-numbered characters.
+
+       * FreeSansBold.sfd:
+
+       SansBold: one Georgian letter with no name, one Zapf Dingbat was
+       unnumbered
+       ATT test shows a bunch of problems with Gurmukhi and 'blwf' table
+       indeed shows those letters at 0x10000+
+       Sans names them like uni0A30_uni0A4D.blwf: they are in range
+       ECC6 to ED06
+       
+       I meant to move this range into Private Use in last release, and
+       missed it.  So now it is moved, into same range as Sans.
+       
+       Both Sans and SansBold in nukt table for Gurmukhi have duplicate
+       entries for uni0A15 uni0A3C.  Deleted dups.
+
+       * FreeMonoOblique.sfd:
+
+       fixed a number of Unassigned Code Points in Greek Extended
+
+       * FreeSansOblique.sfd:
+
+       mis-numbered Combining Diacritics
+
+       * FreeSansOblique.sfd:
+
+       Several chars in Latin Extended hadn't been named.
+       One spurious letter in Letterlike Symbols
+
+2008-09-16 Stevan_White
+       * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd:
+
+       Lots of additions: unless otherwise noted, they are from George Duros'
+       fonts Analecta, Music, and Unicode (haven't got final confirmation of
+       the eligibility of these glyphs, so this is just for testing.)
+       
+       Added some combining marks, fiddled a bit.  In both Serif & Mono, tried
+       to get a key symbol characters to fit inside the key combining mark
+       
+       Serif
+       Got rid of ears on Upsilon
+       Added:
+               # Gothic
+               # Western & Byzantine Musical Symbols
+       
+               # Misc Symbols, Misc Technical Symbols (drew many myself)
+               # Supplemental Symbols and Arrows
+       
+       Mono
+       Added:
+               # lotsa Misc Technical Symbols
+               # OCR Symbols
+               # drew many Supplemental Symbols and Arrows, Misc Technical
+       
+       Sans
+       Added   # Phoenecian
+       Made a few Letterlike Symbols; Made Re and Im to be sans-serif.
+
+2008-09-11 Stevan_White
+       * FreeSerif.sfd:
+
+       Removed pointless entries from Latin kern table
+       
+       Tidied points in Sinhala
+
+2008-09-07 Stevan_White
+       * FreeSerif.sfd:
+
+       Tidied up Tamil ligatures EEA8-EEAB to fix TT build warning
+               "MonotonicFindAlong: Never found our spline."
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, Makefile:
+
+       
+       Added APL characters to FreeMono (why?...)
+       
+       Fixed several last-minute problems, including
+       
+       Serif: Tweeked GPOS mark table for Cyrillic
+       Sans: Added a GPOS table for Cyrillic (but several diacritics missing)
+       
+       Serif, Mono: tweeked some bugs in extensible brackets & integrals
+       
+       Serif: Vietnamese o circumflex: accent was a bit high. fixed.
+       
+       MonoBoldOblique OTF build
+               uni213b intersects self
+       
+       Generation of TT fonts complains about several things to stderr,
+       including:
+       
+       SerifBold: "There exists a 'fpgm' code that seems incompatible with FontForge's. Instructions generated will be of lower quality. If legacy hinting is to be scrapped, it is suggested to clear the `fpgm` and repeat autoinstructing. It will be then possible to append user's code to FontForge's 'fpgm', but due to possible future updates, it is extremely advised to use high numbers for user's functions."
+       Probably has been there since I first copied the TT instructions in. 
+       Just repeated the copying process carefully, and the warning went away.
+       
+       Serif:  "FindMatchingHVEdge fell into an impossible position"
+               fixed a bunch of point too close
+       
+       REMAINING PROBLEM in Serif TT build
+               "MonotonicFindAlong: Never found our spline."
+                       fixed several bad TT matrices-- there are several more
+                       fixed many "control points too close" no luck
+
+2008-09-03 Stevan_White
+       * FreeSans.sfd, FreeSansOblique.sfd:
+
+       Added/corrected some Misc. Symbols by copying from Serif.
+       Note this is only a stopgap solution.  Want real sans-serif symbols.
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Added minimal Miscellaneous Symbols: card suites and some musical notes.
+       Note not happy with shapes...some I just drew.  Sans isn't really sans.
+       
+       Fixed one APL symbol in Mono so it verified in OTF version
+
+2008-08-31 Stevan_White
+       * FreeMono.sfd:
+
+       Built set of APL symbols.
+
+2008-08-30 Stevan_White
+       * FreeSans.sfd:
+
+       Un-linked references in uni02B2 and uni02B5, because when validating the
+       TrueType version, FontForge gave an error "is drawn in wrong direction".
+       I suspect a bug in FontForge.  Other similar glyphs make no errors.
+
+       Fixed missing extrema in TrueType.
+       These were the last cases being reported by validate in all the faces.
+
+       * FreeSerifItalic.sfd:
+
+       fixed last missing extrema in TrueType
+
+       * Makefile:
+
+       restructured validation to look in a directory
+
+       * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd:
+
+       Fixed missing extrema in TrueType versions
+
+2008-08-15 Stevan_White
+       * FreeSans.sfd:
+
+       Same problem with uni0A83 as with bn_llikaar.  Just made zero-width.
+
+2008-08-14 Stevan_White
+       * FreeSans.sfd, FreeSansOblique.sfd:
+
+       Glyph bn_llikaar, U+09E3 BENGALI VOWEL SIGN VOCALIC LL,
+       has right bound positioned far into the negative.  Causes a warning in
+       FontForge when opening OTF version.
+       Comparing with other fonts supporting Bengali, found no others that
+       do this.
+       Serif makes glyph width 0 (which sounds right according to Unicode)
+       and puts glyph wholly to left of 0.  But, I haven't found this letter
+       in text anywhere.  I wonder if it is really used in writing.
+
+       * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Further TrueType validation fixes. 
+       Sans still has two glyps in wrong direction.
+
+       * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Fixed more TrueType problems...all missing extrema in TTF validation
+
+2008-08-13 Stevan_White
+       * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       fixed all the TrueType validation problems of type "intersects itself"
+       and all but two of the "wrong directions", as well as a lot of
+       "missing extrema".  But there remain hundreds of missing extrema in the
+       TrueType version.
+       Also, bn_llikaar in Sans and Oblique still has a problem in OTF version.
+
+       * FreeMono.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd:
+
+       Made .ttf files to validate.  Other faces have many more problems still.
+
+2008-08-12 Stevan_White
+       * FreeMonoOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Continuing to make OTF versions validate.
+       
+       * FreeMonoOblique.sfd:
+               lots of missing points at extrema
+       * FreeSerif.sfd:
+               12 wrong directions, 1 missing extrema
+       * FreeSerifItalic.sfd:
+               many missing points at extrema, 1 self-intersecting
+       
+       What was wrong: in several oblique cases, an already-italic glyph was
+       made more italic, thereby fouling up extrema (although why it passed
+       validation in the SFD I don't know).  Some glyphs were
+       overly-complicated with many near points.  Cleaned up, rounded to int.
+       
+       Remaining problem: OTF FreeSansOblique FreeSans. one Bengali glyph in
+       each whose advance width and htmx don't match.
+       
+       Moral of story: validate the OTF and TTF versions too before a release.
+
+       * FreeSansOblique.sfd:
+
+       Reverse a mistake from last commit: somehow this file was converted to
+       quadratic, or something.
+
+2008-08-11 Stevan_White
+       * FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Found that SFD files that validated produced OpenType files that don't.
+       These represent the easy fixes.  Some were result of conversion to
+       quadratic; some shouldn't have validated in the SFD...
+       
+       * MonoBoldOblique: uni0250 missing pts at extrema [reference glyph rotated...]
+       * Sans:            uni0AC4 wrong direction [simplified, rounded to int]
+       * SansOblique:     uni01EA wrong direction [rounded to int]
+       * SerifBold:       uni023f wrong direction [round to int]
+       * SerifBoldItalic: uni0245 missing pts at extrema [ungrouped ref, added extrema]
+
+2008-08-06 Stevan_White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd:
+
+       Re-set font metrics, which were somehow making uneven vertical spacing.
+
+2008-06-22 Steve White
+       * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Made to validate
+
+       * ranges.py:
+
+       Brought more into line with OpenType
+       Added some ranges
+       Fixed bug with ranges outside of font
+
+       * CREDITS:
+
+       3 new ranges
+
+       * FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Cyrillic: tweeked accents for consistency, and for readability in small
+       sizes.
+
+       * FreeSerif.sfd:
+
+       Thanna range: tweeking
+
+       Thaana range: Scaled up by about 15%, raised by 100EM, tightened
+       some of the diacritics to get inside 900 to -300 EM limits.
+
+       * FreeSans.sfd:
+
+       Added Old Persian and Ugaritic from MPH2BDamase font.
+
+2008-06-21 Steve White
+       * FreeSerif.sfd:
+
+       Added Tai Le range adapted from MPH2BDamase font.
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Added some ancient Greek numerals from Tempora to high Unicode area,
+       (partly just to show it can now be done.)
+
+       * FreeSerifItalic.sfd:
+
+       Couple of tweeks putting glyphs above -300EM.
+
+       * FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Surgery to Thai letter 'tho than', u+0e10, to push it above -300 EM.
+       This makes Thai range completely between 900 and -300 EM.
+
+       * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Many auxilary characters (esp. for Malayalam, Bengla, and Tamil)
+       representing ligatures and alternative forms without their own Unicode,
+       were moved from
+       ranges above 0xFFFF (which ought to have been slots for other defined
+       Unicode ranges) into the Private Use area.
+       
+       In Serif, I segregated the scripts, in Sans it was hard to see where one
+       began and another ended, so I moved them en masse.
+       
+       Note several problems with wrongly-named characters:
+       I already re-named glyph570 and glyph582.
+       But there are others with names starting with A...
+
+       * FreeSansBold.sfd, FreeSansOblique.sfd:
+
+       Fixed (I hope the last) problem with scripts in lookups
+       Find Problems -> ATT (all selected) finds multiple issues,
+       
+       * FreeSansBold.sfd:
+       In addition to script 'guru', added 'gur2' to the scripts for these
+       lookups
+               'nukt' Nukta forms in Gurmukhi
+               'blwf' Below Base Forms in Gurmukhi
+               'pstf' Post Base Forms in Gurmukhi
+               'blws' Below Base Substitutions in Gurmukhi
+               'abvs' Above Base Substitutions in Gurmukhi
+               'psts' Post Base Substitutions in Gurmukhi
+       
+       * FreeSansOblique.sfd:
+       In addition to script 'beng', added 'bng2' to the scripts for the lookup
+               'half' Half Forms in Bengali
+       
+       Moreover, the lookup
+               'aalt' Access All Alternates in Latin
+       contains only Bengali letters.
+       Re-named as Bengali, made to work on beng, bng2 scripts
+
+2008-06-20 Steve White
+       * FreeSerif.sfd:
+
+       Scaled Sinhala range.
+       Remedies bug #23656: Sinhala letters over-sized
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Mostly messing with Greek Extended accents again.
+       re-positioned ypogegrammani on advice of Alexey Kryukov
+       Put prosgegrammani beneath main letters in Mono, to make narrower glyphs
+       Implemented more distinction between tonos and acute.
+
+2008-06-19 Steve White
+       * FreeMonoBoldOblique.sfd:
+
+       Completed fit of Mono to 800 to -200 EM.
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd:
+
+       Set Metrics to recommended values
+
+       * FreeMonoOblique.sfd:
+
+       Now Mono Oblique, as well as roman and Bold, are within 800 to -200 EM.
+       Just BoldOblique to go.
+
+       * FreeMono.sfd, FreeMonoBold.sfd:
+
+       More toward fitting to 800 to -200 EM.
+       Basically, reduced Georgian by 92%.
+       Also made an over-all offset, so Georgian is somehow centered (Bold...I
+       guess I already did this in roman).
+       Want to also do an emboldening to make stroke like rest of font, but
+       current FontForge has a nasty crash that loses data on this function.
+
+       * FreeMono.sfd:
+
+       In effort to make fit in 800 to -200 EM,
+       Scaled Georgian by 92%, centered on 600 wide box.
+       Next: Embolden a bit.
+
+2008-06-18 Steve White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Toward making all glyphs lie between -200 and 800 EM.
+       Numerous small changes, especially raising descenders of some Hebrew
+       letters.
+       Georgian remains a problem
+
+2008-06-13 Steve White
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Moved prosgegrammeni up to baseline,
+       (and then moved all references down to baseline)
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Added Control Picture "blank" to all faces.
+       Switched U+0222-3 from TemporaLGCUni
+
+2008-06-11 Steve White
+       * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       More fiddling with Greek Extended accents
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Tweeks to accents etc in Greek Extended and Cyrillic
+
+2008-06-10 Steve White
+       * FreeSerifBold.sfd, FreeSerifItalic.sfd:
+
+       Fixed a few big horizontal spacing problems
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Implemented TemporaLCGUni glyphs in Cyrillic ranges.
+       Added a breve_cyrillic for the moustache breve mark.
+
+2008-06-08 Steve White
+       * FreeSerif.sfd:
+
+       Replaced most of Cyrillic range with TemporaLGCUni.
+       Remodelled many of the derived Cyrillic characters after these.
+       Fiddled globally with spacing of small letters.
+       Unclear on diacritics 485-6, unhappy with breve.
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Started implementing TemporaLCGUni in Greek ranges.
+       
+       Replaced 3DC-3E1 from Tempora, because I thought they looked nicer and
+       more like the other existing FreeFont glyphs.
+       Replaced 3DA-B from Tempora, because they look more like Unicode
+       samples, and nicer.
+       Added 03f3-4, 03F7-F.
+       Prefer my own lunate epsilon.
+       Replaced Phi and Omega from Tempora.
+       These plainly fit the other FreeFont glyphs better than the origninals.
+       (How did this happen?)
+       
+       In bold, replaced U+03D7
+       
+       Copied lbbar u+2114
+
+       Small italic greek--replaced most except phi, psi, omega
+       
+       Based on new information, broke the identification of oxia with Latin
+       acute.
+
+2008-06-07 Steve White
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Efforts to control heights of characters
+
+2008-06-06 Steve White
+       * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Made to validate
+
+2008-06-05 Steve White
+       * FreeSans.sfd:
+
+       Fixed undefined character in kerning classes
+
+2008-06-04 Steve White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       tweeks and additions to General Punctuation
+
+2008-06-03 Steve White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansOblique.sfd:
+
+       Completed/tweeked Number Forms
+
+       * FreeMono.sfd, FreeSerif.sfd:
+
+       Added some Miscellaneous Technical symbols
+
+2008-06-02 Steve White
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Tweeks...mostly Letterlike
+
+2008-06-01 Steve White
+       * FreeMono.sfd, FreeSerif.sfd:
+
+       Added Box Drawing characters to Serif.
+       Tweeked a glyph in Mono
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Added several glyphs to Letterlike Characters
+
+2008-05-31 Steve White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Validation pass
+       
+       SansOblique and SansBoldOblique had validation problem with BlueValues
+               Private Dictionary
+               Elements in BlueValues/OtherBlues array are disordered
+               Elements in BlueValues/OtherBlues array are too close
+               (Change BlueFuzz)
+               StemSnapV does not contain StdVW value.
+       So I ordered the array, and based on other slanted fonts,
+       removed StemSnapV.
+       
+       Note however, I still think the two top Blues lines are too close
+       But I don't even know what the second-to-top line is meant to do.
+
+       * FreeSerif.sfd:
+
+       Added to Block Elements, Geometric Shapes
+       Made to validate
+
+2008-05-29 Steve White
+       * FreeMono.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Looking at special symbols.
+       Drew several Miscellaneous Symbols in Mono and Serif
+       > Completed/corrected planetary symbols, added Dice,
+       some other easy ones
+       > Completed Dingbats in Serif (using URW Dingbats)
+       Added some Block Elements to Serif
+
+2008-05-26 Steve White
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       More changes stemming from J. Poon's report.
+
+2008-05-25 Steve White
+       * FreeSerif.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Height surgery on SerifBoldItalic.
+       More fiddling with accents in others.
+
+       * FreeSerifItalic.sfd:
+
+       More height surgery.  Only a few left in Benglai and Thai
+
+       * FreeSerifBold.sfd:
+
+       Re-applied surgery to make glyphs between 900 and -300EM
+
+       *** Regression
+       Inadvertently un-linked all references in SerifBold in r1.83.
+       This reverses that error (but also un-does the surgery mentioned there)
+
+       * FreeSerifBold.sfd, FreeSerifItalic.sfd:
+
+       Applied surgery to make Latin letters go under 900EM. 
+       One exception yet...
+
+2008-05-24 Steve White
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Serif: much fiddling with accents in Latin ranges.
+       Re-thought some glyphs (there are still a few messy ones, especially
+       in bold)
+       Checked horizontal spacing...fixed a number of problems.
+
+2008-05-23 Steve White
+       * FreeSansBold.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Made Latin Extended-B coverage consistent across Serif; cleaned up some
+       glyphs
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Filled more of General Punctuation in Sans and Serif
+       Made all agree on coverage of Latin Extended Additional
+
+2008-05-22 Steve White
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Added Latin Extended Additional to SansOblique.
+       Made Latin Extended Additional coverage consistent across Sans, B, I
+       Made Latin Extended-B coverage same in SerifBold.
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSansBold.sfd:
+
+       Mono* made Latin-B coverage consistent across faces
+
+       * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Made set of Latin Extended-B consistent across Sans faces
+
+       * FreeSans.sfd, FreeSansBold.sfd:
+
+       More filling in General Punctuation
+
+       * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Another bunch of J. Poon's reports
+       also, filling in some Combining Diacriticals, Spacing Modifiers, and
+       General Punctuation in bold faces
+
+2008-05-21 Steve White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Mucking about with mark tables in Thai (Serif)
+       Other faces: Making changes from J. Poon's report
+
+2008-05-20 Steve White
+       * CREDITS:
+
+       Mark Williamson
+       Jacob Poon
+
+       * Makefile:
+
+       added tests target
+
+2008-05-18 Steve White
+       * ranges.py:
+
+       Put table explanation back in
+
+       Improved behaviour for high Unicode
+
+       * FreeSans.sfd:
+
+       Revision of kerning
+
+       * FreeSerif.sfd:
+
+       Made Latin kerning a little more reasonable:
+               reduced many excessive kerns (some had letters apparently
+                       overlapping, which shouldn't happen)
+               made kerns increment by 5EM for ease of reading
+               got rid of kerns too small to be seen
+
+       * FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSerifBold.sfd:
+
+       Made to verify
+
+2008-05-13 Steve White
+       * FreeSerif.sfd:
+
+       Made to validate
+
+       * FreeSerif.sfd:
+
+       Gurmukhi: filled range in Serif, taking glyphs from the original
+       Punjabi font by Hardip Singh Pannu
+       http://members.aol.com/hspannu/punjabi.html   (file pb_win95.exe)
+
+2008-05-12 Steve White
+       * FreeSans.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Hebrew, basic.  Some faces missing punctuation marks, added.
+
+       * FreeMono.sfd, FreeSans.sfd:
+
+       Armenian: Sans tried to make verticals and horizontals of more uniform
+       width both, finddled with punctuation
+
+       * FreeMonoOblique.sfd:
+
+       made to validate
+
+       * FreeMonoBold.sfd:
+
+       made to validate
+
+       * FreeSans.sfd, FreeSansBold.sfd:
+
+       Armenian in Sans: regularized letter spacing
+
+       * FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd:
+
+       Armenian: fill out ranges and clean up
+       SansBold especially had a lot of incorrect references.
+       Now all the ranges with Armenian at least share the same set of
+       characters.
+
+       * FreeMono.sfd:
+
+       Fixed glyph with wrong width.
+
+2008-05-11 Steve White
+       * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifItalic.sfd:
+
+       1) made to validate
+       2) Mono: copied in Spacing Modifier Letters (glyphs not yet named)
+       3) SerifItalic: Filled in General Punctuation
+
+       * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Made to validate, and pass all other FontForge tests.
+       Expedient: rounded everything to int
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Made to have the same Greek Symbols,
+       Made to validate
+
+       * FreeSans.sfd, FreeSansBold.sfd:
+
+       Made Greek Symbols as full as rest of Sans.  Changed a name in Sans.
+
+       * FreeMonoOblique.sfd:
+
+       Made Greek as full as other faces
+       Made to validate
+
+       * FreeSansBold.sfd:
+
+       Deleted seven orphaned Arabic characters; looks like somebody started,
+       didn't get very far, putting Arabic in bold.
+
+       Deleted orphaned Arabic glyph from Arabic Presentation forms-B
+
+       * FreeSerifBold.sfd:
+
+       Deleted the single Arabic character: it was clearly there by mistake.
+
+       * FreeSansOblique.sfd:
+
+       Made Greek Symbols as full as rest of Sans
+
+       Tweeks to Armenian
+
+       Comment from previous commit of FreeSans was meant for FreeSansOblique.
+       In FreeSans, only tweeked a few letters during putting more characters
+       in this face.
+       
+       Filled in Spacing Modifier Letters, increased General Punctuation.
+
+       * FreeSans.sfd:
+
+       Filled in Spacing Modifier Letters, increased General Punctuation
+
+       * FreeMono.sfd:
+
+       Made Armenian as full as other roman faces.
+
+       Completed Spacing Modifier Letters
+       Added a couple of Greek Punctuation
+
+       added more Spacing Modifier Letters
+
+2008-05-10 Steve White
+       * FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Did same process of scaling and sizing for Thai in Sans as in Serif.
+       Added mark tables to Sans.  Improvement, but there are questions...
+
+       * FreeSans.sfd:
+
+       Tidied some Gurmukhi glyphs, validated.
+
+       Deleted ranges for Oriya, Kannada, on account of
+       1) they only contained a subset of the consonant glyphs of the scripts,
+          few if any vowels, and had no ligature lookups as required
+       2) Kannada was based on the Akurti fonts, which have copyright issues.
+       
+       See
+       bug #23225: Oriya range only partial
+       bug #23224: Kannada range only partial
+
+       * FreeMonoBoldOblique.sfd:
+
+       Made metrics like rest of Mono
+
+2008-05-09 Steve White
+       * ranges.py:
+
+       More info on range intervals
+
+       * FreeSerif.sfd:
+
+       Deleted Telugu range.
+       It didn't represent a complete writing system for the language.
+       
+       See notes at https://savannah.gnu.org/bugs/index.php?23202
+       Serif: Telugu range missing many characters; many wrong
+
+       Got a copy of the original Tikkana font,
+       Copied in remaining consonants and vowels that I could find there.
+       I think one vowel 0C55 is missing according to unicode).
+       Strangely, the Telugu digits are alo missing.
+       In Tikkana, the default "checkmark" structural mark is missing from many
+       consonants, according to Unicode, but is a separate glyph.  I put
+       the checkmark on.
+       This, and scaled up by 150% and cleaned up intersecting glyphs and
+       many unnecessary points.
+
+2008-05-08 Steve White
+       * FreeSerif.sfd:
+
+       Filled out Telugu consonants.
+       Vowels still need to be done
+
+2008-05-07 Steve White
+       * FreeSerif.sfd:
+
+       Operated on Latin glyphs with stacked accents to make them fit under
+       900EM.
+       Scaled Telugu bu 150%.
+
+2008-05-06 Steve White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeSansBold.sfd, FreeSerif.sfd:
+
+       Corrected further fontforge "find problems"
+       Added some math characters to FreeSerif
+
+2008-05-05 Steve White
+       * FreeSansBold.sfd:
+
+       Made to validate, and fixed bad TT transformations
+
+2008-05-04 Steve White
+       * FreeMono.sfd, FreeSerif.sfd:
+
+       Mainly TeX additions trying to satisfy Markus Kuhn's TeX-as-Unicode page
+
+       * FreeMono.sfd:
+
+       Adjusted heights of extensible brackets
+
+       Fixed problems with extensible brackets, thanks to Markus Kuhn's page
+       http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt
+
+       * ranges.py:
+
+       fiddled with ranges, doc
+
+       made some ranges more correct?
+
+       fixed some bugs in ranges
+       better error reporting
+
+       Got rid of Unicode 1.1 references
+
+       made to use OpenType table
+
+       * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd:
+
+       made to validate
+
+2008-05-03 Steve White
+       * FreeMono.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Removed digits from Private Use Area.
+       See bug 23050.
+
+       * FreeMono.sfd, FreeSans.sfd:
+
+       Completed General Punctuation
+
+       * FreeSans.sfd:
+
+       Completed IPA Extensions
+
+       * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd:
+
+       More work on Superscripts and Subscripts, Spacing Modifiers.
+       Sans is now complete in both.
+       Added Pfennig to Sans and Mono.
+
+       * ranges.py:
+
+       Restructure text output
+       Rearrangement and cosmetic ...except I had broken it.  now fixed
+       Seems to be in a useful form at this point.
+       More docs, date
+
+       * FreeSerif.sfd:
+
+       Added a hand-drawn old German Pfennig to Currency Symbols
+
+       * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Further additions to General Punctuation, Super and Sub Scripts,
+       Spacing Modifiers, etc.
+
+2008-05-02 Steve White
+       * FreeSans.sfd:
+
+       additions to Spacing Modifiers, IPA
+
+       * FreeSerifItalic.sfd:
+
+       Shortening stacked accents to maintain readability when clipped
+
+2008-05-01 Steve White
+       * FreeSans.sfd:
+
+       Additions to Spacing Modifiers and changes to Combining Diacritics
+
+       * FreeSerif.sfd:
+
+       Made sure all the half rings in Combining Diacriticals and Spacing
+       Modifiers were really half rings  (J. Poon had complained about this)
+
+       Filled out General Punctuation
+       Some work on Spacing Modifiers
+
+       Filled out Mathematical Operators
+               still needs lots of work
+       Made to validate
+
+       Filled out Latin Extended B
+       Added some letters with curls to Latin Extended B
+       More fiddling with Latin Extended B accents
+
+2008-04-30 Steve White
+       * FreeSerif.sfd:
+
+       Added Hanunóo script, with characters based on those in
+       font MPH2BDamase, on request from the maintainer of that font,
+       http://packages.debian.org/sid/ttf-mph-2b-damase
+       
+       Glyphs are simple vector strokes.  Could be a little more uniform.
+
+       Added Buginese script "Lontara", with characters based on those in
+       font MPH2BDamase, on request from the maintainer of that font,
+       http://packages.debian.org/sid/ttf-mph-2b-damase
+       
+       Note the glyphs are pretty rough, clearly a digitization of handwriting.
+       I just cleaned them up, and corrected discrepancies with Unicode,
+       and compared with some pictorial samples of the script I could find.
+
+2008-04-29 Steve White
+       * ranges.py:
+
+       Improved look a lot--still unhappy with some ranges
+       OS/2 seems sometimes bang-on, sometimes unrelated to anything (including
+       fontforge's OS/2 listing)
+
+       * FreeSerif.sfd:
+
+       Much fiddling with Tamil range.
+       First scaled to 78% (avoiding the references)
+       This gets it in the ballpark height-wise.  [A bit taller than the Latin
+       letters, but the stroke is narrower, but then the glyphs are busier.]
+       Then had to re-align combined references, the trickiest being the
+       halants.
+       Checked with other fonts with Tamil text.
+
+2008-04-28 Steve White
+       * FreeSans.sfd, FreeSerif.sfd:
+
+       Cleanup of control points in Arabic and Thaana
+
+       * FreeSerif.sfd:
+
+       Cleanup of missing extrema in Arabic and Thaana
+
+       Many changes to Thai, trying to make the script fit between some lines,
+       so accents won't get clipped, etc.
+       Also, stroke weight was heavier than that of Latin.
+       
+       Scaled whole thing by 93%.
+       Shrank the tallest letters 0E42-4 to get them under 900EM.
+       Shaved off top of maiek.
+       Fiddled with positioning of all accents.
+       Made positioning tables for accents.
+               Note: unclear these are working correctly
+       
+       Fixed a bug having to do with character replacements for characters
+       named 'ng' and 'nj'; these names had been taken on by other characters.
+       
+       Made to validate
+       
+       Unicode positions of two Cyrillic Extended characters were switched.
+       Fiddled with a couple of Cyrillic combining diacritics
+
+2008-04-27 Steve White
+       * FreeSans.sfd:
+
+       bugfix: a left harpoon mysteriously appeared to the left of letter p!
+
+2008-04-26 Steve White
+       * FreeMono.sfd:
+
+       Made to validate
+
+       * FreeSans.sfd:
+
+       Made to validate
+
+       Toward J. Poons report
+       Made 032B more like proper double-arches (and distinct fro 033C seagull)
+       Made 032b more like a seagull
+
+       * FreeSans.sfd, FreeSansBold.sfd:
+
+       Sans: fiddling with widths and terminators of math symbols,
+               toward J. Poon's report
+       R & B: removed u+2741 because it didn't match the Unicode description
+
+       * FreeMono.sfd:
+
+       Extensible parenthesis symbols weight/terminators
+       Toward bug # 23064: https://savannah.gnu.org/bugs/index.php?23064
+       Rounded a bunch of terminators
+
+2008-04-22 Steve White
+       * FreeSerif.sfd:
+
+       Small alignment problem in Greek Extended
+
+       One more tweek to spacing in Cyrillic Extended
+
+       Corrected spacing in Cyrillic Supplement
+
+       Added Cyrillic Supplement letters for
+       Enets, Khanty, Chukchi, Itelmen, Mordvin, Kurdish, Aleut
+
+       Added Cyrillic letters for Nivkh (completing Cyrillic range)
+       More tightening of accents in Latin Extended.
+
+       * FreeSans.sfd:
+
+       Fiddled with math--consequences of changing the "similar" operator
+
+       More tightening of accents
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Adjustments to h and k with caron and cedilla in Latin A and B
+
+       * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd:
+
+       FreeSerifBold: deleted 3 dotted Hebrew letters in Private/Corporate use
+       (E801-3).  They weren't ligatures or in any other lookup, and they
+       weren't present in FreeSerif.
+       
+       * FreeSansBold:
+       Unlinked and deleted F6C3, which called itself commaaccent.
+       Made some new spacing and non-spacing accents to make up for it.
+       
+       * FreeSansBoldOblique: 
+       Made references of many Latin Extended.
+       Also corrected several wrong ones.
+       
+       * Freeserif: 
+       Re-named commaaccent
+
+2008-04-21 Steve White
+       * FreeMono.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd, FreeSerifBold.sfd:
+
+       Deleted Hiragana and Katakana ranges, as discussed on bugs list.
+       Cleaned up some encoding issues, unnamed glyphs
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Roman: added 'sine' -- not beautiful, but I liked drawing it
+       All: Made special lookup for Dutch ligatures 'IJ' and 'ij'
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Roman: ffi etc Latin ligatures from 'liga' to 'dlig' (these weren't
+       really ligatures anyway, and only looked very bad when used. 
+       Retain for condensed type.
+       Others: deleted Latin 'liga' table altogether
+       BoldOblique : added j to ij ligature
+
+       Toward J. Poon's Report:
+       Except for issues of terminators not always vertical or horizontal,
+       and a few things that were too hard or I was unsure of.
+
+2008-04-20 Steve White
+       * FreeSerif.sfd:
+
+       Futzing with accents in Latin Extended Additional and Latin Extended-B
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Added primemod character, referenced by Greek number sign
+
+       * FreeMono.sfd, FreeMonoOblique.sfd:
+
+       Following J. Poon's report, disconnected NJ (01CA)
+
+2008-04-19 Steve White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       First pass throught J. Poon's bug list.
+       See bug reports for details.
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Made underscore slanted in Oblique faces, made all to be width of
+       space character.
+       Towards J. Poon's report.
+       Disturbed that xterm and some other apps put small space between
+       characters when none was called for.
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeSans.sfd, FreeSansOblique.sfd:
+
+       Corrections on Currency Symbols
+
+       * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       More corrections, additions to Currency Symbols
+
+       * FreeSans.sfd, FreeSerif.sfd:
+
+       Filled out and corrected Currency Symbols
+
+2008-04-18 Steve White
+       * FreeSans.sfd, FreeSerif.sfd:
+
+       Adjustments to Combining Marks for Symbols
+       Additions to range in Sans, and re-structured its marks table so that
+       "middle" can apply to any range
+
+       * FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Made reference between combining koronis and lenis of Greek Extended.
+       In Serif, re-worked combining marks lookup tables, added anchors in 
+       Latin, moved so without marks they work in kedit (but now I'm doubting
+       kedit does a reasonable thing...what is a better application for
+       testing this?)
+
+2008-04-16 Steve White
+       * FreeSerifItalic.sfd:
+
+       Adjusting of spacing and accents in Greek
+
+       * FreeMono.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd:
+
+       Much futzing with Greek letter spacing and accents.
+       Added lenis to FreeMono.
+
+       * FreeMono.sfd, FreeSerif.sfd:
+
+       Adjusted spacing of dots of Greek dieresistonons in Serif
+       Whipped up something for Greek kappascript in Mono (could use revision)
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Raised dots on double-dotted Cyrillic i, to match that of i and j.
+
+2008-04-14 Steve White
+       * FreeMono.sfd:
+
+       Corrected 27e6-7 "white bracket"
+       Note it is probably a FontForge bug these symbols aren't showing up.
+       FontForge thinks they are in Supplemental Arrows, but they should be
+       in Supplemental Math-A
+
+       Named some Greek characters
+
+       * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd:
+
+       Spacing of some Cyrillic characters
+
+2008-04-13 Steve White
+       * FreeSerif.sfd:
+
+       Some fiddling with accents
+       'yogh' was too wide
+
+       * FreeSansBold.sfd, FreeSansOblique.sfd:
+
+       Character spacing was chaos--tried to improve.  BoldOblique also needs
+       it.
+
+       * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd:
+
+       Completed the fix of bug #12798, Greek glyphs with accents to side
+       Much mucking with accents here, and fixed a few things that were just
+       wrong.
+
+2008-04-12 Steve White
+       * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Made Mono curly quotes "bent"
+
+       * FreeMono.sfd:
+
+       More fiddling with Greek accents
+       Made quotes "bent"
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Adjustments on Greek diaresistonos etc.
+       Adjustments in Serif on combining marks for symbols
+
+       * FreeSerif.sfd:
+
+       More additions to Combining marks for Symbols
+
+       Additions to Combining marks for Symbols -- now mostly full.
+       Lots of adjustments to middle anchor point in Latin to make big circle
+       (nearly) encircle preceding latter
+
+2008-04-11 Steve White
+       * FreeMono.sfd:
+
+       Bugfix:
+       Had indroduce a glyph of width other than 600, making kterminal not
+       recognize it as a monospace font.
+
+2008-04-10 Steve White
+       * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       More messing with accents.
+       Further to bug #12798, Greek glyphs with accents to side
+       Much messing with glyphs in Greek Extended range
+
+2008-04-09 Steve White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSerif.sfd:
+
+       Revisited Latin-1 and Latin-A accents.
+       Glyph B7 was called "periodcentered", but Unicode callse it Mid Dot,
+       and the description doesn't refer to the period.  I made it like the
+       dot accent.  throughout, and referred L-dot to it.
+       
+       Also double-checked "commaaccent" characters (some in Unicode called
+       cedilla, but the Unicode example shows a comma...mystery)
+       
+       Also the funny IPA upside-down f often had two bars, incorrectly.
+       
+       To do:  go through rest of Serif, and Sans
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Completed re-structuring of stacked Latin accents in Mono.
+       Also: lots of associated adjustments of Greek Extended accents.
+       (Trying to at least center extremely wide characters on their box)
+       Repaired some victems of "find overlaps" sweeps
+       Worked on glyphs with apostrope/comma parts
+       Corrected a few wrong glyphs.
+       
+       Trying out a "bent quotes" solution to making primes distinct from
+       quotes.
+
+2008-04-08 Steve White
+       * FreeMonoOblique.sfd:
+
+       Toward reducing overall height
+       Did similar process as for Mono, fixing a few errors along the way.
+       Also the Greek Extended range was very messed up vertical and
+       horizontally.
+       Horizonal spacing of the heavily accented Greek is a real problem in
+       Mono...
+       To do:
+               revisit "commaaccent" characters in all faces: do some have 
+               edillas?
+               some Hebrew glyphs are a little low
+               Georgian generally is way out of bounds
+
+2008-04-07 Steve White
+       * INSTALL:
+
+       Various updates and corrections, tweeked formatting
+
+       * FreeMonoBold.sfd:
+
+       Tweeking of accents
+
+2008-04-06 Steve White
+       * FreeMono.sfd, FreeMonoBold.sfd:
+
+       Re-worked accents in FreeMonoBold.sfd to make Latin ranges lie between
+       800 and -200 EM, as with FreeMono.
+
+       * FreeMono.sfd:
+
+       Latin Extended ranges: Implemented new policy of shortening the letters
+       of the characters with the highest-stacked accents.
+       
+       At this point all the Latin glyphs lie betweeen 800 and -200 EM.
+       
+       Also checked for readability of all the Latin extended letters in xterm.
+       (Issue: it chops letters outside their bounding boxes; many accents had
+       been a bit outside.  Made sure that if they were chopped, they were at
+       least still recognizable.)
+
+2008-04-05 Steve White
+       * FreeMono.sfd:
+
+       Following exchange about Mono on freefont-bugs with Joe Wells, who
+               > doesn't like the curly quote marks
+               > wants combining diacritics to work
+               > wants tight line spacing
+       
+       Trying to reduce font height:
+       > exclamdown was below -200
+       > Throughout Extended Greek, ypogegrammeni were too low.  Shortened
+       glyph, and raised all references.
+       > Lots of messing with Latin Extended ranges to make glyphs mostly
+       fit into 800 height.  Mostly succeeded.  A couple will get chopped.
+       > Messed with "commaaccent" glyphs, which were very low
+       > Cyrillic 04B1 had a tail that was incorrectly low
+       > Much mucking with Georgian range.  Moved up by 95 (read that Georgian
+       is written as though centered between two horizontal lines, rather than
+       as sitting on a baseline)  There are still a few very high glyphs.
+       
+       FontForge U+0122 called Gcommaaccent, glyph looks like that, but
+       Unicode says it's Gcedilla.  Made the ones called cedilla by Unicode
+       to be cedillas
+       
+       Note bug in Unicode: standard for 0122, 0123, 0136, 0137, 013B, 013C,
+       0145, 0146, 0156, 0157 all talk about cedilla, say to make it with
+       cedilla, but example shows comma.
+       
+       By the way:
+       > Got rid of commaaccent and dotlessj in Corporate Use
+       > Replaced shadedark, with little squares now not overlapping.
+       > Corrected IPA symbol 'ts' 02A6, added 02a8, 02a9, 02aa, 02ab, 02ac,
+         02ad, 02ae, 02af
+       
+       (so many changes...the CVS server was down...)
+
+       * FreeSerif.sfd:
+
+       Re-named arabic and hebrew characters
+       Big adjustment to comma-accents.  Mostly effects Greek Extended.
+       Made such accents to be like comma, rather than like Russian apostrophe
+       (and de-referenced that symbol)
+
+2008-04-04 Steve White
+       * FreeMono.sfd, FreeSerif.sfd:
+
+       Raised dot on superscript i (2071) -- more distinct at small sizes
+
+       * FreeMono.sfd:
+
+       added two IPA symbols
+
+2008-04-02 Steve White
+       * FreeSerif.sfd:
+
+       fixed a few more control points too close
+
+       Fixed names of languages in ligature table for latn "w/i".
+       This fixes a crash when FontForge opened the ttf table
+
+       Motivated by bug crashing FontForge when opening ttf file,
+       started cleanup of useless control points.  Not finished.
+       Got partway through Sinhala
+
+2008-03-31 Steve White
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Fixed various "Find Problems", including glyphs with mixed-up names,
+       and bad TT matrices.  (lots more bad TT matrices remain)
+
+       * FreeSerif.sfd:
+
+       Re-named a bunch of Cyrillic letters
+
+       * FreeSerif.sfd:
+
+       Put above mark on Cyrillic i and double-dot i for Slavonic number forms
+
+2008-03-30 Steve White
+       * FreeSans.sfd:
+
+       Tightened spacing on glyphs of last commit
+
+       * FreeSans.sfd, FreeSerif.sfd:
+
+       Concerning bug  #16120, Include upper case Wynn and upper case Yogh
+       Adapted Herman Miller's Thyromanes letters  01F7 021C 021D for Serif
+       Drew my own versions for Sans.
+
+       * FreeSerif.sfd:
+
+       Added 04F6,7
+
+       * FreeSerif.sfd, FreeSerifItalic.sfd:
+
+       Made more Cyrillic diacritics really combine.
+       Made a mark lookup just for Cyrillic diacritics,
+       Marked most of the unadorned Cyrillic alphabet.
+       
+       Still not clear on correct shapes for some of the marks.
+
+       * FreeMono.sfd, FreeMonoOblique.sfd:
+
+       Tweeks to accents
+
+2008-03-29 Steve White
+       * FreeSans.sfd, FreeSerifItalic.sfd:
+
+       Small adjustments in Cyrillic
+
+       * FreeSerif.sfd:
+
+       Corrected small palochka
+       Made Cyrillic combining hundred-thousands and millions really combine
+       Named some combining diacriticals
+
+       * FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd:
+
+       Mostly adjusted horizontal spacing of mono oblique faces
+
+       * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       More cleanup of Cyrillic ranges
+       
+       Completely re-did horizontal spacing of SerifItalic and SerifBoldItalic.
+       See bug #17912, poor kerning in Cyrillic oblique...
+       https://savannah.gnu.org/bugs/index.php?17912
+       It looked like chaos to me. 
+       Only so much can be done: the font is flawed.
+       But I think the changes make text readable in these faces.
+       
+       There were dozens of incorrect glyphs in higher-numbered characters.
+       I deleted all those I found.  No glyph is better than a wrong glyph.
+       
+       Futzt with accents, shooting for consistency and readability.
+       
+       A maintenance thing: making correct references (acyrillic vs a,
+       although they may be the same glyph)  I made a lot of headway, but
+       it isn't finished.
+       
+       Likewise, a large fraction of these are compound characters, which can
+       be made with references, resulting in easier maintenance, reduced
+       likelihood of errors, and smaller files.  I replaced many.
+
+       * FreeSerif.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Cyrillic italic
+       Added italic, bolditalic
+               0493, 04a7, 04AD
+       because their form clearly varies in italic.  But was just guessing...
+
+       * FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Cyrillic italic
+       
+       Added italic, bolditalic
+               0493, 04AD
+       because their form clearly varies in italic.
+       But was just guessing as to exact form.
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Overhaul of Cyrillic
+       
+       Italic, BoldItalic
+               added small yat for bug #22588 (note Times New Roman doesn't use
+               alternate form in Italic)
+       
+       All forms of Serif have big problems in Cyrillic.
+       
+       The ugliest is in roman.  The letters, even of the Russian alphabet, are
+       of inconsistent height (awfully, small 0438 (ii) 0446 (tse))
+       and they vary from the height of Latin
+       and they vary from the height of italic and bold.
+       They are a mish-mash of letters from several fonts, of similar (but not
+       quite identical) weight, and similar, (but not quite identical) size.
+       
+       I think the best solution would be to identify the face that best
+       matches Latin, and fill the range with that.  I think this is possible
+       because the rarer letters seem to be better: the common letters are the
+       ones that are wrong.
+       
+       For now, I just increased the sized of 0438 and 0446, and 048a, 048b,
+       also 0459 (lje) 045A (nje) 0464 (dje)
+       
+       Other issues
+
+2008-03-27 Steve White
+       * FreeSerifBoldItalic.sfd:
+
+       Moving all Greek capitals with accent so they don't cover previous
+       letter.  Remedies bug #12798
+
+       * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd:
+
+       Various tweeks to accented Latin letters.
+       Connected O-ogonek correctly
+
+       * FreeSerifItalic.sfd:
+
+       Accents of numerous accented Latin letters got shifted in a previous
+       commit.  This fixes it.
+
+       * FreeSerif.sfd:
+
+       Adjusted combining tack left and right (0318-0319) to be above -300 EM.
+
+       * FreeSans.sfd, FreeSerif.sfd:
+
+       Added some "middle" marks for positioning of diacritics
+
+       * FreeSans.sfd:
+
+       Copied 4 enclosing combining diacriticals from Serif 20DD - 20E0
+
+       * FreeSerif.sfd:
+
+       Adjusted and added some enclosing diacritics 20DD - 20E0
+       In response to Debian bug #472566
+               ttf-freefont: U+20DD COMBINING ENCOLSING CIRCLE doesn't combine
+               http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=472566
+
+2008-03-26 Steve White
+       * FreeSerif.sfd:
+
+       Lowered a few over-high Latin accents
+
+       * FreeSansBold:
+
+               Devangari--only digits 1 and 2, and nothing else.  Deleted
+       
+       * FreeMonoBold, FreeMonoOblique,
+       FreeSerifBold, FreeSeriftalic, FreeSerifBoldItalic,
+       FreeSansOblique, FreeSansBold, FreeSansBoldOblique:
+
+       Got rid of dotlessj, comma in Corporate Use
+       Single Substitution lookup, ccmp table
+       Made proper dotlessj, re-linked j-circumflex
+       
+       Note:
+       FreeSansBold has a commaaccent in Corporate Use, used by several other
+       characers.  Haven't done anything about this.
+
+2008-03-25 Steve White
+       * FreeSerif.sfd:
+
+       Added/corrected glyphs for yeh hamza in Arabic,
+       Added init and medi lookups for yeh hamza.
+
+2008-03-24 Steve White
+       * FreeSerif.sfd:
+
+       Added isolated and final forms for
+       0629    teh marbuta
+       0624    waw hamza
+       0626    yeh hamza
+       0649    alef maksura
+       A previous commit had added lookups that referred to these,
+
+       More fiddling with super/subscripts
+
+       * Makefile, Makefile, GenerateTrueType:
+
+       Scripts and Make targets to generate OpenType fonts and zip file
+
+       * maintenance.txt:
+
+       Added gnupload and info about tagging
+
+2008-03-23  Steve White
+       * FreeSerif.sfd:
+
+       Last of Find Problems -> ATT
+       'mark' Latin lookup: afii10026 is in 'cyrl', also afii10074
+       Upper and lower Cyrillic i.  Just removed mark from both letters.
+
+       'half' Bengali lookup Khanda_Ta is in 'bng2'. Added bng2 to lookup
+       Added TtTable etc
+
+       Clean-up of Points too Close through to end of font.
+       This episode completes the paths/points clean-up of Serif.
+       But note: many ranges, esp. Ethiopic, Japanese, and Indic, have way
+       too many points, resulting in lumpiness.
+
+       At this point, FontForge can convert splines to quadratic, auto-hint,
+       and auto-instrument without segfault.
+
+       * Makefile, sfd/Makefile, tools/GenerateTrueType:
+
+       Alterations to build process: added a Makefile, and made to work
+       on my system.  Now auto-hints before generating TrueType.
+
+2008-03-22  Steve White
+       * sfd/FreeSans.sfd:
+       Lots of additions of math characters.  Should complete for
+       LaTeX 2e, except for extensible brackets.
+
+2008-03-21  Steve White
+       * *.sfd:
+
+       Regularized stacking of accents in Latin Extended Additional
+       Changed name of 00B5 from 'mu' to 'micro',
+               2206 from 'Delta' to 'Delta.math',
+               0308 from 'diaerisis' to 'diaerisiscomb'
+
+       * FreeMono.sfd:
+
+       additions to IPA
+
+       * FreeMonoBoldOblique.sfd:
+
+       Moved dotlessj from Corporate Use,
+       Deleted commaaccent there
+       Fixed mis-named glyphs tcommaaccent, Tcommaaccent
+       Changed name of 030A from 'dieresis' to 'ringcomb'
+
+       * FreeSans.sfd:
+
+       Added some arrows, and a couple of blackboard bold characters
+
+       Several characters in U+F600 Corporate Use range
+               dotlessj, onefitted, commaaccent
+
+               dotlessj referred to by: jcircumflex, uni01F0:  
+               renamed it to uFFFF, re-linked others by hand
+
+               commaaccent
+                       http://diacritics.typo.cz/index.php?id=9
+               should be u+0326 but wasn't linked to anything 
+
+       * FreeSansBold.sfd:
+
+       U+0617 etc: read glyphs "4GWglm". It should be Arabic.  Deleted
+
+       * FreeSansBold.sfd, FreeSansOblique.sfd, FreeSansBoldOblique.sfd:
+
+       Removed bogus glyphs for 200C 200D, ZWJ and ZWNJ
+
+       * FreeSerif.sfd:
+
+       Split lookup for ligatures in latin into two classes;
+       ff, ffl, fl which are appropriate for all languages,
+       and fi, ffi, which are not appropriate in Turkish (due to distinction
+       between short and long i)
+       Needs to be done for other faces.
+
+       Filled set of extensible brackets in Miscellaneous Technical
+
+       Think IPA is now complete.
+       
+2008-03-18  Steve White
+       * FreeSans.sfd:
+
+       clean-up of all path issues and points too close
+
+2008-03-18  Steve White
+       * FreeSans.sfd:
+
+       Something was causing crashing effects in Windows.  Cleanup of
+       problems eventually made it go away.  Now works well.
+
+       Cleaned up many "points too close"
+
+       Cleaned up all ATT problems, of which there were many and various.
+
+       # Incorrectly labelled zero-width joiner used in a ligature
+
+       # Incorrect substitution of dotlessi and dotlessj with i and j was
+         somehow connected with FontForge crash.  Attemts to remove the
+         substitution would damage a 'ccmp' table; subsequent changes would
+         result in FontForge crashing on save, and truncating the sfd file. 
+         Surgically removed with vi.
+
+       # A couple of Indic lookups had incorrect script DFLT; one had 'latn'.
+
+       # Don't understand why there are scripts named
+               dev2 bng2 grj2 gur2 when there are already deva beng gurj guru
+         But anyway, lots of 'vatu' 'pres' 'haln' and 'liga' lookups contained
+         characters in the '2' scripts but were lablled only for the 'non-2' 
+         ones.  Added the '2' scripts to all these lookups. Suspect a mistake.
+
+       Note: several of these problems are repeated in other Sans faces.
+
+2008-03-16  Steve White
+       * FreeMono.sfd:
+
+       Cleanup of many path problems "points too close"
+
+       Strove to make accents Latin Extended range legible at small sizes
+
+       Named some unnamed characters; removed a duplicate
+
+       At this point, all fonts are passing FontForge Validate.
+
+2008-03-15  Steve White
+       * FreeSerif.sfd:
+
+       CJK punctuation: made some of the very high glyphs smaller (under 900EM)
+       The brackets in Sans were very ugly, and not even Sans-serif.
+       Serif: added extensible square brackets, diddled with integral
+       corrected direction of some added glyphs
+
+       Several bugs having to do with missing glyphs in Tamil range.
+       Also a buggy ligature in Devangari.
+
+       Shortened names of many lookup tables
+
+       Futzt with some combining diacriticals
+
+       Added extensible square brackets.
+
+       * FreeSans.sfd:
+
+       Changed names of a bunch of glyphs with invalid
+       TrueType names, in range 0x1025f+ (not real Unicode).
+       Took pains to retain information contained in the names.
+       Wonder if these glyphs have ever been of any use.
+
+       CJK Punctuation: brackets were hand-drawn and very ugly.  Improved.
+
+       * *.sfd:
+
+       Set OS/2 Metrics back to absolute 900/300.  Offsets are not 
+       interpreted uniformly.
+
+       Cleanup of many path problems up to extrema and self-intersecting
+
+       Ordered PS Blue values.
+
+2008-03-14  Steve White
+       * FreeSerif.sfd:
+
+       Got rid of mixed references and contours
+       Cleanup of many path problems "points too close"
+
+       Started clean-up to satisfy FontForge Validate
+
+       Changed names of three glyphs in the
+       Tamil ligatures range...all clearly bugs. 
+
+       * FreeSans.sfd:
+
+       Added slanted-hyphen
+
+       * *.sfd:
+
+       Unified OS/2 Metrics
+       Added Grid Fit
+
+2008-03-13  Steve White
+       * FreeSans.sfd:
+
+       Rearranged PS BluesValues so they were in increasing order,
+       Made all 20 in width. 
+
+2008-03-12  Steve White
+       * FreeSans.sfd, FreeMono.sfd:
+
+       Added TrueType hinting tables.
+       Fixed glyphs that didn't convert well to quadratics
+       Got rid of mixed contours and refs
+
+       * FreeSerifBold.sfd:
+
+       Cleanup of path problems
+
+2008-03-11  Steve White
+       * FreeMonoOblique.sfd:
+
+       Cleanup of path problems
+
+2008-03-09  Steve White
+       * FreeSerif.sfd:
+
+       Corrected L-dot
+       Further cleanup of path/ref problems
+
+       Found several ligatures that referred to a missing glyph "ZWJ".
+       Took this to mean the "zero width joiner" u+200D
+
+       * *.sfd:
+
+       Changed OS/2 metrics to be absolute 900/300
+
+       * FreeSerifItalic.sfd:
+
+       Added Greek lunate epsilon
+
+       * FreeMono.sfd:
+
+       Many additions in math range
+       Reduced size of binary union, intersection, vee, wedge
+       Corrected empty set
+       Corrected logical 'assert' relations, etc. 22a2-22af
+       Efforts to make Math glyphs legible at small point sizes
+
+       * FreeSans.sfd:
+
+       Added Greek lunate epsilon and rho symbol
+       Unstacked more stacked diacriticals
+
+       Further cleanup of path/reference problems
+
+2008-03-08  Steve White
+       * FreeSans.sfd, FreeSerif.sfd:
+
+       Added some "n-ary" Math operators
+
+       * FreeSerif.sfd:
+
+       Further clean-up of path problems...up to Ethiopic
+       > Started adding and correcting Math operators for LaTeX 2e
+       > Corrected n-ary union, intersection, and spikes to be larger
+       than the binary operators
+       > Made (many of) the operators based on + - = to use those
+       symbols directly (by reference or copying).
+       > Added lunate epsilon
+       > Corrected empty set
+       > Tightened up spacing of some other technical characters
+       > Worked on some more math operators involving =
+       > triangle
+       > Several arrows
+       > Supplemental Arrows-A
+
+       * FreeSans.sfd:
+
+       Clean-up of font paths
+       Open self-intersecting outermost-clockwise missing-extrema
+       also flipped references (unlinked)
+
+       Added Greek lunate epsilon and rho symbol
+
+2008-03-06  Steve White
+       * sfd/FreeSerif.sfd: Shortened and thickened the combining hook mark,
+       U+0309, to make more like Unicode samples.
+       Also see (bug #22499) un-stacked incorrectly stacked accents
+
+2008-03-05  Steve White
+       * sfd/FreeSerif.sfd: vertical lines: combining diacritical marks
+       corrected 0300 030D 0329 0348 (were rendered as straight apostrophes)
+       Spacing Modifier letters added 02C8 02CC 
+               02B9 02Ba prime and double-prime
+       Fixed positioning U+1EC8, 9, I with hook above
+
+2008-03-03  Steve White
+       * sfd/FreeSerif.sfd: TT strings updates.
+               updated Copyright to 2008
+               Added Vendor URL as the Savannah freefont site
+       * sfd/FreeMono.sfd: A standard pangram as the Sample Text for Russian
+               It reads: In the thickets of the South once there was a citrus
+               ...--yes, but a fake specimen!
+       * sfd/*.sfd: Set the OS/2 Sup/Sub settings, which by default looked
+               like random trash.
+
+2008-03-02  Steve White
+       * sfd/FreeSerif.sfd: began cleanup of problems given by FontForge
+       "Find Problems" feature.  (bug #22454)
+               
+2008-03-01  Steve White
+       * sfd/FreeSerif.sfd: made Arabic work for text display (bug #22329)
+               Added required contextual replacement tables,
+               Made a few missing characters,
+       * sfd/*.sfd: Removde all back layers from glyphs that had them.
+
+2008-02-27  Steve White
+       * sfd/FreeSans.sfd: filled in Combining Diacriticals
+       * sfd/FreeSerif.sfd: shifted whole Arabic range down by 200EM.
+
+2008-02-26  Steve White
+       * sfd/FreeSerif.sfd: enabled DPOS table.
+
+2008-02-24  Steve White
+       * sfd/*.sfd: Much fiddling with the "combining diacriticals"
+               range 0300-036F.  Made to align with medium-size lowercase
+               preceding character if not using DPOS table.
+
+2008-02-23  Steve White
+       * sfd/FreeSerif.sfd, FreeSans.sfd, FreeMono.sfd: (bug #21784) Filled
+       in set of HTML 4 Character Entities.
+
+       * sfd/FreeSerif.sfd, FreeSans.sfd, FreeMono.sfd: (bug  #18413)
+       undertie too low -- went on to tidy other similar characters in
+       Combining Diacriticals range.
+       
+2008-02-21  Steve White
+       * sfd/*.sfd: Moved capital Greek letters with tonos so tonos doesn't
+       cover preceding letter (bug #12798)
+
+       * sfd/FreeSerif.sfd, FreeSans.sfd: (bug #13370) made extended
+       integrals to line up.
+       
+2008-02-20  Steve White
+       * sfd/*.sfd: started removing glyphs with back layers (printing bug)
+       * sfd/*.sfd: adjusted vulgar fractions (bug #17756)
+       * sfd/*.sfd: adjusted numerical superscripts (bug #20278)
+
+2008-02-18  Steve White
+       * sfd/FreeSerif.sfd: Offset Hiragana and Katakana ranges (bug #22326)
+       * sfd/FreeSerif.sfd: U+30FB, KATAKANA MIDDLE DOT to be full width
+                               (bug #18326)
+
+       * sfd/FreeSerif.sfd: Re-promoted
+               ff ffi ffl fi fl
+               as standard ligatures in Latin.
+
+2008-02-17  Steve White
+       * sfd/*.sfd: committed to FontForge Spline Font Database (SFD) 2
+       format.
+       
+2008-02-10  Steve White
+       * sfd/*.sfd: brought into line with Debian ttf-freefont
+       Deleted a couple of patches, and applied those applied to Debian.
+
+2006-09-20  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * INSTALL: added installation procedure for MacOS X, courtesy
+       Philipp Kempgen.
+
+2006-05-04  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd: deleted Russian sample text, which did not
+       conform to UTF-7.
+
+2006-04-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd: corrected U+10D3.
+
+       * sfd/FreeSans.sfd: ligature U+FB06 (LATIN SMALL LIGATURE S T)
+       changed from mandatory ("liga") to discretionary ("dlig") (bug
+       #16253).
+
+       * sfd/FreeMono.sfd: deleted incomplete glyph U+FB06 (LATIN SMALL
+       LIGATURE S T); deleted U+FB00, U+FB01, U+FB02, U+FB05 as
+       ligatures (bug #16253).
+
+       * sfd/FreeMonoOblique.sfd, sfd/FreeMonoBoldOblique.sfd: added
+       U+FB00; deleted U+FB01, U+FB02 as ligatures (bug #16253).
+
+       * sfd/FreeMonoBold.sfd: deleted U+FB00, U+FB01, U+FB02 as
+       ligatures (bug #16253).
+       
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
+       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
+       sfd/FreeSerifBoldItalic.sfd: added Georgian letters, donated by
+       Gia Shervashidze
+
+2006-02-22  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd: ligature U+FB4F
+       changed from mandatory ("liga") to discretionary ("dlig"). This is
+       respons to Bug#349657: [bug #15792] Freefont Alef and Lamed
+       combine
+
+2006-02-21  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifBold.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd,
+       sfd/FreeSansBold.sfd: ligature U+FB4F changed from mandatory
+       ("liga") to discretionary ("dlig"). This is respons to Bug#349657:
+       [bug #15792] Freefont Alef and Lamed combine
+
+       * sfd/FreeSerif.sfd: corrected bug#275759: [bug #15790] FreeSerif
+       glyphs for U+2198/U+2199 were reversed.
+
+2006-02-15  Denis Jacquerye <moyogo@gmail.com>
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, 
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeMonoBold.sfd: removed ij 
+       and IJ ligatures.
+
+2006-02-10  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd: added small Georgian letters (mkhedruli),
+       donated by Gia Shervashidze
+
+       * AUTHORS: Added Gia Shervashidze
+
+       * CREDITS: Added Gia Shervashidze
+
+2006-01-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * notes/maintenance.txt: Added information on the Makefile now
+       used; username for FTP login is anonymous.
+
+       * sfd/FreeSansBold.sfd: added U+0569, U+0571, U+0579, U+057B,
+       U+0586. Armenian small letters completed.
+       
+       * sfd/FreeSerif.sfd: added U+0297, U+02AD-02AF. IPA Extensions
+       section is now complete. Copied a dozen of glyphs from Omega IPA
+       to Phonetic Extension section.
+
+2006-01-25  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: added U+01A, U+01A3, U+01A6, U+01B2, U+01BA,
+       U+01BB, U+01BE, U+01BF.
+       
+       * sfd/FreeSans.sfd: aligned small Armenian letters to x-height in
+       response to bug #15480. Armenian in Free Sans needs a major
+       cleanup.
+
+2006-01-24  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd: changed U+0452, U+045B. Cleanup: U+0460,
+       U+0461, U+04Bc, U+04BD, U+0508.
+
+       * sfd/FreeSansOblique.sfd: replaced accented chars in Latin-1 and
+       Latin Extended-B sections with references, where possible.
+
+       * sfd/FreeSerif.sfd: changed U+0285.
+
+2006-01-23  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: added U+0195, U+01AA, U+0297, U+03D7,
+       U+03F0. Several flipped references replaced by outlines.
+
+       * sfd/FreeSansOblique.sfd: Latin Extended-B section more or less
+       brought in sync with FreeSans.
+
+       * sfd/FreeMonoBoldOblique.sfd: added glyphs from FreeMonoBold in
+       the Latin Extended-B and IPA Extensions sections.
+
+       * sfd/FreeSerifBold.sfd: Added U+0224, U+0225. Changed U+01B7,
+       U+01B8, U+04E0, U+0452, U+045B. Replaced accented characters in
+       the Cyrillic region with references.
+
+2006-01-21  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: added U+0255, U+0264, U+0277, U+0286,
+       U+029D. Changed U+0261. Deleted spurious glyphs in the control
+       code area.
+
+2006-01-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: replaced Hardip Pannu Singh's Gurmukhi with
+       AnmolUni by Kulbir Singh Thind.
+
+2006-01-17  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSansBold.sfd: Added U+018D, U+0194, U+01B5, U+01B6,
+       U+01BE, U+0262, U+02A2.
+       
+       * sfd/FreeSansBold.sfd: Changed U+0261 in order to distinguish it
+       from U+0067. Changed U+0251, U+0252.
+       
+       * sfd/FreeSerifBold.sfd: Small changes in the Cyrillic
+       section. Added U+0183, U+018C.
+       
+       * sfd/FreeSans.sfd: Added U+2045, U+2046.
+       
+       * sfd/FreeSansBold.sfd: Filled in the Gurkmukhi part with the
+       AnmolUni-Bold by Kulbir Singh Thind. Also some minor corrections
+       in the Cyrillic part.
+
+       * CREDITS: Added Kulbir Singh Thind.
+
+       * AUTHORS: Added Kulbir Singh Thind.
+       
+2006-01-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd: Thomas Ridgeway's Tamil characters replaced
+       by the ones released by the Samyak font project.
+
+       * CREDITS: Added Pravin Satpute, Bageshri Salvi, Rahul Bhalerao
+       and Sandeep Shedmake
+
+       * AUTHORS: Added Pravin Satpute, Bageshri Salvi, Rahul Bhalerao
+       and Sandeep Shedmake
+
+2006-01-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSansBold.sfd, sfd/FreeMonoBoldOblique.sfd: minor changes.
+
+2006-01-05  Denis Jacquerye <moyogo@gmail.com>
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
+       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
+       sfd/FreeSerifBoldItalic.sfd: added cedi sign U+20B5, Ghanaian
+       currency
+
+2005-12-29  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: minor cleanup in the Gujarati part.
+
+2005-12-22  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: Devanagari and Gujarati parts cleared; once
+       again merged with Gargi 1.9 and Padmaa 0.6, this time correctly so
+       that the anchor points survived the merger.
+
+2005-12-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: added U+0577.
+
+2005-12-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: added U+0559, U+055F, U+2024.
+
+       * sfd/FreeSansBold.sfd: added U+056E, U+0573.
+
+2005-12-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: Merged with Gargi 1.9 and Padmaa 0.6,
+       courtesy Monika Shah and Sonali Sonania from C-DAC, Mumbai.
+
+       * CREDITS: Added Monika Shah and Sonali Sonania.
+
+       * AUTHORS: Added Monika Shah and Sonali Sonania.
+       
+2005-12-13  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - Removed Sinhala glyphs.
+
+       * sfd/FreeSerif.sfd - Added Sinhala glyphs, formerly in FreeSans.
+
+2005-12-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd: added U+20AF, U+211E. Changed U+20AC (EURO
+       SIGN).
+       
+       * tools/freefont-ttf.spec: Added specification file for building
+       RPM package, courtesy Rok Papez.
+
+       * sfd/FreeSerifBold.sfd: added more glyphs from Txfonts to the
+       Arrows and Mathematical Symbols ranges.
+
+       * sfd/FreeSerifBoldItalic.sfd: added U+03F5 from Txfonts.
+
+2005-12-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: added U+0567, U+056A, U+056C, U+0582.
+       
+       * sfd/FreeSerifBold.sfd: copied Box Drawing range from FreeSans.
+
+       * sfd/FreeSerifBold.sfd: added glyphs from Txfonts to the Arrows
+       and Mathematical Symbols ranges.
+       
+       * sfd/FreeSerif.sfd: added U+2259-225A, U+22BA, U+2308-230B,
+       U+2322-2323. Cyrillic composite characters replaced with
+       references.
+
+2005-12-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifBold.sfd: added U+025A, U+025D, U+026B, U+029B,
+       U+02AE, U+02AF, U+02DE.
+       
+       * sfd/FreeSerifBold.sfd: updated Hebrew part with Drugulin font
+       from the Culmus project.
+
+       * sfd/FreeSerif.sfd: added U+207A-207C, U+208A-208C, U+2215-2216.
+       
+       * sfd/FreeSans.sfd: added U+2320 TOP HALF INTEGRAL, U+23AE
+       INTEGRAL EXTENSION, U+2321 BOTTOM HALF INTEGRAL (bug #13370).
+       
+2005-12-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifBold.sfd: added U+0294-0296, U+02A1-02A2. Started
+       adding "below" anchors. Performed hinting on characters that were
+       not hinted "en masse".
+
+2005-12-06  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: fixed some more metrics problems in the
+       Extended Greek area; performed hinting on characters that were not
+       hinted "en masse".
+       
+       * Makefile: clean also signature files.
+
+       * sfd/FreeMonoBoldOblique.sfd, sfd/FreeMonoBold.sfd: cosmetic
+       changes; cleaning background of referenced composed characters.
+
+2005-12-05  Panayotis Katsaloulis  <panayotis@panayotis.com>
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
+       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
+       sfd/FreeSerifBoldItalic.sfd: Some changes to the greek glyphs,
+       mostly having to do with "tonos" (accent)
+
+2005-12-05  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: minor cosmetic changes.
+
+       * sfd/FreeSans.sfd: adjusted widths of characters in the Extended
+       Greek range; accents are not any more considerably overhanging on
+       the left side. Added U+1EDA-1EE3, U+1EE8-1EF1.
+       
+       * sfd/FreeSans.sfd: continued working on Extended Greek range;
+       metrics still not finished.
+
+2005-12-03  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd: fixed combined Greek accents (bug
+       #12800). Width of characters still need to be adjusted as in
+       FreeSerif.
+
+       * sfd/FreeSerif.sfd: fixed positions of Greek accents (bug #12798).
+
+       * CREDITS: Added Panayotis Katsaloulis.
+
+       * AUTHORS: Added Panayotis Katsaloulis.
+
+       * Makefile: minor changes; now creating also a tarfile with sfds.
+
+2005-12-01  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifItalic.sfd: added U+0183, U+018C, U+01C0, U+01C1,
+       U+01C3, U+01E0, U+01E1, U+01F8, U+01F9.
+       
+       * Makefile: created a Makefile to assist building.
+
+       * README: an update.
+
+       * COPYING: added GNU General Public License, version 2.
+
+       * tools/GenerateTrueType: wrote a FontForge script for conversion
+       to TrueType.
+
+       * sfd/FreeSerif.sfd: merged with SolaimanLipi Bangla OpenType font
+       from www.ekushey.org, courtesy Solaiman Karim.
+
+       * sfd/FreeSerifItalic.sfd: merged with SolaimanLipi Bangla
+       OpenType font from www.ekushey.org, slanted by 15.5 degrees.
+
+       * sfd/FreeSans.sfd: merged with Rupali Bangla OpenType font from
+       www.ekushey.org
+
+       * sfd/FreeSansOblique.sfd: merged with Rupali Bangla OpenType font from
+       www.ekushey.org, slanted by 12 degrees.
+
+       * CREDITS: added Solaiman Karim
+
+       * AUTHORS: added Solaiman Karim
+
+2005-11-30  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd: merged with the Rachana Normal.
+
+       * AUTHORS: added K.H. Hussain and R. Chitrajan
+
+       * CREDITS: added K.H. Hussain and R. Chitrajan
+
+2005-11-23  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - cleaned some background images.
+
+       * sfd/FreeSans.sfd - added U+01A0-01A1, U+01AF-01B0, U+026E,
+       U+028F, U+0291, U+02A3-02A5, U+031B. Modified U+0198.
+
+2005-11-22  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - added U+2504-250B.
+
+       * sfd/FreeSans.sfd - added U+2591-25A1, U+25A3-25A5, U+25AA, U+25AC.
+
+       * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd - added U+0263.
+       
+2005-11-21  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - corrected positions of some Greek diacritics
+       on page 0x1F.
+
+       * sfd/FreeMonoOblique.sfd - working on bringing it in sync with
+       FreeMono.sfd.
+
+       * sfd/FreeSerifBoldItalic.sfd - applied the sequence suggested by
+       Werner Lemberg for reducing redundant points. Added a couple of
+       glyphs in the IPA Extensions region.
+
+       * sfd/FreeSansBold.sfd - added U+0574, U+0576. Removed overlaps.
+       
+2005-11-20  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - added U+02AA-02AC, U+02B0-02B2.
+
+2005-11-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - added U+01B7-01B9, U+0196, U+019A, U+01C3,
+       U+0224-0225, U+025E, U+029A, U+2422. Changed U+0184-0185, U+0192,
+       U+01B4, U+0282, U+0284.
+       
+2005-11-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - added U+02EE, U+207F.
+
+       * sfd/FreeSans.sfd - started Box Drawing area.
+
+2005-11-17  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifBold.sfd - added glyphs from the Omega project to
+       Latin Extended-B, IPA Extensions and Greek ranges.
+
+       * sfd/FreeSerifBoldItalic.sfd - added glyphs from the Omega
+       project to Latin Extended-B, IPA Extensions and Greek ranges.
+
+       * sfd/FreeSerifItalic.sfd - added glyphs from the Omega
+       project to Latin Extended-B, IPA Extensions and Greek ranges.
+
+       * sfd/FreeSerifItalic.sfd - added U+018B, U+025C, U+0265, U+026F,
+       U+0279, U+0287, U+028C-028E, U+029E.
+
+       * sfd/FreeSerifBoldItalic.sfd - added U+1EDA-1EE3, U+1EE8-1EF1,
+       U+2190-219B, U+219E-21A8, U+21B9-21BA, U+21C4-21CA, U+21E4-21E5,
+       U+2669-266F. MES-1 compliant.
+       
+       * sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSansOblique.sfd,
+       sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd,
+       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
+       sfd/FreeSerifBoldItalic.sfd - added U+FFFD.
+
+       * sfd/FreeSerif.sfd - removed overlaps in Latin Extended-B and IPA
+       Extensions ranges.
+       
+2005-11-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifItalic.sfd - applied the sequence suggested by
+        Werner Lemberg for reducing redundant points.
+
+       * sfd/papers/eurotex2003/freefont.tex,
+       sfd/papers/eurotex2003/freefont.bib - Revised version, sent back
+       by Karl Berry on 20050110, that should match the one published in
+       TUGboat.
+
+       * sfd/FreeSerifItalic.sfd - started added accent anchors. Added a
+       handful of Greek letters from Omega font collection.
+
+       * sfd/FreeSerif.sfd - added a handful of letters in the Latin
+       Extended-B and IPA Extension ranges from the Omega font collection.
+
+2005-11-16  Denis Jacquerye <moyogo@gmail.com>
+
+       * sfd/FreeSerif.sfd - moved U+0263 to U+0264; added U+0263
+
+       * sfd/FreeSerifItalic.sfd - fixe U+01EE; added U+01B7-U+01B9
+
+2005-11-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - Made small Greek letters the same height as
+       Latin and Cyrillic ones and replaced them with references, where
+       applicable.
+
+       * sfd/FreeSerif.sfd - replaced Greek letters with references,
+       where applicable. Added U+03D7, U+03F0-03F2.
+
+       * sfd/FreeSerif.sfd - added U+0255, U+025A, U+025D, U+025F,
+       U+0262-0263, U+026B-026C, U+0274, U+0276-0277, U+028F, U+0291,
+       U+029D.
+
+       * sfd/FreeMonoOblique.sfd - applied the sequence suggested by
+       Werner Lemberg for reducing redundant points. Added U+F6BE.
+
+       * sfd/FreeSansOblique.sfd - applied the sequence suggested by
+       Werner Lemberg for reducing redundant points.
+
+       * sfd/FreeSans.sfd - changed U+01A5.
+
+2005-11-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - applied the sequence suggested by Werner
+       Lemberg for reducing redundant points. Replaced accented glyphs in
+       the Latin-1 and Latin Extended-A areas with references. Made
+       capital Greek letters the same height as Latin and Cyrillic ones
+       and replaced them with references, where applicable.
+
+2005-11-15  Denis Jacquerye <moyog@gmail.com>
+
+       * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, 
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeSansOblique.sfd - fixed 
+       U+026A, it was a dotlessi and therefore like U+0069 when 
+       accented.
+
+2005-11-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMonoBold.sfd - corrected Greek tonos (slanted instead of
+       a vertical line).
+
+       * sfd/FreeMonoBoldOblique.sfd - applied the sequence suggested by
+       Werner Lemberg for reducing redundant points. Replaced accented
+       glyphs in the Latin-1 and Latin Extended-A areas with references.
+
+2005-11-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
+       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
+       sfd/FreeSerifBoldItalic.sfd - Added 2005 in copyright info.
+
+       * sfd/FreeSansBoldOblique.sfd - applied the sequence suggested by
+       Werner Lemberg for reducing redundant points. Replaced accented
+       glyphs in the Latin-1 area with references.
+
+       * sfd/FreeSansBoldOblique.sfd - added U+0180, U+0184, U+0185,
+       U+0195, U+01A0-01A2, U+01AF-01B0, U+025E, U+026E, U+0292,
+       U+0294-0296, U+029A, U+02A1, U+2126-2127, U+2190-219B,
+       U+219E-21A8, U+21C4-21CA, U+2669-266F. MES-1 compliant.
+
+       * sfd/FreeMono.sfd - Replaced accented glyphs in the Greek and
+       Cyrillic areas with references.
+
+       * sfd/FreeMonoBold.sfd - applied the sequence suggested by Werner
+       Lemberg for reducing redundant points. Replaced accented glyphs in
+       the Latin-1 and Latin Extended-A areas with references.
+
+2005-11-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - applied the sequence suggested by Werner
+       Lemberg for reducing redundant points.
+              
+       * sfd/FreeSansBold.sfd - added U+219A, U+219B, U+2669-266F.
+
+       * sfd/FreeSerifBold.sfd - added U+2669-266F.
+
+2005-11-12  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSansBold.sfd - added U+0180, U+0181, U+0183, U+0187,
+       U+0188, U+018A, U+018C, U+018D, U+0193, U+019C, U+01A0, U+01A1,
+       U+01AC, U+01AF, U+01B0, U+025C, U+0260, U+026E, U+0277, U+0281,
+       U+0284.
+
+2005-11-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSansBold.sfd - added U+195, U+1A6, U+025E, U+026E,
+       U+029A, U+0313, U+0314, U+0342, U+0344, U+0345. Started adding
+       accent anchors.
+
+       * sfd/FreeMono.sfd - applied the sequence for reducing redundant
+       points, suggested by Werner Lemberg.
+
+       * sfd/FreeMono.sfd - corrected Greek letters (using tonos instead
+       of a vertical line). Added U+026E, U+F6BE. Accented characters in
+       Latin 1, Latin Extended A and partly Latin Extended B replaced by
+       references.
+
+       * sfd/FreeSerifBold.sfd - applied the sequence for reducing
+       redundant points, suggested by Werner Lemberg. Added U+01A5,
+       U+02A0, U+2190-219B, U+219E-21A8, U+21B8, U+21B9, U+21C4-21CA,
+       U+21E4, U+21E5.
+       
+2005-11-10  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSansOblique - changed U+0192, U+01A5; added U+01C0-01C3.
+
+       * sfd/FreeSansBold.sfd - replaced glyphs with references in the
+       Cyrillic area. Removed U+04A8, U+04A9. Added U+04C5, U+04C6,
+       U+04C9, U+04CA, U+04CD, U+04CE, U+0535, U+053F, U+0546, U+0565,
+       U+0584, U+0587, U+0589.
+
+2005-11-10  Denis Jacquerye <moyogo@gmail.com>
+
+       * sfd/FreeSans.sfd - added U+028A-U+028B
+
+       * sfd/FreeSansOblique - added U+028A-U+028B, U+0276, 
+       U+0292, U+0294-U+0296, U+0298-U+0299 and U+029B; fixed some 
+       other glyphs
+
+2005-11-10  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - added U+01A6. Simplified outlines in the
+       ASCII range.
+
+       * sfd/FreeSansBold.sfd - added U+00A0, U+00AD, U+0531, U+2126,
+       U+2190-2199, U+219E-21A8, U+21C4-21CA.
+
+       * sfd/FreeSansBold.sfd - applied the sequence for reducing
+       redundant points, suggested by Werner Lemberg. Added automatically
+       constructed accented characters in page 0x1E.
+
+2005-11-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - added U+0183, U+018C.     
+       
+       * sfd/FreeSans.sfd - added U+1EA2, U+1EA3, U+1EA8, U+1EA9, U+1EB2,
+       U+1EB3, U+1EBA, U+1EBB, U+1EC2, U+1EC3, U+1EC8, U+1EC9, U+1ECE,
+       U+1ECF, U+1ED4, U+1ED5, U+1EE6, U+1EE7, U+1EF6, U+1EF7, U+220A,
+       U+220B, U+220D, U+2272, U+2273, U+2282, U+2283.
+
+       * sfd/FreeSerifItalic.sfd - changed U+03D5.
+
+       * sfd/FreeSerifBoldItalic.sfd - changed U+03C6; added U+2070,
+       U+2075-2079, U+207F, U+2080, U+2085-2089, U+2155-217F.
+
+       * sfd/FreeSerif.sfd - added U+0184, U+0185, U+018D, U+0195,
+       U+0197, U+019A, U+019B, U+01A0, U+01A1, U+01AC, U+01B5, U+01B6,
+       U+01C0, U+01C1, U+01C3, U+01F6, U+0294-0296, U+1E9A, U+1EDA-1EE3,
+       U+1EE8-1EF1.
+
+2005-11-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSansBold.sfd - added U+0562, U+056D. U+0575.
+
+       * sfd/FreeMono.sfd - added U+0589.
+
+2005-11-06  Primoz Peterlin  <peterlin@localhost.localdomain>
+
+       * sfd/FreeSans.sfd - added U+0278, U+03D5, U+2248. Corrected
+       U+2071, U+222E, U+2242, U+2243 in response to bug reports
+       http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276118
+       http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276120
+
+       * sfd/FreeMono.sfd - added U+2227, U+2228, U+2262. Corrected
+       U+2299-229D in response to bug report
+       http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276121
+
+       * sfd/FreeMonoBold.sfd - added U+2010, U+2012 in response to bug
+       report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=289032
+       Swapped U+03C6 (Greek small letter phi) and U+03D5 (Greek phi
+       symbol) in order to conform to Unicode standard. Simplified glyph
+       shapes in ASCII range. Started adding "above" and "below" anchors.
+       
+2005-11-05  Primoz Peterlin  <peterlin@localhost.localdomain>
+
+       * sfd/FreeSerif.sfd - accented letters in Latin Extended-A
+       replaced by references wherever possible.
+
+       * sfd/FreeSerif.sfd - added U+0180, U+0181, U+0187, U+0188,
+       U+018A, U+0193, U+019C, U+01A4, U+01A5, U+01A7, U+01A8, U+01AF,
+       U+01B0, U+026E, U+0270, U+0278, U+0280, U+0281, U+028B, U+0299,
+       U+029C, U+029F.
+       
+2005-11-03  Primoz Peterlin  <peterlin@localhost.localdomain>
+
+       * sfd/FreeSansBold.sfd - added U+0180, U+0184, U+0185, U+0192,
+       U+019B, U+01A0-01A2, U+01AF, U+01B0, U+01EE, U+01EF, U+0292,
+       U+0294-0296, U+02A1, U+0532, U+054C, U+057C, U+222B. Changed
+       U+014B, U+01A5, U+01B4, U+03BB.
+
+       * sfd/FreeSans.sfd - added U+04C5, U+04C6, U+04C9, U+04CA, U+04D,
+       U+04CE.
+
+       * sfd/FreeSansBold.sfd - cleaner Arabic outlines. Added U+01E4,
+       U+01E5.
+
+2005-11-02  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSansBold.sfd - started Armenian; added U+0538, U+0542,
+       U+0544, U+0548, U+054D, U+054F, U+0550, U+0553, U+0555, U+0561,
+       U+0563, U+0564, U+0566, U+0568 U+056B, U+056F, U+0570, U+0572,
+       U+0578, U+057A, U+057D-057F, U+0580, U+0581, U+0583, U+0585.
+
+       * sfd/FreeMono.sfd - swapped U+03C6 (Greek small letter phi) and
+       U+03D5 (Greek phi symbol) in order to conform to Unicode standard.
+       Added U+04C5, U+04C6, U+04C9, U+04CA, U+04D, U+04CE.
+       
+2005-11-01  Primoz Peterlin  <peterlin@localhost.localdomain>
+
+       * sfd/FreeSansBold.sfd - modified U+019C.
+
+       * sfd/FreeSansBoldOblique.sfd - added U+00A0, U+00AD, U+019C,
+       U+01B7, U+01B8, U+0275, U+0278, U+0298, U+2012, U+2015,
+       U+2070-207F, U+2080-208E, U+2153-217F, U+2213, U+2215.
+
+2005-10-31  Primoz Peterlin  <peterlin@localhost.localdomain>
+
+       * sfd/FreeSerif.sfd - added U+0199, U+01AB, U+0265, U+0282,
+       U+0288, U+028C-028E, U+0290, U+029E, U+02A0.
+
+2005-10-28  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifBold.sfd - added U+019E, U+01AB, U+01AD, U+01B1,
+       U+0256, U+025F, U+0265, U+0269, U+026F, U+0270, U+0279-027F,
+       U+0282, U+0287, U+0288, U+028C-028E, U+0290.
+
+       * sfd/FreeSerifBold.sfd - added U+2070, U+2075-2079, U+2080,
+       U+2085-2089, U+2153-215E, U+2113-2115, U+2119.
+
+       * sfd/FreeSerifBold.sfd - added U+0199, U+019B, U+01B8, U+01B9,
+       U+01BE, U+01C0, U+0262, U+0274, U+0278, U+0280, U+028F, U+0298,
+       U+0299, U+029C, U+029E, U+029F, U+2012, U+2015, U+2016, U+2129,
+       U+2217.
+       
+2005-10-27  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - added U+018D, U+0194, U+019B, U+019C, U+01B5,
+       U+01B6, U+0295, U+0296, U+029B, U+02A2, U+0472, U+0473, U+2114,
+       U+2119.
+
+       * sfd/FreeSerifItalic.sfd - minor cleanup in the superscript range
+       (U+2070-2079).
+
+       * sfd/FreeSansBold.sfd - added subscripts and superscripts
+       (U+2070-208F), completed fractions (U+2152-215F) and Roman
+       numerals (U+2160-217F).
+
+       * sfd/FreeSerifBold.sfd - added U+018B, U+018E, U+018F, U+0191,
+       U+019D, U+01A7, U+01A8, U+01AE, U+0253, U+0266, U+0267, U+026A,
+       U+0271-0273, U+0283, U+0285.
+       
+2005-10-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - added "above" anchors to selected Cyrillic
+       characters. Added U+0294, U+02A1.
+
+       * sfd/FreeMono.sfd - added U+2011, U+2012, U+203B, U+204A, U+2071,
+       U+2129, U+2232, U+2233. Changed and/or corrected U+2106, U+211E,
+       U+2126, U+2127, U+2153-215F, U+2202.
+
+       * sfd/FreeMono.sfd - a try to imitate Denis' work on adding
+       anchors by adding "above" anchor to a couple of basic Latin
+       characters.
+
+       * sfd/FreeSansBold.sfd - added U+0278, U+0298. Cleaned up outlines
+       of most Greek letters. 
+
+       * sfd/FreeSansBold.sfd - Added U+2010-2012, U+2015, U+2032,
+       U+203C, U+2047-2049.
+
+       * sfd/FreeSans.sfd - Added U+01C0-01C2, U+0276, U+0292,
+       U+0298. Changed U+0251, U+0294, U+02A1.
+       
+2005-10-25  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifItalic.sfd - added U+00A0, U+00AD, U+2010-2012,
+       U+2015, U+2126, U+2127, U+2153-215E, U+2160-217F, U+2190-2193,
+       U+2669-266F. FreeSerifItalic is now MES-1 compliant.
+
+       * sfd/FreeSerif.sfd - added U+0191, U+019D, U+01AE, U+027E,
+       U+027F, U+0283, U+0285.
+
+       * sfd/FreeSerif.sfd - added U+019E, U+01AD, U+01B8, U+01B9,
+       U+0253, U+0256, U+0257, U+025C, U+0260, U+0266, U+0267, U+0269,
+       U+026D, U+0271-0273, U+0279-027D.
+       
+       * sfd/FreeSerifBoldItalic.sfd - added U+00A0, U+00AD, U+2010-2012,
+       U+2015, U+2032-2034, U+203C, U+2047-204A, U+2074, U+2081-2084,
+       U+2126, U+2153, U+2154, U+215F, U+2215.  Corrected positions of
+       diacritics on U+0200-0217.
+
+       * sfd/FreeSansOblique.sfd, sfd/FreeSans.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeMonoBoldOblique.sfd,
+       sfd/FreeMonoBold.sfd, sfd/FreeSerifItalic.sfd,
+       sfd/FreeSerifBold.sfd sfd/FreeSerifBoldItalic.sfd - brought in
+       sync with Valek Filipov's urw-fonts-1.0.7pre41.
+
+       * sfd/FreeSansOblique.sfd - added U+00A0, U+2011-2012, U+2015,
+       U+2070, U+2071, U+2074-2079, U+2080-2089, U+2126, U+2153-215F,
+       U+2190-2195, U+2215, U+266A. FreeSansOblique is now MES-1
+       compliant.
+       
+2005-10-24 Denis Jacquerye <moyogo@altern.org>
+       
+       * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, 
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd - added 
+       ccmp for i and j to be substituted with dotless i or j when 
+       followed by above diacritic
+
+2005-10-24  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - added U+2011, U+2012, U+2015. FreeSans is now
+       MES-1 conformant.
+
+2005-10-23 Denis Jacquerye <moyogo@gmail.com>
+
+       * sfd/FreeSans.sfd - added above, below, abovemk and belowmk 
+       anchors for diacritics placement to many Basic Latin characters, 
+       some Latin Extented A and B, and some IPA characters; fixed a 
+       couple of precomposed characters to have diacritics at the same 
+       height as similar characters.
+
+2005-10-21  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - added U+02B9, U+02BA, U+02CD, U+2017,
+       U+2036, U+2037, U+203C, U+203E, U+2047-204A.
+
+2005-10-20  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifBold.sfd - added U+0182, U+0189, U+0192, U+019F,
+       U+01A9, U+01B7, U+01C4-01CC, U+01E0-1E2, U+01F0-01F3, U+F6BE.
+       Corrected position of diacritics on U+0200-0217.
+
+       * sfd/FreeSerif.sfd - added U+00A0, U+00AD, U+0182, U+0189,
+       U+018B, U+018E, U+018F, U+0192, U+019F, U+01A9, U+01B1, U+01B7,
+       U+01DD, U+2010-2013, U+2015. FreeSerif is now MES-1 conformant.
+
+2005-10-19 Denis Jacquerye <moyogo@gmail.com>
+
+       * sfd/FreeSerif.sfd - added U+0268, U+026A, U+0289, U+0292; and 
+       anchor "above" to more base glyphs.
+
+       * sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd, 
+       sfd/FreeSerifBoldItalic.sfd - added U+0250-0252, U+0258-0259, 
+       U+0261, U+0268, U+026A, U+0279, U+0289
+
+       * sfd/FreeSerifBold.sfd - added anchor "above" to marks 
+       U+0300-0314, and to base glyphs (vowels).
+
+2005-10-18 Denis Jacquerye <moyogo@gmail.com>
+
+       * sfd/FreeSerif.sfd - added anchor "above" to marks U+0300-0314, 
+       and bases vowel of the U+0041-007A range, U+00E6, U+0186, U+0190, 
+       U+0254 and U+025B; fixed Latin-1 Supplement block accented glyphs 
+       to use references.
+
+2005-10-17  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSansBold.sfd - added U+01B7, U+01B8, U+0275.
+
+2005-10-16 Denis Jacquerye <moyogo@gmail.com>
+       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - added some Latin 
+       Extended-B African letters: U+0181, U+018A, U+0197-0198, U+01A4, 
+       U+01AC, U+01B1, U+01B3-01B4;
+
+       * sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd - added Latin 
+       Extended-B U+0187, 018E-018F, U+0191, U+0193, U+0197-0199, 
+       U+019D-019F, U+01AB-01AE; correcting width of non-space 
+       Combining Diacrtical Marks; added more glyphs to IPA Extensions 
+       to match non Bold
+       
+       * sfd/FreeSansBoldOblique.sfd - added many accented glyphs to
+       Latin Extended-B
+
+2005-10-15 Denis Jacquerye <moyogo@gmail.com>
+       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - added IPA Extensions
+       U+0262,U+0274,U+0280-0281, U+0299, U+029F, and Spacing Modifier
+       Letters U+02C9-02CB; fixed U+0287,029E height to baseline; added
+       stroke to U+0268
+
+       * sfd/FreeSansOblique.sfd - fixed skew on U+027F
+
+       * sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd - added to Latin
+       Extended-B U+01A7-01A8, IPA Extensions U+0251-0253, U+0256-0257,
+       U+0261, U+0265-026A, U+026F-0273, U+0289, U+028C-028E
+
+       * sfd/FreeSansBoldOblique.sfd - added to Latin extended-B U+0189,
+       U+01A8, U+01B1, U+0283, U+02C9 and Spacing Modifiers U+02C9-02CB
+       
+2005-10-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSansBold.sfd - Added a couple of composite glyphs,
+       mostly in the IPA and Latin Extended B ranges.
+
+2005-10-13 Denis Jacquerye <moyogo@gmail.com>
+
+       * FreeSans.sfd - removed overlap and simplified U+0187, 0191, 
+       0193, 01A5, 01AE, 0260, 0271, 0272, 0273, 027B; fixed diacritics 
+       placement on U+0200-0217; fixed glyph for U+0283 to correct esh 
+       without stroke; added U+025F and fixed U+025F from it; fixed 
+       height of glyph at U+0285; arranged U+027E,027F to make more 
+       distinguishable from U+0072.
+
+       * FreeSansOblique.sfd - added the corrected or new glyphs from 
+       FreeSans; diacritics on U+200-0217 will need height readjustements.
+
+       * FreeSansBold.sfd, FreeSansBoldOblique.sfd - added U+0186, 0190, 
+       0250, 0254, 0258, 0259, 025B, 025C
+
+2005-10-13  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Minor changes: U+22A2, U+22A3, U+22A6, U+23AE.
+       Added U+0250, U+0251, U+0258, U+0259, U+0275.
+
+       * sfd/FreeSerifItalic.sfd - Added glyphs U+222B-U+222F, U+2320,
+       U+2321. Fixed diacritics on U+0200-U+0217.
+
+2005-10-12 Denis Jacquerye <moyogo@gmail.com>
+
+       * sfd/FreeSerif.sfd - Corrected diacritics position on 
+       U+01D5-01D9,01DB,01EA-01ED,0200-0217 and U+022A.
+       
+       * sfd/FreeSerif.sfd, sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd,
+       sfd/FreeSerifBoldItalic.sfd - added U+0186,0190,0254 and U+025B.
+       
+2005-10-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Fixed bug #13399 (glyphs for U+0360 and
+       U+0361 were swapped).
+       
+       * sfd/FreeSerif.sfd - Attempt to correct bug #13370: INTEGRAL
+       EXTENSION does not align with TOP/BOTTOM HALF INTEGRAL; added
+       glyph U+23AE.
+       
+2005-05-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Corrected shapes for Cross of Lorraine and
+       Cross of Jerusalem.
+
+2005-04-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSansBold.sfd - Added some combining accents, just to
+       test the a version of FontForge.
+
+2003-12-05  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Some composite Latin characters rebuilt, as
+       they had accents 600 points to the left due to changes on October
+       2. Some other minor changes in the mathematics area.
+
+2003-10-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMonoOblique.sfd, sfd/FreeSerifBoldItalic.sfd,
+       FreeSerifItalic.sfd - applied Josef Segur's corrections from
+       Oct. 5.
+
+2003-10-02  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Abbas Izad's contributed Arabic/Farsi
+       characters added.
+       
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
+       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
+       sfd/FreeSerifBoldItalic.sfd - Combining characters (U+0300 -
+       U+036F) moved left, so that they have negative horizontal values
+       and zero advance width.
+
+2003-09-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd - Started working
+       on super- and subscripts. 
+
+2003-09-12  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd, sfd/FreeSerif.sfd - Added some missing
+        Hiragana and Katakana characters.
+
+       * sfd/FreeSansBold.sfd - Cleared background characters in Latin
+       Extended-A. Added some automatically constructed characters in
+       Latin Extended-B. Started with superscripts and subscripts.
+
+       * sfd/FreeSans.sfd - Subscript numerals (U+2080-U+2089) completed.
+       
+2003-05-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Thai characters po pla and bo baimai
+       swapped; Thai character fongman corrected; all courtesy Theppitak
+       Karoonboonyanan.
+
+2003-05-17  Panayotis Katsaloulis  <panayotis@panayotis.com>
+
+       * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd,
+       sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - Full support
+       of all ancient greek glyphs
+
+2003-05-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * tools/KerningNumerals.pl - A Perl script for moving kerning
+       information from ASCII numerals (U+0030...) to characters in the
+       Adobe corporate use area (U+F6xx).
+
+       * sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd,
+       sfd/FreeSansBoldOblique.sfd - Created kerned numerals in the Adobe
+       corporate use area (U+F6xx) and moved kerning information from
+       ASCII numerals to the kerned numerals.
+
+2003-05-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - First approximation of super- and subscript
+       numerals and vulgar fractions.
+
+       * sfd/FreeSerif.sfd - Super- and subscript numerals complete,
+       vulgar fractions completed and redone as references rather than
+       outlines.
+
+2003-05-12  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Clean-up of the Cyrillic letters added on
+       March 27; super- and subscripts, vulgar fractions.
+
+2003-05-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMonoBold.sfd - Added a couple of characters to
+       the Latin Extended-B area and the IPA extensions area.
+
+2003-05-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifBoldItalic.sfd - Added a couple of characters to
+       the Latin Extended-B area.
+
+       * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd,
+       sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - ASCII
+       numerals now monospaced; kerned numerals moved to Adobe corporate
+       use area
+       (U+F6xx).
+
+2003-05-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Roman numerals now more complete.
+
+       * sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd - Accented
+       characters added in the Latin Extended-B area.
+
+       * sfd/FreeSans.sfd - Greek accents added in the Greek Extended
+       area, characters added in the Latin Extended-B area, Roman
+       numerals added.
+
+       * sfd/FreeMonoOblique.sfd - Kerning pairs removed (what were they
+       doing in a monospaced font, anyway?).
+
+       * sfd/FreeMonoBoldOblique.sfd - Additions in Latin Extended-B and
+       Basic Greek.
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd, sfd/FreeMonoOblique.sfd,
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd,
+       sfd/FreeSansBoldOblique.sfd - Major cleanup (fixed widths, open
+       paths, path directions (clockwise/counter-clockwise), points
+       rounded to integer values; outlines simplified etc.)
+
+2003-05-06  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * tools/OS2UnicodeRange - A simple script to display OS/2 Unicode
+       range table in TrueType fonts.
+
+       * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd - ASCII numerals now
+       monospaced; kerned numerals moved to Adobe corporate use area
+       (U+F6xx). FreeSans is done, FreeSansBold half-way.
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
+       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
+       sfd/FreeSerifBoldItalic.sfd - Added 2003 in copyright info.
+
+2003-03-27  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Cyrillic and Cyrillic Supplement blocks
+       brought to conformance with Unicode 3.2, courtesy Daniel Shurovich
+       Chirkov.
+
+2003-03-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - somewhat wider
+       germandbls (U+00DF), due to complaints by Walter Schmidt.
+
+2003-03-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - Added Sinhala glyphs from the Tipitaka
+       project <http://www.metta.lk>, recoded to Unicode by Noah Levitt.
+
+2003-02-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - Minor changes on mathematical operators.
+
+2003-02-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - minor cleanup of glyph backgrounds; changed
+       integral signs (U+222B - U+2230)
+
+2003-02-05  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - added a couple of glyphs in the IPA and
+       African Latin ranges.
+
+2003-01-30  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd - Corrected Maltese Hbar (U+0126)
+       and/or hbar (U+0127).
+
+2003-01-28  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerifItalic.sfd - Corrected Maltese hbar (U+0127).
+
+2002-12-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * tools/ConvertFont - PfaEdit script for converting SFD files to
+       TrueType fonts.
+
+       * sfd/FreeSans.sfd - Added Tamil and Kannada glyphs from the
+       Akruti Indic fonts.
+
+2002-12-17  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - Added Devanagari and Gujarati glyphs from the
+       Akruti Indic fonts.
+
+       * www/index.html - Added information on Rogier van Dalen's tools.
+
+       * AUTHORS - Added M.S. Sridhar.
+
+       * CREDITS - Correct spelling of Culmus project. Added M.S. Sridhar.
+
+2002-12-06  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Added Braille glyphs, courtesy Vyacheslav
+       Dikonov.
+
+       * sfd/FreeSans.sfd - Added Unicode Syriac glyphs, courtesy
+       Vyacheslav Dikonov.
+
+2002-10-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * www/index.html - Added information on the availability of the
+       Debian GNU/Linux package.
+
+       * sfd/FreeSerif.sfd, sfd/FreeSans.sfd - added some kern pairs
+       beyond Latin-1 area.
+
+       * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd,
+       sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - re-introduced
+       all the emtpy glyph slots (changes from Sep 23 made PfaEdit
+       crash). 
+
+2002-09-23  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd,
+       sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - imported
+       kerning information from the URW++ AFM files
+
+2002-09-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoOblique.sfd - updated Hebrew parts to comply with
+       Culmus v0.6.
+
+       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansOblique.sfd - Added Danilo Segan's Serbian Cyrillic
+       glyphs; updated Hebrew parts to comply with Culmus v0.6.
+
+2002-09-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoOblique.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansOblique.sfd - Updated Cyrillic part to match
+       Filippov's 1.0.7pre14
+
+       * sfd/FreeSansOblique.sfd - added Sam Stepanyan's Armenian glyphs
+       from FreeSans (skewed for 12 degrees).
+
+2002-09-06  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd,
+       sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd - Added Maxim
+       Iorsh's Hebrew characters.
+
+2002-08-29  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd,
+       sfd/FreeMonoBold.sfd, sfd/FreeMonoOblique.sfd - Added Maxim
+       Iorsh's Hebrew characters.
+
+       * AUTHORS, CREDITS - Added Maxim Iorsh as author.
+
+2002-08-28  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * www/index.html - Added information of Microsoft's withdrawal of
+       freely available Unicode TrueType fonts
+
+       * www/resources.html - Added link to Maxim Iorsh's Culmus project.
+       
+2002-07-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Added a couple of characters (Arrows area).
+
+2002-06-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Applied Michalis Kabrianis's patch concerning
+       perispomeni in Greek politoniko.
+
+2002-05-23  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Applied Michalis Kabrianis's patch concerning
+       psili in Greek politoniko. Also added two working variants of
+       chars in the IPA range.
+
+2002-05-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, sfd/FreeSerif.sfd,
+       sfd/FreeSerifBold.sfd - Deleted explicit ".notdef" character with
+       no contours.
+
+2002-05-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
+       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
+       sfd/FreeSerifBoldItalic.sfd - The new version of PfaEdit saves
+       correctly formed Panose and LineGap lines.
+
+       * sfd/FreeSansBoldOblique.sfd - Filled-in the missing TTFWidth and
+       TTFWeight values.
+
+2002-05-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - Added diacritics to the Spacing Modifier
+       Letters and Combining Diacritical Marks areas. Added composed
+       glyphs to the Latin Extended-B area.
+
+2002-05-07  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
+       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
+       sfd/FreeSerifBoldItalic.sfd - Updated Panose information with data
+       provided by Josef W. Segur. Updated TTF headers with English and
+       Slovenian text.
+
+2002-04-30  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMonoBold.sfd - Working on Greek small letters. Several
+       minor changes (lower carons etc.)
+
+2002-04-29  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * FreeMonoBoldOblique.sfd - Started adding Greek.
+
+       * sfd/FreeMonoBold.sfd - Added glyphs in the Geometrical Shapes
+       and Miscellaneous Symbols area. Harmonizing Greek with Latin. Done
+       with capitals.
+
+       * sfd/FreeMono.sfd - Deleted the explicit .notdef character. Added
+       one glyph to the Geometrical Shapes area, which is now completed;
+       added three glyphs to the Miscellaneous Symbols area. Harmonizing
+       Greek with Latin. Done with the capitals.
+
+2002-04-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - Adjusted accent positions on several glyphs
+       in the Latin Extended-A area.
+
+2002-04-25  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMonoBold.sfd - Box Drawing area completed. Added a
+       couple of glyphs in the Geometrical Shapes area.
+
+       * sfd/FreeMono.sfd - Small corrections in the Box Drawing area.
+
+2002-04-24  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Box Drawing area completed.
+
+2002-04-23  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * tools/WGL4.lst - corrected.
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd - Working on Box Drawing
+       area.
+
+2002-04-22  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd - Working on Latin
+       Extended-B and Greek.
+
+2002-04-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Somewhat cleaner chess figures.
+
+       * tools/MES-2.txt, tools/MES-2.lst - Corrected list (it is not
+       203C-203E, it is 203C and 203E).
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd,
+       sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd,
+       sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd,
+       sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd,
+       sfd/FreeSerifBoldItalic.sfd - Changed "Family Name" from Free to
+       FreeSerif, FreeSans and FreeMono, as appropriate. Changed Font
+       Modifiers from MonoBold etc. to Bold, Italic, Oblique, BoldOblique
+       and BoldItalic.
+
+2002-04-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd,
+       sfd/FreeMonoBoldOblique.sfd - Corrected metrics; now all character
+       widths are set to 600.
+
+2002-04-17  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Corrected glyphs in the Box Drawing area and
+       Block Elements area, which should extend through the ascender *and
+       descender* height.
+
+       * sfd/FreeMonoBold.sfd - Continued working on harmonizing Greek
+       letters with Latin and Cyrillic.
+
+       * sfd/FreeMonoBold.sfd - Added some box drawing characters.
+
+2002-04-16  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * www/design-notes.html - Updated notes on stroke width for
+       symbols in Free Mono Bold.
+
+       * sfd/FreeMono.sfd - Added a handful of characters in the
+       Miscellaneous Symbols area.
+
+       * sfd/FreeMonoBoldOblique.sfd - Added subscripts, superscripts and
+       vulgar fractions.
+
+       * sfd/FreeMonoBold.sfd - Started harmonizing Greek letters with
+       Latin and Cyrillic.
+
+       * sfd/FreeMonoBold.sfd - Added subscripts, superscripts and vulgar
+       fractions.
+
+2002-04-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * www/design-notes.html - Updated notes on super-/subscripts in
+       Free Mono Bold. Separate subsections for Free Mono regular and
+       Free Mono Bold.
+
+2002-04-12  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Added Ethiopian glyphs, converted from the
+       Metafont sources from TGI, Universität Hamburg (authors Berhanu
+       Beyene, Prof. Dr. Manfred Kudlek, Olaf Kummer, and Jochen
+       Metzinger) using Szabo's TeXtrace and retouched using
+       PfaEdit. Ethiopian metafonts are released under GNU GPL,
+       <http://www.informatik.uni-hamburg.de/TGI/mitarbeiter/wimis/kummer/ethiop_eng.html>.
+
+       * sfd/FreeMonoBold.sfd - Added 40 characters, mostly in the Latin
+       Extended-B and IPA Extensions areas.
+
+2002-04-11  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Added a handful of characters in the Latin
+       Extended-B, IPA Extensions, Currency Symbols and Miscellaneous
+       Symbols areas.
+
+2002-04-09  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Correcting accent positioning in the Extended
+       Greek area; adding a couple of characters here and there. Still 20
+       characters short of MES-2 conformance.
+
+2002-04-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Added some characters in the Arrows area;
+       more or less completed Extended Greek area (accents still need to
+       be fine-tuned).
+
+2002-04-05  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Modern non-Russian Cyrilic mostly completed.
+
+       * sfd/FreeMonoOblique.sfd - Synchronized with FreeMono.
+
+       * sfd/FreeSerif.sfd - Added Thomas Ridgeway's Tamil characters
+       (converted from Metafont and edited somehwat).
+       
+2002-04-04  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMonoOblique.sfd - Armenian letters added.
+
+       * sfd/FreeMonoBold.sfd - Serbian Cyrillic letters dje, tshe, lje
+       and nje corrected.
+
+       * sfd/FreeMono.sfd - Serbian Cyrillic letters dje and tshe
+       corrected. Some other non-Russian Cyrillic letters modified and
+       "welded together".
+
+2002-04-03  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Added more or less complete Armenian
+       area. The glyphs are a tidied-up version based on the Armenian
+       Courier on the <http://www.cilicia.com/armo8.html>. Now we have
+       1673 characters.
+
+2002-03-28  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Added some mathematical symbols.
+
+2002-03-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSans.sfd - took H.S. Pannu's Gurmukhi from FreeSerif. It
+       actually fits to FreeSans much better. It seems I'll have to look
+       for another Gurmukhi font with modulated stroke for FreeSerif.
+
+       * sfd/FreeSerifItalic.sfd - replaced existing Hebrew glyphs by
+       those from FreeSerif (slanted for 15.5 degrees).
+
+       * sfd/FreeSerif.sfd - Added dotted Hebrew letters. Changed barred H.
+
+       * sfd/FreeMono.sfd - Completed vulgar fractions; minor changes in
+       Greek; added some mathematical operators.
+
+       * sfd/FreeMonoBold.sfd - added 12 characters to Latin Extended-B
+       and IPA Extensions areas (total 984).
+
+2002-03-25  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMonoBold.sfd - started adding Latin Extended-B and IPA
+       Extensions.
+
+       * sfd/FreeMono.sfd - Minor cosmetic changes; cleaning up Greek
+       (removing redundant control points), added some non-European
+       Cyrillic glyphs as a test.
+
+2002-03-22  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - Some minor modifications; letters in Latin
+       Extended-B area "welded" together.
+
+2002-03-20  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * www/index.html - finally linked the resources and design notes
+       pages.
+
+       * www/design-notes.html - added scaling information for super- and
+       subscript numerals in FreeMono.
+
+2002-03-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - the Latin Extended-B and IPA Extension area
+       characters moved from FreeMono and skewed for 12 degrees.
+
+2002-03-18  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - added a dozen or two of new characters, in
+       particular in the Latin Extended-B and IPA Extension area.
+
+2002-03-15  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - added a dozen of two of new characters, in
+       particular in the IPA Extension area.
+
+       * www/design-notes.html - Corrected data for x-height in FreeMono;
+       information on constructing small caps.
+
+2002-03-14  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeMono.sfd - added three smiley characters to the
+       Miscallaneous Symbols area.
+
+2002-03-10  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Anshuman Pandey has only converted Gurmukhi
+       from TrueType to Metafont; the original author of Gurkmukhi font
+       is Hardip Singh Pannu <http://members.aol.com/hspannu/punjabi.html>.
+       Got the permission from him to include the Gurmukhi glyph set.
+
+2002-03-08  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Added some more glyphs in the Mathematical
+       Symbols area to a total number of 3374.
+
+2002-03-06  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Added a basic Gurmukhi set.
+
+       * www/design-notes.html - started a page on design notes
+
+       * sfd/FreeMono.sfd - realized that glyphs in the Box Drawing area
+       and Block Elements area should extend through the ascender *and
+       descender* height, and corrected it.
+
+       * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd - added some musical
+       glyphs, linking "no-break space" to space, "soft hyphen" to
+       hyphen-minus etc.
+
+2002-03-05  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * tools/WGL4.lst - Added Windows Glyph List 4.0
+
+       * tools/LigatureList.pl - Wrote a Perl script, which lists the
+       GSUB list (ligature list) of a OpenType font.
+
+       * sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd,
+       sfd/FreeSerifItalic.sfd - auxilliary Hebrew glyphs added. They are
+       too light compared with Latin and will be substituted with better
+       ones.
+
+2002-03-04  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Added some more glyphs to the Mathematical
+       Operators area (page 0x22).
+
+       * sfd/FreeSerif.sfd - Incomplete and fragmentary support for
+       Devanagari, originating from Harsh Kumar's Shusha fonts was
+       replaced by Frans Velthuis' Devanagari metafont, now maintained by
+       Anshuman Pandey <apandey@u.washington.edu> and available under
+       GPL. Until I figure out how to provide glyph substitution table in
+       OpenType, only the Unicode part is there.
+
+2002-02-28  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * ChangeLog file created
+
+       * sfd/FreeSerif.sfd - Added some Telugu glyphs to page 0x0C,
+       courtesy  Prasad A. Chodavarapu <http://chaitanya.bhaavana.net/fonts/>
+
+       * sfd/FreeSerif.sfd - Added some glyphs to the Miscellaneous
+       Symbols page (0x26).
+       
+2002-02-26  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * mailing lists freefont-announce and freefont-bugs created
+
+2002-02-25  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/FreeSerif.sfd - Added a couple of glyphs in Mathematics
+       Operators area.
+
+       * sfd/FreeMono.sfd 
+       - Added some more glyphs, in particular in the Mathematical
+       Operators section.
+       - Changed FamilyName to Free, FontName to FreeMono, and Full name
+       to "Free Monospaced".
+
+2002-02-20  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * sfd/ directory added containing FreeSerif, FreeSans and FreeMono
+       families.
+
+       * tools/ directory added containing lists with characters required
+       for MES (Multilinguag European Subset) compliance.
+
+       * tools/mes-list-expand.pl created - a Perl script for expanding MES
+       ranges into simple one-char-per-line format
+
+       * tools/CheckConformance.pl created - a Perl script for checking
+       conformance of a font file with a given coded character set
+
+       * homepage <http://www.freesoftware.fsf.org/freefont/> created
+
+2002-02-19  Primoz Peterlin  <primoz.peterlin@biofiz.mf.uni-lj.si>
+
+       * freefont (Free UCS Scalable Fonts) project approved on
+       savannah.gnu.org: <http://savannah.gnu.org/projects/freefont/>
diff --git a/lib/tcpdf/fonts/freefont-20090104/INSTALL b/lib/tcpdf/fonts/freefont-20090104/INSTALL
new file mode 100644 (file)
index 0000000..bad7da0
--- /dev/null
@@ -0,0 +1,86 @@
+                          Installing GNU FreeFont
+                          =======================
+
+GNU FreeFont can be used in any modern operating system.
+
+This document explains how to install FreeFont on some common systems.
+
+UNIX/GNU/Linux/BSD Systems
+--------------------------
+
+FreeFont works with any system using the free font rasterizer FreeType
+<http://www.freetype.org/>.
+
+* Debian GNU/Linux
+
+Users of Debian GNU/Linux system will probably want to use the Debian package,
+available from the Debian site, 
+
+       <http://packages.debian.org/unstable/x11/ttf-freefont.html>,
+
+or any of its mirrors.
+
+Install them by issuing the command
+       apt-get install ttf-freefont
+
+
+* KDE local installation
+
+Users of KDE can install .ttf files on a per-user basis using the KDE 
+Control Center module "kcmfontinst", which may appear in the menu as
+
+       Settings -> System Administration -> Font Installer
+
+This is especially helpful for developers and testers.
+
+
+* Generic X-windows
+
+       1) Fetch the freefont-ttf.tar.gz package with Free UCS outline fonts
+          in the TrueType format.
+
+       2) Unpack TrueType fonts into a suitable directory,
+          e.g. /usr/local/share/fonts/default/TrueType/
+
+       3) If you have chosen any other directory, make sure the directory you
+          used to install the fonts is listed in the path searched by the X
+          Font Server by editing the config file in /etc/X11/.
+
+          In some systems, you list the directory in the item "catalogue="
+          in the file /etc/X11/fs/config.
+
+       4) Run ttmkfdir in the directory where you unpacked the fonts.
+
+
+Windows 95/98/NT/2000/XP; Vista
+-------------------------------
+
+Note that in at least Vista, XP and 2000, the OpenType versions perform much
+better than, and are recommended over, the TrueType ones.
+
+* Vista:
+       1) From the Start menu, open Control Panels
+       2) Drag-n-drop font files onto Fonts control panel
+           You may get a dialog saying
+               "Windows needs your permission to continue"
+          a) Click Continue
+
+* 95/98/NT:
+       The font installation is similar to Vista.
+
+       In order to use OpenType, users of Windows 95, 98 and NT 4.0 can
+       install Adobe's 'Type Manager Light'.  It is available for download
+       without cost from Adobe's web site.
+
+       Otherwise, use the TrueType versions.
+
+Mac OS X
+--------
+
+Installing on Mac OS X consists of moving the .ttf files to either
+       /Library/Fonts/  or  ~/Library/Fonts/
+depending on whether they should be available to all users on your system
+or just to yourself.
+
+--------------------------------------------------------------------------
+$Id$
diff --git a/lib/tcpdf/fonts/freefont-20090104/README b/lib/tcpdf/fonts/freefont-20090104/README
new file mode 100644 (file)
index 0000000..b8865a2
--- /dev/null
@@ -0,0 +1,108 @@
+-*-text-*-
+                          GNU FreeFont
+
+The GNU FreeFont project aims to provide a useful set of free scalable
+(i.e., OpenType) fonts covering as much as possible of the ISO 10646/Unicode
+UCS (Universal Character Set).
+
+Statement of Purpose
+--------------------
+
+The practical reason for putting glyphs together in a single font face is
+to conveniently mix symbols and characters from different writing systems,
+without having to switch fonts.
+
+Coverage
+--------
+
+FreeFont covers the following character sets
+
+* ISO 8859 parts 1-15
+* CEN MES-3 European Unicode Subset
+  http://www.evertype.com/standards/iso10646/pdf/cwa13873.pdf
+* IBM/Microsoft code pages 437, 850, 852, 1250, 1252 and more
+* Microsoft/Adobe Windows Glyph List 4 (WGL4)
+  http://www.microsoft.com/typography/otspec/WGL4.htm
+* KOI8-R and KOI8-RU
+* DEC VT100 graphics symbols
+* International Phonetic Alphabet
+* Arabic, Hebrew, Armenian, Georgian, Ethiopian and Thai alphabets,
+  including Arabic presentation forms A/B
+* mathematical symbols, including the whole TeX repertoire of symbols
+* APL symbols
+  etc.
+
+Editing
+-------
+
+The free outline font editor, George Williams's FontForge
+<http://fontforge.sourceforge.net/> is used for editing the fonts.
+
+Design Issues
+-------------
+
+Which font shapes should be made?  Historical style terms like Renaissance
+or Baroque letterforms cannot be applied beyond Latin/Cyrillic/Greek
+scripts to any greater extent than Kufi or Nashki can be applied beyond
+Arabic script; "italic" is really only meaningful for Latin letters. 
+
+However, most modern writing systems have typographic formulations for
+contrasting uniform and modulated character stroke widths, and have some
+history with "oblique", faces.  Since the advent of the typewriter, most
+have developed a typographic style with uniform-width characters.
+
+Accordingly, the FreeFont family has one monospaced - FreeMono - and two
+proportional faces (one with uniform stroke - FreeSans - and one with
+modulated stroke - FreeSerif).
+
+To make text from different writing systems look good side-by-side, each
+FreeFont face is meant to contain characters of similar style and weight.
+
+Licensing
+---------
+
+Free UCS scalable fonts is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as published
+by the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+The fonts are distributed in the hope that they will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+As a special exception, if you create a document which uses this font, and
+embed this font or unaltered portions of this font into the document, this
+font does not by itself cause the resulting document to be covered by the
+GNU General Public License. This exception does not however invalidate any
+other reasons why the document might be covered by the GNU General Public
+License. If you modify this font, you may extend this exception to your
+version of the font, but you are not obligated to do so.  If you do not
+wish to do so, delete this exception statement from your version.
+
+
+Files and their suffixes
+------------------------
+
+The files with .sfd (Spline Font Database) are in FontForge's native format. 
+Please use these if you plan to modify the font files.
+
+TrueType fonts for immediate consumption are the files with the .ttf
+(TrueType Font) suffix.  These are ready to use in Xwindows based
+systems using FreeType, on Mac OS, and on older Windows systems.
+
+OpenType fonts (with suffix .otf) are for use in Windows Vista. 
+Note that although they can be installed on Linux, but many applications
+in Linux still don't support them.
+
+
+--------------------------------------------------------------------------
+Primoz Peterlin, <primoz.peterlin@biofiz.mf.uni-lj.si>
+Steve White <stevan.white@googlemail.com>
+
+Free UCS scalable fonts: http://savannah.gnu.org/projects/freefont/
+$Id$
index 22bec63f7cc986baa56472221fa8e92a38dbf264..93b7b3cf4ce1ca84de56e321f9f0adc0690917c3 100644 (file)
Binary files a/lib/tcpdf/fonts/freemono.ctg.z and b/lib/tcpdf/fonts/freemono.ctg.z differ
index 524fb490f5996773b6732110b4de791f1adc2d52..123b3bf26bf8fc5cadeb2f533ef213a39012c035 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeMono';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>40,'Flags'=>33,'FontBBox'=>'[-557 -343 699 956]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
+$desc=array('Ascent'=>800,'Descent'=>-200,'CapHeight'=>40,'Flags'=>32,'FontBBox'=>'[-793 -200 699 800]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
 $up=-125;
 $ut=50;
 $dw=600;
@@ -63,188 +63,246 @@ $cw=array(
 617=>600,618=>600,619=>600,620=>600,621=>600,622=>600,623=>600,624=>600,625=>600,626=>600,
 627=>600,628=>600,629=>600,630=>600,631=>600,632=>600,633=>600,634=>600,635=>600,636=>600,
 637=>600,638=>600,639=>600,640=>600,641=>600,642=>600,643=>600,644=>600,645=>600,646=>600,
-647=>600,648=>600,649=>600,651=>600,652=>600,653=>600,654=>600,655=>600,656=>600,657=>600,
-658=>600,659=>600,660=>600,661=>600,662=>600,663=>600,664=>600,665=>600,667=>600,668=>600,
-669=>600,670=>600,671=>600,672=>600,673=>600,674=>600,675=>600,676=>600,677=>600,678=>600,
-679=>600,699=>600,700=>600,701=>600,702=>600,703=>600,711=>600,712=>600,713=>600,714=>600,
-715=>600,720=>600,721=>600,722=>600,723=>600,724=>600,725=>600,726=>600,727=>600,728=>600,
-729=>600,730=>600,731=>600,733=>600,735=>600,750=>600,768=>600,769=>600,770=>600,771=>600,
-772=>600,773=>600,774=>600,775=>600,776=>600,777=>600,778=>600,779=>600,780=>600,781=>600,
-782=>600,783=>600,784=>600,785=>600,795=>600,801=>600,802=>600,807=>600,808=>600,821=>600,
-822=>600,823=>600,824=>600,834=>600,836=>600,890=>600,900=>600,901=>600,902=>600,903=>600,
-904=>600,905=>600,906=>600,908=>600,910=>600,911=>600,912=>600,913=>600,914=>600,915=>600,
-916=>600,917=>600,918=>600,919=>600,920=>600,921=>600,922=>600,923=>600,924=>600,925=>600,
-926=>600,927=>600,928=>600,929=>600,931=>600,932=>600,933=>600,934=>600,935=>600,936=>600,
-937=>600,938=>600,939=>600,940=>600,941=>600,942=>600,943=>600,944=>600,945=>600,946=>600,
-947=>600,948=>600,949=>600,950=>600,951=>600,952=>600,953=>600,954=>600,955=>600,956=>600,
-957=>600,958=>600,959=>600,960=>600,961=>600,962=>600,963=>600,964=>600,965=>600,966=>600,
-967=>600,968=>600,969=>600,970=>600,971=>600,972=>600,973=>600,974=>600,976=>600,977=>600,
-978=>600,979=>600,980=>600,981=>600,982=>600,986=>600,987=>600,988=>600,1009=>600,1013=>600,
-1024=>600,1025=>600,1026=>600,1027=>600,1028=>600,1029=>600,1030=>600,1031=>600,1032=>600,1033=>600,
-1034=>600,1035=>600,1036=>600,1037=>600,1038=>600,1039=>600,1040=>600,1041=>600,1042=>600,1043=>600,
-1044=>600,1045=>600,1046=>600,1047=>600,1048=>600,1049=>600,1050=>600,1051=>600,1052=>600,1053=>600,
-1054=>600,1055=>600,1056=>600,1057=>600,1058=>600,1059=>600,1060=>600,1061=>600,1062=>600,1063=>600,
-1064=>600,1065=>600,1066=>600,1067=>600,1068=>600,1069=>600,1070=>600,1071=>600,1072=>600,1073=>600,
-1074=>600,1075=>600,1076=>600,1077=>600,1078=>600,1079=>600,1080=>600,1081=>600,1082=>600,1083=>600,
-1084=>600,1085=>600,1086=>600,1087=>600,1088=>600,1089=>600,1090=>600,1091=>600,1092=>600,1093=>600,
-1094=>600,1095=>600,1096=>600,1097=>600,1098=>600,1099=>600,1100=>600,1101=>600,1102=>600,1103=>600,
-1104=>600,1105=>600,1106=>600,1107=>600,1108=>600,1109=>600,1110=>600,1111=>600,1112=>600,1113=>600,
-1114=>600,1115=>600,1116=>600,1117=>600,1118=>600,1119=>600,1124=>600,1130=>600,1132=>600,1136=>600,
-1137=>600,1164=>600,1165=>600,1166=>600,1167=>600,1168=>600,1169=>600,1170=>600,1171=>600,1172=>600,
-1173=>600,1174=>600,1175=>600,1176=>600,1177=>600,1178=>600,1179=>600,1180=>600,1181=>600,1182=>600,
-1183=>600,1184=>600,1185=>600,1186=>600,1187=>600,1188=>600,1189=>600,1190=>600,1191=>600,1192=>600,
-1193=>600,1194=>600,1195=>600,1196=>600,1197=>600,1198=>600,1199=>600,1200=>600,1201=>600,1202=>600,
-1203=>600,1204=>600,1205=>600,1206=>600,1207=>600,1208=>600,1209=>600,1210=>600,1211=>600,1212=>600,
-1213=>600,1214=>600,1215=>600,1216=>600,1217=>600,1218=>600,1219=>600,1220=>600,1221=>600,1222=>600,
-1223=>600,1224=>600,1225=>600,1226=>600,1227=>600,1228=>600,1229=>600,1230=>600,1232=>600,1233=>600,
-1234=>600,1235=>600,1236=>600,1237=>600,1238=>600,1239=>600,1240=>600,1241=>600,1242=>600,1243=>600,
-1244=>600,1245=>600,1246=>600,1247=>600,1248=>600,1249=>600,1250=>600,1251=>600,1252=>600,1253=>600,
-1254=>600,1255=>600,1256=>600,1257=>600,1258=>600,1259=>600,1260=>600,1261=>600,1262=>600,1263=>600,
-1264=>600,1265=>600,1266=>600,1267=>600,1268=>600,1269=>600,1272=>600,1273=>600,1329=>600,1330=>600,
-1331=>600,1332=>600,1333=>600,1334=>600,1335=>600,1336=>600,1337=>600,1338=>600,1339=>600,1340=>600,
-1341=>600,1342=>600,1343=>600,1344=>600,1345=>600,1346=>600,1347=>600,1348=>600,1349=>600,1350=>600,
-1351=>600,1352=>600,1353=>600,1354=>600,1355=>600,1356=>600,1357=>600,1358=>600,1359=>600,1360=>600,
-1361=>600,1362=>600,1363=>600,1364=>600,1365=>600,1366=>600,1377=>600,1378=>600,1379=>600,1380=>600,
-1381=>600,1382=>600,1383=>600,1384=>600,1385=>600,1386=>600,1387=>600,1388=>600,1389=>600,1390=>600,
-1391=>600,1392=>600,1393=>600,1394=>600,1395=>600,1396=>600,1397=>600,1398=>600,1399=>600,1400=>600,
-1401=>600,1402=>600,1403=>600,1404=>600,1405=>600,1406=>600,1407=>600,1408=>600,1409=>600,1410=>600,
-1411=>600,1412=>600,1413=>600,1414=>600,1417=>600,1418=>600,1456=>600,1457=>600,1458=>600,1459=>600,
-1460=>600,1461=>600,1462=>600,1463=>600,1464=>600,1465=>600,1467=>600,1468=>600,1469=>600,1470=>600,
-1471=>600,1472=>600,1473=>600,1474=>600,1475=>600,1476=>600,1488=>600,1489=>600,1490=>600,1491=>600,
-1492=>600,1493=>600,1494=>600,1495=>600,1496=>600,1497=>600,1498=>600,1499=>600,1500=>600,1501=>600,
-1502=>600,1503=>600,1504=>600,1505=>600,1506=>600,1507=>600,1508=>600,1509=>600,1510=>600,1511=>600,
-1512=>600,1513=>600,1514=>600,1520=>600,1521=>600,1522=>600,1523=>600,1524=>600,4304=>600,4305=>600,
-4306=>600,4307=>600,4308=>600,4309=>600,4310=>600,4311=>600,4312=>600,4313=>600,4314=>600,4315=>600,
-4316=>600,4317=>600,4318=>600,4319=>600,4320=>600,4321=>600,4322=>600,4323=>600,4324=>600,4325=>600,
-4326=>600,4327=>600,4328=>600,4329=>600,4330=>600,4331=>600,4332=>600,4333=>600,4334=>600,4335=>600,
-4336=>600,4337=>600,4338=>600,4339=>600,4340=>600,4341=>600,5792=>600,5793=>600,5794=>600,5795=>600,
-5796=>600,5797=>600,5798=>600,5799=>600,5800=>600,5801=>600,5802=>600,5803=>600,5804=>600,5805=>600,
-5806=>600,5807=>600,5808=>600,5809=>600,5810=>600,5811=>600,5812=>600,5813=>600,5814=>600,5815=>600,
-5816=>600,5817=>600,5818=>600,5819=>600,5820=>600,5821=>600,5822=>600,5823=>600,5824=>600,5825=>600,
-5826=>600,5827=>600,5828=>600,5829=>600,5830=>600,5831=>600,5832=>600,5833=>600,5834=>600,5835=>600,
-5836=>600,5837=>600,5838=>600,5839=>600,5840=>600,5841=>600,5842=>600,5843=>600,5844=>600,5845=>600,
-5846=>600,5847=>600,5848=>600,5849=>600,5850=>600,5851=>600,5852=>600,5853=>600,5854=>600,5855=>600,
-5856=>600,5857=>600,5858=>600,5859=>600,5860=>600,5861=>600,5862=>600,5863=>600,5864=>600,5865=>600,
-5866=>600,5867=>600,5868=>600,5869=>600,5870=>600,5871=>600,5872=>600,7680=>600,7681=>600,7682=>600,
-7683=>600,7684=>600,7685=>600,7686=>600,7687=>600,7688=>600,7689=>600,7690=>600,7691=>600,7692=>600,
-7693=>600,7694=>600,7695=>600,7696=>600,7697=>600,7698=>600,7699=>600,7700=>600,7701=>600,7702=>600,
-7703=>600,7704=>600,7705=>600,7706=>600,7707=>600,7708=>600,7709=>600,7710=>600,7711=>600,7712=>600,
-7713=>600,7714=>600,7715=>600,7716=>600,7717=>600,7718=>600,7719=>600,7720=>600,7721=>600,7722=>600,
-7723=>600,7724=>600,7725=>600,7726=>600,7727=>600,7728=>600,7729=>600,7730=>600,7731=>600,7732=>600,
-7733=>600,7734=>600,7735=>600,7736=>600,7737=>600,7738=>600,7739=>600,7740=>600,7741=>600,7742=>600,
-7743=>600,7744=>600,7745=>600,7746=>600,7747=>600,7748=>600,7749=>600,7750=>600,7751=>600,7752=>600,
-7753=>600,7754=>600,7755=>600,7756=>600,7757=>600,7758=>600,7759=>600,7760=>600,7761=>600,7762=>600,
-7763=>600,7764=>600,7765=>600,7766=>600,7767=>600,7768=>600,7769=>600,7770=>600,7771=>600,7772=>600,
-7773=>600,7774=>600,7775=>600,7776=>600,7777=>600,7778=>600,7779=>600,7780=>600,7781=>600,7782=>600,
-7783=>600,7784=>600,7785=>600,7786=>600,7787=>600,7788=>600,7789=>600,7790=>600,7791=>600,7792=>600,
-7793=>600,7794=>600,7795=>600,7796=>600,7797=>600,7798=>600,7799=>600,7800=>600,7801=>600,7802=>600,
-7803=>600,7804=>600,7805=>600,7806=>600,7807=>600,7808=>600,7809=>600,7810=>600,7811=>600,7812=>600,
-7813=>600,7814=>600,7815=>600,7816=>600,7817=>600,7818=>600,7819=>600,7820=>600,7821=>600,7822=>600,
-7823=>600,7824=>600,7825=>600,7826=>600,7827=>600,7828=>600,7829=>600,7830=>600,7831=>600,7832=>600,
-7833=>600,7834=>600,7835=>600,7840=>600,7841=>600,7842=>600,7843=>600,7844=>600,7845=>600,7846=>600,
-7847=>600,7848=>600,7849=>600,7850=>600,7851=>600,7852=>600,7853=>600,7854=>600,7855=>600,7856=>600,
-7857=>600,7858=>600,7859=>600,7860=>600,7861=>600,7862=>600,7863=>600,7864=>600,7865=>600,7866=>600,
-7867=>600,7868=>600,7869=>600,7870=>600,7871=>600,7872=>600,7873=>600,7874=>600,7875=>600,7876=>600,
-7877=>600,7878=>600,7879=>600,7880=>600,7881=>600,7882=>600,7883=>600,7884=>600,7885=>600,7886=>600,
-7887=>600,7888=>600,7889=>600,7890=>600,7891=>600,7892=>600,7893=>600,7894=>600,7895=>600,7896=>600,
-7897=>600,7898=>600,7899=>600,7900=>600,7901=>600,7902=>600,7903=>600,7904=>600,7905=>600,7906=>600,
-7907=>600,7908=>600,7909=>600,7910=>600,7911=>600,7912=>600,7913=>600,7914=>600,7915=>600,7916=>600,
-7917=>600,7918=>600,7919=>600,7920=>600,7921=>600,7922=>600,7923=>600,7924=>600,7925=>600,7926=>600,
-7927=>600,7928=>600,7929=>600,7936=>600,7937=>600,7938=>600,7939=>600,7940=>600,7941=>600,7942=>600,
-7943=>600,7944=>600,7945=>600,7946=>600,7947=>600,7948=>600,7949=>600,7950=>600,7951=>600,7952=>600,
-7953=>600,7954=>600,7955=>600,7956=>600,7957=>600,7960=>600,7961=>600,7962=>600,7963=>600,7964=>600,
-7965=>600,7968=>600,7969=>600,7970=>600,7971=>600,7972=>600,7973=>600,7974=>600,7975=>600,7976=>600,
-7977=>600,7978=>600,7979=>600,7980=>600,7981=>600,7982=>600,7983=>600,7984=>600,7985=>600,7986=>600,
-7987=>600,7988=>600,7989=>600,7990=>600,7991=>600,7992=>600,7993=>600,7994=>600,7995=>600,7996=>600,
-7997=>600,7998=>600,7999=>600,8000=>600,8001=>600,8002=>600,8003=>600,8004=>600,8005=>600,8008=>600,
-8009=>600,8010=>600,8011=>600,8012=>600,8013=>600,8016=>600,8017=>600,8018=>600,8019=>600,8020=>600,
-8021=>600,8022=>600,8023=>600,8025=>600,8027=>600,8029=>600,8031=>600,8032=>600,8033=>600,8034=>600,
-8035=>600,8036=>600,8037=>600,8038=>600,8039=>600,8040=>600,8041=>600,8042=>600,8043=>600,8044=>600,
-8045=>600,8046=>600,8047=>600,8048=>600,8049=>600,8050=>600,8051=>600,8052=>600,8053=>600,8054=>600,
-8055=>600,8056=>600,8057=>600,8058=>600,8059=>600,8060=>600,8061=>600,8064=>600,8065=>600,8066=>600,
-8067=>600,8068=>600,8069=>600,8070=>600,8071=>600,8072=>600,8073=>600,8074=>600,8075=>600,8076=>600,
-8077=>600,8078=>600,8079=>600,8080=>600,8081=>600,8082=>600,8083=>600,8084=>600,8085=>600,8086=>600,
-8087=>600,8088=>600,8089=>600,8090=>600,8091=>600,8092=>600,8093=>600,8094=>600,8095=>600,8096=>600,
-8097=>600,8098=>600,8099=>600,8100=>600,8101=>600,8102=>600,8103=>600,8104=>600,8105=>600,8106=>600,
-8107=>600,8108=>600,8109=>600,8110=>600,8111=>600,8112=>600,8113=>600,8114=>600,8115=>600,8116=>600,
-8118=>600,8119=>600,8120=>600,8121=>600,8122=>600,8123=>600,8124=>600,8126=>600,8127=>600,8128=>600,
-8129=>600,8130=>600,8131=>600,8132=>600,8134=>600,8135=>600,8136=>600,8137=>600,8138=>600,8139=>600,
-8140=>600,8141=>600,8142=>600,8143=>600,8144=>600,8145=>600,8146=>600,8147=>600,8150=>600,8151=>600,
-8152=>600,8153=>600,8154=>600,8155=>600,8157=>600,8158=>600,8159=>600,8160=>600,8161=>600,8162=>600,
-8163=>600,8164=>600,8165=>600,8166=>600,8167=>600,8168=>600,8169=>600,8170=>600,8171=>600,8172=>600,
-8173=>600,8174=>600,8175=>600,8178=>600,8179=>600,8180=>600,8182=>600,8183=>600,8184=>600,8185=>600,
-8186=>600,8187=>600,8188=>600,8189=>600,8190=>600,8192=>600,8193=>600,8194=>600,8195=>600,8201=>600,
-8208=>600,8209=>600,8210=>600,8213=>600,8215=>600,8219=>600,8223=>600,8241=>600,8242=>600,8243=>600,
-8244=>600,8245=>600,8246=>600,8247=>600,8251=>600,8252=>600,8253=>600,8254=>600,8260=>600,8261=>600,
-8262=>600,8264=>600,8265=>600,8266=>600,8267=>600,8304=>600,8305=>600,8308=>600,8309=>600,8310=>600,
-8311=>600,8312=>600,8313=>600,8314=>600,8315=>600,8316=>600,8317=>600,8318=>600,8319=>600,8320=>600,
-8321=>600,8322=>600,8323=>600,8324=>600,8325=>600,8326=>600,8327=>600,8328=>600,8329=>600,8330=>600,
-8331=>600,8332=>600,8333=>600,8334=>600,8355=>600,8356=>600,8359=>600,8362=>600,8373=>600,8448=>600,
-8449=>600,8450=>600,8451=>600,8453=>600,8454=>600,8455=>600,8461=>600,8464=>600,8465=>600,8466=>600,
-8467=>600,8468=>600,8469=>600,8470=>600,8471=>600,8472=>600,8473=>600,8474=>600,8476=>600,8477=>600,
-8478=>600,8484=>600,8486=>600,8487=>600,8489=>600,8490=>600,8491=>600,8498=>600,8501=>600,8531=>600,
-8532=>600,8533=>600,8534=>600,8535=>600,8536=>600,8537=>600,8538=>600,8539=>600,8540=>600,8541=>600,
-8542=>600,8543=>600,8544=>600,8545=>600,8546=>600,8547=>600,8548=>600,8549=>600,8550=>600,8551=>600,
-8552=>600,8553=>600,8554=>600,8555=>600,8556=>600,8557=>600,8558=>600,8559=>600,8592=>600,8593=>600,
-8594=>600,8595=>600,8596=>600,8597=>600,8598=>600,8599=>600,8600=>600,8601=>600,8602=>600,8603=>600,
-8604=>600,8605=>600,8606=>600,8607=>600,8608=>600,8609=>600,8610=>600,8611=>600,8612=>600,8613=>600,
-8614=>600,8615=>600,8616=>600,8617=>600,8618=>600,8619=>600,8620=>600,8621=>600,8622=>600,8623=>600,
-8624=>600,8625=>600,8626=>600,8627=>600,8628=>600,8629=>600,8630=>600,8631=>600,8632=>600,8633=>600,
-8634=>600,8635=>600,8636=>600,8637=>600,8638=>600,8639=>600,8640=>600,8641=>600,8642=>600,8643=>600,
-8644=>600,8645=>600,8646=>600,8647=>600,8648=>600,8649=>600,8650=>600,8651=>600,8652=>600,8653=>600,
-8654=>600,8655=>600,8656=>600,8657=>600,8658=>600,8659=>600,8660=>600,8661=>600,8669=>600,8704=>600,
-8706=>600,8707=>600,8708=>600,8709=>600,8710=>600,8711=>600,8712=>600,8713=>600,8714=>600,8715=>600,
-8716=>600,8717=>600,8719=>600,8720=>600,8721=>600,8722=>600,8723=>600,8724=>600,8725=>600,8726=>600,
-8727=>600,8728=>600,8729=>600,8730=>600,8731=>600,8732=>600,8733=>600,8734=>600,8735=>600,8736=>600,
-8739=>600,8740=>600,8741=>600,8742=>600,8743=>600,8744=>600,8745=>600,8746=>600,8747=>600,8748=>600,
-8749=>600,8750=>600,8751=>600,8752=>600,8754=>600,8755=>600,8756=>600,8757=>600,8759=>600,8764=>600,
-8765=>600,8768=>600,8769=>600,8770=>600,8771=>600,8772=>600,8773=>600,8774=>600,8776=>600,8777=>600,
-8781=>600,8784=>600,8785=>600,8786=>600,8787=>600,8788=>600,8789=>600,8793=>600,8794=>600,8800=>600,
-8801=>600,8802=>600,8804=>600,8805=>600,8806=>600,8807=>600,8808=>600,8809=>600,8810=>600,8811=>600,
-8812=>600,8813=>600,8814=>600,8815=>600,8816=>600,8817=>600,8822=>600,8823=>600,8826=>600,8827=>600,
-8828=>600,8829=>600,8832=>600,8833=>600,8834=>600,8835=>600,8836=>600,8837=>600,8838=>600,8839=>600,
-8840=>600,8841=>600,8842=>600,8843=>600,8844=>600,8845=>600,8846=>600,8847=>600,8848=>600,8849=>600,
-8850=>600,8851=>600,8852=>600,8853=>600,8854=>600,8855=>600,8856=>600,8857=>600,8858=>600,8859=>600,
-8860=>600,8861=>600,8866=>600,8867=>600,8868=>600,8869=>600,8870=>600,8871=>600,8872=>600,8873=>600,
-8874=>600,8875=>600,8876=>600,8877=>600,8878=>600,8879=>600,8882=>600,8883=>600,8884=>600,8885=>600,
-8894=>600,8896=>600,8897=>600,8898=>600,8899=>600,8900=>600,8901=>600,8902=>600,8904=>600,8928=>600,
-8929=>600,8930=>600,8931=>600,8960=>600,8963=>600,8968=>600,8969=>600,8970=>600,8971=>600,8972=>600,
-8973=>600,8974=>600,8975=>600,8976=>600,8981=>600,8988=>600,8989=>600,8990=>600,8991=>600,8992=>600,
-8993=>600,8994=>600,8995=>600,9001=>600,9002=>600,9115=>600,9116=>600,9117=>600,9118=>600,9119=>600,
-9120=>600,9121=>600,9122=>600,9123=>600,9124=>600,9125=>600,9126=>600,9127=>600,9128=>600,9129=>600,
-9130=>600,9131=>600,9132=>600,9133=>600,9134=>600,9135=>600,9136=>600,9137=>600,9138=>600,9139=>600,
-9140=>600,9143=>600,9146=>600,9147=>600,9148=>600,9149=>600,9472=>600,9473=>600,9474=>600,9475=>600,
-9476=>600,9477=>600,9478=>600,9479=>600,9480=>600,9481=>600,9482=>600,9483=>600,9484=>600,9485=>600,
-9486=>600,9487=>600,9488=>600,9489=>600,9490=>600,9491=>600,9492=>600,9493=>600,9494=>600,9495=>600,
-9496=>600,9497=>600,9498=>600,9499=>600,9500=>600,9501=>600,9502=>600,9503=>600,9504=>600,9505=>600,
-9506=>600,9507=>600,9508=>600,9509=>600,9510=>600,9511=>600,9512=>600,9513=>600,9514=>600,9515=>600,
-9516=>600,9517=>600,9518=>600,9519=>600,9520=>600,9521=>600,9522=>600,9523=>600,9524=>600,9525=>600,
-9526=>600,9527=>600,9528=>600,9529=>600,9530=>600,9531=>600,9532=>600,9533=>600,9534=>600,9535=>600,
-9536=>600,9537=>600,9538=>600,9539=>600,9540=>600,9541=>600,9542=>600,9543=>600,9544=>600,9545=>600,
-9546=>600,9547=>600,9548=>600,9549=>600,9550=>600,9551=>600,9552=>600,9553=>600,9554=>600,9555=>600,
-9556=>600,9557=>600,9558=>600,9559=>600,9560=>600,9561=>600,9562=>600,9563=>600,9564=>600,9565=>600,
-9566=>600,9567=>600,9568=>600,9569=>600,9570=>600,9571=>600,9572=>600,9573=>600,9574=>600,9575=>600,
-9576=>600,9577=>600,9578=>600,9579=>600,9580=>600,9581=>600,9582=>600,9583=>600,9584=>600,9585=>600,
-9586=>600,9587=>600,9588=>600,9589=>600,9590=>600,9591=>600,9592=>600,9593=>600,9594=>600,9595=>600,
-9596=>600,9597=>600,9598=>600,9599=>600,9600=>600,9601=>600,9602=>600,9603=>600,9604=>600,9605=>600,
-9606=>600,9607=>600,9608=>600,9609=>600,9610=>600,9611=>600,9612=>600,9613=>600,9614=>600,9615=>600,
-9616=>600,9617=>600,9618=>600,9619=>600,9620=>600,9621=>600,9622=>600,9623=>600,9624=>600,9625=>600,
-9626=>600,9627=>600,9628=>600,9629=>600,9630=>600,9631=>600,9632=>600,9633=>600,9634=>600,9635=>600,
-9636=>600,9637=>600,9638=>600,9639=>600,9640=>600,9641=>600,9642=>600,9643=>600,9644=>600,9645=>600,
-9646=>600,9647=>600,9648=>600,9649=>600,9650=>600,9651=>600,9652=>600,9653=>600,9654=>600,9655=>600,
-9656=>600,9657=>600,9658=>600,9659=>600,9660=>600,9661=>600,9662=>600,9663=>600,9664=>600,9665=>600,
-9666=>600,9667=>600,9668=>600,9669=>600,9670=>600,9671=>600,9672=>600,9673=>600,9674=>600,9675=>600,
-9676=>600,9677=>600,9678=>600,9679=>600,9680=>600,9681=>600,9682=>600,9683=>600,9684=>600,9685=>600,
-9686=>600,9687=>600,9688=>600,9689=>600,9690=>600,9691=>600,9692=>600,9693=>600,9694=>600,9695=>600,
-9696=>600,9697=>600,9698=>600,9699=>600,9700=>600,9701=>600,9702=>600,9703=>600,9704=>600,9705=>600,
-9706=>600,9707=>600,9708=>600,9709=>600,9710=>600,9711=>600,9712=>600,9713=>600,9714=>600,9715=>600,
-9716=>600,9717=>600,9718=>600,9719=>600,9720=>600,9721=>600,9722=>600,9723=>600,9724=>600,9725=>600,
-9726=>600,9727=>600,9728=>600,9729=>600,9730=>600,9733=>600,9734=>600,9735=>600,9736=>600,9737=>600,
-9744=>600,9745=>600,9746=>600,9756=>600,9758=>600,9766=>600,9768=>600,9769=>600,9774=>600,9776=>600,
-9777=>600,9778=>600,9779=>600,9780=>600,9781=>600,9782=>600,9783=>600,9785=>600,9786=>600,9787=>600,
-9788=>600,9791=>600,9792=>600,9793=>600,9794=>600,9824=>600,9825=>600,9826=>600,9827=>600,9829=>600,
-9830=>600,9833=>600,9834=>600,9835=>600,9836=>600,9837=>600,9838=>600,9839=>600,10214=>600,10215=>600,
-10216=>600,10217=>600,10218=>600,10219=>600,10229=>600,10230=>600,10231=>600,10232=>600,10233=>600,10234=>600,
+647=>600,648=>600,649=>600,650=>600,651=>600,652=>600,653=>600,654=>600,655=>600,656=>600,
+657=>600,658=>600,659=>600,660=>600,661=>600,662=>600,663=>600,664=>600,665=>600,666=>600,
+667=>600,668=>600,669=>600,670=>600,671=>600,672=>600,673=>600,674=>600,675=>600,676=>600,
+677=>600,678=>600,679=>600,680=>600,681=>600,682=>600,683=>600,684=>600,685=>600,686=>600,
+687=>600,688=>600,689=>600,690=>600,691=>600,692=>600,693=>600,694=>600,695=>600,696=>600,
+697=>600,698=>600,699=>600,700=>600,701=>600,702=>600,703=>600,704=>600,705=>600,706=>600,
+707=>600,708=>600,709=>600,711=>600,712=>600,713=>600,714=>600,715=>600,716=>600,717=>600,
+718=>600,719=>600,720=>600,721=>600,722=>600,723=>600,724=>600,725=>600,726=>600,727=>600,
+728=>600,729=>600,730=>600,731=>600,733=>600,734=>600,735=>600,736=>600,737=>600,738=>600,
+739=>600,740=>600,741=>600,742=>600,743=>600,744=>600,745=>600,746=>600,747=>600,748=>600,
+749=>600,750=>600,751=>600,752=>600,753=>600,754=>600,755=>600,756=>600,757=>600,758=>600,
+759=>600,760=>600,761=>600,762=>600,763=>600,764=>600,765=>600,766=>600,767=>600,768=>0,
+769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,
+779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,
+789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,
+799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,
+809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,
+819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,
+829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,
+839=>0,840=>0,841=>0,843=>0,844=>0,845=>0,848=>0,849=>0,850=>0,851=>0,
+852=>0,853=>0,854=>0,855=>0,856=>0,857=>0,858=>0,884=>600,885=>600,890=>600,
+894=>600,900=>600,901=>600,902=>600,903=>600,904=>600,905=>600,906=>600,908=>600,910=>600,
+911=>600,912=>600,913=>600,914=>600,915=>600,916=>600,917=>600,918=>600,919=>600,920=>600,
+921=>600,922=>600,923=>600,924=>600,925=>600,926=>600,927=>600,928=>600,929=>600,931=>600,
+932=>600,933=>600,934=>600,935=>600,936=>600,937=>600,938=>600,939=>600,940=>600,941=>600,
+942=>600,943=>600,944=>600,945=>600,946=>600,947=>600,948=>600,949=>600,950=>600,951=>600,
+952=>600,953=>600,954=>600,955=>600,956=>600,957=>600,958=>600,959=>600,960=>600,961=>600,
+962=>600,963=>600,964=>600,965=>600,966=>600,967=>600,968=>600,969=>600,970=>600,971=>600,
+972=>600,973=>600,974=>600,976=>600,977=>600,978=>600,979=>600,980=>600,981=>600,982=>600,
+986=>600,987=>600,988=>600,1008=>600,1009=>600,1012=>600,1013=>600,1024=>600,1025=>600,1026=>600,
+1027=>600,1028=>600,1029=>600,1030=>600,1031=>600,1032=>600,1033=>600,1034=>600,1035=>600,1036=>600,
+1037=>600,1038=>600,1039=>600,1040=>600,1041=>600,1042=>600,1043=>600,1044=>600,1045=>600,1046=>600,
+1047=>600,1048=>600,1049=>600,1050=>600,1051=>600,1052=>600,1053=>600,1054=>600,1055=>600,1056=>600,
+1057=>600,1058=>600,1059=>600,1060=>600,1061=>600,1062=>600,1063=>600,1064=>600,1065=>600,1066=>600,
+1067=>600,1068=>600,1069=>600,1070=>600,1071=>600,1072=>600,1073=>600,1074=>600,1075=>600,1076=>600,
+1077=>600,1078=>600,1079=>600,1080=>600,1081=>600,1082=>600,1083=>600,1084=>600,1085=>600,1086=>600,
+1087=>600,1088=>600,1089=>600,1090=>600,1091=>600,1092=>600,1093=>600,1094=>600,1095=>600,1096=>600,
+1097=>600,1098=>600,1099=>600,1100=>600,1101=>600,1102=>600,1103=>600,1104=>600,1105=>600,1106=>600,
+1107=>600,1108=>600,1109=>600,1110=>600,1111=>600,1112=>600,1113=>600,1114=>600,1115=>600,1116=>600,
+1117=>600,1118=>600,1119=>600,1120=>600,1121=>600,1122=>600,1123=>600,1124=>600,1126=>600,1127=>600,
+1128=>600,1130=>600,1131=>600,1132=>600,1133=>600,1136=>600,1137=>600,1138=>600,1140=>600,1141=>600,
+1142=>600,1143=>600,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1162=>600,1163=>600,1164=>600,
+1165=>600,1166=>600,1167=>600,1168=>600,1169=>600,1170=>600,1171=>600,1172=>600,1173=>600,1174=>600,
+1175=>600,1176=>600,1177=>600,1178=>600,1179=>600,1180=>600,1181=>600,1182=>600,1183=>600,1184=>600,
+1185=>600,1186=>600,1187=>600,1188=>600,1189=>600,1190=>600,1191=>600,1192=>600,1193=>600,1194=>600,
+1195=>600,1196=>600,1197=>600,1198=>600,1199=>600,1200=>600,1201=>600,1202=>600,1203=>600,1204=>600,
+1205=>600,1206=>600,1207=>600,1208=>600,1209=>600,1210=>600,1211=>600,1212=>600,1213=>600,1214=>600,
+1215=>600,1216=>600,1217=>600,1218=>600,1219=>600,1220=>600,1221=>600,1222=>600,1223=>600,1224=>600,
+1225=>600,1226=>600,1227=>600,1228=>600,1229=>600,1230=>600,1231=>600,1232=>600,1233=>600,1234=>600,
+1235=>600,1236=>600,1237=>600,1238=>600,1239=>600,1240=>600,1241=>600,1242=>600,1243=>600,1244=>600,
+1245=>600,1246=>600,1247=>600,1248=>600,1249=>600,1250=>600,1251=>600,1252=>600,1253=>600,1254=>600,
+1255=>600,1256=>600,1257=>600,1258=>600,1259=>600,1260=>600,1261=>600,1262=>600,1263=>600,1264=>600,
+1265=>600,1266=>600,1267=>600,1268=>600,1269=>600,1270=>600,1271=>600,1272=>600,1273=>600,1296=>600,
+1297=>600,1298=>600,1299=>600,1306=>600,1307=>600,1308=>600,1309=>600,1310=>600,1311=>600,1329=>600,
+1330=>600,1331=>600,1332=>600,1333=>600,1334=>600,1335=>600,1336=>600,1337=>600,1338=>600,1339=>600,
+1340=>600,1341=>600,1342=>600,1343=>600,1344=>600,1345=>600,1346=>600,1347=>600,1348=>600,1349=>600,
+1350=>600,1351=>600,1352=>600,1353=>600,1354=>600,1355=>600,1356=>600,1357=>600,1358=>600,1359=>600,
+1360=>600,1361=>600,1362=>600,1363=>600,1364=>600,1365=>600,1366=>600,1369=>600,1370=>600,1371=>600,
+1372=>600,1373=>600,1374=>600,1375=>600,1377=>600,1378=>600,1379=>600,1380=>600,1381=>600,1382=>600,
+1383=>600,1384=>600,1385=>600,1386=>600,1387=>600,1388=>600,1389=>600,1390=>600,1391=>600,1392=>600,
+1393=>600,1394=>600,1395=>600,1396=>600,1397=>600,1398=>600,1399=>600,1400=>600,1401=>600,1402=>600,
+1403=>600,1404=>600,1405=>600,1406=>600,1407=>600,1408=>600,1409=>600,1410=>600,1411=>600,1412=>600,
+1413=>600,1414=>600,1415=>600,1417=>600,1418=>600,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,
+1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1467=>0,1468=>0,1469=>0,1470=>600,1471=>0,
+1472=>600,1473=>0,1474=>0,1475=>600,1476=>0,1488=>600,1489=>600,1490=>600,1491=>600,1492=>600,
+1493=>600,1494=>600,1495=>600,1496=>600,1497=>600,1498=>600,1499=>600,1500=>600,1501=>600,1502=>600,
+1503=>600,1504=>600,1505=>600,1506=>600,1507=>600,1508=>600,1509=>600,1510=>600,1511=>600,1512=>600,
+1513=>600,1514=>600,1520=>600,1521=>600,1522=>600,1523=>600,1524=>600,4304=>600,4305=>600,4306=>600,
+4307=>600,4308=>600,4309=>600,4310=>600,4311=>600,4312=>600,4313=>600,4314=>600,4315=>600,4316=>600,
+4317=>600,4318=>600,4319=>600,4320=>600,4321=>600,4322=>600,4323=>600,4324=>600,4325=>600,4326=>600,
+4327=>600,4328=>600,4329=>600,4330=>600,4331=>600,4332=>600,4333=>600,4334=>600,4335=>600,4336=>600,
+4337=>600,4338=>600,4339=>600,4340=>600,4341=>600,4345=>600,4347=>600,5792=>600,5793=>600,5794=>600,
+5795=>600,5796=>600,5797=>600,5798=>600,5799=>600,5800=>600,5801=>600,5802=>600,5803=>600,5804=>600,
+5805=>600,5806=>600,5807=>600,5808=>600,5809=>600,5810=>600,5811=>600,5812=>600,5813=>600,5814=>600,
+5815=>600,5816=>600,5817=>600,5818=>600,5819=>600,5820=>600,5821=>600,5822=>600,5823=>600,5824=>600,
+5825=>600,5826=>600,5827=>600,5828=>600,5829=>600,5830=>600,5831=>600,5832=>600,5833=>600,5834=>600,
+5835=>600,5836=>600,5837=>600,5838=>600,5839=>600,5840=>600,5841=>600,5842=>600,5843=>600,5844=>600,
+5845=>600,5846=>600,5847=>600,5848=>600,5849=>600,5850=>600,5851=>600,5852=>600,5853=>600,5854=>600,
+5855=>600,5856=>600,5857=>600,5858=>600,5859=>600,5860=>600,5861=>600,5862=>600,5863=>600,5864=>600,
+5865=>600,5866=>600,5867=>600,5868=>600,5869=>600,5870=>600,5871=>600,5872=>600,7680=>600,7681=>600,
+7682=>600,7683=>600,7684=>600,7685=>600,7686=>600,7687=>600,7688=>600,7689=>600,7690=>600,7691=>600,
+7692=>600,7693=>600,7694=>600,7695=>600,7696=>600,7697=>600,7698=>600,7699=>600,7700=>600,7701=>600,
+7702=>600,7703=>600,7704=>600,7705=>600,7706=>600,7707=>600,7708=>600,7709=>600,7710=>600,7711=>600,
+7712=>600,7713=>600,7714=>600,7715=>600,7716=>600,7717=>600,7718=>600,7719=>600,7720=>600,7721=>600,
+7722=>600,7723=>600,7724=>600,7725=>600,7726=>600,7727=>600,7728=>600,7729=>600,7730=>600,7731=>600,
+7732=>600,7733=>600,7734=>600,7735=>600,7736=>600,7737=>600,7738=>600,7739=>600,7740=>600,7741=>600,
+7742=>600,7743=>600,7744=>600,7745=>600,7746=>600,7747=>600,7748=>600,7749=>600,7750=>600,7751=>600,
+7752=>600,7753=>600,7754=>600,7755=>600,7756=>600,7757=>600,7758=>600,7759=>600,7760=>600,7761=>600,
+7762=>600,7763=>600,7764=>600,7765=>600,7766=>600,7767=>600,7768=>600,7769=>600,7770=>600,7771=>600,
+7772=>600,7773=>600,7774=>600,7775=>600,7776=>600,7777=>600,7778=>600,7779=>600,7780=>600,7781=>600,
+7782=>600,7783=>600,7784=>600,7785=>600,7786=>600,7787=>600,7788=>600,7789=>600,7790=>600,7791=>600,
+7792=>600,7793=>600,7794=>600,7795=>600,7796=>600,7797=>600,7798=>600,7799=>600,7800=>600,7801=>600,
+7802=>600,7803=>600,7804=>600,7805=>600,7806=>600,7807=>600,7808=>600,7809=>600,7810=>600,7811=>600,
+7812=>600,7813=>600,7814=>600,7815=>600,7816=>600,7817=>600,7818=>600,7819=>600,7820=>600,7821=>600,
+7822=>600,7823=>600,7824=>600,7825=>600,7826=>600,7827=>600,7828=>600,7829=>600,7830=>600,7831=>600,
+7832=>600,7833=>600,7834=>600,7835=>600,7840=>600,7841=>600,7842=>600,7843=>600,7844=>600,7845=>600,
+7846=>600,7847=>600,7848=>600,7849=>600,7850=>600,7851=>600,7852=>600,7853=>600,7854=>600,7855=>600,
+7856=>600,7857=>600,7858=>600,7859=>600,7860=>600,7861=>600,7862=>600,7863=>600,7864=>600,7865=>600,
+7866=>600,7867=>600,7868=>600,7869=>600,7870=>600,7871=>600,7872=>600,7873=>600,7874=>600,7875=>600,
+7876=>600,7877=>600,7878=>600,7879=>600,7880=>600,7881=>600,7882=>600,7883=>600,7884=>600,7885=>600,
+7886=>600,7887=>600,7888=>600,7889=>600,7890=>600,7891=>600,7892=>600,7893=>600,7894=>600,7895=>600,
+7896=>600,7897=>600,7898=>600,7899=>600,7900=>600,7901=>600,7902=>600,7903=>600,7904=>600,7905=>600,
+7906=>600,7907=>600,7908=>600,7909=>600,7910=>600,7911=>600,7912=>600,7913=>600,7914=>600,7915=>600,
+7916=>600,7917=>600,7918=>600,7919=>600,7920=>600,7921=>600,7922=>600,7923=>600,7924=>600,7925=>600,
+7926=>600,7927=>600,7928=>600,7929=>600,7936=>600,7937=>600,7938=>600,7939=>600,7940=>600,7941=>600,
+7942=>600,7943=>600,7944=>600,7945=>600,7946=>600,7947=>600,7948=>600,7949=>600,7950=>600,7951=>600,
+7952=>600,7953=>600,7954=>600,7955=>600,7956=>600,7957=>600,7960=>600,7961=>600,7962=>600,7963=>600,
+7964=>600,7965=>600,7968=>600,7969=>600,7970=>600,7971=>600,7972=>600,7973=>600,7974=>600,7975=>600,
+7976=>600,7977=>600,7978=>600,7979=>600,7980=>600,7981=>600,7982=>600,7983=>600,7984=>600,7985=>600,
+7986=>600,7987=>600,7988=>600,7989=>600,7990=>600,7991=>600,7992=>600,7993=>600,7994=>600,7995=>600,
+7996=>600,7997=>600,7998=>600,7999=>600,8000=>600,8001=>600,8002=>600,8003=>600,8004=>600,8005=>600,
+8008=>600,8009=>600,8010=>600,8011=>600,8012=>600,8013=>600,8016=>600,8017=>600,8018=>600,8019=>600,
+8020=>600,8021=>600,8022=>600,8023=>600,8025=>600,8027=>600,8029=>600,8031=>600,8032=>600,8033=>600,
+8034=>600,8035=>600,8036=>600,8037=>600,8038=>600,8039=>600,8040=>600,8041=>600,8042=>600,8043=>600,
+8044=>600,8045=>600,8046=>600,8047=>600,8048=>600,8049=>600,8050=>600,8051=>600,8052=>600,8053=>600,
+8054=>600,8055=>600,8056=>600,8057=>600,8058=>600,8059=>600,8060=>600,8061=>600,8064=>600,8065=>600,
+8066=>600,8067=>600,8068=>600,8069=>600,8070=>600,8071=>600,8072=>600,8073=>600,8074=>600,8075=>600,
+8076=>600,8077=>600,8078=>600,8079=>600,8080=>600,8081=>600,8082=>600,8083=>600,8084=>600,8085=>600,
+8086=>600,8087=>600,8088=>600,8089=>600,8090=>600,8091=>600,8092=>600,8093=>600,8094=>600,8095=>600,
+8096=>600,8097=>600,8098=>600,8099=>600,8100=>600,8101=>600,8102=>600,8103=>600,8104=>600,8105=>600,
+8106=>600,8107=>600,8108=>600,8109=>600,8110=>600,8111=>600,8112=>600,8113=>600,8114=>600,8115=>600,
+8116=>600,8118=>600,8119=>600,8120=>600,8121=>600,8122=>600,8123=>600,8124=>600,8125=>600,8126=>600,
+8127=>600,8128=>600,8129=>600,8130=>600,8131=>600,8132=>600,8134=>600,8135=>600,8136=>600,8137=>600,
+8138=>600,8139=>600,8140=>600,8141=>600,8142=>600,8143=>600,8144=>600,8145=>600,8146=>600,8147=>600,
+8150=>600,8151=>600,8152=>600,8153=>600,8154=>600,8155=>600,8157=>600,8158=>600,8159=>600,8160=>600,
+8161=>600,8162=>600,8163=>600,8164=>600,8165=>600,8166=>600,8167=>600,8168=>600,8169=>600,8170=>600,
+8171=>600,8172=>600,8173=>600,8174=>600,8175=>600,8178=>600,8179=>600,8180=>600,8182=>600,8183=>600,
+8184=>600,8185=>600,8186=>600,8187=>600,8188=>600,8189=>600,8190=>600,8192=>600,8193=>600,8194=>600,
+8195=>600,8196=>600,8197=>600,8198=>600,8199=>600,8200=>600,8201=>600,8202=>600,8203=>600,8204=>0,
+8205=>0,8206=>0,8207=>0,8208=>600,8209=>600,8210=>600,8213=>600,8214=>600,8215=>600,8219=>600,
+8223=>600,8227=>600,8228=>600,8229=>600,8231=>600,8232=>600,8233=>600,8234=>600,8235=>600,8236=>600,
+8237=>600,8238=>600,8239=>600,8241=>600,8242=>600,8243=>600,8244=>600,8245=>600,8246=>600,8247=>600,
+8248=>600,8251=>600,8252=>600,8253=>600,8254=>600,8255=>600,8256=>600,8257=>600,8258=>600,8259=>600,
+8260=>600,8261=>600,8262=>600,8263=>600,8264=>600,8265=>600,8266=>600,8267=>600,8268=>600,8269=>600,
+8270=>600,8271=>600,8272=>600,8273=>600,8274=>600,8275=>600,8276=>600,8277=>600,8278=>600,8279=>600,
+8280=>600,8281=>600,8282=>600,8283=>600,8284=>600,8285=>600,8286=>600,8287=>600,8288=>600,8289=>600,
+8290=>600,8291=>600,8292=>600,8298=>600,8299=>600,8300=>600,8301=>600,8302=>600,8303=>600,8304=>600,
+8305=>600,8308=>600,8309=>600,8310=>600,8311=>600,8312=>600,8313=>600,8314=>600,8315=>600,8316=>600,
+8317=>600,8318=>600,8319=>600,8320=>600,8321=>600,8322=>600,8323=>600,8324=>600,8325=>600,8326=>600,
+8327=>600,8328=>600,8329=>600,8330=>600,8331=>600,8332=>600,8333=>600,8334=>600,8336=>600,8337=>600,
+8338=>600,8339=>600,8340=>600,8353=>600,8354=>600,8355=>600,8356=>600,8357=>600,8358=>600,8359=>600,
+8360=>600,8361=>600,8362=>600,8363=>600,8365=>600,8366=>600,8368=>600,8369=>600,8370=>600,8371=>600,
+8372=>600,8373=>600,8400=>0,8401=>0,8402=>0,8406=>0,8407=>0,8411=>0,8412=>0,8413=>0,
+8414=>0,8415=>0,8416=>0,8417=>0,8418=>0,8419=>0,8428=>0,8429=>0,8430=>0,8431=>0,
+8448=>600,8449=>600,8450=>600,8451=>600,8453=>600,8454=>600,8455=>600,8457=>600,8461=>600,8463=>600,
+8464=>600,8465=>600,8466=>600,8467=>600,8468=>600,8469=>600,8470=>600,8471=>600,8472=>600,8473=>600,
+8474=>600,8476=>600,8477=>600,8478=>600,8481=>600,8484=>600,8486=>600,8487=>600,8489=>600,8490=>600,
+8491=>600,8498=>600,8501=>600,8502=>600,8503=>600,8504=>600,8505=>600,8506=>600,8507=>600,8523=>600,
+8526=>600,8531=>600,8532=>600,8533=>600,8534=>600,8535=>600,8536=>600,8537=>600,8538=>600,8539=>600,
+8540=>600,8541=>600,8542=>600,8543=>600,8544=>600,8545=>600,8546=>600,8547=>600,8548=>600,8549=>600,
+8550=>600,8551=>600,8552=>600,8553=>600,8554=>600,8555=>600,8556=>600,8557=>600,8558=>600,8559=>600,
+8560=>600,8561=>600,8562=>600,8563=>600,8564=>600,8565=>600,8566=>600,8567=>600,8568=>600,8569=>600,
+8570=>600,8571=>600,8572=>600,8573=>600,8574=>600,8575=>600,8592=>600,8593=>600,8594=>600,8595=>600,
+8596=>600,8597=>600,8598=>600,8599=>600,8600=>600,8601=>600,8602=>600,8603=>600,8604=>600,8605=>600,
+8606=>600,8607=>600,8608=>600,8609=>600,8610=>600,8611=>600,8612=>600,8613=>600,8614=>600,8615=>600,
+8616=>600,8617=>600,8618=>600,8619=>600,8620=>600,8621=>600,8622=>600,8623=>600,8624=>600,8625=>600,
+8626=>600,8627=>600,8628=>600,8629=>600,8630=>600,8631=>600,8632=>600,8633=>600,8634=>600,8635=>600,
+8636=>600,8637=>600,8638=>600,8639=>600,8640=>600,8641=>600,8642=>600,8643=>600,8644=>600,8645=>600,
+8646=>600,8647=>600,8648=>600,8649=>600,8650=>600,8651=>600,8652=>600,8653=>600,8654=>600,8655=>600,
+8656=>600,8657=>600,8658=>600,8659=>600,8660=>600,8661=>600,8669=>600,8678=>600,8679=>600,8680=>600,
+8681=>600,8691=>600,8704=>600,8705=>600,8706=>600,8707=>600,8708=>600,8709=>600,8710=>600,8711=>600,
+8712=>600,8713=>600,8714=>600,8715=>600,8716=>600,8717=>600,8718=>600,8719=>600,8720=>600,8721=>600,
+8722=>600,8723=>600,8724=>600,8725=>600,8726=>600,8727=>600,8728=>600,8729=>600,8730=>600,8731=>600,
+8732=>600,8733=>600,8734=>600,8735=>600,8736=>600,8737=>600,8738=>600,8739=>600,8740=>600,8741=>600,
+8742=>600,8743=>600,8744=>600,8745=>600,8746=>600,8747=>600,8748=>600,8749=>600,8750=>600,8751=>600,
+8752=>600,8754=>600,8755=>600,8756=>600,8757=>600,8758=>600,8759=>600,8760=>600,8761=>600,8762=>600,
+8763=>600,8764=>600,8765=>600,8768=>600,8769=>600,8770=>600,8771=>600,8772=>600,8773=>600,8774=>600,
+8775=>600,8776=>600,8777=>600,8778=>600,8779=>600,8780=>600,8781=>600,8784=>600,8785=>600,8786=>600,
+8787=>600,8788=>600,8789=>600,8790=>600,8791=>600,8792=>600,8793=>600,8794=>600,8795=>600,8796=>600,
+8797=>600,8798=>600,8799=>600,8800=>600,8801=>600,8802=>600,8803=>600,8804=>600,8805=>600,8806=>600,
+8807=>600,8808=>600,8809=>600,8810=>600,8811=>600,8812=>600,8813=>600,8814=>600,8815=>600,8816=>600,
+8817=>600,8818=>600,8819=>600,8820=>600,8821=>600,8822=>600,8823=>600,8824=>600,8825=>600,8826=>600,
+8827=>600,8828=>600,8829=>600,8830=>600,8831=>600,8832=>600,8833=>600,8834=>600,8835=>600,8836=>600,
+8837=>600,8838=>600,8839=>600,8840=>600,8841=>600,8842=>600,8843=>600,8844=>600,8845=>600,8846=>600,
+8847=>600,8848=>600,8849=>600,8850=>600,8851=>600,8852=>600,8853=>600,8854=>600,8855=>600,8856=>600,
+8857=>600,8858=>600,8859=>600,8860=>600,8861=>600,8862=>600,8863=>600,8866=>600,8867=>600,8868=>600,
+8869=>600,8870=>600,8871=>600,8872=>600,8873=>600,8874=>600,8875=>600,8876=>600,8877=>600,8878=>600,
+8879=>600,8882=>600,8883=>600,8884=>600,8885=>600,8891=>600,8892=>600,8893=>600,8894=>600,8896=>600,
+8897=>600,8898=>600,8899=>600,8900=>600,8901=>600,8902=>600,8903=>600,8904=>600,8909=>600,8910=>600,
+8911=>600,8912=>600,8913=>600,8914=>600,8915=>600,8924=>600,8925=>600,8926=>600,8927=>600,8928=>600,
+8929=>600,8930=>600,8931=>600,8938=>600,8939=>600,8940=>600,8941=>600,8942=>600,8943=>600,8944=>600,
+8945=>600,8960=>600,8962=>600,8963=>600,8964=>600,8965=>600,8966=>600,8968=>600,8969=>600,8970=>600,
+8971=>600,8972=>600,8973=>600,8974=>600,8975=>600,8976=>600,8978=>600,8980=>600,8981=>600,8984=>600,
+8985=>600,8988=>600,8989=>600,8990=>600,8991=>600,8992=>600,8993=>600,8994=>600,8995=>600,8996=>600,
+8997=>600,8998=>600,8999=>600,9001=>600,9002=>600,9003=>600,9004=>600,9014=>600,9015=>600,9016=>600,
+9017=>600,9018=>600,9019=>600,9020=>600,9021=>600,9022=>600,9023=>600,9024=>600,9025=>600,9026=>600,
+9027=>600,9028=>600,9029=>600,9030=>600,9031=>600,9032=>600,9033=>600,9034=>600,9035=>600,9036=>600,
+9037=>600,9038=>600,9039=>600,9040=>600,9041=>600,9042=>600,9043=>600,9044=>600,9045=>600,9046=>600,
+9047=>600,9048=>600,9049=>600,9050=>600,9051=>600,9052=>600,9053=>600,9054=>600,9055=>600,9056=>600,
+9057=>600,9058=>600,9059=>600,9060=>600,9061=>600,9062=>600,9063=>600,9064=>600,9065=>600,9066=>600,
+9067=>600,9068=>600,9069=>600,9070=>600,9071=>600,9072=>600,9073=>600,9074=>600,9075=>600,9076=>600,
+9077=>600,9078=>600,9079=>600,9080=>600,9081=>600,9082=>600,9084=>600,9085=>600,9086=>600,9087=>600,
+9088=>600,9089=>600,9090=>600,9091=>600,9092=>600,9093=>600,9094=>600,9095=>600,9096=>600,9097=>600,
+9098=>600,9099=>600,9100=>600,9101=>600,9102=>600,9103=>600,9104=>600,9105=>600,9106=>600,9107=>600,
+9108=>600,9109=>600,9110=>600,9111=>600,9112=>600,9113=>600,9114=>600,9115=>600,9116=>600,9117=>600,
+9118=>600,9119=>600,9120=>600,9121=>600,9122=>600,9123=>600,9124=>600,9125=>600,9126=>600,9127=>600,
+9128=>600,9129=>600,9130=>600,9131=>600,9132=>600,9133=>600,9134=>600,9135=>600,9136=>600,9137=>600,
+9138=>600,9139=>600,9140=>600,9141=>600,9142=>600,9143=>600,9146=>600,9147=>600,9148=>600,9149=>600,
+9150=>600,9151=>600,9152=>600,9153=>600,9154=>600,9155=>600,9156=>600,9157=>600,9158=>600,9159=>600,
+9160=>600,9161=>600,9162=>600,9163=>600,9164=>600,9165=>600,9166=>600,9167=>600,9178=>600,9179=>600,
+9182=>600,9183=>600,9186=>600,9187=>600,9188=>600,9189=>600,9190=>600,9251=>600,9280=>600,9281=>600,
+9282=>600,9283=>600,9284=>600,9285=>600,9286=>600,9287=>600,9288=>600,9289=>600,9290=>600,9312=>600,
+9313=>600,9314=>600,9315=>600,9316=>600,9317=>600,9318=>600,9319=>600,9320=>600,9321=>600,9472=>600,
+9473=>600,9474=>600,9475=>600,9476=>600,9477=>600,9478=>600,9479=>600,9480=>600,9481=>600,9482=>600,
+9483=>600,9484=>600,9485=>600,9486=>600,9487=>600,9488=>600,9489=>600,9490=>600,9491=>600,9492=>600,
+9493=>600,9494=>600,9495=>600,9496=>600,9497=>600,9498=>600,9499=>600,9500=>600,9501=>600,9502=>600,
+9503=>600,9504=>600,9505=>600,9506=>600,9507=>600,9508=>600,9509=>600,9510=>600,9511=>600,9512=>600,
+9513=>600,9514=>600,9515=>600,9516=>600,9517=>600,9518=>600,9519=>600,9520=>600,9521=>600,9522=>600,
+9523=>600,9524=>600,9525=>600,9526=>600,9527=>600,9528=>600,9529=>600,9530=>600,9531=>600,9532=>600,
+9533=>600,9534=>600,9535=>600,9536=>600,9537=>600,9538=>600,9539=>600,9540=>600,9541=>600,9542=>600,
+9543=>600,9544=>600,9545=>600,9546=>600,9547=>600,9548=>600,9549=>600,9550=>600,9551=>600,9552=>600,
+9553=>600,9554=>600,9555=>600,9556=>600,9557=>600,9558=>600,9559=>600,9560=>600,9561=>600,9562=>600,
+9563=>600,9564=>600,9565=>600,9566=>600,9567=>600,9568=>600,9569=>600,9570=>600,9571=>600,9572=>600,
+9573=>600,9574=>600,9575=>600,9576=>600,9577=>600,9578=>600,9579=>600,9580=>600,9581=>600,9582=>600,
+9583=>600,9584=>600,9585=>600,9586=>600,9587=>600,9588=>600,9589=>600,9590=>600,9591=>600,9592=>600,
+9593=>600,9594=>600,9595=>600,9596=>600,9597=>600,9598=>600,9599=>600,9600=>600,9601=>600,9602=>600,
+9603=>600,9604=>600,9605=>600,9606=>600,9607=>600,9608=>600,9609=>600,9610=>600,9611=>600,9612=>600,
+9613=>600,9614=>600,9615=>600,9616=>600,9617=>600,9618=>600,9619=>600,9620=>600,9621=>600,9622=>600,
+9623=>600,9624=>600,9625=>600,9626=>600,9627=>600,9628=>600,9629=>600,9630=>600,9631=>600,9632=>600,
+9633=>600,9634=>600,9635=>600,9636=>600,9637=>600,9638=>600,9639=>600,9640=>600,9641=>600,9642=>600,
+9643=>600,9644=>600,9645=>600,9646=>600,9647=>600,9648=>600,9649=>600,9650=>600,9651=>600,9652=>600,
+9653=>600,9654=>600,9655=>600,9656=>600,9657=>600,9658=>600,9659=>600,9660=>600,9661=>600,9662=>600,
+9663=>600,9664=>600,9665=>600,9666=>600,9667=>600,9668=>600,9669=>600,9670=>600,9671=>600,9672=>600,
+9673=>600,9674=>600,9675=>600,9676=>600,9677=>600,9678=>600,9679=>600,9680=>600,9681=>600,9682=>600,
+9683=>600,9684=>600,9685=>600,9686=>600,9687=>600,9688=>600,9689=>600,9690=>600,9691=>600,9692=>600,
+9693=>600,9694=>600,9695=>600,9696=>600,9697=>600,9698=>600,9699=>600,9700=>600,9701=>600,9702=>600,
+9703=>600,9704=>600,9705=>600,9706=>600,9707=>600,9708=>600,9709=>600,9710=>600,9711=>600,9712=>600,
+9713=>600,9714=>600,9715=>600,9716=>600,9717=>600,9718=>600,9719=>600,9720=>600,9721=>600,9722=>600,
+9723=>600,9724=>600,9725=>600,9726=>600,9727=>600,9728=>600,9729=>600,9730=>600,9731=>600,9733=>600,
+9734=>600,9735=>600,9736=>600,9737=>600,9744=>600,9745=>600,9746=>600,9754=>600,9755=>600,9756=>600,
+9757=>600,9758=>600,9759=>600,9766=>600,9768=>600,9769=>600,9774=>600,9775=>600,9776=>600,9777=>600,
+9778=>600,9779=>600,9780=>600,9781=>600,9782=>600,9783=>600,9785=>600,9786=>600,9787=>600,9788=>600,
+9789=>600,9790=>600,9791=>600,9792=>600,9793=>600,9794=>600,9795=>600,9796=>600,9797=>600,9798=>600,
+9799=>600,9800=>600,9801=>600,9802=>600,9803=>600,9804=>600,9805=>600,9806=>600,9807=>600,9808=>600,
+9809=>600,9810=>600,9811=>600,9824=>600,9825=>600,9826=>600,9827=>600,9828=>600,9829=>600,9830=>600,
+9831=>600,9833=>600,9834=>600,9835=>600,9836=>600,9837=>600,9838=>600,9839=>600,9856=>600,9857=>600,
+9858=>600,9859=>600,9860=>600,9861=>600,10176=>600,10177=>600,10178=>600,10179=>600,10180=>600,10181=>600,
+10182=>600,10183=>600,10184=>600,10185=>600,10186=>600,10188=>600,10192=>600,10193=>600,10194=>600,10195=>600,
+10196=>600,10197=>600,10198=>600,10199=>600,10212=>600,10213=>600,10214=>600,10215=>600,10216=>600,10217=>600,
+10218=>600,10219=>600,10226=>600,10227=>600,10229=>600,10230=>600,10231=>600,10232=>600,10233=>600,10234=>600,
 10235=>600,10236=>600,10240=>600,10241=>600,10242=>600,10243=>600,10244=>600,10245=>600,10246=>600,10247=>600,
 10248=>600,10249=>600,10250=>600,10251=>600,10252=>600,10253=>600,10254=>600,10255=>600,10256=>600,10257=>600,
 10258=>600,10259=>600,10260=>600,10261=>600,10262=>600,10263=>600,10264=>600,10265=>600,10266=>600,10267=>600,
@@ -271,15 +329,20 @@ $cw=array(
 10468=>600,10469=>600,10470=>600,10471=>600,10472=>600,10473=>600,10474=>600,10475=>600,10476=>600,10477=>600,
 10478=>600,10479=>600,10480=>600,10481=>600,10482=>600,10483=>600,10484=>600,10485=>600,10486=>600,10487=>600,
 10488=>600,10489=>600,10490=>600,10491=>600,10492=>600,10493=>600,10494=>600,10495=>600,10752=>600,10753=>600,
-10754=>600,10755=>600,10756=>600,63166=>600,63171=>600,64256=>600,64257=>600,64258=>600,64261=>600,64285=>600,
-64286=>600,64287=>600,64288=>600,64289=>600,64290=>600,64291=>600,64292=>600,64293=>600,64294=>600,64295=>600,
-64296=>600,64297=>600,64298=>600,64299=>600,64300=>600,64301=>600,64302=>600,64303=>600,64304=>600,64305=>600,
-64306=>600,64307=>600,64308=>600,64309=>600,64310=>600,64312=>600,64313=>600,64314=>600,64315=>600,64316=>600,
-64318=>600,64320=>600,64321=>600,64323=>600,64324=>600,64326=>600,64327=>600,64328=>600,64329=>600,64330=>600,
-64331=>600,64332=>600,64333=>600,64334=>600,64335=>600,65533=>600);
+10754=>600,10755=>600,10756=>600,10757=>600,10758=>600,10781=>600,10815=>600,11008=>600,11009=>600,11010=>600,
+11011=>600,11012=>600,11013=>600,11014=>600,11015=>600,11016=>600,11017=>600,11018=>600,11019=>600,11020=>600,
+11021=>600,11026=>600,11027=>600,11028=>600,11029=>600,11030=>600,11031=>600,11032=>600,11033=>600,11035=>600,
+11036=>600,11037=>600,11038=>600,11039=>600,11040=>600,11041=>600,11042=>600,11043=>600,11044=>600,11045=>600,
+11046=>600,11047=>600,11048=>600,11049=>600,11050=>600,11051=>600,11091=>600,11092=>600,64256=>600,64257=>600,
+64258=>600,64259=>600,64260=>600,64261=>600,64285=>600,64286=>600,64287=>600,64288=>600,64289=>600,64290=>600,
+64291=>600,64292=>600,64293=>600,64294=>600,64295=>600,64296=>600,64297=>600,64298=>600,64299=>600,64300=>600,
+64301=>600,64302=>600,64303=>600,64304=>600,64305=>600,64306=>600,64307=>600,64308=>600,64309=>600,64310=>600,
+64312=>600,64313=>600,64314=>600,64315=>600,64316=>600,64318=>600,64320=>600,64321=>600,64323=>600,64324=>600,
+64326=>600,64327=>600,64328=>600,64329=>600,64330=>600,64331=>600,64332=>600,64333=>600,64334=>600,64335=>600,
+65533=>600);
 $enc='';
 $diff='';
 $file='freemono.z';
 $ctg='freemono.ctg.z';
-$originalsize=259616;
+$originalsize=314348;
 ?>
\ No newline at end of file
index 991b9df1f0c85fbd52eae8d4235652efd7f9904b..0353139dceae1ecf57968d188e5a1c0135ba4d87 100644 (file)
Binary files a/lib/tcpdf/fonts/freemono.z and b/lib/tcpdf/fonts/freemono.z differ
index 0cc2b25d3132a1ed0e6f6f96c42a5b5d370c6022..40443bbefa6757af756c5b6c99a7efd850cee02e 100644 (file)
Binary files a/lib/tcpdf/fonts/freemonob.ctg.z and b/lib/tcpdf/fonts/freemonob.ctg.z differ
index 02b8082456020400cc0a87202c03fe44b5af8651..3d4cfe40a3d506ecab2568559202ccffd3892700 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeMonoBold';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>10,'Flags'=>33,'FontBBox'=>'[-547 -366 754 1111]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
+$desc=array('Ascent'=>800,'Descent'=>-200,'CapHeight'=>10,'Flags'=>32,'FontBBox'=>'[-604 -200 754 800]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
 $up=-125;
 $ut=50;
 $dw=600;
@@ -40,131 +40,165 @@ $cw=array(
 350=>600,351=>600,354=>600,355=>600,356=>600,357=>600,358=>600,359=>600,360=>600,361=>600,
 362=>600,363=>600,364=>600,365=>600,366=>600,367=>600,368=>600,369=>600,370=>600,371=>600,
 372=>600,373=>600,374=>600,375=>600,377=>600,378=>600,379=>600,380=>600,383=>600,384=>600,
-385=>600,386=>600,387=>600,390=>600,391=>600,392=>600,393=>600,394=>600,395=>600,396=>600,
-397=>600,398=>600,400=>600,401=>600,403=>600,405=>600,406=>600,407=>600,409=>600,410=>600,
-411=>600,412=>600,413=>600,414=>600,415=>600,416=>600,417=>600,418=>600,419=>600,420=>600,
-421=>600,422=>600,423=>600,424=>600,425=>600,427=>600,428=>600,429=>600,430=>600,431=>600,
-432=>600,435=>600,436=>600,437=>600,438=>600,439=>600,440=>600,443=>600,448=>600,449=>600,
-451=>600,455=>600,456=>600,457=>600,459=>600,460=>600,461=>600,462=>600,463=>600,464=>600,
-465=>600,466=>600,467=>600,468=>600,469=>600,470=>600,471=>600,472=>600,473=>600,474=>600,
-475=>600,476=>600,477=>600,478=>600,479=>600,480=>600,481=>600,482=>600,483=>600,484=>600,
-485=>600,486=>600,487=>600,488=>600,489=>600,490=>600,491=>600,492=>600,493=>600,494=>600,
-496=>600,500=>600,501=>600,502=>600,504=>600,505=>600,506=>600,507=>600,508=>600,509=>600,
-510=>600,511=>600,512=>600,513=>600,514=>600,515=>600,516=>600,517=>600,518=>600,519=>600,
-520=>600,521=>600,522=>600,523=>600,524=>600,525=>600,526=>600,527=>600,528=>600,529=>600,
-530=>600,531=>600,532=>600,533=>600,534=>600,535=>600,536=>600,537=>600,538=>600,539=>600,
-542=>600,543=>600,548=>600,549=>600,550=>600,551=>600,552=>600,553=>600,554=>600,555=>600,
-556=>600,557=>600,558=>600,559=>600,560=>600,561=>600,562=>600,563=>600,592=>600,593=>600,
-594=>600,595=>600,596=>600,598=>600,599=>600,600=>600,601=>600,603=>600,604=>600,607=>600,
-608=>600,609=>600,613=>600,614=>600,615=>600,616=>600,617=>600,618=>600,619=>600,621=>600,
-623=>600,624=>600,625=>600,626=>600,627=>600,628=>600,629=>600,633=>600,634=>600,635=>600,
-636=>600,637=>600,638=>600,639=>600,640=>600,641=>600,642=>600,643=>600,644=>600,645=>600,
-647=>600,648=>600,649=>600,652=>600,653=>600,654=>600,656=>600,660=>600,661=>600,662=>600,
-663=>600,664=>600,668=>600,670=>600,671=>600,672=>600,673=>600,674=>600,699=>600,700=>600,
-711=>600,720=>600,721=>600,728=>600,729=>600,730=>600,731=>600,733=>600,768=>600,769=>600,
-770=>600,771=>600,772=>600,773=>600,774=>600,775=>600,776=>600,777=>600,778=>600,779=>600,
-780=>600,781=>600,782=>600,783=>600,784=>600,785=>600,795=>600,801=>600,802=>600,807=>600,
-808=>600,823=>600,884=>600,885=>600,890=>600,894=>600,900=>600,901=>600,902=>600,903=>600,
-904=>600,905=>600,906=>600,908=>600,910=>600,911=>600,912=>600,913=>600,914=>600,915=>600,
-916=>600,917=>600,918=>600,919=>600,920=>600,921=>600,922=>600,923=>600,924=>600,925=>600,
-926=>600,927=>600,928=>600,929=>600,931=>600,932=>600,933=>600,934=>600,935=>600,936=>600,
-937=>600,938=>600,939=>600,940=>600,941=>600,942=>600,943=>600,944=>600,945=>600,946=>600,
-947=>600,948=>600,949=>600,950=>600,951=>600,952=>600,953=>600,954=>600,955=>600,956=>600,
-957=>600,958=>600,959=>600,960=>600,961=>600,962=>600,963=>600,964=>600,965=>600,966=>600,
-967=>600,968=>600,969=>600,970=>600,971=>600,972=>600,973=>600,974=>600,976=>600,977=>600,
-978=>600,981=>600,982=>600,1009=>600,1024=>600,1025=>600,1026=>600,1027=>600,1028=>600,1029=>600,
-1030=>600,1031=>600,1032=>600,1033=>600,1034=>600,1035=>600,1036=>600,1037=>600,1038=>600,1039=>600,
-1040=>600,1041=>600,1042=>600,1043=>600,1044=>600,1045=>600,1046=>600,1047=>600,1048=>600,1049=>600,
-1050=>600,1051=>600,1052=>600,1053=>600,1054=>600,1055=>600,1056=>600,1057=>600,1058=>600,1059=>600,
-1060=>600,1061=>600,1062=>600,1063=>600,1064=>600,1065=>600,1066=>600,1067=>600,1068=>600,1069=>600,
-1070=>600,1071=>600,1072=>600,1073=>600,1074=>600,1075=>600,1076=>600,1077=>600,1078=>600,1079=>600,
-1080=>600,1081=>600,1082=>600,1083=>600,1084=>600,1085=>600,1086=>600,1087=>600,1088=>600,1089=>600,
-1090=>600,1091=>600,1092=>600,1093=>600,1094=>600,1095=>600,1096=>600,1097=>600,1098=>600,1099=>600,
-1100=>600,1101=>600,1102=>600,1103=>600,1104=>600,1105=>600,1106=>600,1107=>600,1108=>600,1109=>600,
-1110=>600,1111=>600,1112=>600,1113=>600,1114=>600,1115=>600,1116=>600,1117=>600,1118=>600,1119=>600,
-1164=>600,1165=>600,1166=>600,1167=>600,1168=>600,1169=>600,1170=>600,1171=>600,1172=>600,1173=>600,
-1174=>600,1175=>600,1176=>600,1177=>600,1178=>600,1179=>600,1180=>600,1181=>600,1182=>600,1183=>600,
-1184=>600,1185=>600,1186=>600,1187=>600,1188=>600,1189=>600,1190=>600,1191=>600,1192=>600,1193=>600,
-1194=>600,1195=>600,1196=>600,1197=>600,1198=>600,1199=>600,1200=>600,1201=>600,1202=>600,1203=>600,
-1204=>600,1205=>600,1206=>600,1207=>600,1208=>600,1209=>600,1210=>600,1211=>600,1212=>600,1213=>600,
-1214=>600,1215=>600,1216=>600,1217=>600,1218=>600,1219=>600,1220=>600,1223=>600,1224=>600,1227=>600,
-1228=>600,1232=>600,1233=>600,1234=>600,1235=>600,1236=>600,1237=>600,1238=>600,1239=>600,1240=>600,
-1241=>600,1242=>600,1243=>600,1244=>600,1245=>600,1246=>600,1247=>600,1248=>600,1249=>600,1250=>600,
-1251=>600,1252=>600,1253=>600,1254=>600,1255=>600,1256=>600,1257=>600,1258=>600,1259=>600,1260=>600,
-1261=>600,1262=>600,1263=>600,1264=>600,1265=>600,1266=>600,1267=>600,1268=>600,1269=>600,1272=>600,
-1273=>600,1456=>600,1457=>600,1458=>600,1459=>600,1460=>600,1461=>600,1462=>600,1463=>600,1464=>600,
-1465=>600,1467=>600,1468=>600,1469=>600,1470=>600,1471=>600,1472=>600,1473=>600,1474=>600,1475=>600,
-1476=>600,1488=>600,1489=>600,1490=>600,1491=>600,1492=>600,1493=>600,1494=>600,1495=>600,1496=>600,
-1497=>600,1498=>600,1499=>600,1500=>600,1501=>600,1502=>600,1503=>600,1504=>600,1505=>600,1506=>600,
-1507=>600,1508=>600,1509=>600,1510=>600,1511=>600,1512=>600,1513=>600,1514=>600,1520=>600,1521=>600,
-1522=>600,1523=>600,1524=>600,4304=>600,4305=>600,4306=>600,4307=>600,4308=>600,4309=>600,4310=>600,
-4311=>600,4312=>600,4313=>600,4314=>600,4315=>600,4316=>600,4317=>600,4318=>600,4319=>600,4320=>600,
-4321=>600,4322=>600,4323=>600,4324=>600,4325=>600,4326=>600,4327=>600,4328=>600,4329=>600,4330=>600,
-4331=>600,4332=>600,4333=>600,4334=>600,4335=>600,4336=>600,4337=>600,4338=>600,4339=>600,4340=>600,
-4341=>600,7680=>600,7681=>600,7682=>600,7683=>600,7684=>600,7685=>600,7686=>600,7687=>600,7688=>600,
-7689=>600,7690=>600,7691=>600,7692=>600,7693=>600,7694=>600,7695=>600,7696=>600,7697=>600,7698=>600,
-7699=>600,7700=>600,7701=>600,7702=>600,7703=>600,7704=>600,7705=>600,7706=>600,7707=>600,7708=>600,
-7709=>600,7710=>600,7711=>600,7712=>600,7713=>600,7714=>600,7715=>600,7716=>600,7717=>600,7718=>600,
-7719=>600,7720=>600,7721=>600,7722=>600,7723=>600,7724=>600,7725=>600,7726=>600,7727=>600,7728=>600,
-7729=>600,7730=>600,7731=>600,7732=>600,7733=>600,7734=>600,7735=>600,7736=>600,7737=>600,7738=>600,
-7739=>600,7740=>600,7741=>600,7742=>600,7743=>600,7744=>600,7745=>600,7746=>600,7747=>600,7748=>600,
-7749=>600,7750=>600,7751=>600,7752=>600,7753=>600,7754=>600,7755=>600,7756=>600,7757=>600,7758=>600,
-7759=>600,7760=>600,7761=>600,7762=>600,7763=>600,7764=>600,7765=>600,7766=>600,7767=>600,7768=>600,
-7769=>600,7770=>600,7771=>600,7772=>600,7773=>600,7774=>600,7775=>600,7776=>600,7777=>600,7778=>600,
-7779=>600,7780=>600,7781=>600,7782=>600,7783=>600,7784=>600,7785=>600,7786=>600,7787=>600,7788=>600,
-7789=>600,7790=>600,7791=>600,7792=>600,7793=>600,7794=>600,7795=>600,7796=>600,7797=>600,7798=>600,
-7799=>600,7800=>600,7801=>600,7802=>600,7803=>600,7804=>600,7805=>600,7806=>600,7807=>600,7808=>600,
-7809=>600,7810=>600,7811=>600,7812=>600,7813=>600,7814=>600,7815=>600,7816=>600,7817=>600,7818=>600,
-7819=>600,7820=>600,7821=>600,7822=>600,7823=>600,7824=>600,7825=>600,7826=>600,7827=>600,7828=>600,
-7829=>600,7830=>600,7831=>600,7832=>600,7833=>600,7835=>600,7840=>600,7841=>600,7842=>600,7843=>600,
-7844=>600,7845=>600,7846=>600,7847=>600,7848=>600,7849=>600,7850=>600,7851=>600,7852=>600,7853=>600,
-7854=>600,7855=>600,7856=>600,7857=>600,7858=>600,7859=>600,7860=>600,7861=>600,7862=>600,7863=>600,
-7864=>600,7865=>600,7866=>600,7867=>600,7868=>600,7869=>600,7870=>600,7871=>600,7872=>600,7873=>600,
-7874=>600,7875=>600,7876=>600,7877=>600,7878=>600,7879=>600,7880=>600,7881=>600,7882=>600,7883=>600,
-7884=>600,7885=>600,7886=>600,7887=>600,7888=>600,7889=>600,7890=>600,7891=>600,7892=>600,7893=>600,
-7894=>600,7895=>600,7896=>600,7897=>600,7898=>600,7899=>600,7900=>600,7901=>600,7902=>600,7903=>600,
-7904=>600,7905=>600,7906=>600,7907=>600,7908=>600,7909=>600,7910=>600,7911=>600,7912=>600,7913=>600,
-7914=>600,7915=>600,7916=>600,7917=>600,7918=>600,7919=>600,7920=>600,7921=>600,7922=>600,7923=>600,
-7924=>600,7925=>600,7926=>600,7927=>600,7928=>600,7929=>600,8192=>600,8193=>600,8194=>600,8195=>600,
-8201=>600,8208=>600,8209=>600,8210=>600,8213=>600,8219=>600,8223=>600,8242=>600,8243=>600,8244=>600,
-8245=>600,8246=>600,8247=>600,8252=>600,8260=>600,8261=>600,8262=>600,8264=>600,8265=>600,8267=>600,
-8292=>600,8304=>600,8308=>600,8309=>600,8310=>600,8311=>600,8312=>600,8313=>600,8314=>600,8315=>600,
-8316=>600,8317=>600,8318=>600,8319=>600,8320=>600,8321=>600,8322=>600,8323=>600,8324=>600,8325=>600,
-8326=>600,8327=>600,8328=>600,8329=>600,8355=>600,8356=>600,8362=>600,8373=>600,8465=>600,8466=>600,
-8470=>600,8472=>600,8476=>600,8486=>600,8487=>600,8490=>600,8491=>600,8501=>600,8531=>600,8532=>600,
-8533=>600,8534=>600,8535=>600,8536=>600,8537=>600,8538=>600,8539=>600,8540=>600,8541=>600,8542=>600,
-8543=>600,8592=>600,8593=>600,8594=>600,8595=>600,8704=>600,8706=>600,8707=>600,8709=>600,8710=>600,
-8711=>600,8712=>600,8713=>600,8715=>600,8716=>600,8721=>600,8722=>600,8723=>600,8725=>600,8730=>600,
-8733=>600,8734=>600,8735=>600,8756=>600,8800=>600,8801=>600,8804=>600,8805=>600,8834=>600,8835=>600,
-8836=>600,8837=>600,8838=>600,8839=>600,8869=>600,8976=>600,9001=>600,9002=>600,9472=>600,9473=>600,
-9474=>600,9475=>600,9476=>600,9477=>600,9478=>600,9479=>600,9480=>600,9481=>600,9482=>600,9483=>600,
-9484=>600,9485=>600,9486=>600,9487=>600,9488=>600,9489=>600,9490=>600,9491=>600,9492=>600,9493=>600,
-9494=>600,9495=>600,9496=>600,9497=>600,9498=>600,9499=>600,9500=>600,9501=>600,9502=>600,9503=>600,
-9504=>600,9505=>600,9506=>600,9507=>600,9508=>600,9509=>600,9510=>600,9511=>600,9512=>600,9513=>600,
-9514=>600,9515=>600,9516=>600,9517=>600,9518=>600,9519=>600,9520=>600,9521=>600,9522=>600,9523=>600,
-9524=>600,9525=>600,9526=>600,9527=>600,9528=>600,9529=>600,9530=>600,9531=>600,9532=>600,9533=>600,
-9534=>600,9535=>600,9536=>600,9537=>600,9538=>600,9539=>600,9540=>600,9541=>600,9542=>600,9543=>600,
-9544=>600,9545=>600,9546=>600,9547=>600,9548=>600,9549=>600,9550=>600,9551=>600,9552=>600,9553=>600,
-9554=>600,9555=>600,9556=>600,9557=>600,9558=>600,9559=>600,9560=>600,9561=>600,9562=>600,9563=>600,
-9564=>600,9565=>600,9566=>600,9567=>600,9568=>600,9569=>600,9570=>600,9571=>600,9572=>600,9573=>600,
-9574=>600,9575=>600,9576=>600,9577=>600,9578=>600,9579=>600,9580=>600,9581=>600,9582=>600,9583=>600,
-9584=>600,9585=>600,9586=>600,9587=>600,9588=>600,9589=>600,9590=>600,9591=>600,9592=>600,9593=>600,
-9594=>600,9595=>600,9596=>600,9597=>600,9598=>600,9599=>600,9600=>600,9601=>600,9602=>600,9603=>600,
-9604=>600,9605=>600,9606=>600,9607=>600,9608=>600,9609=>600,9610=>600,9611=>600,9612=>600,9613=>600,
-9614=>600,9615=>600,9616=>600,9617=>600,9618=>600,9619=>600,9620=>600,9621=>600,9632=>600,9633=>600,
-9635=>600,9636=>600,9637=>600,9638=>600,9639=>600,9640=>600,9641=>600,9642=>600,9643=>600,9644=>600,
-9645=>600,9646=>600,9647=>600,9648=>600,9649=>600,9650=>600,9651=>600,9652=>600,9653=>600,9654=>600,
-9655=>600,9656=>600,9657=>600,9658=>600,9660=>600,9661=>600,9662=>600,9663=>600,9664=>600,9665=>600,
-9666=>600,9667=>600,9668=>600,9669=>600,9670=>600,9671=>600,9673=>600,9674=>600,9675=>600,9677=>600,
-9679=>600,9680=>600,9681=>600,9682=>600,9683=>600,9684=>600,9685=>600,9686=>600,9687=>600,9688=>600,
-9689=>600,9698=>600,9699=>600,9700=>600,9701=>600,9702=>600,9703=>600,9704=>600,9705=>600,9706=>600,
-9707=>600,9708=>600,9709=>600,9710=>600,9712=>600,9713=>600,9714=>600,9715=>600,9716=>600,9717=>600,
-9718=>600,9719=>600,9735=>600,9736=>600,9737=>600,9776=>600,9777=>600,9778=>600,9779=>600,9780=>600,
-9781=>600,9782=>600,9783=>600,9785=>600,9786=>600,9787=>600,9833=>600,9834=>600,9835=>600,9836=>600,
-63166=>600,63171=>600,64256=>600,64257=>600,64258=>600,65533=>600);
+385=>600,386=>600,387=>600,388=>600,389=>600,390=>600,391=>600,392=>600,393=>600,394=>600,
+395=>600,396=>600,397=>600,398=>600,399=>600,400=>600,401=>600,403=>600,404=>600,405=>600,
+406=>600,407=>600,408=>600,409=>600,410=>600,411=>600,412=>600,413=>600,414=>600,415=>600,
+416=>600,417=>600,418=>600,419=>600,420=>600,421=>600,422=>600,423=>600,424=>600,425=>600,
+426=>600,427=>600,428=>600,429=>600,430=>600,431=>600,432=>600,433=>600,434=>600,435=>600,
+436=>600,437=>600,438=>600,439=>600,440=>600,441=>600,442=>600,443=>600,444=>600,445=>600,
+446=>600,447=>600,448=>600,449=>600,450=>600,451=>600,452=>600,453=>600,454=>600,455=>600,
+456=>600,457=>600,458=>600,459=>600,460=>600,461=>600,462=>600,463=>600,464=>600,465=>600,
+466=>600,467=>600,468=>600,469=>600,470=>600,471=>600,472=>600,473=>600,474=>600,475=>600,
+476=>600,477=>600,478=>600,479=>600,480=>600,481=>600,482=>600,483=>600,484=>600,485=>600,
+486=>600,487=>600,488=>600,489=>600,490=>600,491=>600,492=>600,493=>600,494=>600,495=>600,
+496=>600,497=>600,498=>600,499=>600,500=>600,501=>600,502=>600,503=>600,504=>600,505=>600,
+506=>600,507=>600,508=>600,509=>600,510=>600,511=>600,512=>600,513=>600,514=>600,515=>600,
+516=>600,517=>600,518=>600,519=>600,520=>600,521=>600,522=>600,523=>600,524=>600,525=>600,
+526=>600,527=>600,528=>600,529=>600,530=>600,531=>600,532=>600,533=>600,534=>600,535=>600,
+536=>600,537=>600,538=>600,539=>600,540=>600,541=>600,542=>600,543=>600,548=>600,549=>600,
+550=>600,551=>600,552=>600,553=>600,554=>600,555=>600,556=>600,557=>600,558=>600,559=>600,
+560=>600,561=>600,562=>600,563=>600,567=>600,592=>600,593=>600,594=>600,595=>600,596=>600,
+598=>600,599=>600,600=>600,601=>600,603=>600,604=>600,607=>600,608=>600,609=>600,613=>600,
+614=>600,615=>600,616=>600,617=>600,618=>600,619=>600,621=>600,623=>600,624=>600,625=>600,
+626=>600,627=>600,628=>600,629=>600,633=>600,634=>600,635=>600,636=>600,637=>600,638=>600,
+639=>600,640=>600,641=>600,642=>600,643=>600,644=>600,645=>600,647=>600,648=>600,649=>600,
+652=>600,653=>600,654=>600,656=>600,657=>600,658=>600,659=>600,660=>600,661=>600,662=>600,
+663=>600,664=>600,665=>600,666=>600,667=>600,668=>600,669=>600,670=>600,671=>600,672=>600,
+673=>600,674=>600,688=>600,689=>600,690=>600,691=>600,692=>600,693=>600,694=>600,695=>600,
+696=>600,697=>600,698=>600,699=>600,700=>600,701=>600,702=>600,703=>600,704=>600,705=>600,
+706=>600,707=>600,708=>600,709=>600,711=>600,712=>600,713=>600,714=>600,715=>600,716=>600,
+717=>600,718=>600,719=>600,720=>600,721=>600,722=>600,723=>600,724=>600,725=>600,726=>600,
+727=>600,728=>600,729=>600,730=>600,731=>600,733=>600,734=>600,735=>600,736=>600,737=>600,
+738=>600,739=>600,740=>600,741=>600,742=>600,743=>600,744=>600,745=>600,746=>600,747=>600,
+748=>600,749=>600,750=>600,751=>600,752=>600,753=>600,754=>600,755=>600,756=>600,757=>600,
+758=>600,759=>600,760=>600,761=>600,762=>600,763=>600,764=>600,765=>600,766=>600,767=>600,
+768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,
+778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,
+788=>0,789=>0,790=>0,791=>0,795=>0,796=>0,800=>0,801=>0,802=>0,803=>0,
+804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,812=>0,813=>0,814=>0,
+815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,826=>0,
+827=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,838=>0,839=>0,840=>0,
+844=>0,849=>0,850=>0,851=>0,852=>0,853=>0,854=>0,855=>0,884=>600,885=>600,
+890=>600,894=>600,900=>600,901=>600,902=>600,903=>600,904=>600,905=>600,906=>600,908=>600,
+910=>600,911=>600,912=>600,913=>600,914=>600,915=>600,916=>600,917=>600,918=>600,919=>600,
+920=>600,921=>600,922=>600,923=>600,924=>600,925=>600,926=>600,927=>600,928=>600,929=>600,
+931=>600,932=>600,933=>600,934=>600,935=>600,936=>600,937=>600,938=>600,939=>600,940=>600,
+941=>600,942=>600,943=>600,944=>600,945=>600,946=>600,947=>600,948=>600,949=>600,950=>600,
+951=>600,952=>600,953=>600,954=>600,955=>600,956=>600,957=>600,958=>600,959=>600,960=>600,
+961=>600,962=>600,963=>600,964=>600,965=>600,966=>600,967=>600,968=>600,969=>600,970=>600,
+971=>600,972=>600,973=>600,974=>600,976=>600,977=>600,978=>600,979=>600,980=>600,981=>600,
+982=>600,986=>600,987=>600,988=>600,1008=>600,1009=>600,1012=>600,1013=>600,1024=>600,1025=>600,
+1026=>600,1027=>600,1028=>600,1029=>600,1030=>600,1031=>600,1032=>600,1033=>600,1034=>600,1035=>600,
+1036=>600,1037=>600,1038=>600,1039=>600,1040=>600,1041=>600,1042=>600,1043=>600,1044=>600,1045=>600,
+1046=>600,1047=>600,1048=>600,1049=>600,1050=>600,1051=>600,1052=>600,1053=>600,1054=>600,1055=>600,
+1056=>600,1057=>600,1058=>600,1059=>600,1060=>600,1061=>600,1062=>600,1063=>600,1064=>600,1065=>600,
+1066=>600,1067=>600,1068=>600,1069=>600,1070=>600,1071=>600,1072=>600,1073=>600,1074=>600,1075=>600,
+1076=>600,1077=>600,1078=>600,1079=>600,1080=>600,1081=>600,1082=>600,1083=>600,1084=>600,1085=>600,
+1086=>600,1087=>600,1088=>600,1089=>600,1090=>600,1091=>600,1092=>600,1093=>600,1094=>600,1095=>600,
+1096=>600,1097=>600,1098=>600,1099=>600,1100=>600,1101=>600,1102=>600,1103=>600,1104=>600,1105=>600,
+1106=>600,1107=>600,1108=>600,1109=>600,1110=>600,1111=>600,1112=>600,1113=>600,1114=>600,1115=>600,
+1116=>600,1117=>600,1118=>600,1119=>600,1136=>600,1137=>600,1138=>600,1156=>0,1157=>0,1158=>0,
+1162=>600,1163=>600,1164=>600,1165=>600,1166=>600,1167=>600,1168=>600,1169=>600,1170=>600,1171=>600,
+1172=>600,1173=>600,1174=>600,1175=>600,1176=>600,1177=>600,1178=>600,1179=>600,1180=>600,1181=>600,
+1182=>600,1183=>600,1184=>600,1185=>600,1186=>600,1187=>600,1188=>600,1189=>600,1190=>600,1191=>600,
+1192=>600,1193=>600,1194=>600,1195=>600,1196=>600,1197=>600,1198=>600,1199=>600,1200=>600,1201=>600,
+1202=>600,1203=>600,1204=>600,1205=>600,1206=>600,1207=>600,1208=>600,1209=>600,1210=>600,1211=>600,
+1212=>600,1213=>600,1214=>600,1215=>600,1216=>600,1217=>600,1218=>600,1219=>600,1220=>600,1221=>600,
+1222=>600,1223=>600,1224=>600,1225=>600,1226=>600,1227=>600,1228=>600,1229=>600,1230=>600,1231=>600,
+1232=>600,1233=>600,1234=>600,1235=>600,1236=>600,1237=>600,1238=>600,1239=>600,1240=>600,1241=>600,
+1242=>600,1243=>600,1244=>600,1245=>600,1246=>600,1247=>600,1248=>600,1249=>600,1250=>600,1251=>600,
+1252=>600,1253=>600,1254=>600,1255=>600,1256=>600,1257=>600,1258=>600,1259=>600,1260=>600,1261=>600,
+1262=>600,1263=>600,1264=>600,1265=>600,1266=>600,1267=>600,1268=>600,1269=>600,1270=>600,1271=>600,
+1272=>600,1273=>600,1296=>600,1297=>600,1298=>600,1299=>600,1306=>600,1307=>600,1308=>600,1309=>600,
+1310=>600,1311=>600,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,
+1464=>0,1465=>0,1467=>0,1468=>0,1469=>0,1470=>600,1471=>0,1472=>600,1473=>0,1474=>0,
+1475=>600,1476=>0,1488=>600,1489=>600,1490=>600,1491=>600,1492=>600,1493=>600,1494=>600,1495=>600,
+1496=>600,1497=>600,1498=>600,1499=>600,1500=>600,1501=>600,1502=>600,1503=>600,1504=>600,1505=>600,
+1506=>600,1507=>600,1508=>600,1509=>600,1510=>600,1511=>600,1512=>600,1513=>600,1514=>600,1520=>600,
+1521=>600,1522=>600,1523=>600,1524=>600,4304=>600,4305=>600,4306=>600,4307=>600,4308=>600,4309=>600,
+4310=>600,4311=>600,4312=>600,4313=>600,4314=>600,4315=>600,4316=>600,4317=>600,4318=>600,4319=>600,
+4320=>600,4321=>600,4322=>600,4323=>600,4324=>600,4325=>600,4326=>600,4327=>600,4328=>600,4329=>600,
+4330=>600,4331=>600,4332=>600,4333=>600,4334=>600,4335=>600,4336=>600,4337=>600,4338=>600,4339=>600,
+4340=>600,4341=>600,4345=>600,4347=>600,7680=>600,7681=>600,7682=>600,7683=>600,7684=>600,7685=>600,
+7686=>600,7687=>600,7688=>600,7689=>600,7690=>600,7691=>600,7692=>600,7693=>600,7694=>600,7695=>600,
+7696=>600,7697=>600,7698=>600,7699=>600,7700=>600,7701=>600,7702=>600,7703=>600,7704=>600,7705=>600,
+7706=>600,7707=>600,7708=>600,7709=>600,7710=>600,7711=>600,7712=>600,7713=>600,7714=>600,7715=>600,
+7716=>600,7717=>600,7718=>600,7719=>600,7720=>600,7721=>600,7722=>600,7723=>600,7724=>600,7725=>600,
+7726=>600,7727=>600,7728=>600,7729=>600,7730=>600,7731=>600,7732=>600,7733=>600,7734=>600,7735=>600,
+7736=>600,7737=>600,7738=>600,7739=>600,7740=>600,7741=>600,7742=>600,7743=>600,7744=>600,7745=>600,
+7746=>600,7747=>600,7748=>600,7749=>600,7750=>600,7751=>600,7752=>600,7753=>600,7754=>600,7755=>600,
+7756=>600,7757=>600,7758=>600,7759=>600,7760=>600,7761=>600,7762=>600,7763=>600,7764=>600,7765=>600,
+7766=>600,7767=>600,7768=>600,7769=>600,7770=>600,7771=>600,7772=>600,7773=>600,7774=>600,7775=>600,
+7776=>600,7777=>600,7778=>600,7779=>600,7780=>600,7781=>600,7782=>600,7783=>600,7784=>600,7785=>600,
+7786=>600,7787=>600,7788=>600,7789=>600,7790=>600,7791=>600,7792=>600,7793=>600,7794=>600,7795=>600,
+7796=>600,7797=>600,7798=>600,7799=>600,7800=>600,7801=>600,7802=>600,7803=>600,7804=>600,7805=>600,
+7806=>600,7807=>600,7808=>600,7809=>600,7810=>600,7811=>600,7812=>600,7813=>600,7814=>600,7815=>600,
+7816=>600,7817=>600,7818=>600,7819=>600,7820=>600,7821=>600,7822=>600,7823=>600,7824=>600,7825=>600,
+7826=>600,7827=>600,7828=>600,7829=>600,7830=>600,7831=>600,7832=>600,7833=>600,7834=>600,7835=>600,
+7840=>600,7841=>600,7842=>600,7843=>600,7844=>600,7845=>600,7846=>600,7847=>600,7848=>600,7849=>600,
+7850=>600,7851=>600,7852=>600,7853=>600,7854=>600,7855=>600,7856=>600,7857=>600,7858=>600,7859=>600,
+7860=>600,7861=>600,7862=>600,7863=>600,7864=>600,7865=>600,7866=>600,7867=>600,7868=>600,7869=>600,
+7870=>600,7871=>600,7872=>600,7873=>600,7874=>600,7875=>600,7876=>600,7877=>600,7878=>600,7879=>600,
+7880=>600,7881=>600,7882=>600,7883=>600,7884=>600,7885=>600,7886=>600,7887=>600,7888=>600,7889=>600,
+7890=>600,7891=>600,7892=>600,7893=>600,7894=>600,7895=>600,7896=>600,7897=>600,7898=>600,7899=>600,
+7900=>600,7901=>600,7902=>600,7903=>600,7904=>600,7905=>600,7906=>600,7907=>600,7908=>600,7909=>600,
+7910=>600,7911=>600,7912=>600,7913=>600,7914=>600,7915=>600,7916=>600,7917=>600,7918=>600,7919=>600,
+7920=>600,7921=>600,7922=>600,7923=>600,7924=>600,7925=>600,7926=>600,7927=>600,7928=>600,7929=>600,
+8192=>600,8193=>600,8194=>600,8195=>600,8196=>600,8197=>600,8198=>600,8199=>600,8200=>600,8201=>600,
+8202=>600,8203=>600,8204=>0,8205=>0,8206=>0,8207=>0,8208=>600,8209=>600,8210=>600,8213=>600,
+8214=>600,8215=>600,8219=>600,8223=>600,8227=>600,8228=>600,8229=>600,8231=>600,8232=>600,8233=>600,
+8234=>600,8235=>600,8236=>600,8237=>600,8238=>600,8239=>600,8241=>600,8242=>600,8243=>600,8244=>600,
+8245=>600,8246=>600,8247=>600,8248=>600,8251=>600,8252=>600,8253=>600,8254=>600,8255=>600,8256=>600,
+8257=>600,8258=>600,8259=>600,8260=>600,8261=>600,8262=>600,8263=>600,8264=>600,8265=>600,8266=>600,
+8267=>600,8268=>600,8269=>600,8270=>600,8271=>600,8272=>600,8273=>600,8274=>600,8275=>600,8276=>600,
+8277=>600,8278=>600,8279=>600,8280=>600,8281=>600,8282=>600,8283=>600,8284=>600,8285=>600,8286=>600,
+8287=>600,8288=>600,8289=>600,8290=>600,8291=>600,8292=>600,8298=>600,8299=>600,8300=>600,8301=>600,
+8302=>600,8303=>600,8304=>600,8305=>600,8308=>600,8309=>600,8310=>600,8311=>600,8312=>600,8313=>600,
+8314=>600,8315=>600,8316=>600,8317=>600,8318=>600,8319=>600,8320=>600,8321=>600,8322=>600,8323=>600,
+8324=>600,8325=>600,8326=>600,8327=>600,8328=>600,8329=>600,8330=>600,8331=>600,8332=>600,8333=>600,
+8334=>600,8336=>600,8337=>600,8338=>600,8339=>600,8340=>600,8355=>600,8356=>600,8362=>600,8373=>600,
+8448=>600,8449=>600,8451=>600,8453=>600,8454=>600,8457=>600,8465=>600,8466=>600,8470=>600,8472=>600,
+8476=>600,8481=>600,8486=>600,8487=>600,8489=>600,8490=>600,8491=>600,8498=>600,8501=>600,8502=>600,
+8503=>600,8504=>600,8506=>600,8507=>600,8523=>600,8531=>600,8532=>600,8533=>600,8534=>600,8535=>600,
+8536=>600,8537=>600,8538=>600,8539=>600,8540=>600,8541=>600,8542=>600,8543=>600,8544=>600,8545=>600,
+8546=>600,8547=>600,8548=>600,8549=>600,8550=>600,8553=>600,8556=>600,8557=>600,8558=>600,8559=>600,
+8560=>600,8564=>600,8569=>600,8572=>600,8573=>600,8574=>600,8575=>600,8592=>600,8593=>600,8594=>600,
+8595=>600,8704=>600,8706=>600,8707=>600,8709=>600,8710=>600,8711=>600,8712=>600,8713=>600,8715=>600,
+8716=>600,8721=>600,8722=>600,8723=>600,8725=>600,8730=>600,8733=>600,8734=>600,8735=>600,8756=>600,
+8800=>600,8801=>600,8804=>600,8805=>600,8834=>600,8835=>600,8836=>600,8837=>600,8838=>600,8839=>600,
+8869=>600,8976=>600,9001=>600,9002=>600,9251=>600,9472=>600,9473=>600,9474=>600,9475=>600,9476=>600,
+9477=>600,9478=>600,9479=>600,9480=>600,9481=>600,9482=>600,9483=>600,9484=>600,9485=>600,9486=>600,
+9487=>600,9488=>600,9489=>600,9490=>600,9491=>600,9492=>600,9493=>600,9494=>600,9495=>600,9496=>600,
+9497=>600,9498=>600,9499=>600,9500=>600,9501=>600,9502=>600,9503=>600,9504=>600,9505=>600,9506=>600,
+9507=>600,9508=>600,9509=>600,9510=>600,9511=>600,9512=>600,9513=>600,9514=>600,9515=>600,9516=>600,
+9517=>600,9518=>600,9519=>600,9520=>600,9521=>600,9522=>600,9523=>600,9524=>600,9525=>600,9526=>600,
+9527=>600,9528=>600,9529=>600,9530=>600,9531=>600,9532=>600,9533=>600,9534=>600,9535=>600,9536=>600,
+9537=>600,9538=>600,9539=>600,9540=>600,9541=>600,9542=>600,9543=>600,9544=>600,9545=>600,9546=>600,
+9547=>600,9548=>600,9549=>600,9550=>600,9551=>600,9552=>600,9553=>600,9554=>600,9555=>600,9556=>600,
+9557=>600,9558=>600,9559=>600,9560=>600,9561=>600,9562=>600,9563=>600,9564=>600,9565=>600,9566=>600,
+9567=>600,9568=>600,9569=>600,9570=>600,9571=>600,9572=>600,9573=>600,9574=>600,9575=>600,9576=>600,
+9577=>600,9578=>600,9579=>600,9580=>600,9581=>600,9582=>600,9583=>600,9584=>600,9585=>600,9586=>600,
+9587=>600,9588=>600,9589=>600,9590=>600,9591=>600,9592=>600,9593=>600,9594=>600,9595=>600,9596=>600,
+9597=>600,9598=>600,9599=>600,9600=>600,9601=>600,9602=>600,9603=>600,9604=>600,9605=>600,9606=>600,
+9607=>600,9608=>600,9609=>600,9610=>600,9611=>600,9612=>600,9613=>600,9614=>600,9615=>600,9616=>600,
+9617=>600,9618=>600,9619=>600,9620=>600,9621=>600,9632=>600,9633=>600,9635=>600,9636=>600,9637=>600,
+9638=>600,9639=>600,9640=>600,9641=>600,9642=>600,9643=>600,9644=>600,9645=>600,9646=>600,9647=>600,
+9648=>600,9649=>600,9650=>600,9651=>600,9652=>600,9653=>600,9654=>600,9655=>600,9656=>600,9657=>600,
+9658=>600,9660=>600,9661=>600,9662=>600,9663=>600,9664=>600,9665=>600,9666=>600,9667=>600,9668=>600,
+9669=>600,9670=>600,9671=>600,9673=>600,9674=>600,9675=>600,9677=>600,9679=>600,9680=>600,9681=>600,
+9682=>600,9683=>600,9684=>600,9685=>600,9686=>600,9687=>600,9688=>600,9689=>600,9698=>600,9699=>600,
+9700=>600,9701=>600,9702=>600,9703=>600,9704=>600,9705=>600,9706=>600,9707=>600,9708=>600,9709=>600,
+9710=>600,9712=>600,9713=>600,9714=>600,9715=>600,9716=>600,9717=>600,9718=>600,9719=>600,9735=>600,
+9736=>600,9737=>600,9776=>600,9777=>600,9778=>600,9779=>600,9780=>600,9781=>600,9782=>600,9783=>600,
+9785=>600,9786=>600,9787=>600,9824=>600,9825=>600,9826=>600,9827=>600,9828=>600,9829=>600,9830=>600,
+9831=>600,9833=>600,9834=>600,9835=>600,9836=>600,9837=>600,9838=>600,9839=>600,64256=>600,64257=>600,
+64258=>600,64285=>600,64287=>600,64288=>600,64298=>600,64299=>600,64300=>600,64301=>600,64302=>600,64303=>600,
+64304=>600,64305=>600,64306=>600,64307=>600,64308=>600,64309=>600,64310=>600,64312=>600,64313=>600,64314=>600,
+64315=>600,64316=>600,64318=>600,64320=>600,64321=>600,64323=>600,64324=>600,64326=>600,64327=>600,64328=>600,
+64329=>600,64330=>600,64331=>600,64332=>600,64333=>600,64334=>600,64335=>600,65533=>600);
 $enc='';
 $diff='';
 $file='freemonob.z';
 $ctg='freemonob.ctg.z';
-$originalsize=139624;
+$originalsize=164212;
 ?>
\ No newline at end of file
index de0514c9dbaa42b9a9a90bf36768f4b75fd50fc4..84b1dec7c4e735d45f010aa60f18316215150fb8 100644 (file)
Binary files a/lib/tcpdf/fonts/freemonob.z and b/lib/tcpdf/fonts/freemonob.z differ
index 954be4730b9f89d732e2fbff54257aa1597f91fa..efaebb08feaefa55843fb6f48f0a6f4faceb7e5a 100644 (file)
Binary files a/lib/tcpdf/fonts/freemonobi.ctg.z and b/lib/tcpdf/fonts/freemonobi.ctg.z differ
index 9c819b60bee239d41ccc43194d41630c0829dd9e..05e95d42ef52bece4727caed107ce7172d8dc9bc 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeMonoBoldOblique';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>19,'Flags'=>97,'FontBBox'=>'[-418 -366 809 1111]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>600);
+$desc=array('Ascent'=>800,'Descent'=>-200,'CapHeight'=>19,'Flags'=>96,'FontBBox'=>'[-644 -200 833 800]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>600);
 $up=-125;
 $ut=50;
 $dw=600;
@@ -40,76 +40,114 @@ $cw=array(
 350=>600,351=>600,354=>600,355=>600,356=>600,357=>600,358=>600,359=>600,360=>600,361=>600,
 362=>600,363=>600,364=>600,365=>600,366=>600,367=>600,368=>600,369=>600,370=>600,371=>600,
 372=>600,373=>600,374=>600,375=>600,377=>600,378=>600,379=>600,380=>600,383=>600,384=>600,
-385=>600,386=>600,387=>600,390=>600,391=>600,392=>600,393=>600,394=>600,395=>600,396=>600,
-397=>600,398=>600,400=>600,401=>600,403=>600,405=>600,406=>600,407=>600,409=>600,410=>600,
-411=>600,412=>600,413=>600,414=>600,415=>600,416=>600,417=>600,418=>600,419=>600,420=>600,
-421=>600,422=>600,423=>600,424=>600,425=>600,427=>600,428=>600,429=>600,430=>600,431=>600,
-432=>600,435=>600,436=>600,437=>600,438=>600,439=>600,440=>600,443=>600,455=>600,456=>600,
-457=>600,459=>600,460=>600,461=>600,462=>600,463=>600,464=>600,465=>600,466=>600,467=>600,
-468=>600,469=>600,470=>600,471=>600,472=>600,473=>600,474=>600,475=>600,476=>600,477=>600,
-478=>600,479=>600,482=>600,483=>600,486=>600,487=>600,488=>600,489=>600,490=>600,491=>600,
-492=>600,493=>600,494=>600,496=>600,500=>600,501=>600,504=>600,505=>600,506=>600,507=>600,
-508=>600,509=>600,510=>600,511=>600,512=>600,513=>600,514=>600,515=>600,516=>600,517=>600,
-518=>600,519=>600,520=>600,521=>600,522=>600,523=>600,524=>600,525=>600,526=>600,527=>600,
-528=>600,529=>600,530=>600,531=>600,532=>600,533=>600,534=>600,535=>600,536=>600,537=>600,
-538=>600,539=>600,542=>600,543=>600,550=>600,551=>600,552=>600,553=>600,554=>600,555=>600,
-556=>600,557=>600,558=>600,559=>600,567=>600,592=>600,593=>600,594=>600,595=>600,596=>600,
+385=>600,386=>600,387=>600,388=>600,389=>600,390=>600,391=>600,392=>600,393=>600,394=>600,
+395=>600,396=>600,397=>600,398=>600,399=>600,400=>600,401=>600,403=>600,404=>600,405=>600,
+406=>600,407=>600,408=>600,409=>600,410=>600,411=>600,412=>600,413=>600,414=>600,415=>600,
+416=>600,417=>600,418=>600,419=>600,420=>600,421=>600,422=>600,423=>600,424=>600,425=>600,
+426=>600,427=>600,428=>600,429=>600,430=>600,431=>600,432=>600,433=>600,434=>600,435=>600,
+436=>600,437=>600,438=>600,439=>600,440=>600,441=>600,442=>600,443=>600,444=>600,445=>600,
+446=>600,447=>600,448=>600,449=>600,450=>600,451=>600,452=>600,453=>600,454=>600,455=>600,
+456=>600,457=>600,458=>600,459=>600,460=>600,461=>600,462=>600,463=>600,464=>600,465=>600,
+466=>600,467=>600,468=>600,469=>600,470=>600,471=>600,472=>600,473=>600,474=>600,475=>600,
+476=>600,477=>600,478=>600,479=>600,480=>600,481=>600,482=>600,483=>600,484=>600,485=>600,
+486=>600,487=>600,488=>600,489=>600,490=>600,491=>600,492=>600,493=>600,494=>600,495=>600,
+496=>600,497=>600,498=>600,499=>600,500=>600,501=>600,502=>600,503=>600,504=>600,505=>600,
+506=>600,507=>600,508=>600,509=>600,510=>600,511=>600,512=>600,513=>600,514=>600,515=>600,
+516=>600,517=>600,518=>600,519=>600,520=>600,521=>600,522=>600,523=>600,524=>600,525=>600,
+526=>600,527=>600,528=>600,529=>600,530=>600,531=>600,532=>600,533=>600,534=>600,535=>600,
+536=>600,537=>600,538=>600,539=>600,540=>600,541=>600,542=>600,543=>600,548=>600,549=>600,
+550=>600,551=>600,552=>600,553=>600,554=>600,555=>600,556=>600,557=>600,558=>600,559=>600,
+560=>600,561=>600,562=>600,563=>600,567=>600,592=>600,593=>600,594=>600,595=>600,596=>600,
 598=>600,599=>600,600=>600,601=>600,603=>600,604=>600,607=>600,608=>600,609=>600,613=>600,
 614=>600,615=>600,616=>600,617=>600,618=>600,619=>600,621=>600,623=>600,624=>600,625=>600,
 626=>600,627=>600,628=>600,629=>600,633=>600,634=>600,635=>600,636=>600,637=>600,638=>600,
 639=>600,640=>600,641=>600,642=>600,643=>600,644=>600,645=>600,647=>600,648=>600,649=>600,
-652=>600,653=>600,654=>600,656=>600,660=>600,661=>600,662=>600,663=>600,664=>600,668=>600,
-670=>600,671=>600,672=>600,673=>600,674=>600,699=>600,700=>600,711=>600,728=>600,729=>600,
-730=>600,731=>600,733=>600,768=>600,769=>600,770=>600,771=>600,772=>600,774=>600,775=>600,
-776=>600,778=>600,779=>600,780=>600,783=>600,784=>600,785=>600,806=>600,884=>600,885=>600,
-890=>600,894=>600,900=>600,901=>600,902=>600,903=>600,904=>600,905=>600,906=>600,908=>600,
-910=>600,911=>600,912=>600,913=>600,914=>600,915=>600,916=>600,917=>600,918=>600,919=>600,
-920=>600,921=>600,922=>600,923=>600,924=>600,925=>600,926=>600,927=>600,928=>600,929=>600,
-931=>600,932=>600,933=>600,934=>600,935=>600,936=>600,937=>600,938=>600,939=>600,940=>600,
-941=>600,942=>600,943=>600,944=>600,945=>600,946=>600,947=>600,948=>600,949=>600,950=>600,
-951=>600,952=>600,953=>600,954=>600,955=>600,956=>600,957=>600,958=>600,959=>600,960=>600,
-961=>600,962=>600,963=>600,964=>600,965=>600,966=>600,967=>600,968=>600,969=>600,970=>600,
-971=>600,972=>600,973=>600,974=>600,977=>600,978=>600,981=>600,1024=>600,1025=>600,1026=>600,
-1027=>600,1028=>600,1029=>600,1030=>600,1031=>600,1032=>600,1033=>600,1034=>600,1035=>600,1036=>600,
-1037=>600,1038=>600,1039=>600,1040=>600,1041=>600,1042=>600,1043=>600,1044=>600,1045=>600,1046=>600,
-1047=>600,1048=>600,1049=>600,1050=>600,1051=>600,1052=>600,1053=>600,1054=>600,1055=>600,1056=>600,
-1057=>600,1058=>600,1059=>600,1060=>600,1061=>600,1062=>600,1063=>600,1064=>600,1065=>600,1066=>600,
-1067=>600,1068=>600,1069=>600,1070=>600,1071=>600,1072=>600,1073=>600,1074=>600,1075=>600,1076=>600,
-1077=>600,1078=>600,1079=>600,1080=>600,1081=>600,1082=>600,1083=>600,1084=>600,1085=>600,1086=>600,
-1087=>600,1088=>600,1089=>600,1090=>600,1091=>600,1092=>600,1093=>600,1094=>600,1095=>600,1096=>600,
-1097=>600,1098=>600,1099=>600,1100=>600,1101=>600,1102=>600,1103=>600,1104=>600,1105=>600,1106=>600,
-1107=>600,1108=>600,1109=>600,1110=>600,1111=>600,1112=>600,1113=>600,1114=>600,1115=>600,1116=>600,
-1117=>600,1118=>600,1119=>600,1164=>600,1165=>600,1166=>600,1167=>600,1168=>600,1169=>600,1170=>600,
-1171=>600,1172=>600,1173=>600,1174=>600,1175=>600,1176=>600,1177=>600,1178=>600,1179=>600,1180=>600,
-1181=>600,1182=>600,1183=>600,1184=>600,1185=>600,1186=>600,1187=>600,1188=>600,1189=>600,1190=>600,
-1191=>600,1192=>600,1193=>600,1194=>600,1195=>600,1196=>600,1197=>600,1198=>600,1199=>600,1200=>600,
-1201=>600,1202=>600,1203=>600,1204=>600,1205=>600,1206=>600,1207=>600,1208=>600,1209=>600,1210=>600,
-1211=>600,1212=>600,1213=>600,1214=>600,1215=>600,1216=>600,1217=>600,1218=>600,1219=>600,1220=>600,
-1223=>600,1224=>600,1227=>600,1228=>600,1232=>600,1233=>600,1234=>600,1235=>600,1236=>600,1237=>600,
-1238=>600,1239=>600,1240=>600,1241=>600,1242=>600,1243=>600,1244=>600,1245=>600,1246=>600,1247=>600,
-1248=>600,1249=>600,1250=>600,1251=>600,1252=>600,1253=>600,1254=>600,1255=>600,1256=>600,1257=>600,
-1258=>600,1259=>600,1260=>600,1261=>600,1262=>600,1263=>600,1264=>600,1265=>600,1266=>600,1267=>600,
-1268=>600,1269=>600,1272=>600,1273=>600,1456=>600,1457=>600,1458=>600,1459=>600,1460=>600,1461=>600,
-1462=>600,1463=>600,1464=>600,1465=>600,1467=>600,1468=>600,1469=>600,1470=>600,1471=>600,1472=>600,
-1473=>600,1474=>600,1475=>600,1476=>600,1488=>600,1489=>600,1490=>600,1491=>600,1492=>600,1493=>600,
-1494=>600,1495=>600,1496=>600,1497=>600,1498=>600,1499=>600,1500=>600,1501=>600,1502=>600,1503=>600,
-1504=>600,1505=>600,1506=>600,1507=>600,1508=>600,1509=>600,1510=>600,1511=>600,1512=>600,1513=>600,
-1514=>600,1520=>600,1521=>600,1522=>600,1523=>600,1524=>600,4304=>600,4305=>600,4306=>600,4307=>600,
-4308=>600,4309=>600,4310=>600,4311=>600,4312=>600,4313=>600,4314=>600,4315=>600,4316=>600,4317=>600,
-4318=>600,4319=>600,4320=>600,4321=>600,4322=>600,4323=>600,4324=>600,4325=>600,4326=>600,4327=>600,
-4328=>600,4329=>600,4330=>600,4331=>600,4332=>600,4333=>600,4334=>600,4335=>600,4336=>600,4337=>600,
-4338=>600,4339=>600,4340=>600,4341=>600,8208=>600,8209=>600,8210=>600,8213=>600,8219=>600,8223=>600,
-8260=>600,8304=>600,8306=>600,8307=>600,8308=>600,8309=>600,8310=>600,8311=>600,8312=>600,8313=>600,
-8320=>600,8321=>600,8322=>600,8323=>600,8324=>600,8325=>600,8326=>600,8327=>600,8328=>600,8329=>600,
-8362=>600,8373=>600,8465=>600,8466=>600,8470=>600,8472=>600,8476=>600,8486=>600,8487=>600,8491=>600,
-8501=>600,8531=>600,8532=>600,8533=>600,8534=>600,8535=>600,8536=>600,8537=>600,8538=>600,8539=>600,
-8540=>600,8541=>600,8542=>600,8543=>600,8592=>600,8593=>600,8594=>600,8595=>600,8704=>600,8706=>600,
-8707=>600,8710=>600,8711=>600,8712=>600,8713=>600,8715=>600,8716=>600,8721=>600,8722=>600,8723=>600,
-8725=>600,8730=>600,8733=>600,8734=>600,8756=>600,8800=>600,8801=>600,8804=>600,8805=>600,9674=>600,
-9833=>600,9834=>600,9835=>600,9836=>600,64256=>600,64257=>600,64258=>600,65533=>600);
+652=>600,653=>600,654=>600,656=>600,657=>600,658=>600,659=>600,660=>600,661=>600,662=>600,
+663=>600,664=>600,665=>600,666=>600,667=>600,668=>600,669=>600,670=>600,671=>600,672=>600,
+673=>600,674=>600,697=>600,698=>600,699=>600,700=>600,701=>600,702=>600,703=>600,704=>600,
+705=>600,706=>600,707=>600,708=>600,709=>600,711=>600,712=>600,713=>600,714=>600,715=>600,
+716=>600,717=>600,718=>600,719=>600,720=>600,721=>600,722=>600,723=>600,724=>600,725=>600,
+726=>600,727=>600,728=>600,729=>600,730=>600,731=>600,733=>600,734=>600,735=>600,741=>600,
+742=>600,743=>600,744=>600,745=>600,746=>600,747=>600,748=>600,749=>600,750=>600,751=>600,
+752=>600,753=>600,754=>600,755=>600,756=>600,757=>600,758=>600,759=>600,760=>600,761=>600,
+762=>600,763=>600,764=>600,765=>600,766=>600,767=>600,768=>0,769=>0,770=>0,771=>0,
+772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,
+782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,
+795=>0,796=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,
+808=>0,809=>0,810=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,
+819=>0,820=>0,821=>0,822=>0,825=>0,826=>0,827=>0,831=>0,832=>0,833=>0,
+834=>0,835=>0,836=>0,838=>0,839=>0,840=>0,844=>0,849=>0,850=>0,851=>0,
+852=>0,853=>0,854=>0,855=>0,884=>600,885=>600,890=>600,894=>600,900=>600,901=>600,
+902=>600,903=>600,904=>600,905=>600,906=>600,908=>600,910=>600,911=>600,912=>600,913=>600,
+914=>600,915=>600,916=>600,917=>600,918=>600,919=>600,920=>600,921=>600,922=>600,923=>600,
+924=>600,925=>600,926=>600,927=>600,928=>600,929=>600,931=>600,932=>600,933=>600,934=>600,
+935=>600,936=>600,937=>600,938=>600,939=>600,940=>600,941=>600,942=>600,943=>600,944=>600,
+945=>600,946=>600,947=>600,948=>600,949=>600,950=>600,951=>600,952=>600,953=>600,954=>600,
+955=>600,956=>600,957=>600,958=>600,959=>600,960=>600,961=>600,962=>600,963=>600,964=>600,
+965=>600,966=>600,967=>600,968=>600,969=>600,970=>600,971=>600,972=>600,973=>600,974=>600,
+976=>600,977=>600,978=>600,979=>600,980=>600,981=>600,982=>600,986=>600,987=>600,988=>600,
+1008=>600,1009=>600,1012=>600,1013=>600,1024=>600,1025=>600,1026=>600,1027=>600,1028=>600,1029=>600,
+1030=>600,1031=>600,1032=>600,1033=>600,1034=>600,1035=>600,1036=>600,1037=>600,1038=>600,1039=>600,
+1040=>600,1041=>600,1042=>600,1043=>600,1044=>600,1045=>600,1046=>600,1047=>600,1048=>600,1049=>600,
+1050=>600,1051=>600,1052=>600,1053=>600,1054=>600,1055=>600,1056=>600,1057=>600,1058=>600,1059=>600,
+1060=>600,1061=>600,1062=>600,1063=>600,1064=>600,1065=>600,1066=>600,1067=>600,1068=>600,1069=>600,
+1070=>600,1071=>600,1072=>600,1073=>600,1074=>600,1075=>600,1076=>600,1077=>600,1078=>600,1079=>600,
+1080=>600,1081=>600,1082=>600,1083=>600,1084=>600,1085=>600,1086=>600,1087=>600,1088=>600,1089=>600,
+1090=>600,1091=>600,1092=>600,1093=>600,1094=>600,1095=>600,1096=>600,1097=>600,1098=>600,1099=>600,
+1100=>600,1101=>600,1102=>600,1103=>600,1104=>600,1105=>600,1106=>600,1107=>600,1108=>600,1109=>600,
+1110=>600,1111=>600,1112=>600,1113=>600,1114=>600,1115=>600,1116=>600,1117=>600,1118=>600,1119=>600,
+1136=>600,1137=>600,1138=>600,1156=>0,1157=>0,1158=>0,1162=>600,1163=>600,1164=>600,1165=>600,
+1166=>600,1167=>600,1168=>600,1169=>600,1170=>600,1171=>600,1172=>600,1173=>600,1174=>600,1175=>600,
+1176=>600,1177=>600,1178=>600,1179=>600,1180=>600,1181=>600,1182=>600,1183=>600,1184=>600,1185=>600,
+1186=>600,1187=>600,1188=>600,1189=>600,1190=>600,1191=>600,1192=>600,1193=>600,1194=>600,1195=>600,
+1196=>600,1197=>600,1198=>600,1199=>600,1200=>600,1201=>600,1202=>600,1203=>600,1204=>600,1205=>600,
+1206=>600,1207=>600,1208=>600,1209=>600,1210=>600,1211=>600,1212=>600,1213=>600,1214=>600,1215=>600,
+1216=>600,1217=>600,1218=>600,1219=>600,1220=>600,1221=>600,1222=>600,1223=>600,1224=>600,1225=>600,
+1226=>600,1227=>600,1228=>600,1229=>600,1230=>600,1231=>600,1232=>600,1233=>600,1234=>600,1235=>600,
+1236=>600,1237=>600,1238=>600,1239=>600,1240=>600,1241=>600,1242=>600,1243=>600,1244=>600,1245=>600,
+1246=>600,1247=>600,1248=>600,1249=>600,1250=>600,1251=>600,1252=>600,1253=>600,1254=>600,1255=>600,
+1256=>600,1257=>600,1258=>600,1259=>600,1260=>600,1261=>600,1262=>600,1263=>600,1264=>600,1265=>600,
+1266=>600,1267=>600,1268=>600,1269=>600,1270=>600,1271=>600,1272=>600,1273=>600,1296=>600,1297=>600,
+1298=>600,1299=>600,1306=>600,1307=>600,1308=>600,1309=>600,1310=>600,1311=>600,1456=>0,1457=>0,
+1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1467=>0,1468=>0,
+1469=>0,1470=>0,1471=>0,1472=>600,1473=>0,1474=>0,1475=>600,1476=>0,1488=>600,1489=>600,
+1490=>600,1491=>600,1492=>600,1493=>600,1494=>600,1495=>600,1496=>600,1497=>600,1498=>600,1499=>600,
+1500=>600,1501=>600,1502=>600,1503=>600,1504=>600,1505=>600,1506=>600,1507=>600,1508=>600,1509=>600,
+1510=>600,1511=>600,1512=>600,1513=>600,1514=>600,1520=>600,1521=>600,1522=>600,1523=>600,1524=>600,
+4304=>600,4305=>600,4306=>600,4307=>600,4308=>600,4309=>600,4310=>600,4311=>600,4312=>600,4313=>600,
+4314=>600,4315=>600,4316=>600,4317=>600,4318=>600,4319=>600,4320=>600,4321=>600,4322=>600,4323=>600,
+4324=>600,4325=>600,4326=>600,4327=>600,4328=>600,4329=>600,4330=>600,4331=>600,4332=>600,4333=>600,
+4334=>600,4335=>600,4336=>600,4337=>600,4338=>600,4339=>600,4340=>600,4341=>600,4345=>600,4347=>600,
+8192=>600,8193=>600,8194=>600,8195=>600,8196=>600,8197=>600,8198=>600,8199=>600,8200=>600,8201=>600,
+8202=>600,8203=>600,8204=>0,8205=>0,8206=>0,8207=>0,8208=>600,8209=>600,8210=>600,8213=>600,
+8214=>600,8215=>600,8219=>600,8223=>600,8227=>600,8228=>600,8229=>600,8231=>600,8232=>600,8233=>600,
+8234=>600,8235=>600,8236=>600,8237=>600,8238=>600,8239=>600,8241=>600,8242=>600,8243=>600,8244=>600,
+8245=>600,8246=>600,8247=>600,8248=>600,8251=>600,8252=>600,8253=>600,8254=>600,8255=>600,8256=>600,
+8257=>600,8258=>600,8259=>600,8260=>600,8261=>600,8262=>600,8263=>600,8264=>600,8265=>600,8266=>600,
+8267=>600,8268=>600,8269=>600,8270=>600,8271=>600,8272=>600,8273=>600,8274=>600,8275=>600,8276=>600,
+8277=>600,8278=>600,8279=>600,8280=>600,8281=>600,8282=>600,8283=>600,8284=>600,8285=>600,8286=>600,
+8287=>600,8288=>600,8289=>600,8290=>600,8291=>600,8292=>600,8298=>600,8299=>600,8300=>600,8301=>600,
+8302=>600,8303=>600,8304=>600,8305=>600,8308=>600,8309=>600,8310=>600,8311=>600,8312=>600,8313=>600,
+8314=>600,8315=>600,8316=>600,8317=>600,8318=>600,8319=>600,8320=>600,8321=>600,8322=>600,8323=>600,
+8324=>600,8325=>600,8326=>600,8327=>600,8328=>600,8329=>600,8330=>600,8331=>600,8332=>600,8333=>600,
+8334=>600,8336=>600,8337=>600,8338=>600,8339=>600,8340=>600,8362=>600,8373=>600,8448=>600,8449=>600,
+8451=>600,8453=>600,8454=>600,8457=>600,8465=>600,8466=>600,8470=>600,8472=>600,8476=>600,8481=>600,
+8486=>600,8487=>600,8489=>600,8490=>600,8491=>600,8498=>600,8501=>600,8502=>600,8503=>600,8504=>600,
+8506=>600,8507=>600,8523=>600,8531=>600,8532=>600,8533=>600,8534=>600,8535=>600,8536=>600,8537=>600,
+8538=>600,8539=>600,8540=>600,8541=>600,8542=>600,8543=>600,8544=>600,8545=>600,8546=>600,8547=>600,
+8548=>600,8549=>600,8550=>600,8553=>600,8556=>600,8557=>600,8558=>600,8559=>600,8560=>600,8564=>600,
+8569=>600,8572=>600,8573=>600,8574=>600,8575=>600,8592=>600,8593=>600,8594=>600,8595=>600,8704=>600,
+8706=>600,8707=>600,8710=>600,8711=>600,8712=>600,8713=>600,8715=>600,8716=>600,8721=>600,8722=>600,
+8723=>600,8725=>600,8730=>600,8733=>600,8734=>600,8756=>600,8800=>600,8801=>600,8804=>600,8805=>600,
+9251=>600,9674=>600,9824=>600,9825=>600,9826=>600,9827=>600,9828=>600,9829=>600,9830=>600,9831=>600,
+9833=>600,9834=>600,9835=>600,9836=>600,9837=>600,9838=>600,9839=>600,64256=>600,64257=>600,64258=>600,
+64285=>600,64287=>600,64288=>600,64298=>600,64299=>600,64300=>600,64301=>600,64302=>600,64303=>600,64304=>600,
+64305=>600,64306=>600,64307=>600,64308=>600,64309=>600,64310=>600,64312=>600,64313=>600,64314=>600,64315=>600,
+64316=>600,64318=>600,64320=>600,64321=>600,64323=>600,64324=>600,64326=>600,64327=>600,64328=>600,64329=>600,
+64330=>600,64331=>600,64332=>600,64333=>600,64334=>600,64335=>600,65533=>600);
 $enc='';
 $diff='';
 $file='freemonobi.z';
 $ctg='freemonobi.ctg.z';
-$originalsize=119824;
+$originalsize=145080;
 ?>
\ No newline at end of file
index 7c93d8bf9c65475f0fbb49720a8c6477b0139e3a..b31acfb16f297ae9dfd4ffdc6d91e0951e611dcb 100644 (file)
Binary files a/lib/tcpdf/fonts/freemonobi.z and b/lib/tcpdf/fonts/freemonobi.z differ
index 559b542766ebe9cefa2b56b496e6f49b2bb885aa..36e92ec0da7fccce1e3a583e61f402d490855534 100644 (file)
Binary files a/lib/tcpdf/fonts/freemonoi.ctg.z and b/lib/tcpdf/fonts/freemonoi.ctg.z differ
index 9c540cb5ab17b1afce290d8491ae2cd9ee1df37d..11cc061bd4f62f4d4224d851c8752ca2700a8515 100755 (executable)
@@ -1,63 +1,63 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeMonoOblique';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>44,'Flags'=>97,'FontBBox'=>'[-577 -343 848 1000]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>600);
+$desc=array('Ascent'=>800,'Descent'=>-200,'CapHeight'=>44,'Flags'=>96,'FontBBox'=>'[-644 -200 816 800]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>600);
 $up=-125;
 $ut=50;
 $dw=600;
 $cw=array(
-0=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,
-41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,
-51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,
-61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,
-71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,
-81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,
-91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,
-101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,
-111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,
-121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,8364=>600,8218=>600,402=>600,8222=>600,
-8230=>600,8224=>600,8225=>600,710=>600,8240=>600,352=>600,8249=>600,338=>600,381=>600,8216=>600,
-8217=>600,8220=>600,8221=>600,8226=>600,8211=>600,8212=>600,732=>600,8482=>600,353=>600,8250=>600,
-339=>600,382=>600,376=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,
-167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,
-177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,
-187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,
-197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,
-207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,
-217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,
-227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,
-237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,
-247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600,256=>600,
-257=>600,258=>600,259=>600,260=>600,261=>600,262=>600,263=>600,264=>600,265=>600,266=>600,
-267=>600,268=>600,269=>600,270=>600,271=>600,272=>600,273=>600,274=>600,275=>600,276=>600,
-277=>600,278=>600,279=>600,280=>600,281=>600,282=>600,283=>600,284=>600,285=>600,286=>600,
-287=>600,288=>600,289=>600,290=>600,291=>600,292=>600,293=>600,294=>600,295=>600,296=>600,
-297=>600,298=>600,299=>600,300=>600,301=>600,302=>600,303=>600,304=>600,305=>600,306=>600,
-307=>600,308=>600,309=>600,310=>600,311=>600,312=>600,313=>600,314=>600,315=>600,316=>600,
-317=>600,318=>600,319=>600,320=>600,321=>600,322=>600,323=>600,324=>600,325=>600,326=>600,
-327=>600,328=>600,329=>600,330=>600,331=>600,332=>600,333=>600,334=>600,335=>600,336=>600,
-337=>600,340=>600,341=>600,342=>600,343=>600,344=>600,345=>600,346=>600,347=>600,348=>600,
-349=>600,350=>600,351=>600,354=>600,355=>600,356=>600,357=>600,358=>600,359=>600,360=>600,
-361=>600,362=>600,363=>600,364=>600,365=>600,366=>600,367=>600,368=>600,369=>600,370=>600,
-371=>600,372=>600,373=>600,374=>600,375=>600,377=>600,378=>600,379=>600,380=>600,383=>600,
-384=>600,385=>600,386=>600,387=>600,388=>600,389=>600,390=>600,391=>600,392=>600,393=>600,
-394=>600,395=>600,396=>600,397=>600,398=>600,399=>600,400=>600,401=>600,403=>600,404=>600,
-405=>600,406=>600,407=>600,408=>600,409=>600,410=>600,411=>600,412=>600,413=>600,414=>600,
-415=>600,416=>600,417=>600,418=>600,419=>600,420=>600,421=>600,422=>600,423=>600,424=>600,
-425=>600,426=>600,427=>600,428=>600,429=>600,430=>600,431=>600,432=>600,433=>600,434=>600,
-435=>600,436=>600,437=>600,438=>600,439=>600,440=>600,441=>600,442=>600,443=>600,444=>600,
-445=>600,446=>600,447=>600,448=>600,449=>600,450=>600,451=>600,452=>600,453=>600,454=>600,
-455=>600,456=>600,457=>600,458=>600,459=>600,460=>600,461=>600,462=>600,463=>600,464=>600,
-465=>600,466=>600,467=>600,468=>600,469=>600,470=>600,471=>600,472=>600,473=>600,474=>600,
-475=>600,476=>600,477=>600,478=>600,479=>600,480=>600,481=>600,482=>600,483=>600,484=>600,
-485=>600,486=>600,487=>600,488=>600,489=>600,490=>600,491=>600,492=>600,493=>600,494=>600,
-495=>600,496=>600,497=>600,498=>600,499=>600,500=>600,501=>600,502=>600,503=>600,504=>600,
-505=>600,506=>600,507=>600,508=>600,509=>600,510=>600,511=>600,512=>600,513=>600,514=>600,
-515=>600,516=>600,517=>600,518=>600,519=>600,520=>600,521=>600,522=>600,523=>600,524=>600,
-525=>600,526=>600,527=>600,528=>600,529=>600,530=>600,531=>600,532=>600,533=>600,534=>600,
-535=>600,536=>600,537=>600,538=>600,539=>600,540=>600,541=>600,542=>600,543=>600,548=>600,
-549=>600,550=>600,551=>600,552=>600,553=>600,554=>600,555=>600,556=>600,557=>600,558=>600,
-559=>600,560=>600,561=>600,562=>600,563=>600,592=>600,593=>600,594=>600,595=>600,596=>600,
+32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,
+42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,
+52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,
+62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,
+72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,
+82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,
+92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,
+102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,
+112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,
+122=>600,123=>600,124=>600,125=>600,126=>600,8364=>600,8218=>600,402=>600,8222=>600,8230=>600,
+8224=>600,8225=>600,710=>600,8240=>600,352=>600,8249=>600,338=>600,381=>600,8216=>600,8217=>600,
+8220=>600,8221=>600,8226=>600,8211=>600,8212=>600,732=>600,8482=>600,353=>600,8250=>600,339=>600,
+382=>600,376=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,
+168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,
+178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,
+188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,
+198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,
+208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,
+218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,
+228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,
+238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,
+248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600,256=>600,257=>600,
+258=>600,259=>600,260=>600,261=>600,262=>600,263=>600,264=>600,265=>600,266=>600,267=>600,
+268=>600,269=>600,270=>600,271=>600,272=>600,273=>600,274=>600,275=>600,276=>600,277=>600,
+278=>600,279=>600,280=>600,281=>600,282=>600,283=>600,284=>600,285=>600,286=>600,287=>600,
+288=>600,289=>600,290=>600,291=>600,292=>600,293=>600,294=>600,295=>600,296=>600,297=>600,
+298=>600,299=>600,300=>600,301=>600,302=>600,303=>600,304=>600,305=>600,306=>600,307=>600,
+308=>600,309=>600,310=>600,311=>600,312=>600,313=>600,314=>600,315=>600,316=>600,317=>600,
+318=>600,319=>600,320=>600,321=>600,322=>600,323=>600,324=>600,325=>600,326=>600,327=>600,
+328=>600,329=>600,330=>600,331=>600,332=>600,333=>600,334=>600,335=>600,336=>600,337=>600,
+340=>600,341=>600,342=>600,343=>600,344=>600,345=>600,346=>600,347=>600,348=>600,349=>600,
+350=>600,351=>600,354=>600,355=>600,356=>600,357=>600,358=>600,359=>600,360=>600,361=>600,
+362=>600,363=>600,364=>600,365=>600,366=>600,367=>600,368=>600,369=>600,370=>600,371=>600,
+372=>600,373=>600,374=>600,375=>600,377=>600,378=>600,379=>600,380=>600,383=>600,384=>600,
+385=>600,386=>600,387=>600,388=>600,389=>600,390=>600,391=>600,392=>600,393=>600,394=>600,
+395=>600,396=>600,397=>600,398=>600,399=>600,400=>600,401=>600,403=>600,404=>600,405=>600,
+406=>600,407=>600,408=>600,409=>600,410=>600,411=>600,412=>600,413=>600,414=>600,415=>600,
+416=>600,417=>600,418=>600,419=>600,420=>600,421=>600,422=>600,423=>600,424=>600,425=>600,
+426=>600,427=>600,428=>600,429=>600,430=>600,431=>600,432=>600,433=>600,434=>600,435=>600,
+436=>600,437=>600,438=>600,439=>600,440=>600,441=>600,442=>600,443=>600,444=>600,445=>600,
+446=>600,447=>600,448=>600,449=>600,450=>600,451=>600,452=>600,453=>600,454=>600,455=>600,
+456=>600,457=>600,458=>600,459=>600,460=>600,461=>600,462=>600,463=>600,464=>600,465=>600,
+466=>600,467=>600,468=>600,469=>600,470=>600,471=>600,472=>600,473=>600,474=>600,475=>600,
+476=>600,477=>600,478=>600,479=>600,480=>600,481=>600,482=>600,483=>600,484=>600,485=>600,
+486=>600,487=>600,488=>600,489=>600,490=>600,491=>600,492=>600,493=>600,494=>600,495=>600,
+496=>600,497=>600,498=>600,499=>600,500=>600,501=>600,502=>600,503=>600,504=>600,505=>600,
+506=>600,507=>600,508=>600,509=>600,510=>600,511=>600,512=>600,513=>600,514=>600,515=>600,
+516=>600,517=>600,518=>600,519=>600,520=>600,521=>600,522=>600,523=>600,524=>600,525=>600,
+526=>600,527=>600,528=>600,529=>600,530=>600,531=>600,532=>600,533=>600,534=>600,535=>600,
+536=>600,537=>600,538=>600,539=>600,540=>600,541=>600,542=>600,543=>600,548=>600,549=>600,
+550=>600,551=>600,552=>600,553=>600,554=>600,555=>600,556=>600,557=>600,558=>600,559=>600,
+560=>600,561=>600,562=>600,563=>600,567=>600,592=>600,593=>600,594=>600,595=>600,596=>600,
 597=>600,598=>600,599=>600,600=>600,601=>600,602=>600,603=>600,604=>600,607=>600,608=>600,
 609=>600,610=>600,611=>600,612=>600,613=>600,614=>600,615=>600,616=>600,617=>600,618=>600,
 619=>600,620=>600,621=>600,622=>600,623=>600,624=>600,625=>600,626=>600,627=>600,628=>600,
@@ -65,55 +65,73 @@ $cw=array(
 640=>600,641=>600,642=>600,643=>600,644=>600,645=>600,646=>600,647=>600,648=>600,649=>600,
 651=>600,652=>600,653=>600,654=>600,655=>600,656=>600,657=>600,658=>600,660=>600,661=>600,
 662=>600,663=>600,664=>600,665=>600,667=>600,668=>600,669=>600,670=>600,671=>600,672=>600,
-673=>600,674=>600,679=>600,699=>600,700=>600,701=>600,702=>600,703=>600,711=>600,712=>600,
-713=>600,714=>600,715=>600,728=>600,729=>600,730=>600,731=>600,733=>600,768=>600,769=>600,
-770=>600,771=>600,772=>600,773=>600,774=>600,775=>600,776=>600,777=>600,778=>600,779=>600,
-780=>600,781=>600,782=>600,783=>600,785=>600,807=>600,808=>600,821=>600,822=>600,823=>600,
-824=>600,890=>600,900=>600,901=>600,902=>600,904=>600,905=>600,906=>600,908=>600,910=>600,
-911=>600,912=>600,913=>600,914=>600,915=>600,916=>600,917=>600,918=>600,919=>600,920=>600,
-921=>600,922=>600,923=>600,924=>600,925=>600,926=>600,927=>600,928=>600,929=>600,931=>600,
-932=>600,933=>600,934=>600,935=>600,936=>600,937=>600,938=>600,939=>600,940=>600,941=>600,
-942=>600,943=>600,944=>600,945=>600,946=>600,947=>600,948=>600,949=>600,950=>600,951=>600,
-952=>600,953=>600,954=>600,955=>600,956=>600,957=>600,958=>600,959=>600,960=>600,961=>600,
-962=>600,963=>600,964=>600,965=>600,966=>600,967=>600,968=>600,969=>600,970=>600,971=>600,
-972=>600,973=>600,974=>600,977=>600,978=>600,981=>600,982=>600,1024=>600,1025=>600,1026=>600,
-1027=>600,1028=>600,1029=>600,1030=>600,1031=>600,1032=>600,1033=>600,1034=>600,1035=>600,1036=>600,
-1037=>600,1038=>600,1039=>600,1040=>600,1041=>600,1042=>600,1043=>600,1044=>600,1045=>600,1046=>600,
-1047=>600,1048=>600,1049=>600,1050=>600,1051=>600,1052=>600,1053=>600,1054=>600,1055=>600,1056=>600,
-1057=>600,1058=>600,1059=>600,1060=>600,1061=>600,1062=>600,1063=>600,1064=>600,1065=>600,1066=>600,
-1067=>600,1068=>600,1069=>600,1070=>600,1071=>600,1072=>600,1073=>600,1074=>600,1075=>600,1076=>600,
-1077=>600,1078=>600,1079=>600,1080=>600,1081=>600,1082=>600,1083=>600,1084=>600,1085=>600,1086=>600,
-1087=>600,1088=>600,1089=>600,1090=>600,1091=>600,1092=>600,1093=>600,1094=>600,1095=>600,1096=>600,
-1097=>600,1098=>600,1099=>600,1100=>600,1101=>600,1102=>600,1103=>600,1104=>600,1105=>600,1106=>600,
-1107=>600,1108=>600,1109=>600,1110=>600,1111=>600,1112=>600,1113=>600,1114=>600,1115=>600,1116=>600,
-1117=>600,1118=>600,1119=>600,1164=>600,1165=>600,1166=>600,1167=>600,1168=>600,1169=>600,1170=>600,
+673=>600,674=>600,679=>600,688=>600,689=>600,690=>600,691=>600,692=>600,693=>600,694=>600,
+695=>600,696=>600,697=>600,698=>600,699=>600,700=>600,701=>600,702=>600,703=>600,704=>600,
+705=>600,706=>600,707=>600,708=>600,709=>600,711=>600,712=>600,713=>600,714=>600,715=>600,
+716=>600,717=>600,718=>600,719=>600,720=>600,721=>600,722=>600,723=>600,724=>600,725=>600,
+726=>600,727=>600,728=>600,729=>600,730=>600,731=>600,733=>600,734=>600,735=>600,736=>600,
+737=>600,738=>600,739=>600,740=>600,741=>600,742=>600,743=>600,744=>600,745=>600,746=>600,
+747=>600,748=>600,749=>600,750=>600,751=>600,752=>600,753=>600,754=>600,755=>600,756=>600,
+757=>600,758=>600,759=>600,760=>600,761=>600,762=>600,763=>600,764=>600,765=>600,766=>600,
+767=>600,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,
+777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,
+787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,795=>0,796=>0,800=>0,
+803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,812=>0,813=>0,
+814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,
+824=>0,825=>0,826=>0,827=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,
+838=>0,839=>0,840=>0,844=>0,849=>0,850=>0,851=>0,852=>0,853=>0,854=>0,
+855=>0,884=>600,885=>600,890=>600,894=>600,900=>600,901=>600,902=>600,903=>600,904=>600,
+905=>600,906=>600,908=>600,910=>600,911=>600,912=>600,913=>600,914=>600,915=>600,916=>600,
+917=>600,918=>600,919=>600,920=>600,921=>600,922=>600,923=>600,924=>600,925=>600,926=>600,
+927=>600,928=>600,929=>600,931=>600,932=>600,933=>600,934=>600,935=>600,936=>600,937=>600,
+938=>600,939=>600,940=>600,941=>600,942=>600,943=>600,944=>600,945=>600,946=>600,947=>600,
+948=>600,949=>600,950=>600,951=>600,952=>600,953=>600,954=>600,955=>600,956=>600,957=>600,
+958=>600,959=>600,960=>600,961=>600,962=>600,963=>600,964=>600,965=>600,966=>600,967=>600,
+968=>600,969=>600,970=>600,971=>600,972=>600,973=>600,974=>600,976=>600,977=>600,978=>600,
+979=>600,980=>600,981=>600,982=>600,986=>600,987=>600,988=>600,1008=>600,1009=>600,1012=>600,
+1013=>600,1024=>600,1025=>600,1026=>600,1027=>600,1028=>600,1029=>600,1030=>600,1031=>600,1032=>600,
+1033=>600,1034=>600,1035=>600,1036=>600,1037=>600,1038=>600,1039=>600,1040=>600,1041=>600,1042=>600,
+1043=>600,1044=>600,1045=>600,1046=>600,1047=>600,1048=>600,1049=>600,1050=>600,1051=>600,1052=>600,
+1053=>600,1054=>600,1055=>600,1056=>600,1057=>600,1058=>600,1059=>600,1060=>600,1061=>600,1062=>600,
+1063=>600,1064=>600,1065=>600,1066=>600,1067=>600,1068=>600,1069=>600,1070=>600,1071=>600,1072=>600,
+1073=>600,1074=>600,1075=>600,1076=>600,1077=>600,1078=>600,1079=>600,1080=>600,1081=>600,1082=>600,
+1083=>600,1084=>600,1085=>600,1086=>600,1087=>600,1088=>600,1089=>600,1090=>600,1091=>600,1092=>600,
+1093=>600,1094=>600,1095=>600,1096=>600,1097=>600,1098=>600,1099=>600,1100=>600,1101=>600,1102=>600,
+1103=>600,1104=>600,1105=>600,1106=>600,1107=>600,1108=>600,1109=>600,1110=>600,1111=>600,1112=>600,
+1113=>600,1114=>600,1115=>600,1116=>600,1117=>600,1118=>600,1119=>600,1120=>600,1121=>600,1122=>600,
+1123=>600,1124=>600,1126=>600,1127=>600,1128=>600,1130=>600,1131=>600,1132=>600,1133=>600,1136=>600,
+1137=>600,1138=>600,1140=>600,1141=>600,1142=>600,1143=>600,1155=>0,1156=>0,1157=>0,1158=>0,
+1159=>0,1162=>600,1163=>600,1164=>600,1165=>600,1166=>600,1167=>600,1168=>600,1169=>600,1170=>600,
 1171=>600,1172=>600,1173=>600,1174=>600,1175=>600,1176=>600,1177=>600,1178=>600,1179=>600,1180=>600,
 1181=>600,1182=>600,1183=>600,1184=>600,1185=>600,1186=>600,1187=>600,1188=>600,1189=>600,1190=>600,
 1191=>600,1192=>600,1193=>600,1194=>600,1195=>600,1196=>600,1197=>600,1198=>600,1199=>600,1200=>600,
 1201=>600,1202=>600,1203=>600,1204=>600,1205=>600,1206=>600,1207=>600,1208=>600,1209=>600,1210=>600,
 1211=>600,1212=>600,1213=>600,1214=>600,1215=>600,1216=>600,1217=>600,1218=>600,1219=>600,1220=>600,
-1223=>600,1224=>600,1227=>600,1228=>600,1232=>600,1233=>600,1234=>600,1235=>600,1236=>600,1237=>600,
-1238=>600,1239=>600,1240=>600,1241=>600,1242=>600,1243=>600,1244=>600,1245=>600,1246=>600,1247=>600,
-1248=>600,1249=>600,1250=>600,1251=>600,1252=>600,1253=>600,1254=>600,1255=>600,1256=>600,1257=>600,
-1258=>600,1259=>600,1260=>600,1261=>600,1262=>600,1263=>600,1264=>600,1265=>600,1266=>600,1267=>600,
-1268=>600,1269=>600,1272=>600,1273=>600,1329=>600,1330=>600,1331=>600,1332=>600,1333=>600,1334=>600,
-1335=>600,1336=>600,1337=>600,1338=>600,1339=>600,1340=>600,1341=>600,1342=>600,1343=>600,1344=>600,
-1345=>600,1346=>600,1347=>600,1348=>600,1349=>600,1350=>600,1351=>600,1352=>600,1353=>600,1354=>600,
-1355=>600,1356=>600,1357=>600,1358=>600,1359=>600,1360=>600,1361=>600,1362=>600,1363=>600,1364=>600,
-1365=>600,1366=>600,1377=>600,1378=>600,1379=>600,1380=>600,1381=>600,1382=>600,1383=>600,1384=>600,
-1385=>600,1386=>600,1387=>600,1388=>600,1389=>600,1390=>600,1391=>600,1392=>600,1393=>600,1394=>600,
-1395=>600,1396=>600,1397=>600,1398=>600,1399=>600,1400=>600,1401=>600,1402=>600,1403=>600,1404=>600,
-1405=>600,1406=>600,1407=>600,1408=>600,1409=>600,1410=>600,1411=>600,1412=>600,1413=>600,1414=>600,
-1418=>600,1456=>600,1457=>600,1458=>600,1459=>600,1460=>600,1461=>600,1462=>600,1463=>600,1464=>600,
-1465=>600,1467=>600,1468=>600,1469=>600,1470=>600,1471=>600,1472=>600,1473=>600,1474=>600,1475=>600,
-1476=>600,1488=>600,1489=>600,1490=>600,1491=>600,1492=>600,1493=>600,1494=>600,1495=>600,1496=>600,
-1497=>600,1498=>600,1499=>600,1500=>600,1501=>600,1502=>600,1503=>600,1504=>600,1505=>600,1506=>600,
-1507=>600,1508=>600,1509=>600,1510=>600,1511=>600,1512=>600,1513=>600,1514=>600,1520=>600,1521=>600,
-1522=>600,1523=>600,1524=>600,4304=>600,4305=>600,4306=>600,4307=>600,4308=>600,4309=>600,4310=>600,
-4311=>600,4312=>600,4313=>600,4314=>600,4315=>600,4316=>600,4317=>600,4318=>600,4319=>600,4320=>600,
-4321=>600,4322=>600,4323=>600,4324=>600,4325=>600,4326=>600,4327=>600,4328=>600,4329=>600,4330=>600,
-4331=>600,4332=>600,4333=>600,4334=>600,4335=>600,4336=>600,4337=>600,4338=>600,4339=>600,4340=>600,
-4341=>600,7680=>600,7681=>600,7682=>600,7683=>600,7684=>600,7685=>600,7686=>600,7687=>600,7688=>600,
+1221=>600,1222=>600,1223=>600,1224=>600,1225=>600,1226=>600,1227=>600,1228=>600,1229=>600,1230=>600,
+1231=>600,1232=>600,1233=>600,1234=>600,1235=>600,1236=>600,1237=>600,1238=>600,1239=>600,1240=>600,
+1241=>600,1242=>600,1243=>600,1244=>600,1245=>600,1246=>600,1247=>600,1248=>600,1249=>600,1250=>600,
+1251=>600,1252=>600,1253=>600,1254=>600,1255=>600,1256=>600,1257=>600,1258=>600,1259=>600,1260=>600,
+1261=>600,1262=>600,1263=>600,1264=>600,1265=>600,1266=>600,1267=>600,1268=>600,1269=>600,1270=>600,
+1271=>600,1272=>600,1273=>600,1296=>600,1297=>600,1298=>600,1299=>600,1306=>600,1307=>600,1308=>600,
+1309=>600,1310=>600,1311=>600,1329=>600,1330=>600,1331=>600,1332=>600,1333=>600,1334=>600,1335=>600,
+1336=>600,1337=>600,1338=>600,1339=>600,1340=>600,1341=>600,1342=>600,1343=>600,1344=>600,1345=>600,
+1346=>600,1347=>600,1348=>600,1349=>600,1350=>600,1351=>600,1352=>600,1353=>600,1354=>600,1355=>600,
+1356=>600,1357=>600,1358=>600,1359=>600,1360=>600,1361=>600,1362=>600,1363=>600,1364=>600,1365=>600,
+1366=>600,1369=>600,1370=>600,1371=>600,1372=>600,1373=>600,1374=>600,1375=>600,1377=>600,1378=>600,
+1379=>600,1380=>600,1381=>600,1382=>600,1383=>600,1384=>600,1385=>600,1386=>600,1387=>600,1388=>600,
+1389=>600,1390=>600,1391=>600,1392=>600,1393=>600,1394=>600,1395=>600,1396=>600,1397=>600,1398=>600,
+1399=>600,1400=>600,1401=>600,1402=>600,1403=>600,1404=>600,1405=>600,1406=>600,1407=>600,1408=>600,
+1409=>600,1410=>600,1411=>600,1412=>600,1413=>600,1414=>600,1415=>600,1417=>600,1418=>600,1456=>0,
+1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1467=>0,
+1468=>0,1469=>0,1470=>600,1471=>0,1472=>600,1473=>0,1474=>0,1475=>600,1476=>0,1488=>600,
+1489=>600,1490=>600,1491=>600,1492=>600,1493=>600,1494=>600,1495=>600,1496=>600,1497=>600,1498=>600,
+1499=>600,1500=>600,1501=>600,1502=>600,1503=>600,1504=>600,1505=>600,1506=>600,1507=>600,1508=>600,
+1509=>600,1510=>600,1511=>600,1512=>600,1513=>600,1514=>600,1520=>600,1521=>600,1522=>600,1523=>600,
+1524=>600,4304=>600,4305=>600,4306=>600,4307=>600,4308=>600,4309=>600,4310=>600,4311=>600,4312=>600,
+4313=>600,4314=>600,4315=>600,4316=>600,4317=>600,4318=>600,4319=>600,4320=>600,4321=>600,4322=>600,
+4323=>600,4324=>600,4325=>600,4326=>600,4327=>600,4328=>600,4329=>600,4330=>600,4331=>600,4332=>600,
+4333=>600,4334=>600,4335=>600,4336=>600,4337=>600,4338=>600,4339=>600,4340=>600,4341=>600,4345=>600,
+4347=>600,7680=>600,7681=>600,7682=>600,7683=>600,7684=>600,7685=>600,7686=>600,7687=>600,7688=>600,
 7689=>600,7690=>600,7691=>600,7692=>600,7693=>600,7694=>600,7695=>600,7696=>600,7697=>600,7698=>600,
 7699=>600,7700=>600,7701=>600,7702=>600,7703=>600,7704=>600,7705=>600,7706=>600,7707=>600,7708=>600,
 7709=>600,7710=>600,7711=>600,7712=>600,7713=>600,7714=>600,7715=>600,7716=>600,7717=>600,7718=>600,
@@ -128,58 +146,68 @@ $cw=array(
 7799=>600,7800=>600,7801=>600,7802=>600,7803=>600,7804=>600,7805=>600,7806=>600,7807=>600,7808=>600,
 7809=>600,7810=>600,7811=>600,7812=>600,7813=>600,7814=>600,7815=>600,7816=>600,7817=>600,7818=>600,
 7819=>600,7820=>600,7821=>600,7822=>600,7823=>600,7824=>600,7825=>600,7826=>600,7827=>600,7828=>600,
-7829=>600,7830=>600,7831=>600,7832=>600,7833=>600,7835=>600,7840=>600,7841=>600,7842=>600,7843=>600,
-7844=>600,7845=>600,7846=>600,7847=>600,7848=>600,7849=>600,7850=>600,7851=>600,7852=>600,7853=>600,
-7854=>600,7855=>600,7856=>600,7857=>600,7858=>600,7859=>600,7860=>600,7861=>600,7862=>600,7863=>600,
-7864=>600,7865=>600,7866=>600,7867=>600,7868=>600,7869=>600,7870=>600,7871=>600,7872=>600,7873=>600,
-7874=>600,7875=>600,7876=>600,7877=>600,7878=>600,7879=>600,7880=>600,7881=>600,7882=>600,7883=>600,
-7884=>600,7885=>600,7886=>600,7887=>600,7888=>600,7889=>600,7890=>600,7891=>600,7892=>600,7893=>600,
-7894=>600,7895=>600,7896=>600,7897=>600,7898=>600,7899=>600,7900=>600,7901=>600,7902=>600,7903=>600,
-7904=>600,7905=>600,7906=>600,7907=>600,7908=>600,7909=>600,7910=>600,7911=>600,7912=>600,7913=>600,
-7914=>600,7915=>600,7916=>600,7917=>600,7918=>600,7919=>600,7920=>600,7921=>600,7922=>600,7923=>600,
-7924=>600,7925=>600,7926=>600,7927=>600,7928=>600,7929=>600,7936=>600,7937=>600,7938=>600,7939=>600,
-7940=>600,7941=>600,7942=>600,7943=>600,7944=>600,7945=>600,7946=>600,7947=>600,7948=>600,7949=>600,
-7950=>600,7951=>600,7952=>600,7953=>600,7954=>600,7955=>600,7956=>600,7957=>600,7958=>600,7959=>600,
-7960=>600,7961=>600,7962=>600,7963=>600,7964=>600,7965=>600,7966=>600,7967=>600,7968=>600,7969=>600,
-7970=>600,7971=>600,7972=>600,7973=>600,7974=>600,7975=>600,7976=>600,7977=>600,7978=>600,7979=>600,
-7980=>600,7981=>600,7982=>600,7983=>600,7984=>600,7985=>600,7986=>600,7987=>600,7988=>600,7989=>600,
-7990=>600,7991=>600,7992=>600,7993=>600,7994=>600,7995=>600,7996=>600,7997=>600,7998=>600,7999=>600,
-8000=>600,8001=>600,8002=>600,8003=>600,8004=>600,8005=>600,8006=>600,8007=>600,8008=>600,8009=>600,
-8010=>600,8011=>600,8012=>600,8013=>600,8014=>600,8015=>600,8016=>600,8017=>600,8018=>600,8019=>600,
-8020=>600,8021=>600,8022=>600,8023=>600,8024=>600,8025=>600,8026=>600,8027=>600,8028=>600,8029=>600,
-8030=>600,8031=>600,8032=>600,8033=>600,8034=>600,8035=>600,8036=>600,8037=>600,8038=>600,8039=>600,
-8040=>600,8041=>600,8042=>600,8043=>600,8044=>600,8045=>600,8046=>600,8047=>600,8048=>600,8049=>600,
-8050=>600,8051=>600,8052=>600,8053=>600,8054=>600,8055=>600,8056=>600,8057=>600,8058=>600,8059=>600,
-8060=>600,8061=>600,8062=>600,8063=>600,8064=>600,8065=>600,8066=>600,8067=>600,8068=>600,8069=>600,
-8070=>600,8071=>600,8072=>600,8073=>600,8074=>600,8075=>600,8076=>600,8077=>600,8078=>600,8079=>600,
-8080=>600,8081=>600,8082=>600,8083=>600,8084=>600,8085=>600,8086=>600,8087=>600,8088=>600,8089=>600,
-8090=>600,8091=>600,8092=>600,8093=>600,8094=>600,8095=>600,8096=>600,8097=>600,8098=>600,8099=>600,
-8100=>600,8101=>600,8102=>600,8103=>600,8104=>600,8105=>600,8106=>600,8107=>600,8108=>600,8109=>600,
-8110=>600,8111=>600,8112=>600,8113=>600,8114=>600,8115=>600,8116=>600,8117=>600,8118=>600,8119=>600,
-8120=>600,8121=>600,8122=>600,8123=>600,8124=>600,8125=>600,8126=>600,8127=>600,8128=>600,8129=>600,
-8130=>600,8131=>600,8132=>600,8133=>600,8134=>600,8135=>600,8136=>600,8137=>600,8138=>600,8139=>600,
-8140=>600,8141=>600,8142=>600,8143=>600,8144=>600,8145=>600,8146=>600,8147=>600,8148=>600,8149=>600,
-8150=>600,8151=>600,8152=>600,8153=>600,8154=>600,8155=>600,8156=>600,8157=>600,8158=>600,8159=>600,
-8160=>600,8161=>600,8162=>600,8163=>600,8164=>600,8165=>600,8166=>600,8167=>600,8168=>600,8169=>600,
-8170=>600,8171=>600,8172=>600,8173=>600,8174=>600,8175=>600,8176=>600,8177=>600,8178=>600,8179=>600,
-8180=>600,8181=>600,8182=>600,8183=>600,8184=>600,8185=>600,8186=>600,8187=>600,8188=>600,8189=>600,
-8190=>600,8213=>600,8219=>600,8223=>600,8241=>600,8242=>600,8243=>600,8244=>600,8245=>600,8246=>600,
-8247=>600,8251=>600,8252=>600,8253=>600,8254=>600,8260=>600,8261=>600,8262=>600,8264=>600,8265=>600,
-8266=>600,8267=>600,8304=>600,8305=>600,8306=>600,8307=>600,8308=>600,8309=>600,8310=>600,8311=>600,
-8312=>600,8313=>600,8320=>600,8321=>600,8322=>600,8323=>600,8324=>600,8325=>600,8326=>600,8327=>600,
-8328=>600,8329=>600,8355=>600,8356=>600,8359=>600,8362=>600,8373=>600,8448=>600,8449=>600,8450=>600,
-8451=>600,8453=>600,8454=>600,8455=>600,8461=>600,8464=>600,8465=>600,8466=>600,8467=>600,8468=>600,
-8469=>600,8470=>600,8471=>600,8472=>600,8473=>600,8474=>600,8476=>600,8477=>600,8478=>600,8484=>600,
-8486=>600,8487=>600,8490=>600,8491=>600,8501=>600,8531=>600,8532=>600,8533=>600,8534=>600,8535=>600,
-8536=>600,8537=>600,8538=>600,8539=>600,8540=>600,8541=>600,8542=>600,8543=>600,8544=>600,8545=>600,
-8546=>600,8547=>600,8548=>600,8549=>600,8550=>600,8551=>600,8552=>600,8553=>600,8554=>600,8555=>600,
-8556=>600,8557=>600,8558=>600,8559=>600,8592=>600,8593=>600,8594=>600,8595=>600,8596=>600,8597=>600,
-8598=>600,8599=>600,8600=>600,8601=>600,8616=>600,8704=>600,8706=>600,8707=>600,8709=>600,8710=>600,
-8711=>600,8712=>600,8713=>600,8715=>600,8716=>600,8721=>600,8722=>600,8723=>600,8725=>600,8729=>600,
-8730=>600,8733=>600,8734=>600,8745=>600,8746=>600,8747=>600,8756=>600,8764=>600,8769=>600,8773=>600,
-8776=>600,8800=>600,8801=>600,8804=>600,8805=>600,8834=>600,8835=>600,8836=>600,8837=>600,8838=>600,
-8839=>600,9001=>600,9002=>600,9674=>600,9833=>600,9834=>600,9835=>600,9836=>600,9837=>600,9838=>600,
-9839=>600,63166=>600,63171=>600,64256=>600,64257=>600,64258=>600,64285=>600,64286=>600,64287=>600,64288=>600,
+7829=>600,7830=>600,7831=>600,7832=>600,7833=>600,7834=>600,7835=>600,7840=>600,7841=>600,7842=>600,
+7843=>600,7844=>600,7845=>600,7846=>600,7847=>600,7848=>600,7849=>600,7850=>600,7851=>600,7852=>600,
+7853=>600,7854=>600,7855=>600,7856=>600,7857=>600,7858=>600,7859=>600,7860=>600,7861=>600,7862=>600,
+7863=>600,7864=>600,7865=>600,7866=>600,7867=>600,7868=>600,7869=>600,7870=>600,7871=>600,7872=>600,
+7873=>600,7874=>600,7875=>600,7876=>600,7877=>600,7878=>600,7879=>600,7880=>600,7881=>600,7882=>600,
+7883=>600,7884=>600,7885=>600,7886=>600,7887=>600,7888=>600,7889=>600,7890=>600,7891=>600,7892=>600,
+7893=>600,7894=>600,7895=>600,7896=>600,7897=>600,7898=>600,7899=>600,7900=>600,7901=>600,7902=>600,
+7903=>600,7904=>600,7905=>600,7906=>600,7907=>600,7908=>600,7909=>600,7910=>600,7911=>600,7912=>600,
+7913=>600,7914=>600,7915=>600,7916=>600,7917=>600,7918=>600,7919=>600,7920=>600,7921=>600,7922=>600,
+7923=>600,7924=>600,7925=>600,7926=>600,7927=>600,7928=>600,7929=>600,7936=>600,7937=>600,7938=>600,
+7939=>600,7940=>600,7941=>600,7942=>600,7943=>600,7944=>600,7945=>600,7946=>600,7947=>600,7948=>600,
+7949=>600,7950=>600,7951=>600,7952=>600,7953=>600,7954=>600,7955=>600,7956=>600,7957=>600,7960=>600,
+7961=>600,7962=>600,7963=>600,7964=>600,7965=>600,7968=>600,7969=>600,7970=>600,7971=>600,7972=>600,
+7973=>600,7974=>600,7975=>600,7976=>600,7977=>600,7978=>600,7979=>600,7980=>600,7981=>600,7982=>600,
+7983=>600,7984=>600,7985=>600,7986=>600,7987=>600,7988=>600,7989=>600,7990=>600,7991=>600,7992=>600,
+7993=>600,7994=>600,7995=>600,7996=>600,7997=>600,7998=>600,7999=>600,8000=>600,8001=>600,8002=>600,
+8003=>600,8004=>600,8005=>600,8008=>600,8009=>600,8010=>600,8011=>600,8012=>600,8013=>600,8016=>600,
+8017=>600,8018=>600,8019=>600,8020=>600,8021=>600,8022=>600,8023=>600,8025=>600,8027=>600,8029=>600,
+8031=>600,8032=>600,8033=>600,8034=>600,8035=>600,8036=>600,8037=>600,8038=>600,8039=>600,8040=>600,
+8041=>600,8042=>600,8043=>600,8044=>600,8045=>600,8046=>600,8047=>600,8048=>600,8049=>600,8050=>600,
+8051=>600,8052=>600,8053=>600,8054=>600,8055=>600,8056=>600,8057=>600,8058=>600,8059=>600,8060=>600,
+8061=>600,8064=>600,8065=>600,8066=>600,8067=>600,8068=>600,8069=>600,8070=>600,8071=>600,8072=>600,
+8073=>600,8074=>600,8075=>600,8076=>600,8077=>600,8078=>600,8079=>600,8080=>600,8081=>600,8082=>600,
+8083=>600,8084=>600,8085=>600,8086=>600,8087=>600,8088=>600,8089=>600,8090=>600,8091=>600,8092=>600,
+8093=>600,8094=>600,8095=>600,8096=>600,8097=>600,8098=>600,8099=>600,8100=>600,8101=>600,8102=>600,
+8103=>600,8104=>600,8105=>600,8106=>600,8107=>600,8108=>600,8109=>600,8110=>600,8111=>600,8112=>600,
+8113=>600,8114=>600,8115=>600,8116=>600,8118=>600,8119=>600,8120=>600,8121=>600,8122=>600,8123=>600,
+8124=>600,8125=>600,8126=>600,8127=>600,8128=>600,8129=>600,8130=>600,8131=>600,8132=>600,8134=>600,
+8135=>600,8136=>600,8137=>600,8138=>600,8139=>600,8140=>600,8141=>600,8142=>600,8143=>600,8144=>600,
+8145=>600,8146=>600,8147=>600,8150=>600,8151=>600,8152=>600,8153=>600,8154=>600,8155=>600,8157=>600,
+8158=>600,8159=>600,8160=>600,8161=>600,8162=>600,8163=>600,8164=>600,8165=>600,8166=>600,8167=>600,
+8168=>600,8169=>600,8170=>600,8171=>600,8172=>600,8173=>600,8174=>600,8175=>600,8178=>600,8179=>600,
+8180=>600,8182=>600,8183=>600,8184=>600,8185=>600,8186=>600,8187=>600,8188=>600,8189=>600,8190=>600,
+8192=>600,8193=>600,8194=>600,8195=>600,8196=>600,8197=>600,8198=>600,8199=>600,8200=>600,8201=>600,
+8202=>600,8203=>600,8204=>0,8205=>0,8206=>0,8207=>0,8208=>600,8209=>600,8210=>600,8213=>600,
+8214=>600,8215=>600,8219=>600,8223=>600,8227=>600,8228=>600,8229=>600,8231=>600,8232=>600,8233=>600,
+8234=>600,8235=>600,8236=>600,8237=>600,8238=>600,8239=>600,8241=>600,8242=>600,8243=>600,8244=>600,
+8245=>600,8246=>600,8247=>600,8248=>600,8251=>600,8252=>600,8253=>600,8254=>600,8255=>600,8256=>600,
+8257=>600,8258=>600,8259=>600,8260=>600,8261=>600,8262=>600,8263=>600,8264=>600,8265=>600,8266=>600,
+8267=>600,8268=>600,8269=>600,8270=>600,8271=>600,8272=>600,8273=>600,8274=>600,8275=>600,8276=>600,
+8277=>600,8278=>600,8279=>600,8280=>600,8281=>600,8282=>600,8283=>600,8284=>600,8285=>600,8286=>600,
+8287=>600,8288=>600,8289=>600,8290=>600,8291=>600,8292=>600,8298=>600,8299=>600,8300=>600,8301=>600,
+8302=>600,8303=>600,8304=>600,8305=>600,8308=>600,8309=>600,8310=>600,8311=>600,8312=>600,8313=>600,
+8314=>600,8315=>600,8316=>600,8317=>600,8318=>600,8319=>600,8320=>600,8321=>600,8322=>600,8323=>600,
+8324=>600,8325=>600,8326=>600,8327=>600,8328=>600,8329=>600,8330=>600,8331=>600,8332=>600,8333=>600,
+8334=>600,8336=>600,8337=>600,8338=>600,8339=>600,8340=>600,8355=>600,8356=>600,8359=>600,8362=>600,
+8373=>600,8448=>600,8449=>600,8450=>600,8451=>600,8453=>600,8454=>600,8455=>600,8457=>600,8461=>600,
+8464=>600,8465=>600,8466=>600,8467=>600,8468=>600,8469=>600,8470=>600,8471=>600,8472=>600,8473=>600,
+8474=>600,8476=>600,8477=>600,8478=>600,8481=>600,8484=>600,8486=>600,8487=>600,8489=>600,8490=>600,
+8491=>600,8498=>600,8501=>600,8502=>600,8503=>600,8504=>600,8506=>600,8507=>600,8523=>600,8525=>600,
+8526=>600,8531=>600,8532=>600,8533=>600,8534=>600,8535=>600,8536=>600,8537=>600,8538=>600,8539=>600,
+8540=>600,8541=>600,8542=>600,8543=>600,8544=>600,8545=>600,8546=>600,8547=>600,8548=>600,8549=>600,
+8550=>600,8551=>600,8552=>600,8553=>600,8554=>600,8555=>600,8556=>600,8557=>600,8558=>600,8559=>600,
+8560=>600,8561=>600,8562=>600,8563=>600,8564=>600,8565=>600,8566=>600,8567=>600,8568=>600,8569=>600,
+8570=>600,8571=>600,8572=>600,8573=>600,8574=>600,8575=>600,8592=>600,8593=>600,8594=>600,8595=>600,
+8596=>600,8597=>600,8598=>600,8599=>600,8600=>600,8601=>600,8616=>600,8704=>600,8706=>600,8707=>600,
+8709=>600,8710=>600,8711=>600,8712=>600,8713=>600,8715=>600,8716=>600,8721=>600,8722=>600,8723=>600,
+8725=>600,8729=>600,8730=>600,8733=>600,8734=>600,8745=>600,8746=>600,8747=>600,8756=>600,8764=>600,
+8769=>600,8770=>600,8773=>600,8776=>600,8800=>600,8801=>600,8804=>600,8805=>600,8834=>600,8835=>600,
+8836=>600,8837=>600,8838=>600,8839=>600,9001=>600,9002=>600,9251=>600,9674=>600,9824=>600,9825=>600,
+9826=>600,9827=>600,9828=>600,9829=>600,9830=>600,9831=>600,9833=>600,9834=>600,9835=>600,9836=>600,
+9837=>600,9838=>600,9839=>600,64256=>600,64257=>600,64258=>600,64285=>600,64286=>600,64287=>600,64288=>600,
 64289=>600,64290=>600,64291=>600,64292=>600,64293=>600,64294=>600,64295=>600,64296=>600,64297=>600,64298=>600,
 64299=>600,64300=>600,64301=>600,64302=>600,64303=>600,64304=>600,64305=>600,64306=>600,64307=>600,64308=>600,
 64309=>600,64310=>600,64312=>600,64313=>600,64314=>600,64315=>600,64316=>600,64318=>600,64320=>600,64321=>600,
@@ -189,5 +217,5 @@ $enc='';
 $diff='';
 $file='freemonoi.z';
 $ctg='freemonoi.ctg.z';
-$originalsize=191616;
+$originalsize=196732;
 ?>
\ No newline at end of file
index fcfff9fecf444cbf65a63c417e1adad398248ae9..93bf7d35e92775a372ffb45b23d9af8293e1dcf1 100644 (file)
Binary files a/lib/tcpdf/fonts/freemonoi.z and b/lib/tcpdf/fonts/freemonoi.z differ
index fbc70ed4223bf6beb435dc58779415f6739fca3c..b3bf68c3d39d56c725c3bfcba9115ec3e2edda97 100644 (file)
Binary files a/lib/tcpdf/fonts/freesans.ctg.z and b/lib/tcpdf/fonts/freesans.ctg.z differ
index f7f5998439385162dd472b90dedfa19a9aeb200d..d10a32197379be955906ab660a72f94dc02295e0 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeSans';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>22,'Flags'=>32,'FontBBox'=>'[-701 -462 1632 1141]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
+$desc=array('Ascent'=>1000,'Descent'=>-300,'CapHeight'=>22,'Flags'=>32,'FontBBox'=>'[-958 -550 1632 1050]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
 $up=-176;
 $ut=50;
 $dw=600;
@@ -12,15 +12,15 @@ $cw=array(
 62=>584,63=>556,64=>1015,65=>667,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,
 72=>722,73=>278,74=>500,75=>667,76=>556,77=>833,78=>722,79=>778,80=>667,81=>778,
 82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>278,
-92=>278,93=>278,94=>469,95=>556,96=>333,97=>556,98=>556,99=>500,100=>556,101=>556,
+92=>278,93=>277,94=>469,95=>556,96=>333,97=>556,98=>556,99=>500,100=>556,101=>556,
 102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556,
 112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,
-122=>500,123=>334,124=>260,125=>334,126=>584,8364=>556,8218=>222,402=>278,8222=>333,8230=>1000,
-8224=>556,8225=>556,710=>333,8240=>1000,352=>667,8249=>333,338=>1000,381=>611,8216=>222,8217=>221,
-8220=>333,8221=>333,8226=>350,8211=>556,8212=>1000,732=>333,8482=>1000,353=>500,8250=>333,339=>944,
+122=>500,123=>334,124=>260,125=>334,126=>584,8364=>655,8218=>222,402=>278,8222=>333,8230=>1000,
+8224=>556,8225=>556,710=>333,8240=>1000,352=>667,8249=>250,338=>1000,381=>611,8216=>222,8217=>221,
+8220=>333,8221=>333,8226=>350,8211=>556,8212=>1000,732=>333,8482=>1000,353=>500,8250=>250,339=>944,
 382=>500,376=>667,160=>278,161=>278,162=>556,163=>556,164=>556,165=>556,166=>260,167=>556,
-168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>606,177=>584,
-178=>351,179=>351,180=>333,181=>556,182=>537,183=>278,184=>333,185=>240,186=>365,187=>556,
+168=>333,169=>737,170=>370,171=>448,172=>584,173=>333,174=>737,175=>333,176=>606,177=>584,
+178=>350,179=>350,180=>333,181=>556,182=>537,183=>278,184=>333,185=>350,186=>365,187=>448,
 188=>869,189=>869,190=>869,191=>556,192=>667,193=>667,194=>667,195=>667,196=>667,197=>667,
 198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,
 208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,
@@ -31,7 +31,7 @@ $cw=array(
 258=>667,259=>556,260=>667,261=>556,262=>722,263=>500,264=>722,265=>500,266=>722,267=>500,
 268=>722,269=>500,270=>722,271=>722,272=>722,273=>556,274=>667,275=>556,276=>667,277=>556,
 278=>667,279=>556,280=>667,281=>556,282=>667,283=>556,284=>778,285=>556,286=>778,287=>556,
-288=>778,289=>556,290=>778,291=>697,292=>722,293=>556,294=>722,295=>556,296=>278,297=>278,
+288=>778,289=>556,290=>778,291=>556,292=>722,293=>556,294=>722,295=>556,296=>278,297=>278,
 298=>278,299=>278,300=>278,301=>278,302=>278,303=>222,304=>278,305=>278,306=>700,307=>374,
 308=>500,309=>222,310=>667,311=>500,312=>500,313=>556,314=>222,315=>556,316=>222,317=>556,
 318=>387,319=>556,320=>500,321=>556,322=>222,323=>722,324=>556,325=>722,326=>556,327=>722,
@@ -40,273 +40,272 @@ $cw=array(
 350=>667,351=>500,354=>611,355=>278,356=>611,357=>443,358=>611,359=>278,360=>722,361=>556,
 362=>722,363=>556,364=>722,365=>556,366=>722,367=>556,368=>722,369=>556,370=>722,371=>556,
 372=>944,373=>722,374=>667,375=>500,377=>611,378=>500,379=>611,380=>500,383=>278,384=>556,
-385=>854,386=>667,387=>556,388=>667,389=>556,390=>722,391=>722,392=>500,393=>722,394=>899,
-395=>667,396=>556,397=>556,398=>667,399=>722,400=>667,401=>611,403=>778,404=>667,405=>889,
+385=>854,386=>668,387=>556,388=>667,389=>556,390=>722,391=>722,392=>500,393=>722,394=>899,
+395=>667,396=>556,397=>564,398=>667,399=>722,400=>667,401=>611,403=>778,404=>667,405=>889,
 406=>278,407=>333,408=>667,409=>500,410=>333,411=>560,412=>833,413=>722,414=>556,415=>778,
-416=>778,417=>556,418=>944,419=>722,420=>842,421=>556,422=>666,423=>667,424=>500,425=>611,
-426=>333,427=>278,428=>611,429=>278,430=>611,431=>722,432=>556,433=>778,434=>722,435=>722,
+416=>788,417=>565,418=>944,419=>722,420=>842,421=>556,422=>666,423=>667,424=>500,425=>611,
+426=>333,427=>278,428=>611,429=>278,430=>611,431=>776,432=>624,433=>778,434=>722,435=>722,
 436=>556,437=>611,438=>500,439=>611,440=>611,441=>500,442=>500,443=>556,446=>556,447=>556,
 448=>260,449=>370,450=>584,451=>278,452=>1311,453=>1208,454=>1056,455=>1056,456=>778,457=>444,
 458=>1158,459=>944,460=>778,461=>667,462=>556,463=>278,464=>278,465=>778,466=>556,467=>722,
 468=>556,469=>722,470=>556,471=>722,472=>556,473=>722,474=>556,475=>722,476=>556,477=>556,
 478=>667,479=>556,480=>667,481=>556,482=>1000,483=>889,484=>778,485=>556,486=>778,487=>556,
 488=>667,489=>500,490=>778,491=>556,492=>778,493=>556,494=>611,495=>500,496=>222,497=>1333,
-498=>1222,499=>1056,500=>778,501=>556,504=>722,505=>556,506=>667,507=>556,508=>1000,509=>889,
-510=>778,511=>611,512=>667,513=>556,514=>667,515=>556,516=>667,517=>556,518=>667,519=>556,
-520=>278,521=>278,522=>278,523=>278,524=>778,525=>556,526=>778,527=>556,528=>722,529=>333,
-530=>1083,531=>333,532=>722,533=>556,534=>722,535=>556,536=>667,537=>500,538=>611,539=>278,
-542=>722,543=>556,548=>611,549=>500,550=>667,551=>556,552=>667,553=>556,554=>778,555=>556,
-556=>778,557=>556,558=>778,559=>556,560=>778,561=>556,562=>667,563=>500,567=>222,592=>556,
-593=>556,594=>556,595=>556,596=>500,597=>500,598=>556,599=>556,600=>556,601=>556,603=>500,
-604=>500,606=>500,607=>222,608=>556,609=>556,610=>546,611=>500,612=>556,613=>556,614=>556,
-615=>556,616=>222,617=>222,618=>278,621=>222,622=>611,623=>833,624=>833,625=>833,626=>556,
-627=>556,628=>567,629=>556,630=>778,631=>722,632=>741,633=>333,634=>333,635=>333,636=>333,
-637=>333,638=>384,639=>369,640=>546,641=>546,642=>500,643=>278,644=>278,645=>278,646=>444,
-647=>278,648=>278,649=>556,650=>626,651=>539,652=>500,653=>722,654=>500,655=>556,656=>500,
-657=>500,658=>500,660=>556,661=>556,662=>556,663=>722,664=>778,665=>522,666=>500,667=>546,
-668=>558,669=>444,670=>500,671=>430,672=>556,673=>556,674=>556,675=>944,676=>944,677=>944,
-702=>333,703=>333,711=>333,713=>333,714=>333,715=>333,722=>333,723=>333,728=>333,729=>333,
-730=>333,731=>333,733=>333,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,
-775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,
-785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,
-795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,
-805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,
-815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,
-825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,
-835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,
-845=>0,846=>0,848=>0,849=>0,850=>0,851=>0,852=>0,853=>0,854=>0,855=>0,
-856=>0,857=>0,858=>0,859=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,
-866=>0,867=>0,868=>0,869=>0,870=>0,871=>0,872=>0,873=>0,874=>0,875=>0,
-876=>0,877=>0,878=>0,879=>0,884=>199,885=>199,890=>332,894=>278,900=>333,901=>333,
-902=>667,903=>278,904=>786,905=>828,906=>369,908=>833,910=>845,911=>778,912=>286,913=>667,
-914=>667,915=>582,916=>778,917=>667,918=>628,919=>722,920=>778,921=>278,922=>667,923=>667,
-924=>833,925=>722,926=>630,927=>778,928=>722,929=>667,931=>628,932=>611,933=>667,934=>717,
-935=>667,936=>745,937=>778,938=>278,939=>667,940=>608,941=>528,942=>547,943=>307,944=>515,
-945=>596,946=>516,947=>531,948=>556,949=>510,950=>462,951=>526,952=>526,953=>286,954=>516,
-955=>560,956=>574,957=>500,958=>470,959=>556,960=>661,961=>566,962=>535,963=>616,964=>532,
-965=>515,966=>741,967=>572,968=>662,969=>740,970=>286,971=>515,972=>553,973=>518,974=>740,
-977=>580,978=>742,981=>741,982=>740,983=>556,1008=>556,1009=>566,1013=>328,1024=>667,1025=>667,
-1026=>766,1027=>611,1028=>722,1029=>667,1030=>278,1031=>278,1032=>500,1033=>1080,1034=>1014,1035=>766,
-1036=>667,1037=>728,1038=>650,1039=>722,1040=>667,1041=>667,1042=>667,1043=>611,1044=>812,1045=>667,
-1046=>1023,1047=>667,1048=>728,1049=>728,1050=>667,1051=>673,1052=>833,1053=>722,1054=>778,1055=>719,
-1056=>667,1057=>722,1058=>611,1059=>650,1060=>936,1061=>667,1062=>741,1063=>648,1064=>828,1065=>850,
-1066=>897,1067=>872,1068=>667,1069=>722,1070=>1032,1071=>702,1072=>556,1073=>556,1074=>522,1075=>430,
-1076=>602,1077=>556,1078=>837,1079=>500,1080=>567,1081=>567,1082=>510,1083=>557,1084=>618,1085=>558,
-1086=>556,1087=>557,1088=>556,1089=>500,1090=>496,1091=>500,1092=>912,1093=>500,1094=>578,1095=>520,
-1096=>692,1097=>712,1098=>734,1099=>690,1100=>552,1101=>500,1102=>758,1103=>543,1104=>556,1105=>556,
-1106=>568,1107=>430,1108=>500,1109=>500,1110=>222,1111=>278,1112=>222,1113=>840,1114=>850,1115=>568,
-1116=>510,1117=>567,1118=>500,1119=>556,1138=>778,1139=>556,1164=>667,1165=>552,1166=>667,1167=>556,
-1168=>611,1169=>430,1170=>611,1171=>430,1172=>611,1173=>490,1174=>1023,1175=>837,1176=>667,1177=>500,
-1178=>667,1179=>510,1180=>667,1181=>500,1182=>667,1183=>500,1184=>900,1185=>683,1186=>722,1187=>556,
-1188=>1000,1189=>764,1190=>1061,1191=>826,1194=>722,1195=>500,1196=>611,1197=>496,1198=>667,1199=>667,
-1200=>667,1201=>667,1202=>667,1203=>500,1204=>942,1205=>732,1206=>648,1207=>520,1208=>648,1209=>520,
-1210=>648,1211=>520,1212=>927,1213=>716,1214=>927,1215=>716,1216=>278,1217=>1023,1218=>837,1219=>667,
-1220=>500,1221=>673,1222=>557,1223=>722,1224=>556,1225=>722,1226=>558,1227=>648,1228=>520,1229=>833,
-1230=>618,1232=>667,1233=>556,1234=>667,1235=>556,1236=>1000,1237=>889,1238=>667,1239=>556,1240=>722,
-1241=>556,1242=>722,1243=>556,1244=>1023,1245=>837,1246=>667,1247=>500,1248=>611,1249=>500,1250=>728,
-1251=>567,1252=>728,1253=>567,1254=>778,1255=>556,1256=>778,1257=>556,1258=>778,1259=>556,1260=>722,
-1261=>500,1262=>650,1263=>500,1264=>650,1265=>500,1266=>650,1267=>500,1268=>648,1269=>520,1272=>872,
-1273=>690,1329=>722,1330=>705,1331=>774,1332=>754,1333=>722,1334=>751,1335=>485,1336=>722,1337=>782,
-1338=>655,1339=>699,1340=>417,1341=>853,1342=>791,1343=>711,1344=>588,1345=>663,1346=>665,1347=>665,
-1348=>756,1349=>623,1350=>773,1351=>603,1352=>722,1353=>648,1354=>722,1355=>751,1356=>750,1357=>722,
-1358=>748,1359=>667,1360=>699,1361=>623,1362=>417,1363=>785,1364=>638,1365=>778,1366=>716,1369=>333,
-1370=>222,1371=>133,1372=>333,1373=>333,1374=>333,1375=>333,1377=>833,1378=>556,1379=>572,1380=>581,
-1381=>550,1382=>588,1383=>448,1384=>556,1385=>568,1386=>582,1387=>545,1388=>301,1389=>799,1390=>556,
-1391=>554,1392=>533,1393=>548,1394=>552,1395=>552,1396=>544,1397=>222,1398=>544,1399=>456,1400=>556,
-1401=>390,1402=>833,1403=>509,1404=>547,1405=>533,1406=>610,1407=>887,1408=>556,1409=>545,1410=>352,
-1411=>853,1412=>588,1413=>579,1414=>690,1415=>545,1417=>278,1418=>333,1456=>70,1457=>335,1458=>329,
-1459=>329,1460=>70,1461=>200,1462=>200,1463=>188,1464=>188,1465=>70,1467=>329,1468=>70,1469=>70,
-1470=>488,1471=>200,1472=>212,1473=>0,1474=>0,1475=>278,1476=>70,1488=>640,1489=>591,1490=>466,
+498=>1222,499=>1056,500=>778,501=>556,503=>630,504=>722,505=>556,506=>667,507=>556,508=>1000,
+509=>889,510=>778,511=>611,512=>667,513=>556,514=>667,515=>556,516=>667,517=>556,518=>667,
+519=>556,520=>278,521=>278,522=>278,523=>278,524=>778,525=>556,526=>778,527=>556,528=>722,
+529=>333,530=>722,531=>333,532=>722,533=>556,534=>722,535=>556,536=>667,537=>500,538=>611,
+539=>278,540=>521,541=>393,542=>722,543=>556,548=>611,549=>500,550=>667,551=>556,552=>667,
+553=>556,554=>778,555=>556,556=>778,557=>556,558=>778,559=>556,560=>778,561=>556,562=>667,
+563=>500,567=>222,592=>556,593=>556,594=>556,595=>556,596=>500,597=>500,598=>556,599=>556,
+600=>556,601=>556,602=>804,603=>500,604=>499,605=>742,606=>500,607=>222,608=>556,609=>556,
+610=>546,611=>500,612=>556,613=>556,614=>556,615=>556,616=>222,617=>222,618=>278,619=>473,
+620=>427,621=>222,622=>611,623=>833,624=>833,625=>833,626=>556,627=>556,628=>567,629=>556,
+630=>778,631=>722,632=>741,633=>333,634=>333,635=>333,636=>333,637=>333,638=>384,639=>369,
+640=>546,641=>546,642=>500,643=>278,644=>278,645=>278,646=>444,647=>278,648=>278,649=>556,
+650=>626,651=>539,652=>500,653=>722,654=>500,655=>556,656=>500,657=>500,658=>500,659=>552,
+660=>556,661=>556,662=>556,663=>722,664=>778,665=>506,666=>500,667=>546,668=>558,669=>444,
+670=>500,671=>430,672=>556,673=>556,674=>556,675=>944,676=>944,677=>944,678=>689,679=>506,
+680=>764,681=>766,682=>660,683=>577,684=>530,685=>486,686=>565,687=>621,688=>333,689=>333,
+690=>167,691=>236,692=>236,693=>276,694=>359,695=>500,696=>330,697=>278,698=>454,699=>278,
+700=>278,701=>278,702=>333,703=>333,704=>333,705=>333,706=>333,707=>333,708=>333,709=>333,
+711=>333,712=>333,713=>333,714=>333,715=>333,716=>272,717=>333,718=>333,719=>333,720=>333,
+721=>333,722=>333,723=>333,724=>333,725=>333,726=>333,727=>333,728=>333,729=>333,730=>333,
+731=>333,733=>333,734=>333,735=>510,736=>333,737=>186,738=>333,739=>333,740=>334,741=>526,
+742=>526,743=>526,744=>526,745=>526,746=>519,747=>519,748=>333,749=>333,750=>333,751=>333,
+752=>333,753=>333,754=>333,755=>327,756=>261,757=>437,758=>437,759=>333,760=>278,761=>200,
+762=>200,763=>200,764=>200,765=>333,766=>333,767=>333,768=>0,769=>0,770=>0,771=>0,
+772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,
+782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,
+792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,
+802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,
+812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,
+822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,
+832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,
+842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,848=>0,849=>0,850=>0,851=>0,
+852=>0,853=>0,854=>0,855=>0,856=>0,857=>0,858=>0,859=>0,860=>0,861=>0,
+862=>0,863=>0,864=>0,865=>0,866=>0,867=>0,868=>0,869=>0,870=>0,871=>0,
+872=>0,873=>0,874=>0,875=>0,876=>0,877=>0,878=>0,879=>0,884=>278,885=>199,
+890=>332,894=>278,900=>333,901=>333,902=>667,903=>275,904=>786,905=>828,906=>369,908=>833,
+910=>845,911=>778,912=>286,913=>667,914=>667,915=>582,916=>778,917=>667,918=>628,919=>722,
+920=>778,921=>278,922=>667,923=>667,924=>833,925=>722,926=>630,927=>778,928=>722,929=>667,
+931=>628,932=>611,933=>667,934=>717,935=>667,936=>745,937=>778,938=>278,939=>667,940=>608,
+941=>528,942=>548,943=>307,944=>538,945=>596,946=>542,947=>531,948=>564,949=>512,950=>455,
+951=>548,952=>525,953=>286,954=>510,955=>551,956=>540,957=>500,958=>470,959=>546,960=>619,
+961=>569,962=>547,963=>620,964=>492,965=>538,966=>741,967=>571,968=>662,969=>740,970=>286,
+971=>538,972=>546,973=>538,974=>740,977=>580,978=>742,979=>845,980=>620,981=>741,982=>740,
+983=>556,1008=>556,1009=>566,1012=>778,1013=>328,1024=>667,1025=>657,1026=>766,1027=>582,1028=>722,
+1029=>667,1030=>278,1031=>278,1032=>500,1033=>1080,1034=>1014,1035=>766,1036=>628,1037=>730,1038=>613,
+1039=>722,1040=>666,1041=>668,1042=>668,1043=>582,1044=>812,1045=>657,1046=>905,1047=>667,1048=>730,
+1049=>730,1050=>632,1051=>674,1052=>846,1053=>721,1054=>796,1055=>721,1056=>654,1057=>722,1058=>611,
+1059=>613,1060=>861,1061=>657,1062=>742,1063=>626,1064=>830,1065=>851,1066=>841,1067=>874,1068=>670,
+1069=>717,1070=>1001,1071=>686,1072=>552,1073=>550,1074=>506,1075=>404,1076=>602,1077=>547,1078=>755,
+1079=>499,1080=>567,1081=>567,1082=>489,1083=>517,1084=>618,1085=>558,1086=>550,1087=>557,1088=>577,
+1089=>520,1090=>444,1091=>468,1092=>865,1093=>466,1094=>578,1095=>498,1096=>692,1097=>712,1098=>664,
+1099=>690,1100=>521,1101=>520,1102=>759,1103=>543,1104=>549,1105=>549,1106=>577,1107=>404,1108=>519,
+1109=>502,1110=>224,1111=>278,1112=>223,1113=>813,1114=>853,1115=>577,1116=>489,1117=>567,1118=>468,
+1119=>558,1120=>942,1121=>693,1136=>762,1137=>662,1138=>800,1139=>550,1148=>942,1149=>693,1150=>942,
+1151=>693,1154=>468,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>0,1161=>0,1162=>763,
+1163=>583,1164=>689,1165=>526,1166=>652,1167=>572,1168=>601,1169=>397,1170=>589,1171=>392,1172=>591,
+1173=>475,1174=>927,1175=>830,1176=>661,1177=>493,1178=>658,1179=>510,1180=>675,1181=>519,1182=>684,
+1183=>514,1184=>839,1185=>653,1186=>740,1187=>570,1188=>987,1189=>714,1190=>1058,1191=>808,1192=>722,
+1193=>510,1194=>722,1195=>516,1196=>611,1197=>402,1198=>668,1199=>578,1200=>668,1201=>588,1202=>664,
+1203=>488,1204=>936,1205=>679,1206=>638,1207=>521,1208=>630,1209=>498,1210=>630,1211=>498,1212=>927,
+1213=>699,1214=>919,1215=>703,1216=>254,1217=>905,1218=>755,1219=>668,1220=>512,1221=>696,1222=>524,
+1223=>721,1224=>558,1225=>744,1226=>571,1227=>630,1228=>498,1229=>869,1230=>631,1231=>254,1232=>666,
+1233=>552,1234=>666,1235=>552,1236=>1000,1237=>879,1238=>657,1239=>547,1240=>722,1241=>543,1242=>722,
+1243=>543,1244=>905,1245=>755,1246=>667,1247=>499,1248=>611,1249=>540,1250=>730,1251=>567,1252=>730,
+1253=>567,1254=>796,1255=>550,1256=>800,1257=>550,1258=>800,1259=>550,1260=>717,1261=>520,1262=>613,
+1263=>468,1264=>613,1265=>468,1266=>613,1267=>468,1268=>626,1269=>498,1270=>582,1271=>395,1272=>874,
+1273=>690,1296=>667,1297=>491,1298=>665,1299=>509,1306=>778,1307=>575,1308=>934,1309=>712,1310=>627,
+1311=>489,1329=>720,1330=>696,1331=>750,1332=>725,1333=>699,1334=>751,1335=>446,1336=>703,1337=>790,
+1338=>656,1339=>697,1340=>390,1341=>852,1342=>791,1343=>698,1344=>585,1345=>656,1346=>651,1347=>658,
+1348=>759,1349=>595,1350=>772,1351=>603,1352=>703,1353=>648,1354=>698,1355=>744,1356=>738,1357=>703,
+1358=>739,1359=>660,1360=>693,1361=>623,1362=>385,1363=>788,1364=>632,1365=>775,1366=>714,1369=>333,
+1370=>222,1371=>200,1372=>333,1373=>333,1374=>333,1375=>333,1377=>833,1378=>551,1379=>572,1380=>569,
+1381=>546,1382=>581,1383=>353,1384=>551,1385=>568,1386=>569,1387=>552,1388=>276,1389=>795,1390=>535,
+1391=>553,1392=>537,1393=>512,1394=>568,1395=>552,1396=>531,1397=>249,1398=>527,1399=>405,1400=>551,
+1401=>390,1402=>833,1403=>509,1404=>523,1405=>545,1406=>584,1407=>879,1408=>552,1409=>552,1410=>301,
+1411=>884,1412=>578,1413=>556,1414=>668,1415=>544,1417=>278,1418=>333,1456=>0,1457=>0,1458=>0,
+1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1467=>0,1468=>0,1469=>0,
+1470=>488,1471=>0,1472=>212,1473=>0,1474=>0,1475=>278,1476=>0,1488=>640,1489=>591,1490=>466,
 1491=>598,1492=>622,1493=>212,1494=>351,1495=>623,1496=>608,1497=>200,1498=>526,1499=>550,1500=>600,
 1501=>623,1502=>621,1503=>212,1504=>378,1505=>607,1506=>587,1507=>575,1508=>568,1509=>540,1510=>590,
-1511=>606,1512=>547,1513=>776,1514=>687,1792=>600,1793=>201,1794=>201,1795=>201,1796=>201,1797=>500,
-1798=>500,1799=>500,1800=>370,1801=>370,1802=>574,1803=>574,1804=>645,1805=>574,1808=>452,1809=>452,
-1810=>574,1811=>645,1812=>645,1813=>509,1814=>509,1815=>682,1816=>585,1817=>404,1818=>627,1819=>718,
-1820=>718,1821=>484,1822=>682,1823=>600,1824=>660,1825=>682,1826=>538,1827=>718,1828=>718,1829=>718,
-1830=>574,1831=>574,1832=>638,1833=>585,1834=>509,1835=>682,1836=>682,1840=>0,1841=>0,1842=>0,
-1843=>0,1844=>0,1845=>0,1846=>0,1847=>0,1848=>0,1849=>0,1850=>0,1851=>0,1852=>0,
-1853=>0,1854=>0,1855=>0,1856=>0,1857=>0,1858=>0,1859=>0,1860=>0,1861=>0,1862=>0,
-1863=>0,1864=>0,1865=>0,1866=>0,2305=>6,2306=>0,2307=>305,2308=>717,2309=>717,2310=>829,
-2311=>463,2312=>463,2313=>581,2314=>803,2315=>920,2316=>639,2317=>430,2318=>430,2319=>430,2320=>430,
-2321=>856,2322=>828,2323=>837,2324=>856,2325=>749,2326=>779,2327=>522,2328=>587,2329=>650,2330=>619,
-2331=>641,2332=>703,2333=>691,2334=>677,2335=>568,2336=>529,2337=>611,2338=>536,2339=>607,2340=>564,
-2341=>659,2342=>500,2343=>591,2344=>521,2345=>568,2346=>477,2347=>728,2348=>490,2349=>577,2350=>517,
-2351=>554,2352=>433,2353=>433,2354=>656,2355=>660,2356=>660,2357=>490,2358=>645,2359=>477,2360=>666,
-2361=>484,2363=>639,2364=>6,2365=>442,2366=>211,2367=>211,2368=>211,2369=>6,2370=>3,2371=>6,
-2372=>0,2373=>6,2374=>84,2375=>6,2376=>6,2377=>224,2378=>234,2379=>211,2380=>211,2381=>6,
-2383=>6,2384=>839,2385=>15,2386=>0,2387=>9,2388=>9,2389=>12,2392=>750,2393=>779,2394=>522,
-2395=>703,2396=>613,2397=>536,2398=>728,2399=>554,2400=>899,2401=>625,2402=>625,2403=>625,2404=>674,
-2405=>674,2406=>575,2407=>575,2408=>575,2409=>575,2410=>575,2411=>575,2412=>575,2413=>575,2414=>575,
-2415=>575,2416=>365,2417=>211,2418=>211,2419=>211,2420=>211,2421=>211,2422=>211,2433=>0,2434=>300,
-2435=>264,2437=>594,2438=>790,2439=>469,2440=>513,2441=>520,2442=>549,2443=>594,2444=>481,2447=>580,
-2448=>627,2451=>540,2452=>613,2453=>570,2454=>467,2455=>471,2456=>428,2457=>483,2458=>408,2459=>509,
-2460=>591,2461=>563,2462=>771,2463=>381,2464=>404,2465=>522,2466=>408,2467=>450,2468=>543,2469=>477,
-2470=>418,2471=>433,2472=>445,2474=>499,2475=>584,2476=>377,2477=>555,2478=>448,2479=>423,2480=>390,
-2482=>498,2486=>498,2487=>425,2488=>495,2489=>440,2492=>22,2493=>440,2494=>193,2495=>189,2496=>180,
-2497=>0,2498=>0,2499=>0,2500=>0,2503=>252,2504=>243,2507=>889,2508=>865,2509=>0,2510=>356,
-2519=>219,2524=>523,2525=>408,2527=>428,2528=>594,2529=>481,2530=>0,2531=>-199,2534=>500,2535=>437,
-2536=>479,2537=>530,2538=>497,2539=>500,2540=>482,2541=>503,2542=>517,2543=>481,2544=>377,2545=>377,
-2546=>429,2547=>383,2548=>429,2549=>478,2550=>545,2551=>158,2552=>365,2553=>280,2554=>357,2561=>5,
-2562=>64,2563=>351,2565=>860,2566=>1088,2567=>869,2568=>928,2569=>723,2570=>723,2575=>665,2576=>857,
-2579=>716,2580=>858,2581=>682,2582=>634,2583=>696,2584=>744,2585=>649,2586=>674,2587=>656,2588=>653,
-2589=>629,2590=>639,2591=>641,2592=>657,2593=>650,2594=>653,2595=>651,2596=>640,2597=>634,2598=>662,
-2599=>630,2600=>625,2602=>645,2603=>653,2604=>624,2605=>613,2606=>658,2607=>734,2608=>620,2610=>676,
-2611=>719,2613=>626,2614=>666,2616=>666,2617=>614,2620=>0,2622=>286,2623=>322,2624=>301,2625=>9,
-2626=>9,2631=>9,2632=>9,2635=>9,2636=>9,2637=>0,2649=>636,2650=>762,2651=>652,2652=>653,
-2654=>656,2662=>672,2663=>543,2664=>622,2665=>622,2666=>576,2667=>595,2668=>509,2669=>645,2670=>661,
-2671=>655,2672=>9,2673=>168,2674=>666,2675=>726,2676=>1217,2689=>22,2690=>23,2691=>-51,2693=>775,
-2694=>979,2695=>588,2696=>563,2697=>525,2698=>724,2699=>942,2701=>775,2703=>775,2704=>775,2705=>979,
-2707=>979,2708=>979,2709=>610,2710=>706,2711=>623,2712=>610,2713=>601,2714=>614,2715=>642,2716=>684,
-2717=>634,2718=>644,2719=>509,2720=>541,2721=>539,2722=>524,2723=>657,2724=>547,2725=>616,2726=>494,
-2727=>601,2728=>627,2730=>524,2731=>620,2732=>691,2733=>687,2734=>468,2735=>590,2736=>509,2738=>571,
-2739=>687,2741=>526,2742=>620,2743=>575,2744=>620,2745=>549,2746=>0,2748=>53,2749=>415,2750=>241,
-2751=>186,2752=>217,2753=>32,2754=>21,2755=>38,2756=>27,2757=>45,2759=>41,2760=>46,2761=>207,
-2763=>190,2764=>182,2765=>16,2768=>962,2784=>949,2788=>222,2789=>383,2790=>479,2791=>502,2792=>484,
-2793=>471,2794=>501,2795=>527,2796=>462,2797=>524,2798=>454,2799=>495,2800=>496,2801=>752,2818=>131,
-2819=>302,2821=>560,2822=>644,2823=>632,2825=>630,2827=>553,2831=>604,2835=>520,2837=>572,2838=>570,
-2839=>580,2840=>565,2842=>580,2844=>564,2845=>575,2847=>565,2848=>565,2849=>524,2858=>572,2859=>700,
-2863=>655,2864=>620,2866=>652,2867=>560,2870=>565,2871=>565,2872=>545,2873=>524,2878=>128,2879=>1,
-2880=>190,2881=>1,2882=>1,2883=>1,2887=>396,2912=>563,2918=>508,2919=>424,2920=>440,2921=>600,
-2922=>600,2923=>600,2924=>600,2925=>600,2926=>511,2927=>483,2946=>479,2947=>893,2949=>1018,2950=>1170,
-2951=>916,2952=>676,2953=>836,2954=>1225,2958=>744,2959=>744,2960=>848,2962=>813,2963=>813,2964=>813,
-2965=>688,2969=>744,2970=>676,2972=>848,2974=>984,2975=>777,2979=>1338,2980=>664,2984=>561,2985=>1029,
-2986=>607,2990=>697,2991=>697,2992=>434,2993=>617,2994=>869,2995=>859,2996=>697,2997=>869,2999=>1145,
-3000=>1064,3001=>1316,3006=>424,3007=>125,3008=>596,3009=>539,3014=>596,3015=>650,3016=>973,3018=>1286,
-3019=>1286,3020=>1706,3021=>333,3031=>859,3034=>778,3035=>881,3036=>876,3037=>648,3041=>744,3203=>342,
-3205=>620,3206=>591,3207=>600,3208=>776,3209=>1138,3210=>1464,3214=>574,3215=>570,3216=>580,3218=>589,
-3219=>597,3220=>625,3221=>256,3222=>565,3223=>326,3224=>604,3225=>651,3226=>408,3228=>611,3230=>843,
-3231=>610,3232=>258,3233=>317,3234=>328,3235=>803,3236=>317,3237=>328,3238=>352,3239=>352,3240=>317,
-3248=>248,3249=>621,3250=>620,3251=>620,3302=>649,3303=>550,3304=>573,3305=>567,3306=>562,3307=>557,
-3308=>562,3309=>567,3310=>557,3311=>557,4256=>587,4257=>620,4258=>642,4259=>815,4260=>600,4261=>595,
-4262=>799,4263=>893,4264=>622,4265=>597,4266=>939,4267=>602,4268=>603,4269=>790,4270=>587,4271=>623,
-4272=>799,4273=>601,4274=>792,4275=>724,4276=>847,4277=>599,4278=>812,4279=>603,4280=>653,4281=>590,
-4282=>754,4283=>596,4284=>653,4285=>651,4286=>596,4287=>888,4288=>593,4304=>436,4305=>491,4306=>528,
-4307=>692,4308=>447,4309=>447,4310=>628,4311=>734,4312=>449,4313=>445,4314=>843,4315=>449,4316=>449,
-4317=>682,4318=>449,4319=>480,4320=>682,4321=>468,4322=>710,4323=>623,4324=>697,4325=>447,4326=>702,
-4327=>447,4328=>470,4329=>440,4330=>632,4331=>449,4332=>470,4333=>536,4334=>449,4335=>656,4336=>474,
-4337=>630,4338=>394,4339=>419,4340=>422,4341=>436,7680=>667,7681=>556,7682=>667,7683=>556,7684=>667,
-7685=>556,7686=>667,7687=>556,7688=>722,7689=>500,7690=>722,7691=>556,7692=>722,7693=>556,7694=>722,
-7695=>556,7696=>722,7697=>556,7698=>722,7699=>556,7700=>667,7701=>556,7702=>667,7703=>556,7704=>667,
-7705=>556,7706=>667,7707=>556,7708=>667,7709=>556,7710=>611,7711=>278,7712=>778,7713=>556,7714=>722,
-7715=>556,7716=>722,7717=>556,7718=>722,7719=>556,7720=>722,7721=>556,7722=>722,7723=>556,7724=>278,
-7725=>222,7726=>278,7727=>278,7728=>667,7729=>500,7730=>667,7731=>500,7732=>667,7733=>500,7734=>556,
-7735=>222,7736=>556,7737=>222,7738=>556,7739=>222,7740=>556,7741=>222,7742=>833,7743=>833,7744=>833,
-7745=>833,7746=>833,7747=>833,7748=>722,7749=>556,7750=>722,7751=>556,7752=>722,7753=>556,7754=>722,
-7755=>556,7756=>778,7757=>556,7758=>778,7759=>556,7760=>778,7761=>556,7762=>778,7763=>556,7764=>667,
-7765=>556,7766=>667,7767=>556,7768=>722,7769=>333,7770=>722,7771=>333,7772=>722,7773=>333,7774=>722,
-7775=>333,7776=>667,7777=>500,7778=>667,7779=>500,7780=>667,7781=>500,7782=>667,7783=>500,7784=>667,
-7785=>500,7786=>611,7787=>278,7788=>611,7789=>278,7790=>611,7791=>278,7792=>611,7793=>278,7794=>722,
-7795=>556,7796=>722,7797=>556,7798=>722,7799=>556,7800=>722,7801=>556,7802=>722,7803=>556,7804=>667,
-7805=>500,7806=>667,7807=>500,7808=>944,7809=>722,7810=>944,7811=>722,7812=>944,7813=>722,7814=>944,
-7815=>722,7816=>944,7817=>722,7818=>667,7819=>500,7820=>667,7821=>500,7822=>667,7823=>500,7824=>611,
-7825=>500,7826=>611,7827=>500,7828=>611,7829=>500,7830=>556,7831=>278,7832=>722,7833=>500,7835=>278,
-7840=>667,7841=>556,7842=>667,7843=>556,7844=>667,7845=>556,7846=>667,7847=>556,7848=>667,7849=>556,
-7850=>667,7851=>556,7852=>667,7853=>556,7854=>667,7855=>556,7856=>667,7857=>556,7858=>667,7859=>556,
-7860=>667,7861=>556,7862=>667,7863=>556,7864=>667,7865=>556,7866=>667,7867=>556,7868=>667,7869=>556,
-7870=>667,7871=>556,7872=>667,7873=>556,7874=>667,7875=>556,7876=>667,7877=>556,7878=>667,7879=>556,
-7880=>278,7881=>278,7882=>278,7883=>222,7884=>778,7885=>556,7886=>778,7887=>556,7888=>778,7889=>556,
-7890=>778,7891=>556,7892=>778,7893=>556,7894=>778,7895=>556,7896=>778,7897=>556,7898=>778,7899=>556,
-7900=>778,7901=>556,7902=>778,7903=>556,7904=>778,7905=>556,7906=>778,7907=>556,7908=>722,7909=>556,
-7910=>722,7911=>556,7912=>722,7913=>556,7914=>722,7915=>556,7916=>722,7917=>556,7918=>722,7919=>556,
-7920=>722,7921=>556,7922=>667,7923=>500,7924=>667,7925=>500,7926=>667,7927=>500,7928=>667,7929=>500,
-7936=>596,7937=>596,7938=>596,7939=>596,7940=>596,7941=>596,7942=>596,7943=>596,7944=>667,7945=>667,
-7946=>833,7947=>833,7948=>833,7949=>833,7950=>833,7951=>833,7952=>510,7953=>510,7954=>510,7955=>510,
-7956=>510,7957=>510,7960=>778,7961=>778,7962=>944,7963=>944,7964=>944,7965=>944,7968=>526,7969=>526,
-7970=>526,7971=>526,7972=>526,7973=>526,7974=>526,7975=>526,7976=>778,7977=>778,7978=>1000,7979=>1000,
-7980=>1000,7981=>1000,7982=>1000,7983=>1000,7984=>286,7985=>286,7986=>286,7987=>286,7988=>286,7989=>286,
-7990=>286,7991=>286,7992=>400,7993=>400,7994=>611,7995=>611,7996=>611,7997=>611,7998=>611,7999=>611,
-8000=>556,8001=>556,8002=>556,8003=>556,8004=>556,8005=>556,8008=>833,8009=>833,8010=>1111,8011=>1111,
-8012=>1111,8013=>1111,8016=>515,8017=>515,8018=>515,8019=>515,8020=>515,8021=>515,8022=>515,8023=>515,
-8025=>833,8027=>1000,8029=>1000,8031=>1000,8032=>740,8033=>740,8034=>740,8035=>740,8036=>740,8037=>740,
-8038=>740,8039=>740,8040=>833,8041=>833,8042=>1111,8043=>1111,8044=>1000,8045=>1000,8046=>1000,8047=>1000,
-8048=>596,8049=>596,8050=>510,8051=>510,8052=>526,8053=>526,8054=>286,8055=>286,8056=>556,8057=>556,
-8058=>515,8059=>515,8060=>740,8061=>740,8064=>596,8065=>596,8066=>596,8067=>596,8068=>596,8069=>596,
-8070=>596,8071=>596,8072=>883,8073=>883,8074=>1049,8075=>1049,8076=>1049,8077=>1049,8078=>1049,8079=>1049,
-8080=>526,8081=>526,8082=>526,8083=>526,8084=>526,8085=>526,8086=>526,8087=>526,8088=>994,8089=>994,
-8090=>1216,8091=>1216,8092=>1216,8093=>1216,8094=>1216,8095=>1216,8096=>740,8097=>740,8098=>740,8099=>740,
-8100=>740,8101=>740,8102=>740,8103=>740,8104=>1000,8105=>1000,8106=>1311,8107=>1311,8108=>1216,8109=>1216,
-8110=>1216,8111=>1216,8112=>596,8113=>596,8114=>596,8115=>596,8116=>596,8118=>596,8119=>596,8120=>667,
-8121=>667,8122=>667,8123=>667,8124=>883,8125=>278,8126=>200,8127=>333,8128=>333,8129=>333,8130=>526,
-8131=>526,8132=>536,8134=>526,8135=>526,8136=>833,8137=>833,8138=>944,8139=>944,8140=>938,8141=>400,
-8142=>400,8143=>333,8144=>286,8145=>286,8146=>286,8147=>286,8150=>286,8151=>312,8152=>278,8153=>278,
-8154=>500,8155=>500,8157=>400,8158=>400,8159=>333,8160=>515,8161=>515,8162=>515,8163=>515,8164=>566,
-8165=>566,8166=>515,8167=>515,8168=>667,8169=>667,8170=>833,8171=>833,8172=>778,8173=>333,8174=>393,
-8175=>333,8178=>740,8179=>740,8180=>740,8182=>740,8183=>740,8184=>833,8185=>833,8186=>833,8187=>833,
-8188=>939,8189=>333,8190=>333,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>333,8197=>250,8198=>167,
-8201=>200,8203=>0,8204=>0,8205=>0,8208=>333,8209=>333,8210=>556,8213=>1000,8219=>221,8223=>333,
-8227=>350,8228=>278,8241=>1360,8242=>278,8243=>469,8244=>680,8245=>278,8246=>469,8247=>680,8251=>622,
-8252=>556,8253=>556,8254=>556,8260=>167,8261=>334,8262=>334,8263=>1112,8264=>834,8265=>834,8267=>537,
-8304=>351,8305=>351,8308=>351,8309=>351,8310=>351,8311=>351,8312=>351,8313=>351,8320=>351,8321=>251,
-8322=>351,8323=>351,8324=>351,8325=>353,8326=>351,8327=>351,8328=>351,8329=>351,8359=>1445,8360=>1222,
-8362=>869,8373=>640,8459=>969,8460=>615,8464=>809,8465=>519,8466=>874,8470=>1008,8471=>737,8472=>600,
-8475=>850,8476=>644,8486=>778,8487=>778,8488=>512,8490=>667,8491=>667,8492=>908,8493=>623,8496=>562,
-8497=>611,8498=>611,8499=>1080,8501=>640,8531=>869,8532=>869,8533=>869,8534=>869,8535=>869,8536=>869,
-8537=>869,8538=>869,8539=>869,8540=>869,8541=>869,8542=>869,8543=>869,8544=>278,8545=>556,8546=>834,
-8547=>945,8548=>667,8549=>945,8550=>1223,8551=>1501,8552=>945,8553=>667,8554=>945,8555=>1223,8556=>556,
-8557=>722,8558=>722,8559=>833,8560=>222,8561=>444,8562=>666,8563=>722,8564=>500,8565=>722,8566=>944,
-8567=>1166,8568=>722,8569=>500,8570=>722,8571=>944,8572=>222,8573=>500,8574=>556,8575=>833,8592=>987,
-8593=>603,8594=>987,8595=>603,8596=>1042,8597=>1042,8598=>800,8599=>800,8600=>800,8601=>800,8614=>987,
-8617=>987,8618=>987,8629=>658,8636=>987,8637=>987,8638=>380,8639=>393,8640=>987,8641=>987,8642=>380,
-8643=>379,8652=>987,8656=>987,8657=>603,8658=>987,8659=>603,8660=>1042,8661=>603,8669=>1092,8704=>667,
-8706=>556,8707=>667,8709=>823,8710=>711,8711=>711,8712=>584,8713=>584,8714=>584,8715=>584,8716=>584,
-8717=>713,8719=>823,8720=>823,8721=>804,8722=>584,8723=>584,8724=>584,8725=>510,8726=>392,8727=>584,
-8729=>584,8730=>542,8733=>713,8734=>713,8736=>768,8739=>200,8740=>288,8741=>312,8742=>340,8743=>603,
-8744=>603,8745=>768,8746=>768,8747=>556,8748=>796,8749=>956,8750=>556,8756=>863,8764=>584,8765=>584,
-8766=>584,8768=>244,8769=>584,8770=>584,8771=>584,8772=>584,8773=>584,8774=>584,8775=>584,8776=>584,
-8777=>584,8781=>554,8784=>584,8800=>584,8801=>584,8802=>584,8804=>584,8805=>584,8810=>955,8811=>955,
-8813=>554,8814=>584,8815=>584,8816=>584,8817=>584,8818=>584,8819=>584,8826=>584,8827=>584,8828=>584,
-8829=>584,8832=>584,8833=>584,8834=>584,8835=>584,8836=>584,8837=>584,8838=>584,8839=>584,8840=>584,
-8841=>584,8844=>768,8847=>636,8848=>636,8849=>636,8850=>636,8851=>636,8852=>636,8853=>768,8854=>768,
-8855=>768,8856=>768,8857=>768,8866=>658,8867=>658,8868=>658,8869=>658,8870=>600,8871=>608,8882=>636,
-8883=>636,8884=>636,8885=>636,8896=>744,8897=>744,8898=>764,8899=>764,8901=>278,8902=>471,8904=>710,
-8928=>584,8929=>584,8930=>636,8931=>636,8960=>823,8968=>456,8969=>455,8970=>455,8971=>456,8992=>556,
-8993=>556,8994=>658,8995=>658,9001=>329,9002=>329,9134=>556,9250=>556,9472=>1000,9473=>1000,9474=>1000,
-9475=>1000,9476=>1000,9477=>1000,9478=>1000,9479=>1000,9480=>1000,9481=>1000,9482=>1000,9483=>1000,9484=>1000,
-9485=>1000,9486=>1000,9487=>1000,9488=>1000,9489=>1000,9490=>1000,9491=>1000,9492=>1000,9493=>1000,9494=>1000,
-9495=>1000,9496=>1000,9497=>1000,9498=>1000,9499=>1000,9500=>1000,9501=>1000,9502=>1000,9503=>1000,9504=>1000,
-9505=>1000,9506=>1000,9507=>1000,9508=>1000,9509=>1000,9510=>1000,9511=>1000,9512=>1000,9513=>1000,9514=>1000,
-9515=>1000,9516=>1000,9517=>1000,9518=>1000,9519=>1000,9520=>1000,9521=>1000,9522=>1000,9523=>1000,9524=>1000,
-9525=>1000,9526=>1000,9527=>1000,9528=>1000,9529=>1000,9530=>1000,9531=>1000,9532=>1000,9533=>1000,9534=>1000,
-9535=>1000,9536=>1000,9537=>1000,9538=>1000,9539=>1000,9540=>1000,9541=>1000,9542=>1000,9543=>1000,9544=>1000,
-9545=>1000,9546=>1000,9547=>1000,9552=>1000,9553=>1000,9554=>1000,9555=>1000,9556=>1000,9557=>1000,9558=>1000,
-9559=>1000,9560=>1000,9561=>1000,9562=>1000,9563=>1000,9564=>1000,9565=>1000,9566=>1000,9567=>1000,9568=>1000,
-9569=>1000,9570=>1000,9571=>1000,9572=>1000,9573=>1000,9574=>1000,9575=>1000,9576=>1000,9577=>1000,9578=>1000,
-9579=>1000,9580=>1000,9600=>1000,9601=>1000,9602=>1000,9603=>1000,9604=>1000,9605=>1000,9606=>1000,9607=>1000,
-9608=>1000,9609=>1000,9610=>1000,9611=>1000,9612=>1000,9613=>1000,9614=>1000,9615=>1000,9616=>1000,9617=>1000,
-9618=>1000,9619=>1000,9620=>1000,9621=>1000,9622=>1000,9623=>1000,9624=>1000,9625=>1000,9626=>1000,9627=>1000,
-9628=>1000,9629=>1000,9630=>1000,9631=>1000,9632=>1000,9633=>1000,9635=>1000,9636=>1000,9637=>1000,9642=>1000,
-9644=>1000,9651=>892,9661=>892,9671=>788,9674=>489,9675=>791,9711=>882,9772=>1130,9824=>626,9825=>694,
-9826=>595,9827=>776,9829=>694,9830=>595,9834=>555,10048=>1453,10049=>1454,10752=>791,10753=>791,10754=>791,
-10755=>764,10756=>764,10761=>584,11799=>333,12289=>1000,12290=>1000,12291=>1000,12293=>1000,12295=>1000,12296=>1000,
-12297=>1000,12298=>1000,12299=>1000,12300=>1000,12301=>1000,12302=>1000,12303=>1000,12304=>1000,12305=>1000,12308=>1000,
-12309=>1000,12353=>1000,12354=>1000,12355=>1000,12356=>1000,12357=>1000,12358=>1000,12359=>1000,12360=>1000,12361=>1000,
-12362=>1000,12363=>1000,12364=>1000,12365=>1000,12366=>1000,12367=>1000,12368=>1000,12369=>1000,12370=>1000,12371=>1000,
-12372=>1000,12373=>1000,12374=>1000,12375=>1000,12376=>1000,12377=>1000,12378=>1000,12379=>1000,12380=>1000,12381=>1000,
-12382=>1000,12383=>1000,12384=>1000,12385=>1000,12386=>1000,12387=>1000,12388=>1000,12389=>1000,12390=>1000,12391=>1000,
-12392=>1000,12393=>1000,12394=>1000,12395=>1000,12396=>1000,12397=>1000,12398=>1000,12399=>1000,12400=>1000,12401=>1000,
-12402=>1000,12403=>1000,12404=>1000,12405=>1000,12406=>1000,12407=>1000,12408=>1000,12409=>1000,12410=>1000,12411=>1000,
-12412=>1000,12413=>1000,12414=>1000,12415=>1000,12416=>1000,12417=>1000,12418=>1000,12419=>1000,12420=>1000,12421=>1000,
-12422=>1000,12423=>1000,12424=>1000,12425=>1000,12426=>1000,12427=>1000,12428=>1000,12429=>1000,12430=>1000,12431=>1000,
-12432=>1000,12433=>1000,12434=>1000,12435=>1000,12441=>1000,12443=>1000,12449=>1000,12450=>1000,12451=>1000,12452=>1000,
-12453=>1000,12454=>1000,12455=>1000,12456=>1000,12457=>1000,12458=>1000,12459=>1000,12460=>1000,12461=>1000,12462=>1000,
-12463=>1000,12464=>1000,12465=>1000,12466=>1000,12467=>1000,12468=>1000,12469=>1000,12470=>1000,12471=>1000,12472=>1000,
-12473=>1000,12474=>1000,12475=>1000,12476=>1000,12477=>1000,12478=>1000,12479=>1000,12480=>1000,12481=>1000,12482=>1000,
-12483=>1000,12484=>1000,12485=>1000,12486=>1000,12487=>1000,12488=>1000,12489=>1000,12490=>1000,12491=>1000,12492=>1000,
-12493=>1000,12494=>1000,12495=>1000,12496=>1000,12497=>1000,12498=>1000,12499=>1000,12500=>1000,12501=>1000,12502=>1000,
-12503=>1000,12504=>1000,12505=>1000,12506=>1000,12507=>1000,12508=>1000,12509=>1000,12510=>1000,12511=>1000,12512=>1000,
-12513=>1000,12514=>1000,12515=>1000,12516=>1000,12517=>1000,12518=>1000,12519=>1000,12520=>1000,12521=>1000,12522=>1000,
-12523=>1000,12524=>1000,12525=>1000,12526=>1000,12527=>1000,12528=>1000,12529=>1000,12530=>1000,12531=>1000,12532=>1000,
-12533=>1000,12534=>1000,12535=>1000,12536=>1000,12537=>1000,12538=>1000,12539=>1000,12540=>1000,12541=>1000,12542=>1000,
-59752=>196,59753=>6,59754=>0,63033=>556,63034=>556,63035=>556,63036=>556,63037=>556,63038=>556,63039=>556,
-63040=>556,63041=>556,63196=>556,64256=>556,64257=>500,64258=>500,64259=>778,64260=>778,64261=>556,64262=>778,
-64285=>200,64286=>305,64287=>400,64288=>587,64289=>890,64290=>848,64291=>872,64292=>800,64293=>850,64294=>873,
-64295=>797,64296=>937,64297=>584,64298=>776,64299=>776,64300=>776,64301=>776,64302=>640,64303=>640,64304=>640,
-64305=>591,64306=>466,64307=>598,64308=>622,64309=>262,64310=>351,64312=>608,64313=>270,64314=>526,64315=>550,
-64316=>600,64318=>621,64320=>378,64321=>607,64323=>575,64324=>568,64326=>590,64327=>606,64328=>547,64329=>776,
-64330=>687,64331=>212,64332=>591,64333=>550,64334=>568,64335=>640,65533=>788);
+1511=>606,1512=>547,1513=>776,1514=>687,1520=>424,1521=>412,1522=>400,1523=>184,1524=>344,1792=>600,
+1793=>201,1794=>201,1795=>201,1796=>201,1797=>500,1798=>500,1799=>500,1800=>370,1801=>370,1802=>574,
+1803=>574,1804=>645,1805=>574,1807=>0,1808=>452,1809=>452,1810=>574,1811=>645,1812=>645,1813=>509,
+1814=>509,1815=>682,1816=>585,1817=>404,1818=>627,1819=>718,1820=>718,1821=>484,1822=>682,1823=>600,
+1824=>660,1825=>682,1826=>538,1827=>718,1828=>718,1829=>718,1830=>574,1831=>574,1832=>638,1833=>585,
+1834=>509,1835=>682,1836=>682,1840=>0,1841=>0,1842=>0,1843=>0,1844=>0,1845=>0,1846=>0,
+1847=>0,1848=>0,1849=>0,1850=>0,1851=>0,1852=>0,1853=>0,1854=>0,1855=>0,1856=>0,
+1857=>0,1858=>0,1859=>0,1860=>0,1861=>0,1862=>0,1863=>0,1864=>0,1865=>0,1866=>0,
+2305=>6,2306=>0,2307=>305,2308=>717,2309=>717,2310=>829,2311=>463,2312=>463,2313=>581,2314=>803,
+2315=>920,2316=>639,2317=>430,2318=>430,2319=>430,2320=>430,2321=>856,2322=>828,2323=>837,2324=>856,
+2325=>749,2326=>779,2327=>522,2328=>587,2329=>650,2330=>619,2331=>641,2332=>703,2333=>691,2334=>677,
+2335=>568,2336=>529,2337=>611,2338=>536,2339=>607,2340=>564,2341=>659,2342=>500,2343=>591,2344=>521,
+2345=>568,2346=>477,2347=>728,2348=>490,2349=>577,2350=>517,2351=>554,2352=>433,2353=>433,2354=>656,
+2355=>660,2356=>660,2357=>490,2358=>645,2359=>477,2360=>666,2361=>484,2364=>6,2365=>442,2366=>211,
+2367=>211,2368=>211,2369=>6,2370=>3,2371=>6,2372=>0,2373=>6,2374=>84,2375=>6,2376=>6,
+2377=>224,2378=>234,2379=>211,2380=>211,2381=>6,2384=>839,2385=>15,2386=>0,2387=>9,2388=>9,
+2392=>750,2393=>779,2394=>522,2395=>703,2396=>613,2397=>536,2398=>728,2399=>554,2400=>899,2401=>625,
+2402=>625,2403=>625,2404=>674,2405=>674,2406=>575,2407=>575,2408=>575,2409=>575,2410=>575,2411=>575,
+2412=>575,2413=>575,2414=>575,2415=>575,2416=>365,2417=>387,2418=>717,2433=>0,2434=>300,2435=>264,
+2437=>594,2438=>790,2439=>469,2440=>513,2441=>520,2442=>549,2443=>594,2444=>481,2447=>580,2448=>627,
+2451=>540,2452=>613,2453=>570,2454=>467,2455=>471,2456=>428,2457=>483,2458=>408,2459=>509,2460=>591,
+2461=>563,2462=>771,2463=>381,2464=>404,2465=>522,2466=>408,2467=>450,2468=>543,2469=>477,2470=>418,
+2471=>433,2472=>445,2474=>499,2475=>584,2476=>377,2477=>555,2478=>448,2479=>423,2480=>390,2482=>498,
+2486=>498,2487=>425,2488=>495,2489=>440,2492=>22,2493=>440,2494=>193,2495=>189,2496=>180,2497=>0,
+2498=>0,2499=>0,2500=>0,2503=>252,2504=>243,2507=>889,2508=>865,2509=>0,2510=>356,2519=>219,
+2524=>523,2525=>408,2527=>428,2528=>594,2529=>481,2530=>0,2531=>0,2534=>500,2535=>437,2536=>479,
+2537=>530,2538=>497,2539=>500,2540=>482,2541=>503,2542=>517,2543=>481,2544=>377,2545=>377,2546=>429,
+2547=>383,2548=>429,2549=>478,2550=>545,2551=>158,2552=>365,2553=>280,2554=>357,2561=>0,2562=>0,
+2563=>351,2565=>860,2566=>1088,2567=>869,2568=>928,2569=>723,2570=>723,2575=>665,2576=>857,2579=>716,
+2580=>858,2581=>682,2582=>634,2583=>696,2584=>744,2585=>649,2586=>674,2587=>656,2588=>653,2589=>629,
+2590=>639,2591=>641,2592=>657,2593=>650,2594=>653,2595=>651,2596=>640,2597=>634,2598=>662,2599=>630,
+2600=>625,2602=>645,2603=>653,2604=>624,2605=>613,2606=>658,2607=>734,2608=>620,2610=>676,2611=>719,
+2613=>626,2614=>666,2616=>666,2617=>614,2620=>0,2622=>286,2623=>322,2624=>301,2625=>0,2626=>0,
+2631=>0,2632=>0,2635=>0,2636=>0,2637=>0,2649=>636,2650=>762,2651=>652,2652=>653,2654=>656,
+2662=>672,2663=>543,2664=>622,2665=>622,2666=>576,2667=>589,2668=>509,2669=>645,2670=>661,2671=>655,
+2672=>0,2673=>0,2674=>666,2675=>726,2676=>1217,2689=>22,2690=>23,2691=>0,2693=>775,2694=>979,
+2695=>588,2696=>563,2697=>525,2698=>724,2699=>942,2701=>775,2703=>775,2704=>775,2705=>979,2707=>979,
+2708=>979,2709=>610,2710=>706,2711=>623,2712=>610,2713=>601,2714=>614,2715=>642,2716=>684,2717=>634,
+2718=>644,2719=>509,2720=>541,2721=>539,2722=>524,2723=>657,2724=>547,2725=>616,2726=>494,2727=>601,
+2728=>627,2730=>524,2731=>620,2732=>691,2733=>687,2734=>468,2735=>590,2736=>509,2738=>571,2739=>687,
+2741=>526,2742=>620,2743=>575,2744=>620,2745=>549,2748=>53,2749=>415,2750=>241,2751=>186,2752=>217,
+2753=>32,2754=>21,2755=>38,2756=>27,2757=>45,2759=>41,2760=>46,2761=>207,2763=>190,2764=>182,
+2765=>16,2768=>962,2784=>949,2790=>479,2791=>502,2792=>484,2793=>471,2794=>501,2795=>527,2796=>462,
+2797=>524,2798=>454,2799=>495,2801=>752,2946=>479,2947=>893,2949=>1018,2950=>1170,2951=>916,2952=>676,
+2953=>836,2954=>1225,2958=>744,2959=>744,2960=>848,2962=>813,2963=>813,2964=>813,2965=>688,2969=>744,
+2970=>676,2972=>848,2974=>984,2975=>777,2979=>1338,2980=>664,2984=>561,2985=>1029,2986=>607,2990=>697,
+2991=>697,2992=>434,2993=>617,2994=>869,2995=>859,2996=>697,2997=>869,2999=>1145,3000=>1064,3001=>1316,
+3006=>424,3007=>125,3008=>596,3009=>539,3014=>596,3015=>650,3016=>973,3018=>1286,3019=>1286,3020=>1706,
+3021=>333,3031=>859,3050=>778,3051=>881,3052=>876,3053=>648,3057=>744,4256=>587,4257=>620,4258=>642,
+4259=>815,4260=>600,4261=>595,4262=>799,4263=>893,4264=>622,4265=>597,4266=>939,4267=>602,4268=>603,
+4269=>790,4270=>587,4271=>623,4272=>799,4273=>601,4274=>792,4275=>724,4276=>847,4277=>599,4278=>812,
+4279=>603,4280=>653,4281=>590,4282=>754,4283=>596,4284=>653,4285=>651,4286=>596,4287=>888,4288=>593,
+4304=>436,4305=>491,4306=>528,4307=>692,4308=>447,4309=>447,4310=>628,4311=>734,4312=>449,4313=>445,
+4314=>843,4315=>449,4316=>449,4317=>682,4318=>449,4319=>480,4320=>682,4321=>468,4322=>710,4323=>623,
+4324=>697,4325=>447,4326=>702,4327=>447,4328=>470,4329=>440,4330=>632,4331=>449,4332=>470,4333=>536,
+4334=>449,4335=>656,4336=>474,4337=>630,4338=>394,4339=>419,4340=>422,4341=>436,4345=>528,4347=>515,
+7680=>667,7681=>556,7682=>667,7683=>556,7684=>667,7685=>556,7686=>667,7687=>556,7688=>722,7689=>500,
+7690=>722,7691=>556,7692=>722,7693=>556,7694=>722,7695=>556,7696=>722,7697=>556,7698=>722,7699=>556,
+7700=>667,7701=>556,7702=>667,7703=>556,7704=>667,7705=>556,7706=>667,7707=>556,7708=>667,7709=>556,
+7710=>611,7711=>278,7712=>778,7713=>556,7714=>722,7715=>556,7716=>722,7717=>556,7718=>722,7719=>556,
+7720=>722,7721=>556,7722=>722,7723=>556,7724=>278,7725=>222,7726=>278,7727=>278,7728=>667,7729=>500,
+7730=>667,7731=>500,7732=>667,7733=>500,7734=>556,7735=>222,7736=>556,7737=>222,7738=>556,7739=>222,
+7740=>556,7741=>222,7742=>833,7743=>833,7744=>833,7745=>833,7746=>833,7747=>833,7748=>722,7749=>556,
+7750=>722,7751=>556,7752=>722,7753=>556,7754=>722,7755=>556,7756=>778,7757=>556,7758=>778,7759=>556,
+7760=>778,7761=>556,7762=>778,7763=>556,7764=>667,7765=>556,7766=>667,7767=>556,7768=>722,7769=>333,
+7770=>722,7771=>333,7772=>722,7773=>333,7774=>722,7775=>333,7776=>667,7777=>500,7778=>667,7779=>500,
+7780=>667,7781=>500,7782=>667,7783=>500,7784=>667,7785=>500,7786=>611,7787=>278,7788=>611,7789=>278,
+7790=>611,7791=>278,7792=>611,7793=>278,7794=>722,7795=>556,7796=>722,7797=>556,7798=>722,7799=>556,
+7800=>722,7801=>556,7802=>722,7803=>556,7804=>667,7805=>500,7806=>667,7807=>500,7808=>944,7809=>722,
+7810=>944,7811=>722,7812=>944,7813=>722,7814=>944,7815=>722,7816=>944,7817=>722,7818=>667,7819=>500,
+7820=>667,7821=>500,7822=>667,7823=>500,7824=>611,7825=>500,7826=>611,7827=>500,7828=>611,7829=>500,
+7830=>556,7831=>278,7832=>722,7833=>500,7834=>555,7835=>278,7840=>667,7841=>556,7842=>667,7843=>556,
+7844=>667,7845=>556,7846=>667,7847=>556,7848=>667,7849=>556,7850=>667,7851=>556,7852=>667,7853=>556,
+7854=>667,7855=>556,7856=>667,7857=>556,7858=>667,7859=>556,7860=>667,7861=>556,7862=>667,7863=>556,
+7864=>667,7865=>556,7866=>667,7867=>556,7868=>667,7869=>556,7870=>667,7871=>556,7872=>667,7873=>556,
+7874=>667,7875=>556,7876=>667,7877=>556,7878=>667,7879=>556,7880=>278,7881=>278,7882=>278,7883=>222,
+7884=>778,7885=>556,7886=>778,7887=>556,7888=>778,7889=>556,7890=>778,7891=>556,7892=>778,7893=>556,
+7894=>778,7895=>556,7896=>778,7897=>556,7898=>788,7899=>565,7900=>788,7901=>565,7902=>788,7903=>565,
+7904=>788,7905=>565,7906=>788,7907=>565,7908=>722,7909=>556,7910=>722,7911=>556,7912=>776,7913=>624,
+7914=>776,7915=>624,7916=>776,7917=>624,7918=>776,7919=>624,7920=>776,7921=>624,7922=>667,7923=>500,
+7924=>667,7925=>500,7926=>667,7927=>500,7928=>667,7929=>500,7936=>596,7937=>596,7938=>596,7939=>596,
+7940=>596,7941=>596,7942=>596,7943=>596,7944=>667,7945=>667,7946=>742,7947=>756,7948=>692,7949=>699,
+7950=>673,7951=>667,7952=>512,7953=>512,7954=>512,7955=>512,7956=>512,7957=>512,7960=>730,7961=>714,
+7962=>900,7963=>882,7964=>867,7965=>879,7968=>548,7969=>548,7970=>548,7971=>548,7972=>548,7973=>548,
+7974=>548,7975=>548,7976=>772,7977=>778,7978=>945,7979=>947,7980=>943,7981=>946,7982=>853,7983=>853,
+7984=>286,7985=>286,7986=>286,7987=>286,7988=>286,7989=>286,7990=>286,7991=>286,7992=>322,7993=>321,
+7994=>482,7995=>485,7996=>477,7997=>484,7998=>394,7999=>390,8000=>546,8001=>546,8002=>546,8003=>546,
+8004=>546,8005=>546,8008=>775,8009=>784,8010=>990,8011=>987,8012=>887,8013=>897,8016=>538,8017=>538,
+8018=>538,8019=>538,8020=>538,8021=>538,8022=>538,8023=>538,8025=>747,8027=>915,8029=>971,8031=>863,
+8032=>740,8033=>740,8034=>740,8035=>740,8036=>740,8037=>740,8038=>740,8039=>740,8040=>769,8041=>774,
+8042=>972,8043=>970,8044=>879,8045=>918,8046=>901,8047=>901,8048=>596,8049=>596,8050=>512,8051=>512,
+8052=>548,8053=>548,8054=>286,8055=>286,8056=>546,8057=>546,8058=>538,8059=>538,8060=>740,8061=>740,
+8064=>596,8065=>596,8066=>596,8067=>596,8068=>596,8069=>596,8070=>596,8071=>596,8072=>830,8073=>828,
+8074=>916,8075=>916,8076=>853,8077=>860,8078=>835,8079=>827,8080=>548,8081=>548,8082=>548,8083=>548,
+8084=>548,8085=>548,8086=>548,8087=>548,8088=>928,8089=>931,8090=>1104,8091=>1109,8092=>1099,8093=>1102,
+8094=>1009,8095=>1012,8096=>740,8097=>740,8098=>740,8099=>740,8100=>740,8101=>740,8102=>740,8103=>740,
+8104=>934,8105=>934,8106=>1130,8107=>1128,8108=>1045,8109=>1077,8110=>1062,8111=>1065,8112=>596,8113=>596,
+8114=>596,8115=>596,8116=>596,8118=>596,8119=>596,8120=>667,8121=>667,8122=>667,8123=>667,8124=>832,
+8125=>333,8126=>200,8127=>333,8128=>333,8129=>333,8130=>548,8131=>548,8132=>548,8134=>548,8135=>548,
+8136=>833,8137=>776,8138=>944,8139=>896,8140=>875,8141=>400,8142=>400,8143=>333,8144=>286,8145=>286,
+8146=>286,8147=>286,8150=>286,8151=>286,8152=>278,8153=>278,8154=>385,8155=>376,8157=>400,8158=>400,
+8159=>333,8160=>538,8161=>538,8162=>538,8163=>538,8164=>569,8165=>569,8166=>538,8167=>514,8168=>667,
+8169=>667,8170=>817,8171=>827,8172=>741,8173=>393,8174=>393,8175=>333,8178=>740,8179=>740,8180=>740,
+8182=>740,8183=>740,8184=>833,8185=>833,8186=>848,8187=>814,8188=>939,8189=>333,8190=>333,8192=>500,
+8193=>1000,8194=>500,8195=>1000,8196=>333,8197=>250,8198=>167,8199=>556,8200=>278,8201=>200,8202=>100,
+8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>333,8209=>333,8210=>556,8213=>1000,8214=>312,
+8215=>566,8219=>221,8223=>333,8227=>350,8228=>278,8229=>666,8231=>278,8232=>0,8233=>0,8234=>0,
+8235=>0,8236=>0,8237=>0,8238=>0,8239=>500,8241=>1360,8242=>278,8243=>469,8244=>680,8245=>278,
+8246=>469,8247=>680,8248=>376,8251=>622,8252=>556,8253=>556,8254=>556,8255=>658,8256=>658,8257=>438,
+8258=>840,8259=>400,8260=>167,8261=>334,8262=>334,8263=>1112,8264=>834,8265=>834,8266=>556,8267=>537,
+8268=>537,8269=>537,8270=>389,8271=>278,8272=>658,8273=>389,8274=>634,8275=>500,8276=>658,8277=>787,
+8278=>515,8279=>855,8280=>722,8281=>725,8282=>224,8283=>722,8284=>604,8285=>224,8286=>224,8287=>0,
+8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8304=>350,8305=>350,8308=>350,8309=>350,8310=>350,
+8311=>350,8312=>350,8313=>350,8314=>350,8315=>350,8316=>350,8317=>350,8318=>350,8319=>350,8320=>350,
+8321=>350,8322=>350,8323=>350,8324=>350,8325=>350,8326=>350,8327=>350,8328=>350,8329=>350,8330=>350,
+8331=>350,8332=>350,8333=>350,8334=>350,8336=>350,8337=>349,8338=>350,8339=>350,8340=>350,8353=>615,
+8354=>601,8355=>611,8356=>556,8357=>833,8358=>682,8359=>1317,8360=>1202,8361=>879,8362=>869,8363=>538,
+8365=>667,8366=>611,8368=>570,8369=>684,8370=>717,8371=>667,8372=>667,8373=>640,8400=>0,8401=>0,
+8402=>0,8403=>0,8406=>0,8407=>0,8411=>0,8412=>0,8413=>0,8414=>0,8415=>0,8416=>0,
+8417=>0,8421=>0,8422=>0,8423=>0,8424=>0,8425=>0,8426=>0,8427=>0,8428=>0,8429=>0,
+8430=>0,8431=>0,8432=>0,8448=>970,8449=>979,8451=>1017,8452=>556,8453=>876,8454=>922,8455=>667,
+8457=>919,8459=>969,8460=>615,8462=>556,8463=>572,8464=>809,8465=>606,8466=>874,8467=>417,8468=>747,
+8470=>934,8471=>737,8472=>600,8475=>850,8476=>699,8480=>1000,8481=>1230,8486=>778,8487=>778,8488=>512,
+8489=>286,8490=>667,8491=>667,8492=>908,8493=>623,8494=>556,8495=>444,8496=>562,8497=>895,8498=>588,
+8499=>1080,8501=>640,8502=>592,8503=>466,8504=>598,8505=>278,8506=>871,8507=>1230,8513=>778,8514=>556,
+8515=>556,8516=>667,8522=>516,8523=>655,8525=>936,8526=>482,8531=>869,8532=>869,8533=>869,8534=>869,
+8535=>869,8536=>869,8537=>869,8538=>869,8539=>869,8540=>869,8541=>869,8542=>869,8543=>869,8544=>278,
+8545=>556,8546=>834,8547=>945,8548=>667,8549=>945,8550=>1223,8551=>1501,8552=>945,8553=>667,8554=>945,
+8555=>1223,8556=>556,8557=>722,8558=>722,8559=>833,8560=>222,8561=>444,8562=>666,8563=>722,8564=>500,
+8565=>722,8566=>944,8567=>1166,8568=>722,8569=>500,8570=>722,8571=>944,8572=>222,8573=>500,8574=>556,
+8575=>833,8592=>987,8593=>603,8594=>987,8595=>603,8596=>1042,8597=>1042,8598=>800,8599=>800,8600=>800,
+8601=>800,8614=>987,8617=>987,8618=>987,8629=>658,8636=>987,8637=>987,8638=>380,8639=>393,8640=>987,
+8641=>987,8642=>380,8643=>379,8652=>987,8656=>987,8657=>603,8658=>987,8659=>603,8660=>1042,8661=>603,
+8669=>1092,8704=>667,8706=>556,8707=>667,8709=>823,8710=>711,8711=>711,8712=>584,8713=>584,8714=>584,
+8715=>584,8716=>584,8717=>713,8719=>823,8720=>823,8721=>804,8722=>584,8723=>584,8724=>584,8725=>510,
+8726=>392,8727=>584,8729=>584,8730=>542,8733=>713,8734=>713,8736=>768,8739=>200,8740=>288,8741=>312,
+8742=>340,8743=>603,8744=>603,8745=>768,8746=>768,8747=>556,8748=>796,8749=>956,8750=>556,8756=>863,
+8764=>584,8765=>584,8766=>573,8768=>244,8769=>584,8770=>584,8771=>584,8772=>584,8773=>584,8774=>584,
+8775=>584,8776=>584,8777=>584,8781=>554,8784=>584,8800=>584,8801=>584,8802=>584,8804=>584,8805=>584,
+8810=>955,8811=>955,8813=>554,8814=>584,8815=>584,8816=>584,8817=>584,8818=>584,8819=>584,8826=>584,
+8827=>584,8828=>584,8829=>584,8832=>584,8833=>584,8834=>584,8835=>584,8836=>584,8837=>584,8838=>584,
+8839=>584,8840=>584,8841=>584,8844=>768,8847=>636,8848=>636,8849=>636,8850=>636,8851=>636,8852=>636,
+8853=>768,8854=>768,8855=>768,8856=>768,8857=>768,8866=>658,8867=>658,8868=>658,8869=>658,8870=>600,
+8871=>608,8882=>636,8883=>636,8884=>636,8885=>636,8896=>744,8897=>744,8898=>764,8899=>764,8901=>278,
+8902=>471,8904=>710,8928=>584,8929=>584,8930=>636,8931=>636,8960=>823,8968=>456,8969=>455,8970=>455,
+8971=>456,8992=>556,8993=>556,8994=>658,8995=>658,9001=>329,9002=>329,9115=>384,9116=>384,9117=>384,
+9118=>384,9119=>384,9120=>384,9121=>388,9122=>388,9123=>388,9124=>388,9125=>388,9126=>388,9134=>556,
+9250=>556,9251=>500,9312=>788,9313=>788,9314=>788,9315=>788,9316=>788,9317=>788,9318=>788,9319=>788,
+9320=>788,9321=>788,9472=>1000,9473=>1000,9474=>1000,9475=>1000,9476=>1000,9477=>1000,9478=>1000,9479=>1000,
+9480=>1000,9481=>1000,9482=>1000,9483=>1000,9484=>1000,9485=>1000,9486=>1000,9487=>1000,9488=>1000,9489=>1000,
+9490=>1000,9491=>1000,9492=>1000,9493=>1000,9494=>1000,9495=>1000,9496=>1000,9497=>1000,9498=>1000,9499=>1000,
+9500=>1000,9501=>1000,9502=>1000,9503=>1000,9504=>1000,9505=>1000,9506=>1000,9507=>1000,9508=>1000,9509=>1000,
+9510=>1000,9511=>1000,9512=>1000,9513=>1000,9514=>1000,9515=>1000,9516=>1000,9517=>1000,9518=>1000,9519=>1000,
+9520=>1000,9521=>1000,9522=>1000,9523=>1000,9524=>1000,9525=>1000,9526=>1000,9527=>1000,9528=>1000,9529=>1000,
+9530=>1000,9531=>1000,9532=>1000,9533=>1000,9534=>1000,9535=>1000,9536=>1000,9537=>1000,9538=>1000,9539=>1000,
+9540=>1000,9541=>1000,9542=>1000,9543=>1000,9544=>1000,9545=>1000,9546=>1000,9547=>1000,9552=>1000,9553=>1000,
+9554=>1000,9555=>1000,9556=>1000,9557=>1000,9558=>1000,9559=>1000,9560=>1000,9561=>1000,9562=>1000,9563=>1000,
+9564=>1000,9565=>1000,9566=>1000,9567=>1000,9568=>1000,9569=>1000,9570=>1000,9571=>1000,9572=>1000,9573=>1000,
+9574=>1000,9575=>1000,9576=>1000,9577=>1000,9578=>1000,9579=>1000,9580=>1000,9600=>1000,9601=>1000,9602=>1000,
+9603=>1000,9604=>1000,9605=>1000,9606=>1000,9607=>1000,9608=>1000,9609=>1000,9610=>1000,9611=>1000,9612=>1000,
+9613=>1000,9614=>1000,9615=>1000,9616=>1000,9617=>1000,9618=>1000,9619=>1000,9620=>1000,9621=>1000,9622=>1000,
+9623=>1000,9624=>1000,9625=>1000,9626=>1000,9627=>1000,9628=>1000,9629=>1000,9630=>1000,9631=>1000,9632=>1000,
+9633=>1000,9635=>1000,9636=>1000,9637=>1000,9642=>1000,9644=>1000,9651=>892,9661=>892,9671=>788,9674=>489,
+9675=>791,9711=>882,9772=>929,9824=>626,9825=>694,9826=>595,9827=>776,9828=>626,9829=>694,9830=>595,
+9831=>776,9833=>333,9834=>555,9835=>722,9836=>722,9837=>415,9838=>377,9839=>402,10048=>1161,10752=>791,
+10753=>791,10754=>791,10755=>764,10756=>764,10761=>584,11799=>333,64256=>495,64257=>460,64258=>465,64259=>652,
+64260=>645,64261=>520,64275=>1004,64276=>1044,64277=>1042,64278=>1037,64279=>1256,64285=>200,64286=>305,64287=>400,
+64288=>587,64289=>890,64290=>848,64291=>872,64292=>800,64293=>850,64294=>873,64295=>797,64296=>937,64297=>584,
+64298=>776,64299=>776,64300=>776,64301=>776,64302=>640,64303=>640,64304=>640,64305=>591,64306=>466,64307=>598,
+64308=>622,64309=>262,64310=>351,64312=>608,64313=>270,64314=>526,64315=>550,64316=>600,64318=>621,64320=>378,
+64321=>607,64323=>575,64324=>568,64326=>590,64327=>606,64328=>547,64329=>776,64330=>687,64331=>212,64332=>591,
+64333=>550,64334=>568,64335=>640,65533=>788);
 $enc='';
 $diff='';
 $file='freesans.z';
 $ctg='freesans.ctg.z';
-$originalsize=830728;
+$originalsize=568896;
 ?>
\ No newline at end of file
index 897f14586c3e7a18f56ad64d512dda19d52b03da..2bcdd56f2e23a250344f9d3127eec8462c2e8726 100644 (file)
Binary files a/lib/tcpdf/fonts/freesans.z and b/lib/tcpdf/fonts/freesans.z differ
index 4c989e629e75963795e1f62fff27ff8de022f032..8c0510dc3a904066261f9f0f727ffa2c4c0fb6ac 100644 (file)
Binary files a/lib/tcpdf/fonts/freesansb.ctg.z and b/lib/tcpdf/fonts/freesansb.ctg.z differ
index ad55c0af46c2a78017cdb1589dc8959a8c067d54..ea53a175734eaf6537576625df685b8983b96084 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeSansBold';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>22,'Flags'=>32,'FontBBox'=>'[-628 -1175 1556 1639]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
+$desc=array('Ascent'=>1000,'Descent'=>-300,'CapHeight'=>22,'Flags'=>32,'FontBBox'=>'[-967 -1175 1556 1639]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
 $up=-189;
 $ut=69;
 $dw=600;
@@ -15,7 +15,7 @@ $cw=array(
 92=>278,93=>333,94=>584,95=>556,96=>333,97=>556,98=>611,99=>556,100=>611,101=>556,
 102=>333,103=>611,104=>611,105=>278,106=>278,107=>556,108=>278,109=>889,110=>611,111=>611,
 112=>611,113=>611,114=>389,115=>556,116=>333,117=>611,118=>556,119=>778,120=>556,121=>556,
-122=>500,123=>389,124=>280,125=>389,126=>584,8364=>556,8218=>278,402=>333,8222=>500,8230=>1000,
+122=>500,123=>389,124=>280,125=>389,126=>584,8364=>640,8218=>278,402=>333,8222=>500,8230=>1000,
 8224=>556,8225=>556,710=>333,8240=>1000,352=>667,8249=>333,338=>1000,381=>611,8216=>278,8217=>278,
 8220=>500,8221=>500,8226=>350,8211=>556,8212=>1000,732=>333,8482=>1000,353=>556,8250=>333,339=>944,
 382=>500,376=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>280,167=>556,
@@ -29,166 +29,208 @@ $cw=array(
 238=>278,239=>278,240=>611,241=>611,242=>611,243=>611,244=>611,245=>611,246=>611,247=>584,
 248=>611,249=>611,250=>611,251=>611,252=>611,253=>556,254=>611,255=>556,256=>722,257=>556,
 258=>722,259=>556,260=>722,261=>556,262=>722,263=>556,264=>722,265=>556,266=>722,267=>556,
-268=>722,269=>556,270=>722,271=>611,272=>722,273=>611,274=>667,275=>556,276=>667,277=>556,
+268=>722,269=>556,270=>722,271=>723,272=>722,273=>611,274=>667,275=>556,276=>667,277=>556,
 278=>667,279=>556,280=>667,281=>556,282=>667,283=>556,284=>778,285=>611,286=>778,287=>611,
 288=>778,289=>611,290=>778,291=>611,292=>722,293=>611,294=>722,295=>611,296=>278,297=>278,
 298=>278,299=>278,300=>278,301=>278,302=>278,303=>278,304=>278,305=>278,306=>808,307=>492,
-308=>556,309=>278,310=>722,311=>556,312=>573,313=>611,314=>278,315=>611,316=>278,317=>611,
-318=>278,319=>611,320=>556,321=>611,322=>278,323=>722,324=>611,325=>722,326=>611,327=>722,
+308=>556,309=>278,310=>722,311=>556,312=>559,313=>611,314=>278,315=>611,316=>278,317=>611,
+318=>362,319=>611,320=>556,321=>611,322=>278,323=>722,324=>611,325=>722,326=>611,327=>722,
 328=>611,329=>611,330=>722,331=>611,332=>778,333=>611,334=>778,335=>611,336=>778,337=>611,
 340=>722,341=>389,342=>722,343=>389,344=>722,345=>389,346=>667,347=>556,348=>667,349=>556,
-350=>667,351=>556,354=>611,355=>333,356=>611,357=>333,358=>611,359=>333,360=>722,361=>611,
+350=>667,351=>556,354=>611,355=>333,356=>611,357=>414,358=>611,359=>333,360=>722,361=>611,
 362=>722,363=>611,364=>722,365=>611,366=>722,367=>611,368=>722,369=>611,370=>722,371=>611,
 372=>944,373=>778,374=>667,375=>556,377=>611,378=>500,379=>611,380=>500,383=>333,384=>611,
-385=>963,386=>722,387=>611,388=>687,389=>611,390=>722,391=>752,392=>562,393=>722,394=>968,
-395=>722,396=>611,397=>620,398=>667,399=>778,400=>672,401=>611,403=>778,404=>667,405=>889,
-407=>395,408=>778,409=>556,411=>620,412=>944,413=>722,414=>611,415=>778,416=>778,417=>611,
-418=>1111,420=>914,421=>611,422=>722,423=>667,424=>556,425=>688,427=>333,428=>742,429=>333,
-430=>611,431=>722,432=>611,433=>780,435=>667,436=>620,437=>611,438=>500,439=>556,440=>556,
-446=>611,452=>1333,453=>1222,454=>1111,455=>1167,456=>889,457=>556,458=>1278,459=>1000,460=>889,
-461=>722,462=>556,463=>278,464=>278,465=>778,466=>611,467=>722,468=>611,469=>722,470=>611,
-471=>722,472=>611,473=>722,474=>611,475=>722,476=>611,477=>556,478=>722,479=>556,480=>722,
-481=>556,482=>1000,483=>889,484=>778,485=>611,486=>778,487=>611,488=>722,489=>556,490=>778,
-491=>611,492=>778,493=>611,494=>556,495=>556,496=>278,497=>1333,498=>1222,499=>1111,500=>778,
-501=>611,504=>722,505=>611,506=>722,507=>556,508=>1000,509=>889,510=>778,511=>611,512=>722,
-513=>556,514=>722,515=>556,516=>667,517=>556,518=>667,519=>556,520=>278,521=>278,522=>278,
-523=>278,524=>778,525=>611,526=>778,527=>611,528=>722,529=>389,530=>722,531=>389,532=>722,
-533=>611,534=>722,535=>611,536=>667,537=>556,538=>611,539=>333,542=>722,543=>611,550=>722,
-551=>556,552=>667,553=>556,554=>778,555=>611,556=>778,557=>611,558=>778,559=>611,560=>778,
-561=>611,562=>667,563=>556,592=>556,593=>667,594=>667,595=>611,596=>556,598=>611,599=>611,
-600=>556,601=>556,603=>570,604=>546,606=>570,607=>278,608=>611,609=>611,610=>556,611=>556,
-613=>619,614=>611,615=>611,616=>278,617=>344,618=>278,621=>298,622=>778,623=>889,624=>889,
-625=>889,626=>611,627=>611,628=>615,629=>611,632=>778,633=>389,634=>389,635=>389,636=>389,
-637=>389,638=>455,639=>455,640=>620,641=>620,642=>556,643=>333,644=>278,645=>333,647=>328,
-648=>333,649=>623,652=>556,653=>778,654=>556,656=>500,658=>556,660=>611,661=>611,662=>611,
-664=>611,665=>572,666=>570,668=>603,670=>556,671=>454,672=>611,673=>611,674=>611,711=>333,
-713=>333,714=>333,715=>333,728=>333,729=>333,730=>333,731=>333,733=>333,768=>0,769=>0,
-770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,778=>0,779=>0,780=>0,
-783=>0,785=>0,787=>0,788=>0,807=>0,808=>0,834=>0,836=>0,837=>0,884=>379,
-885=>379,890=>333,894=>333,900=>363,901=>333,902=>761,903=>474,904=>829,905=>856,906=>416,
-908=>778,910=>991,911=>867,912=>346,913=>722,914=>722,915=>642,916=>726,917=>667,918=>611,
-919=>722,920=>810,921=>278,922=>722,923=>744,924=>860,925=>714,926=>690,927=>778,928=>781,
-929=>698,931=>688,932=>688,933=>804,934=>777,935=>783,936=>805,937=>780,938=>278,939=>804,
-940=>660,941=>559,942=>560,943=>356,944=>575,945=>656,946=>576,947=>591,948=>620,949=>570,
-950=>522,951=>586,952=>586,953=>346,954=>576,955=>620,956=>667,957=>564,958=>530,959=>611,
-960=>721,961=>626,962=>595,963=>676,964=>592,965=>575,966=>801,967=>632,968=>722,969=>800,
-970=>346,971=>575,972=>599,973=>567,974=>800,981=>778,1024=>667,1025=>667,1026=>790,1027=>611,
-1028=>722,1029=>667,1030=>278,1031=>278,1032=>556,1033=>1110,1034=>1113,1035=>790,1036=>750,1037=>757,
-1038=>718,1039=>722,1040=>722,1041=>722,1042=>722,1043=>611,1044=>900,1045=>667,1046=>1093,1047=>672,
-1048=>757,1049=>757,1050=>750,1051=>729,1052=>833,1053=>722,1054=>778,1055=>753,1056=>667,1057=>722,
-1058=>611,1059=>718,1060=>892,1061=>667,1062=>816,1063=>685,1064=>1057,1065=>1183,1066=>928,1067=>949,
-1068=>687,1069=>722,1070=>1109,1071=>698,1072=>556,1073=>606,1074=>572,1075=>454,1076=>685,1077=>556,
-1078=>809,1079=>546,1080=>615,1081=>615,1082=>573,1083=>577,1084=>666,1085=>603,1086=>611,1087=>603,
-1088=>611,1089=>556,1090=>454,1091=>556,1092=>957,1093=>556,1094=>652,1095=>578,1096=>886,1097=>968,
-1098=>693,1099=>811,1100=>562,1101=>564,1102=>908,1103=>596,1104=>556,1105=>556,1106=>606,1107=>454,
-1108=>556,1109=>556,1110=>278,1111=>278,1112=>278,1113=>900,1114=>900,1115=>606,1116=>573,1117=>615,
-1118=>556,1119=>608,1164=>687,1165=>562,1166=>667,1167=>611,1168=>611,1169=>454,1170=>611,1171=>454,
-1172=>611,1173=>584,1174=>1093,1175=>809,1176=>672,1177=>546,1178=>750,1179=>573,1180=>722,1181=>573,
-1182=>722,1183=>573,1184=>912,1185=>704,1186=>753,1187=>608,1188=>985,1189=>787,1190=>1092,1191=>925,
-1194=>722,1195=>556,1196=>611,1197=>454,1198=>667,1199=>667,1200=>667,1201=>667,1202=>667,1203=>556,
-1204=>951,1205=>738,1206=>781,1207=>627,1208=>685,1209=>578,1210=>685,1211=>578,1212=>957,1213=>716,
-1214=>957,1215=>716,1216=>278,1217=>1093,1218=>809,1219=>750,1220=>573,1221=>729,1222=>577,1223=>722,
-1224=>608,1225=>722,1226=>603,1227=>685,1228=>578,1229=>833,1230=>666,1232=>722,1233=>556,1234=>722,
-1235=>556,1236=>1000,1237=>889,1238=>667,1239=>556,1240=>722,1241=>556,1242=>722,1243=>556,1244=>1093,
-1245=>809,1246=>672,1247=>546,1248=>672,1249=>546,1250=>757,1251=>615,1252=>757,1253=>615,1254=>778,
-1255=>611,1256=>778,1257=>611,1258=>778,1259=>611,1260=>722,1261=>564,1262=>718,1263=>556,1264=>718,
-1265=>556,1266=>718,1267=>556,1268=>685,1269=>578,1272=>949,1273=>811,1329=>722,1330=>722,1331=>778,
-1332=>722,1333=>722,1336=>722,1343=>722,1346=>722,1348=>722,1350=>722,1352=>722,1356=>722,1357=>722,
-1359=>667,1360=>722,1363=>892,1365=>778,1373=>333,1377=>889,1378=>611,1379=>611,1380=>611,1381=>611,
-1382=>611,1383=>448,1384=>611,1385=>667,1386=>722,1387=>611,1388=>333,1389=>833,1390=>667,1391=>611,
-1392=>611,1393=>611,1394=>611,1395=>611,1396=>611,1397=>278,1398=>611,1399=>556,1400=>611,1401=>390,
-1402=>889,1403=>556,1404=>611,1405=>611,1406=>611,1407=>944,1408=>611,1409=>611,1410=>389,1411=>944,
-1412=>611,1413=>611,1414=>778,1415=>611,1417=>333,1456=>82,1457=>347,1458=>341,1459=>341,1460=>82,
-1461=>211,1462=>211,1463=>200,1464=>200,1465=>82,1467=>341,1468=>82,1469=>82,1470=>516,1471=>200,
-1472=>297,1473=>1038,1474=>1038,1475=>333,1476=>82,1488=>714,1489=>651,1490=>557,1491=>638,1492=>682,
-1493=>297,1494=>443,1495=>682,1496=>670,1497=>284,1498=>590,1499=>595,1500=>667,1501=>683,1502=>704,
-1503=>297,1504=>429,1505=>670,1506=>653,1507=>661,1508=>660,1509=>616,1510=>671,1511=>672,1512=>600,
-1513=>840,1514=>756,1520=>554,1521=>550,1522=>542,1523=>238,1524=>474,1569=>844,1576=>923,1578=>922,
-1579=>922,1581=>649,1582=>704,1587=>1221,2404=>467,2405=>656,2561=>0,2562=>122,2563=>313,2565=>897,
-2566=>1157,2567=>930,2568=>966,2569=>762,2570=>762,2575=>729,2576=>904,2579=>773,2580=>903,2581=>726,
-2582=>672,2583=>741,2584=>790,2585=>702,2586=>723,2587=>693,2588=>688,2589=>673,2590=>683,2591=>686,
-2592=>711,2593=>680,2594=>693,2595=>729,2596=>691,2597=>694,2598=>699,2599=>666,2600=>669,2602=>683,
-2603=>690,2604=>660,2605=>659,2606=>692,2607=>772,2608=>673,2610=>731,2611=>814,2613=>663,2614=>704,
-2616=>702,2617=>650,2620=>0,2622=>307,2623=>304,2624=>306,2625=>7,2626=>7,2631=>7,2632=>8,
-2635=>6,2636=>5,2637=>8,2649=>684,2650=>813,2651=>715,2652=>695,2654=>709,2662=>697,2663=>630,
-2664=>696,2665=>690,2666=>646,2667=>636,2668=>571,2669=>682,2670=>718,2671=>730,2672=>9,2673=>162,
-2674=>722,2675=>760,2676=>1110,4256=>616,4257=>645,4258=>664,4259=>839,4260=>627,4261=>630,4262=>827,
-4263=>928,4264=>639,4265=>630,4266=>951,4267=>606,4268=>608,4269=>835,4270=>630,4271=>610,4272=>804,
-4273=>615,4274=>823,4275=>747,4276=>870,4277=>627,4278=>840,4279=>627,4280=>665,4281=>610,4282=>799,
-4283=>598,4284=>665,4285=>664,4286=>608,4287=>886,4288=>629,4304=>463,4305=>516,4306=>564,4307=>706,
-4308=>459,4309=>476,4310=>623,4311=>711,4312=>494,4313=>476,4314=>894,4315=>500,4316=>500,4317=>712,
-4318=>493,4319=>503,4320=>712,4321=>503,4322=>710,4323=>670,4324=>707,4325=>459,4326=>691,4327=>465,
-4328=>492,4329=>480,4330=>656,4331=>500,4332=>492,4333=>524,4334=>500,4335=>688,4336=>510,4337=>739,
-4338=>450,4339=>479,4340=>502,4341=>501,7680=>722,7681=>556,7682=>722,7683=>611,7684=>722,7685=>611,
-7686=>722,7687=>611,7688=>722,7689=>556,7690=>722,7691=>611,7692=>722,7693=>611,7694=>722,7695=>611,
-7696=>722,7697=>611,7698=>722,7699=>611,7700=>667,7701=>556,7702=>667,7703=>556,7704=>667,7705=>556,
-7706=>667,7707=>556,7708=>667,7709=>556,7710=>611,7711=>333,7712=>778,7713=>611,7714=>722,7715=>611,
-7716=>722,7717=>611,7718=>722,7719=>611,7720=>722,7721=>611,7722=>722,7723=>611,7724=>278,7725=>278,
-7726=>278,7727=>278,7728=>722,7729=>556,7730=>722,7731=>556,7732=>722,7733=>556,7734=>611,7735=>278,
-7736=>611,7737=>278,7738=>611,7739=>278,7740=>611,7741=>278,7742=>833,7743=>889,7744=>833,7745=>889,
-7746=>833,7747=>889,7748=>722,7749=>611,7750=>722,7751=>611,7752=>722,7753=>611,7754=>722,7755=>611,
-7756=>778,7757=>611,7758=>778,7759=>611,7760=>778,7761=>611,7762=>778,7763=>611,7764=>667,7765=>611,
-7766=>667,7767=>611,7768=>722,7769=>389,7770=>722,7771=>389,7772=>722,7773=>389,7774=>722,7775=>389,
-7776=>667,7777=>556,7778=>667,7779=>556,7780=>667,7781=>556,7782=>667,7783=>556,7784=>667,7785=>556,
-7786=>611,7787=>333,7788=>611,7789=>333,7790=>611,7791=>333,7792=>611,7793=>333,7794=>722,7795=>611,
-7796=>722,7797=>611,7798=>722,7799=>611,7800=>722,7801=>611,7802=>722,7803=>611,7804=>667,7805=>556,
-7806=>667,7807=>556,7808=>944,7809=>778,7810=>944,7811=>778,7812=>944,7813=>778,7814=>944,7815=>778,
-7816=>944,7817=>778,7818=>667,7819=>556,7820=>667,7821=>556,7822=>667,7823=>556,7824=>611,7825=>500,
-7826=>611,7827=>500,7828=>611,7829=>500,7830=>611,7831=>333,7832=>778,7833=>556,7835=>333,7840=>722,
-7841=>556,7844=>722,7845=>556,7846=>722,7847=>556,7850=>722,7851=>556,7852=>722,7853=>556,7854=>722,
-7855=>556,7856=>722,7857=>556,7860=>722,7861=>556,7862=>722,7863=>556,7864=>667,7865=>556,7868=>667,
-7869=>556,7870=>667,7871=>556,7872=>667,7873=>556,7876=>667,7877=>556,7878=>667,7879=>556,7882=>278,
-7883=>278,7884=>778,7885=>611,7888=>778,7889=>611,7890=>778,7891=>611,7894=>778,7895=>611,7896=>778,
-7897=>611,7898=>778,7899=>611,7900=>778,7901=>611,7904=>778,7905=>611,7906=>778,7907=>611,7908=>722,
-7909=>611,7912=>722,7913=>611,7914=>722,7915=>611,7918=>722,7919=>611,7920=>722,7921=>611,7922=>667,
-7923=>556,7924=>667,7925=>556,7928=>667,7929=>556,7936=>656,7937=>656,7938=>656,7939=>656,7940=>656,
-7941=>656,7942=>656,7943=>656,7944=>722,7945=>722,7946=>722,7947=>722,7948=>722,7949=>722,7950=>722,
-7951=>722,7952=>570,7953=>570,7954=>570,7955=>570,7956=>570,7957=>570,7960=>647,7961=>667,7962=>667,
-7963=>667,7964=>667,7965=>667,7968=>586,7969=>586,7970=>586,7971=>586,7972=>586,7973=>586,7974=>586,
-7975=>586,7976=>722,7977=>722,7978=>722,7979=>722,7980=>722,7981=>722,7982=>722,7983=>722,7984=>346,
-7985=>346,7986=>346,7987=>346,7988=>346,7989=>346,7990=>346,7991=>346,7992=>278,7993=>278,7994=>278,
-7995=>278,7996=>278,7997=>278,7998=>278,7999=>278,8000=>610,8001=>610,8002=>610,8003=>610,8004=>610,
-8005=>610,8008=>778,8009=>778,8010=>778,8011=>778,8012=>778,8013=>778,8016=>575,8017=>575,8018=>575,
-8019=>575,8020=>575,8021=>575,8022=>575,8023=>575,8025=>804,8027=>804,8029=>804,8031=>804,8032=>800,
-8033=>800,8034=>800,8035=>800,8036=>800,8037=>800,8038=>800,8039=>800,8040=>780,8041=>780,8042=>780,
-8043=>780,8044=>780,8045=>780,8046=>780,8047=>780,8048=>656,8049=>656,8050=>570,8051=>570,8052=>586,
-8053=>586,8054=>346,8055=>346,8056=>610,8057=>610,8058=>575,8059=>575,8060=>800,8061=>800,8064=>656,
-8065=>656,8066=>656,8067=>656,8068=>656,8069=>656,8070=>656,8071=>656,8072=>968,8073=>968,8074=>968,
-8075=>968,8076=>968,8077=>968,8078=>968,8079=>968,8080=>586,8081=>586,8082=>586,8083=>586,8084=>586,
-8085=>586,8086=>586,8087=>586,8088=>968,8089=>968,8090=>968,8091=>968,8092=>968,8093=>968,8094=>968,
-8095=>968,8096=>800,8097=>800,8098=>800,8099=>800,8100=>800,8101=>800,8102=>800,8103=>800,8104=>1026,
-8105=>1026,8106=>1026,8107=>1026,8108=>1026,8109=>1026,8110=>1026,8111=>1026,8112=>656,8113=>656,8114=>656,
-8115=>656,8116=>660,8118=>656,8119=>656,8120=>722,8121=>722,8122=>722,8123=>722,8124=>968,8125=>278,
-8126=>346,8127=>278,8128=>278,8129=>333,8130=>586,8131=>586,8132=>560,8134=>586,8135=>586,8136=>667,
-8137=>667,8138=>722,8139=>722,8140=>968,8141=>492,8142=>489,8143=>394,8144=>346,8145=>346,8146=>346,
-8147=>346,8150=>346,8151=>346,8152=>278,8153=>278,8154=>278,8155=>278,8157=>481,8158=>589,8159=>333,
-8160=>575,8161=>575,8162=>575,8163=>575,8164=>626,8165=>626,8166=>575,8167=>575,8168=>804,8169=>804,
-8170=>804,8171=>804,8172=>698,8173=>333,8174=>333,8175=>333,8178=>800,8179=>800,8180=>1125,8182=>800,
-8183=>800,8184=>778,8185=>778,8186=>780,8187=>780,8188=>1111,8189=>333,8190=>278,8203=>0,8204=>0,
-8205=>0,8208=>333,8209=>333,8210=>556,8213=>1000,8242=>238,8252=>666,8260=>167,8263=>1222,8264=>944,
-8265=>944,8304=>351,8305=>351,8308=>351,8309=>351,8310=>351,8311=>351,8312=>351,8313=>351,8314=>351,
-8315=>351,8316=>351,8317=>351,8318=>351,8319=>351,8320=>351,8321=>301,8322=>351,8323=>351,8324=>351,
-8325=>351,8326=>351,8327=>351,8328=>351,8329=>351,8330=>351,8331=>351,8332=>351,8333=>351,8334=>351,
-8362=>1049,8373=>591,8486=>780,8531=>869,8532=>869,8533=>869,8534=>869,8535=>869,8536=>869,8537=>869,
-8538=>869,8539=>869,8540=>869,8541=>869,8542=>869,8543=>869,8544=>278,8545=>556,8546=>834,8547=>945,
-8548=>667,8549=>945,8550=>1223,8551=>1501,8552=>945,8553=>667,8554=>945,8555=>1223,8556=>611,8557=>722,
-8558=>722,8559=>833,8560=>278,8561=>556,8562=>834,8563=>834,8564=>556,8565=>834,8566=>1112,8567=>1390,
-8568=>834,8569=>556,8570=>834,8571=>1112,8572=>278,8573=>556,8574=>611,8575=>889,8592=>964,8593=>964,
-8594=>964,8595=>964,8596=>964,8597=>964,8598=>964,8599=>964,8600=>964,8601=>964,8602=>964,8603=>964,
-8606=>964,8607=>964,8608=>964,8609=>964,8610=>964,8611=>964,8612=>964,8613=>964,8614=>964,8615=>964,
-8616=>964,8644=>964,8645=>964,8646=>964,8647=>964,8648=>964,8649=>964,8650=>964,8704=>722,8706=>556,
-8707=>667,8710=>729,8711=>729,8721=>711,8722=>584,8725=>869,8730=>542,8747=>556,8800=>548,8804=>584,
-8805=>584,9674=>489,9676=>688,9772=>1143,9833=>333,9834=>556,9835=>778,9836=>778,9837=>556,9838=>556,
-9839=>556,10048=>1453,10049=>1454,63033=>556,63034=>556,63035=>556,63036=>556,63037=>556,63038=>556,63039=>556,
-63040=>556,63041=>556,63166=>278,63171=>333,63196=>556,64257=>611,64258=>611,64285=>284,64286=>305,64287=>542,
-64288=>653,64289=>964,64290=>888,64291=>932,64292=>845,64293=>917,64294=>933,64295=>850,64296=>1006,64297=>584,
-64298=>840,64299=>840,64300=>840,64301=>840,64302=>714,64303=>714,64304=>714,64305=>651,64306=>557,64307=>638,
-64308=>682,64309=>367,64310=>443,64312=>670,64313=>354,64314=>590,64315=>595,64316=>667,64318=>704,64320=>429,
-64321=>670,64323=>661,64324=>660,64326=>671,64327=>672,64328=>600,64329=>840,64330=>756,64331=>297,64332=>651,
-64333=>595,64334=>660,64335=>714,65182=>636,65533=>788);
+385=>963,386=>704,387=>611,388=>687,389=>611,390=>722,391=>752,392=>562,393=>722,394=>968,
+395=>722,396=>611,397=>609,398=>667,399=>778,400=>672,401=>611,403=>778,404=>667,405=>889,
+406=>278,407=>395,408=>778,409=>556,410=>333,411=>620,412=>944,413=>722,414=>611,415=>778,
+416=>791,417=>653,418=>1111,419=>722,420=>914,421=>611,422=>647,423=>667,424=>556,425=>673,
+426=>441,427=>333,428=>742,429=>333,430=>611,431=>769,432=>656,433=>766,434=>722,435=>667,
+436=>620,437=>611,438=>500,439=>556,440=>556,441=>645,442=>569,443=>579,446=>611,447=>608,
+448=>260,449=>370,450=>584,451=>278,452=>1333,453=>1222,454=>1111,455=>1167,456=>889,457=>556,
+458=>1278,459=>1000,460=>889,461=>722,462=>556,463=>278,464=>278,465=>778,466=>611,467=>722,
+468=>611,469=>722,470=>611,471=>722,472=>611,473=>722,474=>611,475=>722,476=>611,477=>556,
+478=>722,479=>556,480=>722,481=>556,482=>1000,483=>889,484=>778,485=>611,486=>778,487=>611,
+488=>722,489=>556,490=>778,491=>611,492=>778,493=>611,494=>556,495=>556,496=>278,497=>1333,
+498=>1222,499=>1111,500=>778,501=>611,503=>630,504=>722,505=>611,506=>722,507=>556,508=>1000,
+509=>889,510=>778,511=>611,512=>722,513=>556,514=>722,515=>556,516=>667,517=>556,518=>667,
+519=>556,520=>278,521=>278,522=>278,523=>278,524=>778,525=>611,526=>778,527=>611,528=>722,
+529=>389,530=>722,531=>389,532=>722,533=>611,534=>722,535=>611,536=>667,537=>556,538=>611,
+539=>333,540=>569,541=>486,542=>722,543=>611,548=>645,549=>500,550=>722,551=>556,552=>667,
+553=>556,554=>778,555=>611,556=>778,557=>611,558=>778,559=>611,560=>778,561=>611,562=>667,
+563=>556,567=>278,592=>556,593=>667,594=>667,595=>611,596=>556,597=>600,598=>611,599=>611,
+600=>556,601=>556,602=>834,603=>541,604=>557,605=>820,606=>570,607=>278,608=>611,609=>611,
+610=>556,611=>556,612=>656,613=>619,614=>611,615=>611,616=>278,617=>344,618=>278,619=>473,
+620=>527,621=>298,622=>778,623=>889,624=>889,625=>889,626=>611,627=>611,628=>615,629=>606,
+630=>878,631=>822,632=>778,633=>389,634=>389,635=>389,636=>389,637=>389,638=>455,639=>455,
+640=>620,641=>620,642=>556,643=>333,644=>278,645=>333,646=>544,647=>328,648=>333,649=>623,
+650=>726,651=>639,652=>556,653=>778,654=>556,655=>556,656=>500,657=>571,658=>556,659=>642,
+660=>611,661=>611,662=>611,664=>611,665=>554,666=>570,667=>616,668=>603,669=>552,670=>556,
+671=>454,672=>611,673=>611,674=>611,684=>522,688=>377,689=>377,690=>202,691=>272,692=>272,
+693=>299,694=>395,695=>534,696=>364,697=>278,698=>454,699=>278,700=>278,701=>278,702=>333,
+703=>333,704=>333,705=>333,706=>333,707=>333,708=>333,709=>333,711=>333,712=>333,713=>333,
+714=>333,715=>333,716=>272,717=>333,718=>333,719=>333,720=>333,721=>333,722=>333,723=>333,
+724=>333,725=>333,726=>333,727=>333,728=>333,729=>333,730=>333,731=>333,733=>333,734=>333,
+735=>510,736=>372,737=>210,738=>363,739=>373,740=>334,741=>526,742=>526,743=>526,744=>526,
+745=>526,746=>519,747=>519,748=>333,749=>333,750=>333,751=>333,752=>333,753=>333,754=>333,
+755=>333,756=>333,757=>437,758=>437,759=>400,760=>333,761=>200,762=>200,763=>200,764=>200,
+765=>333,766=>333,767=>333,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,
+775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,
+785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,
+795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,
+805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,
+815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,
+825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,
+835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,
+845=>0,846=>0,847=>0,848=>0,849=>0,850=>0,851=>0,852=>0,853=>0,854=>0,
+855=>0,856=>0,857=>0,858=>0,859=>0,860=>0,861=>0,862=>0,863=>0,864=>0,
+865=>0,866=>0,867=>0,868=>0,869=>0,870=>0,871=>0,872=>0,873=>0,874=>0,
+875=>0,876=>0,877=>0,878=>0,879=>0,884=>379,885=>379,890=>333,894=>333,900=>363,
+901=>333,902=>761,903=>333,904=>864,905=>903,906=>454,908=>796,910=>991,911=>867,912=>315,
+913=>696,914=>640,915=>585,916=>726,917=>589,918=>581,919=>654,920=>783,921=>215,922=>648,
+923=>710,924=>829,925=>683,926=>645,927=>738,928=>726,929=>645,931=>673,932=>674,933=>771,
+934=>773,935=>780,936=>778,937=>766,938=>263,939=>771,940=>660,941=>541,942=>560,943=>356,
+944=>568,945=>632,946=>560,947=>591,948=>609,949=>541,950=>488,951=>608,952=>562,953=>315,
+954=>533,955=>603,956=>582,957=>586,958=>513,959=>611,960=>658,961=>595,962=>590,963=>657,
+964=>557,965=>568,966=>768,967=>632,968=>708,969=>778,970=>315,971=>568,972=>599,973=>568,
+974=>778,977=>580,978=>742,979=>857,980=>620,981=>706,982=>740,983=>556,1008=>556,1009=>566,
+1012=>778,1013=>328,1024=>670,1025=>670,1026=>800,1027=>611,1028=>714,1029=>667,1030=>314,1031=>300,
+1032=>576,1033=>1100,1034=>1114,1035=>806,1036=>740,1037=>757,1038=>711,1039=>754,1040=>707,1041=>704,
+1042=>704,1043=>611,1044=>900,1045=>670,1046=>1076,1047=>667,1048=>757,1049=>757,1050=>740,1051=>729,
+1052=>874,1053=>753,1054=>774,1055=>753,1056=>675,1057=>711,1058=>611,1059=>711,1060=>904,1061=>666,
+1062=>816,1063=>698,1064=>1057,1065=>1157,1066=>837,1067=>980,1068=>675,1069=>711,1070=>1093,1071=>708,
+1072=>552,1073=>593,1074=>554,1075=>423,1076=>685,1077=>573,1078=>782,1079=>557,1080=>615,1081=>615,
+1082=>559,1083=>568,1084=>666,1085=>603,1086=>606,1087=>603,1088=>612,1089=>556,1090=>440,1091=>549,
+1092=>964,1093=>539,1094=>652,1095=>554,1096=>886,1097=>968,1098=>699,1099=>778,1100=>568,1101=>556,
+1102=>848,1103=>586,1104=>573,1105=>573,1106=>606,1107=>423,1108=>556,1109=>555,1110=>260,1111=>278,
+1112=>270,1113=>898,1114=>898,1115=>626,1116=>559,1117=>615,1118=>549,1119=>604,1136=>832,1137=>748,
+1138=>774,1139=>606,1154=>449,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>0,1161=>0,
+1162=>832,1163=>675,1164=>678,1165=>611,1166=>675,1167=>612,1168=>636,1169=>440,1170=>622,1171=>449,
+1172=>647,1173=>574,1174=>1096,1175=>803,1176=>683,1177=>555,1178=>759,1179=>573,1180=>730,1181=>554,
+1182=>737,1183=>555,1184=>892,1185=>680,1186=>825,1187=>653,1188=>999,1189=>763,1190=>1105,1191=>925,
+1192=>714,1193=>558,1194=>722,1195=>558,1196=>614,1197=>438,1198=>643,1199=>573,1200=>643,1201=>603,
+1202=>670,1203=>548,1204=>952,1205=>738,1206=>781,1207=>615,1208=>698,1209=>588,1210=>687,1211=>588,
+1212=>993,1213=>761,1214=>965,1215=>759,1216=>314,1217=>1076,1218=>809,1219=>700,1220=>543,1221=>793,
+1222=>634,1223=>753,1224=>603,1225=>819,1226=>663,1227=>706,1228=>588,1229=>935,1230=>720,1231=>314,
+1232=>707,1233=>564,1234=>707,1235=>566,1236=>1004,1237=>898,1238=>670,1239=>573,1240=>722,1241=>573,
+1242=>722,1243=>573,1244=>1076,1245=>782,1246=>667,1247=>557,1248=>556,1249=>552,1250=>757,1251=>615,
+1252=>757,1253=>615,1254=>778,1255=>611,1256=>774,1257=>606,1258=>774,1259=>606,1260=>711,1261=>556,
+1262=>700,1263=>544,1264=>701,1265=>539,1266=>700,1267=>537,1268=>698,1269=>554,1270=>611,1271=>432,
+1272=>980,1273=>778,1296=>672,1297=>546,1298=>729,1299=>577,1306=>778,1307=>612,1308=>944,1309=>776,
+1310=>730,1311=>554,1329=>730,1330=>713,1331=>765,1332=>752,1333=>708,1334=>801,1335=>496,1336=>713,
+1337=>855,1338=>686,1339=>727,1340=>420,1341=>897,1342=>841,1343=>708,1344=>660,1345=>666,1346=>747,
+1347=>698,1348=>757,1349=>630,1350=>747,1351=>651,1352=>743,1353=>657,1354=>728,1355=>799,1356=>752,
+1357=>743,1358=>768,1359=>691,1360=>713,1361=>640,1362=>425,1363=>818,1364=>672,1365=>805,1366=>754,
+1369=>333,1370=>222,1371=>250,1372=>333,1373=>333,1374=>352,1375=>362,1377=>873,1378=>613,1379=>634,
+1380=>636,1381=>593,1382=>639,1383=>417,1384=>613,1385=>658,1386=>711,1387=>609,1388=>318,1389=>836,
+1390=>670,1391=>613,1392=>607,1393=>611,1394=>626,1395=>619,1396=>618,1397=>324,1398=>613,1399=>540,
+1400=>591,1401=>392,1402=>873,1403=>577,1404=>603,1405=>600,1406=>626,1407=>951,1408=>613,1409=>612,
+1410=>348,1411=>951,1412=>616,1413=>606,1414=>763,1415=>626,1417=>333,1418=>398,1456=>0,1457=>0,
+1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1467=>0,1468=>0,
+1469=>0,1470=>516,1471=>0,1472=>297,1473=>0,1474=>0,1475=>333,1476=>0,1488=>714,1489=>651,
+1490=>557,1491=>638,1492=>682,1493=>297,1494=>443,1495=>682,1496=>670,1497=>284,1498=>590,1499=>595,
+1500=>667,1501=>683,1502=>704,1503=>297,1504=>429,1505=>670,1506=>653,1507=>661,1508=>660,1509=>616,
+1510=>671,1511=>672,1512=>600,1513=>840,1514=>756,1520=>554,1521=>550,1522=>542,1523=>238,1524=>474,
+2561=>0,2562=>122,2563=>313,2565=>897,2566=>1157,2567=>930,2568=>966,2569=>762,2570=>762,2575=>729,
+2576=>904,2579=>773,2580=>903,2581=>726,2582=>672,2583=>741,2584=>790,2585=>702,2586=>723,2587=>693,
+2588=>688,2589=>673,2590=>683,2591=>686,2592=>711,2593=>680,2594=>693,2595=>729,2596=>691,2597=>694,
+2598=>699,2599=>666,2600=>669,2602=>683,2603=>690,2604=>660,2605=>659,2606=>692,2607=>772,2608=>673,
+2610=>731,2611=>814,2613=>663,2614=>704,2616=>702,2617=>650,2620=>0,2622=>307,2623=>304,2624=>306,
+2625=>7,2626=>7,2631=>7,2632=>8,2635=>6,2636=>5,2637=>8,2649=>684,2650=>813,2651=>715,
+2652=>695,2654=>709,2662=>697,2663=>630,2664=>696,2665=>690,2666=>646,2667=>636,2668=>571,2669=>682,
+2670=>718,2671=>730,2672=>9,2673=>162,2674=>722,2675=>760,2676=>1110,4256=>616,4257=>645,4258=>664,
+4259=>839,4260=>627,4261=>630,4262=>827,4263=>928,4264=>639,4265=>630,4266=>951,4267=>606,4268=>608,
+4269=>835,4270=>630,4271=>610,4272=>804,4273=>615,4274=>823,4275=>747,4276=>870,4277=>627,4278=>840,
+4279=>627,4280=>665,4281=>610,4282=>799,4283=>598,4284=>665,4285=>664,4286=>608,4287=>886,4288=>629,
+4304=>463,4305=>516,4306=>564,4307=>706,4308=>459,4309=>476,4310=>623,4311=>711,4312=>494,4313=>476,
+4314=>894,4315=>500,4316=>500,4317=>712,4318=>493,4319=>503,4320=>712,4321=>503,4322=>710,4323=>670,
+4324=>707,4325=>459,4326=>691,4327=>465,4328=>492,4329=>480,4330=>656,4331=>500,4332=>492,4333=>524,
+4334=>500,4335=>688,4336=>510,4337=>739,4338=>450,4339=>479,4340=>502,4341=>501,4345=>564,4347=>515,
+7680=>722,7681=>556,7682=>722,7683=>611,7684=>722,7685=>611,7686=>722,7687=>611,7688=>722,7689=>556,
+7690=>722,7691=>611,7692=>722,7693=>611,7694=>722,7695=>611,7696=>722,7697=>611,7698=>722,7699=>611,
+7700=>667,7701=>556,7702=>667,7703=>556,7704=>667,7705=>556,7706=>667,7707=>556,7708=>667,7709=>556,
+7710=>611,7711=>333,7712=>778,7713=>611,7714=>722,7715=>611,7716=>722,7717=>611,7718=>722,7719=>611,
+7720=>722,7721=>611,7722=>722,7723=>611,7724=>278,7725=>278,7726=>278,7727=>278,7728=>722,7729=>556,
+7730=>722,7731=>556,7732=>722,7733=>556,7734=>611,7735=>278,7736=>611,7737=>278,7738=>611,7739=>278,
+7740=>611,7741=>278,7742=>833,7743=>889,7744=>833,7745=>889,7746=>833,7747=>889,7748=>722,7749=>611,
+7750=>722,7751=>611,7752=>722,7753=>611,7754=>722,7755=>611,7756=>778,7757=>611,7758=>778,7759=>611,
+7760=>778,7761=>611,7762=>778,7763=>611,7764=>667,7765=>611,7766=>667,7767=>611,7768=>722,7769=>389,
+7770=>722,7771=>389,7772=>722,7773=>389,7774=>722,7775=>389,7776=>667,7777=>556,7778=>667,7779=>556,
+7780=>667,7781=>556,7782=>667,7783=>556,7784=>667,7785=>556,7786=>611,7787=>333,7788=>611,7789=>333,
+7790=>611,7791=>333,7792=>611,7793=>333,7794=>722,7795=>611,7796=>722,7797=>611,7798=>722,7799=>611,
+7800=>722,7801=>611,7802=>722,7803=>611,7804=>667,7805=>556,7806=>667,7807=>556,7808=>944,7809=>778,
+7810=>944,7811=>778,7812=>944,7813=>778,7814=>944,7815=>778,7816=>944,7817=>778,7818=>667,7819=>556,
+7820=>667,7821=>556,7822=>667,7823=>556,7824=>611,7825=>500,7826=>611,7827=>500,7828=>611,7829=>500,
+7830=>611,7831=>333,7832=>778,7833=>556,7834=>555,7835=>333,7840=>722,7841=>556,7842=>722,7843=>556,
+7844=>722,7845=>556,7846=>722,7847=>556,7848=>667,7849=>556,7850=>722,7851=>556,7852=>722,7853=>556,
+7854=>722,7855=>556,7856=>722,7857=>556,7858=>722,7859=>556,7860=>722,7861=>556,7862=>722,7863=>556,
+7864=>667,7865=>556,7866=>667,7867=>556,7868=>667,7869=>556,7870=>667,7871=>556,7872=>667,7873=>556,
+7874=>667,7875=>556,7876=>667,7877=>556,7878=>667,7879=>556,7880=>278,7881=>278,7882=>278,7883=>278,
+7884=>778,7885=>611,7886=>778,7887=>611,7888=>778,7889=>611,7890=>778,7891=>611,7892=>778,7893=>611,
+7894=>778,7895=>611,7896=>778,7897=>611,7898=>791,7899=>653,7900=>791,7901=>653,7902=>791,7903=>653,
+7904=>791,7905=>653,7906=>791,7907=>653,7908=>722,7909=>611,7910=>722,7911=>611,7912=>769,7913=>656,
+7914=>769,7915=>656,7916=>769,7917=>656,7918=>769,7919=>656,7920=>769,7921=>656,7922=>667,7923=>556,
+7924=>667,7925=>556,7926=>667,7927=>556,7928=>667,7929=>556,7936=>632,7937=>632,7938=>632,7939=>632,
+7940=>632,7941=>632,7942=>632,7943=>632,7944=>696,7945=>696,7946=>865,7947=>849,7948=>796,7949=>807,
+7950=>730,7951=>750,7952=>541,7953=>541,7954=>541,7955=>541,7956=>541,7957=>541,7960=>758,7961=>760,
+7962=>957,7963=>943,7964=>939,7965=>945,7968=>608,7969=>608,7970=>608,7971=>608,7972=>608,7973=>608,
+7974=>608,7975=>608,7976=>823,7977=>831,7978=>1026,7979=>1017,7980=>1002,7981=>1024,7982=>908,7983=>909,
+7984=>315,7985=>315,7986=>373,7987=>375,7988=>378,7989=>374,7990=>370,7991=>384,7992=>378,7993=>383,
+7994=>596,7995=>579,7996=>572,7997=>576,7998=>474,7999=>459,8000=>610,8001=>610,8002=>610,8003=>610,
+8004=>610,8005=>610,8008=>800,8009=>871,8010=>1084,8011=>1079,8012=>975,8013=>973,8016=>568,8017=>568,
+8018=>568,8019=>568,8020=>568,8021=>568,8022=>568,8023=>568,8025=>906,8027=>1080,8029=>1115,8031=>977,
+8032=>778,8033=>778,8034=>778,8035=>778,8036=>778,8037=>778,8038=>778,8039=>778,8040=>837,8041=>860,
+8042=>1062,8043=>1072,8044=>962,8045=>985,8046=>922,8047=>959,8048=>632,8049=>632,8050=>541,8051=>541,
+8052=>608,8053=>608,8054=>315,8055=>315,8056=>610,8057=>610,8058=>568,8059=>568,8060=>778,8061=>778,
+8064=>632,8065=>632,8066=>632,8067=>632,8068=>632,8069=>632,8070=>632,8071=>632,8072=>909,8073=>906,
+8074=>1061,8075=>1035,8076=>984,8077=>994,8078=>910,8079=>916,8080=>608,8081=>608,8082=>608,8083=>608,
+8084=>608,8085=>608,8086=>608,8087=>608,8088=>1006,8089=>1015,8090=>1204,8091=>1207,8092=>1188,8093=>1209,
+8094=>1096,8095=>1105,8096=>778,8097=>778,8098=>778,8099=>778,8100=>778,8101=>778,8102=>778,8103=>778,
+8104=>1026,8105=>1048,8106=>1251,8107=>1260,8108=>1150,8109=>1177,8110=>1106,8111=>1142,8112=>632,8113=>632,
+8114=>632,8115=>632,8116=>660,8118=>632,8119=>632,8120=>696,8121=>696,8122=>696,8123=>696,8124=>907,
+8125=>278,8126=>346,8127=>278,8128=>278,8129=>333,8130=>608,8131=>608,8132=>560,8134=>608,8135=>608,
+8136=>776,8137=>793,8138=>847,8139=>854,8140=>848,8141=>492,8142=>489,8143=>394,8144=>335,8145=>354,
+8146=>367,8147=>368,8150=>353,8151=>366,8152=>240,8153=>259,8154=>418,8155=>416,8157=>481,8158=>589,
+8159=>333,8160=>568,8161=>568,8162=>568,8163=>568,8164=>595,8165=>595,8166=>568,8167=>568,8168=>771,
+8169=>771,8170=>951,8171=>982,8172=>806,8173=>333,8174=>333,8175=>333,8178=>778,8179=>778,8180=>778,
+8182=>778,8183=>778,8184=>909,8185=>809,8186=>897,8187=>825,8188=>978,8189=>333,8190=>278,8192=>500,
+8193=>1000,8194=>500,8195=>1000,8196=>333,8197=>250,8198=>167,8199=>556,8200=>278,8201=>200,8202=>100,
+8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>333,8209=>333,8210=>556,8213=>1000,8214=>437,
+8215=>556,8219=>278,8223=>500,8227=>350,8228=>278,8229=>666,8231=>278,8232=>0,8233=>0,8234=>0,
+8235=>0,8236=>0,8237=>0,8238=>0,8239=>500,8241=>1367,8242=>238,8243=>426,8244=>614,8245=>238,
+8246=>379,8247=>571,8248=>450,8251=>622,8252=>666,8253=>614,8254=>556,8255=>658,8256=>658,8257=>438,
+8258=>840,8259=>400,8260=>167,8261=>334,8262=>334,8263=>1222,8264=>944,8265=>944,8266=>556,8267=>537,
+8268=>537,8269=>537,8270=>389,8271=>333,8272=>658,8273=>389,8274=>634,8275=>568,8276=>658,8277=>793,
+8278=>515,8279=>855,8280=>722,8281=>725,8282=>224,8283=>722,8284=>604,8285=>224,8286=>224,8287=>0,
+8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8304=>351,8305=>351,8308=>351,8309=>351,8310=>351,
+8311=>351,8312=>351,8313=>351,8314=>351,8315=>351,8316=>351,8317=>351,8318=>351,8319=>351,8320=>351,
+8321=>301,8322=>351,8323=>351,8324=>351,8325=>351,8326=>351,8327=>351,8328=>351,8329=>351,8330=>350,
+8331=>350,8332=>350,8333=>350,8334=>350,8355=>611,8356=>591,8357=>889,8358=>727,8360=>1265,8362=>1049,
+8363=>580,8368=>605,8373=>591,8400=>0,8401=>0,8402=>0,8403=>0,8406=>0,8407=>0,8411=>0,
+8412=>0,8413=>0,8414=>0,8415=>0,8416=>0,8417=>0,8421=>0,8422=>0,8423=>0,8424=>0,
+8425=>0,8426=>0,8427=>0,8428=>0,8429=>0,8430=>0,8431=>0,8432=>0,8448=>985,8449=>1007,
+8451=>1034,8453=>981,8454=>1042,8455=>667,8457=>919,8465=>606,8468=>881,8470=>979,8471=>784,8476=>699,
+8480=>1000,8481=>1230,8486=>766,8487=>778,8489=>315,8490=>741,8491=>729,8494=>556,8498=>588,8501=>714,
+8502=>651,8503=>557,8504=>638,8506=>871,8507=>1230,8513=>778,8514=>611,8515=>611,8516=>667,8523=>669,
+8525=>1072,8526=>482,8531=>869,8532=>869,8533=>869,8534=>869,8535=>869,8536=>869,8537=>869,8538=>869,
+8539=>869,8540=>869,8541=>869,8542=>869,8543=>869,8544=>278,8545=>556,8546=>834,8547=>945,8548=>667,
+8549=>945,8550=>1223,8551=>1501,8552=>945,8553=>667,8554=>945,8555=>1223,8556=>611,8557=>722,8558=>722,
+8559=>833,8560=>278,8561=>556,8562=>834,8563=>834,8564=>556,8565=>834,8566=>1112,8567=>1390,8568=>834,
+8569=>556,8570=>834,8571=>1112,8572=>278,8573=>556,8574=>611,8575=>889,8592=>964,8593=>964,8594=>964,
+8595=>964,8596=>964,8597=>964,8598=>964,8599=>964,8600=>964,8601=>964,8602=>964,8603=>964,8606=>964,
+8607=>964,8608=>964,8609=>964,8610=>964,8611=>964,8612=>964,8613=>964,8614=>964,8615=>964,8616=>964,
+8644=>964,8645=>964,8646=>964,8647=>964,8648=>964,8649=>964,8650=>964,8704=>722,8706=>556,8707=>667,
+8710=>729,8711=>729,8721=>856,8722=>584,8725=>869,8730=>594,8747=>608,8800=>548,8804=>584,8805=>584,
+9251=>500,9674=>541,9772=>923,9824=>626,9825=>694,9826=>595,9827=>776,9828=>626,9829=>694,9830=>595,
+9831=>776,9833=>333,9834=>556,9835=>778,9836=>778,9837=>556,9838=>556,9839=>556,10048=>1453,11799=>333,
+64256=>607,64257=>576,64258=>603,64259=>849,64260=>849,64275=>1243,64276=>1226,64277=>1233,64278=>1238,64279=>1448,
+64285=>284,64286=>305,64287=>542,64288=>653,64289=>964,64290=>888,64291=>932,64292=>845,64293=>917,64294=>933,
+64295=>850,64296=>1006,64297=>584,64298=>840,64299=>840,64300=>840,64301=>840,64302=>714,64303=>714,64304=>714,
+64305=>651,64306=>557,64307=>638,64308=>682,64309=>348,64310=>443,64312=>670,64313=>354,64314=>590,64315=>595,
+64316=>667,64318=>704,64320=>429,64321=>670,64323=>661,64324=>660,64326=>671,64327=>672,64328=>600,64329=>840,
+64330=>756,64331=>212,64332=>591,64333=>550,64334=>568,64335=>714,65533=>788);
 $enc='';
 $diff='';
 $file='freesansb.z';
 $ctg='freesansb.ctg.z';
-$originalsize=150016;
+$originalsize=283180;
 ?>
\ No newline at end of file
index 8c421a2fbfd7d46b0d421ab570bce4c5fc8708c0..800fed290e777ffee471cab7ddb974c61e80139c 100644 (file)
Binary files a/lib/tcpdf/fonts/freesansb.z and b/lib/tcpdf/fonts/freesansb.z differ
index 02c26fa3754e71f93a9fde0940a4d3eb35baafc2..9e8a3c725a76de4142b97e558af8132f3f0b2e8e 100644 (file)
Binary files a/lib/tcpdf/fonts/freesansbi.ctg.z and b/lib/tcpdf/fonts/freesansbi.ctg.z differ
index d3099eb9948b32a5f176eed1dc7698c09745a1a2..783eb3cd394e51c0e550bcc92ed932992a44f313 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeSansBoldOblique';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>22,'Flags'=>96,'FontBBox'=>'[-380 -1175 1591 1639]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>600);
+$desc=array('Ascent'=>1000,'Descent'=>-300,'CapHeight'=>22,'Flags'=>96,'FontBBox'=>'[-769 -1175 1591 1639]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>600);
 $up=-145;
 $ut=69;
 $dw=600;
@@ -15,12 +15,12 @@ $cw=array(
 92=>278,93=>333,94=>584,95=>556,96=>333,97=>556,98=>611,99=>556,100=>611,101=>556,
 102=>333,103=>611,104=>611,105=>278,106=>278,107=>556,108=>278,109=>889,110=>611,111=>611,
 112=>611,113=>611,114=>389,115=>556,116=>333,117=>611,118=>556,119=>778,120=>556,121=>556,
-122=>500,123=>389,124=>280,125=>389,126=>584,8364=>556,8218=>278,402=>556,8222=>500,8230=>1000,
+122=>500,123=>389,124=>280,125=>389,126=>584,8364=>640,8218=>278,402=>556,8222=>500,8230=>1000,
 8224=>556,8225=>556,710=>333,8240=>1000,352=>667,8249=>333,338=>1000,381=>611,8216=>278,8217=>278,
 8220=>500,8221=>500,8226=>350,8211=>556,8212=>1000,732=>333,8482=>1000,353=>556,8250=>333,339=>944,
 382=>500,376=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>280,167=>556,
 168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>606,177=>584,
-178=>350,179=>350,180=>333,181=>611,182=>556,183=>278,184=>333,185=>248,186=>365,187=>556,
+178=>350,179=>350,180=>333,181=>667,182=>556,183=>278,184=>333,185=>248,186=>365,187=>556,
 188=>869,189=>869,190=>869,191=>611,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,
 198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,
 208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,
@@ -32,121 +32,194 @@ $cw=array(
 268=>722,269=>556,270=>722,271=>722,272=>722,273=>611,274=>667,275=>556,276=>667,277=>556,
 278=>667,279=>556,280=>667,281=>556,282=>667,283=>556,284=>778,285=>611,286=>778,287=>611,
 288=>778,289=>611,290=>778,291=>611,292=>722,293=>611,294=>722,295=>611,296=>278,297=>278,
-298=>278,299=>278,300=>278,301=>278,302=>278,303=>268,304=>278,305=>278,306=>278,307=>278,
+298=>278,299=>278,300=>278,301=>278,302=>278,303=>268,304=>278,305=>278,306=>796,307=>487,
 308=>556,309=>278,310=>722,311=>556,312=>529,313=>611,314=>278,315=>611,316=>278,317=>611,
 318=>384,319=>611,320=>556,321=>611,322=>278,323=>722,324=>611,325=>722,326=>611,327=>722,
 328=>611,329=>611,330=>722,331=>611,332=>778,333=>611,334=>778,335=>611,336=>778,337=>611,
 340=>722,341=>389,342=>722,343=>389,344=>722,345=>389,346=>667,347=>556,348=>667,349=>556,
-350=>667,351=>556,354=>611,355=>333,356=>611,357=>404,358=>611,359=>333,360=>722,361=>611,
+350=>667,351=>556,354=>611,355=>333,356=>611,357=>404,358=>611,359=>404,360=>722,361=>611,
 362=>722,363=>611,364=>722,365=>611,366=>722,367=>611,368=>722,369=>611,370=>722,371=>611,
 372=>944,373=>778,374=>667,375=>556,377=>611,378=>500,379=>611,380=>500,383=>333,384=>611,
 385=>963,386=>722,387=>611,388=>687,389=>611,390=>722,391=>752,392=>562,393=>722,394=>968,
-395=>722,396=>611,398=>667,399=>778,400=>672,401=>611,403=>778,405=>889,407=>395,408=>778,
-409=>556,412=>889,413=>722,414=>611,415=>778,416=>778,417=>611,418=>1111,420=>914,421=>611,
-423=>667,424=>556,425=>688,427=>333,428=>742,429=>333,430=>611,431=>722,432=>611,433=>780,
-435=>667,436=>706,439=>556,440=>556,452=>1333,453=>1222,454=>1111,455=>1167,456=>889,457=>556,
+395=>722,396=>611,397=>609,398=>667,399=>778,400=>672,401=>611,403=>778,404=>667,405=>889,
+406=>278,407=>395,408=>778,409=>556,410=>333,411=>620,412=>889,413=>722,414=>611,415=>778,
+416=>778,417=>611,418=>1111,419=>722,420=>914,421=>611,422=>647,423=>667,424=>556,425=>688,
+426=>441,427=>333,428=>742,429=>333,430=>611,431=>722,432=>611,433=>780,434=>722,435=>667,
+436=>706,437=>611,438=>500,439=>556,440=>556,441=>645,442=>569,443=>579,446=>611,447=>608,
+448=>260,449=>370,450=>584,451=>278,452=>1333,453=>1222,454=>1111,455=>1167,456=>889,457=>556,
 458=>1278,459=>1000,460=>889,461=>722,462=>556,463=>278,464=>278,465=>778,466=>611,467=>722,
-468=>611,477=>556,482=>1000,483=>889,486=>778,487=>611,488=>722,489=>556,490=>778,491=>611,
-492=>778,493=>611,496=>278,497=>1333,498=>1222,499=>1111,500=>778,501=>611,504=>722,505=>611,
-506=>722,507=>556,508=>1000,509=>889,510=>778,511=>611,512=>722,513=>556,514=>722,515=>556,
-516=>667,517=>556,518=>667,519=>556,520=>278,521=>278,522=>278,523=>278,524=>778,525=>611,
-526=>778,527=>611,528=>722,529=>389,530=>722,531=>389,532=>722,533=>611,534=>722,535=>611,
-536=>667,537=>556,538=>611,539=>333,542=>722,543=>611,550=>722,551=>556,552=>667,553=>556,
-558=>778,559=>611,562=>667,563=>556,592=>556,593=>611,594=>611,595=>611,596=>556,598=>611,
-599=>611,600=>556,601=>556,603=>570,604=>546,606=>570,607=>278,608=>611,609=>611,613=>619,
-614=>611,615=>611,616=>278,617=>344,618=>278,621=>298,622=>778,623=>889,624=>889,625=>889,
-626=>611,627=>611,628=>615,629=>611,632=>778,633=>389,634=>389,635=>389,636=>389,637=>389,
-638=>455,639=>455,640=>620,641=>620,642=>556,643=>333,644=>278,645=>333,647=>328,648=>333,
-649=>623,652=>556,653=>778,654=>556,656=>500,658=>556,660=>611,661=>611,662=>611,664=>611,
-665=>572,666=>570,668=>603,670=>556,671=>454,672=>611,673=>611,711=>333,713=>333,714=>333,
-715=>333,728=>333,729=>333,730=>333,731=>333,733=>333,768=>0,769=>0,770=>0,771=>0,
-772=>0,774=>0,775=>0,776=>0,778=>0,779=>0,780=>0,783=>0,785=>0,787=>0,
-788=>0,884=>208,885=>247,890=>364,894=>333,900=>239,901=>446,902=>688,903=>418,904=>903,
-905=>962,906=>448,908=>904,910=>991,911=>932,912=>346,913=>764,914=>688,915=>642,916=>744,
-917=>710,918=>688,919=>743,920=>810,921=>296,922=>744,923=>744,924=>860,925=>714,926=>690,
-927=>822,928=>781,929=>698,931=>688,932=>688,933=>744,934=>777,935=>783,936=>805,937=>780,
-938=>296,939=>744,940=>640,941=>530,942=>597,943=>339,944=>575,945=>656,946=>576,947=>591,
-948=>620,949=>570,950=>522,951=>586,952=>586,953=>346,954=>576,955=>620,956=>667,957=>564,
-958=>530,959=>610,960=>721,961=>626,962=>595,963=>676,964=>592,965=>575,966=>801,967=>632,
-968=>722,969=>800,970=>346,971=>575,972=>609,973=>604,974=>769,1024=>666,1025=>666,1026=>790,
-1027=>611,1028=>722,1029=>667,1030=>278,1031=>278,1032=>556,1033=>1110,1034=>1088,1035=>790,1036=>720,
-1037=>722,1038=>698,1039=>722,1040=>722,1041=>722,1042=>722,1043=>611,1044=>918,1045=>667,1046=>1054,
-1047=>659,1048=>722,1049=>722,1050=>722,1051=>722,1052=>833,1053=>722,1054=>778,1055=>722,1056=>667,
-1057=>722,1058=>611,1059=>698,1060=>902,1061=>664,1062=>730,1063=>671,1064=>1101,1065=>1179,1066=>816,
-1067=>939,1068=>639,1069=>737,1070=>1080,1071=>690,1072=>556,1073=>611,1074=>621,1075=>475,1076=>804,
-1077=>556,1078=>775,1079=>556,1080=>636,1081=>636,1082=>529,1083=>608,1084=>697,1085=>636,1086=>611,
-1087=>636,1088=>611,1089=>556,1090=>454,1091=>552,1092=>989,1093=>554,1094=>690,1095=>606,1096=>934,
-1097=>987,1098=>741,1099=>839,1100=>619,1101=>575,1102=>908,1103=>636,1104=>552,1105=>552,1106=>606,
-1107=>475,1108=>556,1109=>556,1110=>278,1111=>278,1112=>278,1113=>900,1114=>611,1115=>606,1116=>529,
-1117=>636,1118=>552,1119=>636,1164=>639,1165=>619,1166=>649,1167=>611,1168=>611,1169=>454,1170=>611,
-1171=>475,1172=>611,1173=>475,1174=>1054,1175=>775,1176=>659,1177=>556,1178=>720,1179=>529,1180=>720,
-1181=>529,1182=>720,1183=>529,1184=>889,1185=>650,1186=>722,1187=>636,1188=>992,1189=>807,1190=>1067,
-1191=>876,1192=>837,1193=>554,1194=>837,1195=>554,1196=>611,1197=>454,1198=>667,1199=>667,1200=>667,
-1201=>667,1202=>664,1203=>554,1204=>864,1205=>727,1206=>743,1207=>606,1208=>671,1209=>606,1210=>671,
-1211=>606,1212=>837,1213=>552,1214=>837,1215=>552,1216=>278,1217=>1054,1218=>775,1219=>720,1220=>529,
-1223=>722,1224=>636,1227=>671,1228=>606,1232=>722,1233=>554,1234=>722,1235=>554,1236=>1000,1237=>889,
-1238=>666,1239=>552,1240=>837,1241=>552,1242=>837,1243=>552,1244=>1054,1245=>775,1246=>659,1247=>556,
-1248=>659,1249=>556,1250=>722,1251=>636,1252=>722,1253=>636,1254=>778,1255=>611,1256=>778,1257=>611,
-1258=>778,1259=>611,1260=>737,1261=>575,1262=>698,1263=>552,1264=>698,1265=>552,1266=>698,1267=>552,
-1268=>671,1269=>606,1272=>939,1273=>839,1456=>82,1457=>347,1458=>341,1459=>341,1460=>82,1461=>211,
-1462=>211,1463=>200,1464=>200,1465=>82,1467=>341,1468=>82,1469=>82,1470=>516,1471=>200,1472=>297,
-1473=>1038,1474=>1038,1475=>333,1476=>82,1488=>714,1489=>651,1490=>557,1491=>638,1492=>682,1493=>297,
-1494=>443,1495=>682,1496=>670,1497=>284,1498=>590,1499=>595,1500=>667,1501=>683,1502=>704,1503=>297,
-1504=>429,1505=>670,1506=>653,1507=>661,1508=>660,1509=>616,1510=>671,1511=>672,1512=>600,1513=>840,
-1514=>756,1520=>554,1521=>550,1522=>542,1523=>238,1524=>474,4256=>616,4257=>645,4258=>664,4259=>839,
-4260=>627,4261=>630,4262=>827,4263=>928,4264=>639,4265=>630,4266=>951,4267=>606,4268=>608,4269=>835,
-4270=>630,4271=>610,4272=>804,4273=>615,4274=>823,4275=>747,4276=>870,4277=>627,4278=>840,4279=>627,
-4280=>665,4281=>610,4282=>799,4283=>598,4284=>665,4285=>664,4286=>608,4287=>886,4288=>629,4304=>463,
-4305=>516,4306=>564,4307=>706,4308=>459,4309=>476,4310=>623,4311=>711,4312=>494,4313=>476,4314=>894,
-4315=>500,4316=>500,4317=>712,4318=>493,4319=>503,4320=>712,4321=>503,4322=>710,4323=>670,4324=>707,
-4325=>459,4326=>691,4327=>465,4328=>492,4329=>480,4330=>656,4331=>500,4332=>492,4333=>524,4334=>500,
-4335=>688,4336=>510,4337=>739,4338=>450,4339=>479,4340=>502,4341=>501,7936=>656,7937=>656,7938=>656,
-7939=>656,7940=>656,7941=>656,7942=>656,7943=>656,7944=>764,7945=>764,7946=>764,7947=>764,7948=>764,
-7949=>764,7950=>764,7951=>764,7952=>570,7953=>570,7954=>570,7955=>570,7956=>570,7957=>570,7960=>710,
-7961=>710,7962=>710,7963=>710,7964=>710,7965=>710,7968=>586,7969=>586,7970=>586,7971=>586,7972=>586,
-7973=>586,7974=>586,7975=>586,7976=>743,7977=>743,7978=>743,7979=>743,7980=>743,7981=>743,7982=>743,
-7983=>743,7984=>346,7985=>346,7986=>346,7987=>346,7988=>346,7989=>346,7990=>346,7991=>346,7992=>296,
-7993=>296,7994=>296,7995=>296,7996=>296,7997=>296,7998=>296,7999=>296,8000=>610,8001=>610,8002=>610,
-8003=>610,8004=>610,8005=>610,8008=>822,8009=>822,8010=>822,8011=>822,8012=>822,8013=>822,8016=>575,
-8017=>575,8018=>575,8019=>575,8020=>575,8021=>575,8022=>575,8023=>575,8025=>744,8027=>744,8029=>744,
-8031=>744,8032=>800,8033=>800,8034=>800,8035=>800,8036=>800,8037=>800,8038=>800,8039=>800,8040=>780,
-8041=>780,8042=>780,8043=>780,8044=>780,8045=>780,8046=>780,8047=>780,8048=>656,8049=>656,8050=>570,
-8051=>570,8052=>586,8053=>586,8054=>346,8055=>346,8056=>610,8057=>610,8058=>575,8059=>575,8060=>800,
-8061=>800,8064=>656,8065=>656,8066=>656,8067=>656,8068=>656,8069=>656,8070=>656,8071=>656,8072=>1007,
-8073=>1007,8074=>1007,8075=>1007,8076=>1007,8077=>1007,8078=>1007,8079=>1007,8080=>586,8081=>586,8082=>586,
-8083=>586,8084=>586,8085=>586,8086=>586,8087=>586,8088=>986,8089=>986,8090=>986,8091=>986,8092=>986,
-8093=>986,8094=>986,8095=>986,8096=>800,8097=>800,8098=>800,8099=>800,8100=>800,8101=>800,8102=>800,
-8103=>800,8104=>1023,8105=>1023,8106=>1023,8107=>1023,8108=>1023,8109=>1023,8110=>1023,8111=>1023,8112=>656,
-8113=>656,8114=>656,8115=>656,8116=>640,8118=>656,8119=>656,8120=>764,8121=>764,8122=>764,8123=>764,
-8124=>1007,8125=>278,8126=>201,8127=>147,8128=>278,8129=>333,8130=>586,8131=>586,8132=>597,8134=>586,
-8135=>586,8136=>710,8137=>710,8138=>743,8139=>743,8140=>986,8141=>402,8142=>403,8143=>147,8144=>346,
-8145=>346,8146=>346,8147=>346,8150=>346,8151=>346,8152=>296,8153=>296,8154=>296,8155=>296,8157=>434,
-8158=>433,8159=>333,8160=>575,8161=>575,8162=>575,8163=>575,8164=>626,8165=>626,8166=>575,8167=>575,
-8168=>744,8169=>744,8173=>333,8174=>351,8175=>303,8182=>800,8183=>800,8184=>822,8185=>822,8186=>780,
-8187=>780,8188=>1023,8189=>333,8190=>159,8210=>556,8213=>1000,8260=>167,8263=>1222,8264=>944,8265=>944,
-8304=>351,8305=>351,8308=>351,8309=>351,8310=>351,8311=>351,8312=>351,8313=>351,8314=>351,8315=>351,
-8316=>351,8317=>351,8318=>351,8319=>351,8320=>351,8321=>251,8322=>351,8323=>351,8324=>351,8325=>351,
-8326=>351,8327=>351,8328=>351,8329=>351,8330=>351,8331=>351,8332=>351,8333=>351,8334=>351,8362=>1049,
-8373=>591,8486=>780,8487=>780,8531=>869,8532=>869,8533=>869,8534=>869,8535=>869,8536=>869,8537=>869,
-8538=>869,8539=>869,8540=>869,8541=>869,8542=>869,8543=>869,8544=>278,8545=>556,8546=>834,8547=>945,
-8548=>667,8549=>945,8550=>1223,8551=>1501,8552=>945,8553=>667,8554=>945,8555=>1223,8556=>611,8557=>722,
-8558=>722,8559=>833,8560=>278,8561=>556,8562=>834,8563=>834,8564=>556,8565=>834,8566=>1112,8567=>1390,
-8568=>834,8569=>556,8570=>834,8571=>1112,8572=>278,8573=>556,8574=>611,8575=>889,8592=>964,8593=>964,
-8594=>964,8595=>964,8596=>964,8597=>964,8598=>964,8599=>964,8600=>964,8601=>964,8602=>964,8603=>964,
-8606=>964,8607=>964,8608=>964,8609=>964,8610=>964,8611=>964,8612=>964,8613=>964,8614=>964,8615=>964,
-8616=>964,8644=>964,8645=>964,8646=>964,8647=>964,8648=>964,8649=>964,8650=>964,8706=>490,8710=>729,
-8721=>711,8722=>584,8723=>584,8725=>1055,8730=>542,8800=>584,8804=>584,8805=>584,9674=>489,9833=>333,
-9834=>556,9835=>778,9836=>778,9837=>556,9838=>556,9839=>556,63033=>556,63034=>556,63035=>556,63036=>556,
-63037=>556,63038=>556,63039=>556,63040=>556,63041=>556,63166=>278,63171=>333,63196=>556,64256=>666,64257=>611,
-64258=>611,64259=>944,64260=>944,64261=>666,64262=>889,64285=>284,64286=>305,64287=>542,64288=>653,64289=>964,
-64290=>888,64291=>932,64292=>845,64293=>917,64294=>933,64295=>850,64296=>1006,64297=>584,64298=>840,64299=>840,
-64300=>840,64301=>840,64302=>714,64303=>714,64304=>714,64305=>651,64306=>557,64307=>638,64308=>682,64309=>367,
-64310=>443,64312=>670,64313=>354,64314=>590,64315=>595,64316=>667,64318=>704,64320=>429,64321=>670,64323=>661,
-64324=>660,64326=>671,64327=>672,64328=>600,64329=>840,64330=>756,64331=>297,64332=>651,64333=>595,64334=>660,
-64335=>714,65533=>788);
+468=>611,469=>722,470=>611,471=>722,472=>611,473=>722,474=>611,475=>722,476=>611,477=>556,
+478=>722,479=>556,480=>722,481=>556,482=>1000,483=>889,484=>811,485=>641,486=>778,487=>611,
+488=>722,489=>556,490=>778,491=>611,492=>778,493=>611,494=>556,495=>556,496=>278,497=>1333,
+498=>1222,499=>1111,500=>778,501=>611,503=>630,504=>722,505=>611,506=>722,507=>556,508=>1000,
+509=>889,510=>778,511=>611,512=>722,513=>556,514=>722,515=>556,516=>667,517=>556,518=>667,
+519=>556,520=>278,521=>278,522=>278,523=>278,524=>778,525=>611,526=>778,527=>611,528=>722,
+529=>389,530=>722,531=>389,532=>722,533=>611,534=>722,535=>611,536=>667,537=>556,538=>611,
+539=>333,540=>569,541=>486,542=>722,543=>611,548=>645,549=>500,550=>722,551=>556,552=>667,
+553=>556,554=>778,555=>611,556=>778,557=>611,558=>778,559=>611,560=>778,561=>611,562=>667,
+563=>556,567=>278,592=>556,593=>611,594=>611,595=>611,596=>556,597=>600,598=>611,599=>611,
+600=>556,601=>556,602=>834,603=>570,604=>546,605=>820,606=>570,607=>278,608=>611,609=>611,
+610=>556,611=>556,612=>656,613=>619,614=>611,615=>611,616=>278,617=>344,618=>278,619=>473,
+620=>527,621=>298,622=>778,623=>889,624=>889,625=>889,626=>611,627=>611,628=>615,629=>590,
+630=>878,631=>822,632=>778,633=>389,634=>389,635=>389,636=>389,637=>389,638=>455,639=>455,
+640=>620,641=>586,642=>556,643=>333,644=>278,645=>333,646=>544,647=>328,648=>333,649=>623,
+650=>726,651=>639,652=>556,653=>778,654=>556,655=>556,656=>500,657=>571,658=>556,659=>642,
+660=>611,661=>611,662=>611,664=>611,665=>572,666=>570,667=>616,668=>603,669=>552,670=>556,
+671=>454,672=>611,673=>611,674=>611,684=>520,688=>500,689=>500,690=>167,691=>333,692=>333,
+693=>333,694=>348,695=>500,696=>345,697=>278,698=>454,699=>278,700=>333,701=>278,702=>333,
+703=>333,704=>333,705=>333,706=>333,707=>333,708=>333,709=>333,711=>333,712=>333,713=>333,
+714=>333,715=>333,716=>272,717=>333,718=>333,719=>333,720=>333,721=>333,722=>333,723=>333,
+724=>333,725=>333,726=>333,727=>333,728=>333,729=>333,730=>333,731=>333,733=>333,734=>333,
+735=>510,736=>333,737=>333,738=>333,739=>357,740=>334,741=>526,742=>526,743=>526,744=>526,
+745=>526,746=>519,747=>519,748=>333,749=>333,750=>333,751=>333,752=>333,753=>333,754=>333,
+755=>333,756=>333,757=>437,758=>437,759=>400,760=>333,761=>200,762=>200,763=>200,764=>200,
+765=>332,766=>333,767=>333,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,
+775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,
+785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,
+795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,
+805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,
+815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,
+825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,
+835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,
+845=>0,846=>0,847=>0,848=>0,849=>0,850=>0,851=>0,852=>0,853=>0,854=>0,
+855=>0,856=>0,857=>0,858=>0,859=>0,860=>0,861=>0,862=>0,863=>0,864=>0,
+865=>0,866=>0,867=>0,868=>0,869=>0,870=>0,871=>0,872=>0,873=>0,874=>0,
+875=>0,876=>0,877=>0,878=>0,879=>0,884=>208,885=>247,890=>364,894=>333,900=>239,
+901=>446,902=>688,903=>333,904=>903,905=>962,906=>448,908=>904,910=>991,911=>932,912=>346,
+913=>764,914=>688,915=>642,916=>744,917=>710,918=>688,919=>743,920=>810,921=>296,922=>744,
+923=>744,924=>860,925=>714,926=>690,927=>822,928=>781,929=>698,931=>688,932=>688,933=>744,
+934=>777,935=>783,936=>805,937=>780,938=>296,939=>744,940=>640,941=>530,942=>597,943=>339,
+944=>575,945=>656,946=>576,947=>591,948=>620,949=>570,950=>522,951=>586,952=>586,953=>346,
+954=>576,955=>620,956=>667,957=>564,958=>530,959=>610,960=>721,961=>626,962=>595,963=>676,
+964=>592,965=>575,966=>801,967=>632,968=>722,969=>800,970=>346,971=>575,972=>609,973=>604,
+974=>769,977=>580,978=>742,979=>857,980=>620,981=>778,982=>740,983=>601,1008=>556,1009=>566,
+1012=>778,1013=>328,1024=>667,1025=>667,1026=>790,1027=>617,1028=>731,1029=>667,1030=>278,1031=>278,
+1032=>556,1033=>1110,1034=>1088,1035=>790,1036=>722,1037=>757,1038=>698,1039=>722,1040=>722,1041=>722,
+1042=>722,1043=>617,1044=>876,1045=>667,1046=>1100,1047=>670,1048=>757,1049=>757,1050=>722,1051=>715,
+1052=>874,1053=>753,1054=>778,1055=>753,1056=>680,1057=>722,1058=>611,1059=>698,1060=>909,1061=>657,
+1062=>845,1063=>688,1064=>1132,1065=>1217,1066=>835,1067=>980,1068=>678,1069=>735,1070=>1142,1071=>708,
+1072=>553,1073=>591,1074=>574,1075=>429,1076=>745,1077=>572,1078=>792,1079=>554,1080=>603,1081=>603,
+1082=>559,1083=>583,1084=>664,1085=>603,1086=>588,1087=>603,1088=>605,1089=>549,1090=>440,1091=>541,
+1092=>948,1093=>539,1094=>690,1095=>564,1096=>901,1097=>987,1098=>692,1099=>806,1100=>572,1101=>546,
+1102=>893,1103=>586,1104=>572,1105=>572,1106=>616,1107=>429,1108=>549,1109=>562,1110=>281,1111=>281,
+1112=>282,1113=>888,1114=>897,1115=>606,1116=>559,1117=>603,1118=>541,1119=>603,1136=>830,1137=>761,
+1138=>778,1139=>590,1154=>456,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>0,1161=>0,
+1162=>791,1163=>662,1164=>639,1165=>581,1166=>670,1167=>649,1168=>623,1169=>450,1170=>623,1171=>472,
+1172=>674,1173=>528,1174=>1091,1175=>803,1176=>659,1177=>548,1178=>739,1179=>569,1180=>742,1181=>560,
+1182=>737,1183=>559,1184=>900,1185=>679,1186=>808,1187=>673,1188=>1004,1189=>761,1190=>1114,1191=>876,
+1192=>721,1193=>548,1194=>724,1195=>554,1196=>611,1197=>454,1198=>667,1199=>584,1200=>652,1201=>632,
+1202=>667,1203=>550,1204=>951,1205=>748,1206=>759,1207=>630,1208=>669,1209=>580,1210=>672,1211=>576,
+1212=>977,1213=>752,1214=>957,1215=>752,1216=>318,1217=>1087,1218=>792,1219=>726,1220=>530,1221=>782,
+1222=>674,1223=>749,1224=>603,1225=>823,1226=>682,1227=>675,1228=>573,1229=>941,1230=>754,1231=>310,
+1232=>704,1233=>553,1234=>711,1235=>553,1236=>1000,1237=>889,1238=>667,1239=>569,1240=>738,1241=>561,
+1242=>738,1243=>561,1244=>1086,1245=>792,1246=>670,1247=>554,1248=>558,1249=>546,1250=>753,1251=>603,
+1252=>753,1253=>603,1254=>778,1255=>588,1256=>778,1257=>590,1258=>778,1259=>590,1260=>735,1261=>546,
+1262=>698,1263=>541,1264=>698,1265=>541,1266=>698,1267=>541,1268=>686,1269=>564,1270=>617,1271=>475,
+1272=>976,1273=>806,1296=>672,1297=>546,1298=>729,1299=>577,1306=>778,1307=>611,1308=>944,1309=>776,
+1310=>750,1311=>573,1329=>730,1330=>713,1331=>765,1332=>752,1333=>708,1334=>801,1335=>496,1336=>713,
+1337=>855,1338=>686,1339=>727,1340=>420,1341=>897,1342=>841,1343=>708,1344=>660,1345=>666,1346=>747,
+1347=>698,1348=>757,1349=>630,1350=>747,1351=>651,1352=>743,1353=>657,1354=>728,1355=>799,1356=>752,
+1357=>743,1358=>768,1359=>691,1360=>713,1361=>640,1362=>425,1363=>818,1364=>672,1365=>805,1366=>754,
+1369=>333,1370=>222,1371=>250,1372=>333,1373=>333,1374=>352,1375=>362,1377=>873,1378=>613,1379=>634,
+1380=>636,1381=>593,1382=>639,1383=>417,1384=>613,1385=>658,1386=>711,1387=>609,1388=>318,1389=>836,
+1390=>670,1391=>613,1392=>607,1393=>611,1394=>626,1395=>619,1396=>618,1397=>324,1398=>613,1399=>540,
+1400=>591,1401=>392,1402=>873,1403=>577,1404=>603,1405=>600,1406=>626,1407=>951,1408=>613,1409=>612,
+1410=>348,1411=>951,1412=>616,1413=>606,1414=>763,1415=>626,1417=>333,1418=>398,1456=>0,1457=>0,
+1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1467=>0,1468=>0,
+1469=>0,1470=>516,1471=>0,1472=>297,1473=>0,1474=>0,1475=>333,1476=>0,1488=>714,1489=>651,
+1490=>557,1491=>638,1492=>682,1493=>297,1494=>443,1495=>682,1496=>670,1497=>284,1498=>590,1499=>595,
+1500=>667,1501=>683,1502=>704,1503=>297,1504=>429,1505=>670,1506=>653,1507=>661,1508=>660,1509=>616,
+1510=>671,1511=>672,1512=>600,1513=>840,1514=>756,1520=>554,1521=>550,1522=>542,1523=>238,1524=>474,
+4256=>616,4257=>645,4258=>664,4259=>839,4260=>627,4261=>630,4262=>827,4263=>928,4264=>639,4265=>630,
+4266=>951,4267=>606,4268=>608,4269=>835,4270=>630,4271=>610,4272=>804,4273=>615,4274=>823,4275=>747,
+4276=>870,4277=>627,4278=>840,4279=>627,4280=>665,4281=>610,4282=>799,4283=>598,4284=>665,4285=>664,
+4286=>608,4287=>886,4288=>629,4304=>463,4305=>516,4306=>564,4307=>706,4308=>459,4309=>476,4310=>623,
+4311=>711,4312=>494,4313=>476,4314=>894,4315=>500,4316=>500,4317=>712,4318=>493,4319=>503,4320=>712,
+4321=>503,4322=>710,4323=>670,4324=>707,4325=>459,4326=>691,4327=>465,4328=>492,4329=>480,4330=>656,
+4331=>500,4332=>492,4333=>524,4334=>500,4335=>688,4336=>510,4337=>739,4338=>450,4339=>479,4340=>502,
+4341=>501,4345=>564,4347=>515,7680=>722,7681=>556,7682=>722,7683=>611,7684=>722,7685=>611,7686=>722,
+7687=>611,7688=>722,7689=>556,7690=>722,7691=>611,7692=>722,7693=>611,7694=>722,7695=>611,7696=>722,
+7697=>611,7698=>722,7699=>611,7700=>667,7701=>556,7702=>667,7703=>556,7704=>667,7705=>556,7706=>667,
+7707=>556,7708=>667,7709=>556,7710=>611,7711=>333,7712=>778,7713=>611,7714=>722,7715=>611,7716=>722,
+7717=>611,7718=>722,7719=>611,7720=>722,7721=>611,7722=>722,7723=>611,7724=>278,7725=>278,7726=>278,
+7727=>278,7728=>722,7729=>556,7730=>722,7731=>556,7732=>722,7733=>556,7734=>611,7735=>278,7736=>611,
+7737=>278,7738=>611,7739=>278,7740=>611,7741=>278,7742=>833,7743=>889,7744=>833,7745=>889,7746=>833,
+7747=>889,7748=>722,7749=>611,7750=>722,7751=>611,7752=>722,7753=>611,7754=>722,7755=>611,7756=>778,
+7757=>611,7758=>778,7759=>611,7760=>778,7761=>611,7762=>778,7763=>611,7764=>667,7765=>611,7766=>667,
+7767=>611,7768=>722,7769=>389,7770=>722,7771=>389,7772=>722,7773=>389,7774=>722,7775=>389,7776=>667,
+7777=>556,7778=>667,7779=>556,7780=>667,7781=>556,7782=>667,7783=>556,7784=>667,7785=>556,7786=>611,
+7787=>333,7788=>611,7789=>333,7790=>611,7791=>333,7792=>611,7793=>333,7794=>722,7795=>611,7796=>722,
+7797=>611,7798=>722,7799=>611,7800=>722,7801=>611,7802=>722,7803=>611,7804=>667,7805=>556,7806=>667,
+7807=>556,7808=>944,7809=>778,7810=>944,7811=>778,7812=>944,7813=>778,7814=>944,7815=>778,7816=>944,
+7817=>778,7818=>667,7819=>556,7820=>667,7821=>556,7822=>667,7823=>556,7824=>611,7825=>500,7826=>611,
+7827=>500,7828=>611,7829=>500,7830=>611,7831=>333,7832=>778,7833=>556,7834=>555,7835=>333,7840=>722,
+7841=>556,7842=>722,7843=>556,7844=>722,7845=>556,7846=>722,7847=>556,7848=>722,7849=>556,7850=>722,
+7851=>556,7852=>722,7853=>556,7854=>722,7855=>556,7856=>722,7857=>556,7858=>722,7859=>556,7860=>722,
+7861=>556,7862=>722,7863=>556,7864=>667,7865=>556,7866=>667,7867=>556,7868=>667,7869=>556,7870=>667,
+7871=>556,7872=>667,7873=>556,7874=>667,7875=>556,7876=>667,7877=>556,7878=>667,7879=>556,7880=>278,
+7881=>278,7882=>278,7883=>278,7884=>778,7885=>611,7886=>778,7887=>611,7888=>778,7889=>611,7890=>778,
+7891=>611,7892=>778,7893=>611,7894=>778,7895=>611,7896=>778,7897=>611,7898=>778,7899=>611,7900=>778,
+7901=>611,7902=>778,7903=>611,7904=>778,7905=>611,7906=>778,7907=>611,7908=>722,7909=>611,7910=>722,
+7911=>611,7912=>722,7913=>611,7914=>722,7915=>611,7916=>722,7917=>611,7918=>722,7919=>611,7920=>722,
+7921=>611,7922=>667,7923=>556,7924=>667,7925=>556,7926=>667,7927=>556,7928=>667,7929=>556,7936=>656,
+7937=>656,7938=>656,7939=>656,7940=>656,7941=>656,7942=>656,7943=>656,7944=>764,7945=>764,7946=>916,
+7947=>940,7948=>908,7949=>891,7950=>844,7951=>869,7952=>570,7953=>570,7954=>570,7955=>570,7956=>570,
+7957=>570,7960=>842,7961=>836,7962=>1025,7963=>1051,7964=>1035,7965=>1049,7968=>586,7969=>586,7970=>586,
+7971=>586,7972=>586,7973=>586,7974=>586,7975=>586,7976=>891,7977=>886,7978=>1081,7979=>1108,7980=>1085,
+7981=>1096,7982=>1009,7983=>1023,7984=>346,7985=>346,7986=>346,7987=>346,7988=>346,7989=>346,7990=>346,
+7991=>346,7992=>467,7993=>476,7994=>631,7995=>661,7996=>631,7997=>633,7998=>568,7999=>571,8000=>610,
+8001=>610,8002=>610,8003=>610,8004=>610,8005=>610,8008=>945,8009=>905,8010=>1118,8011=>1121,8012=>1064,
+8013=>1062,8016=>575,8017=>575,8018=>575,8019=>575,8020=>575,8021=>575,8022=>575,8023=>575,8025=>964,
+8027=>1148,8029=>1162,8031=>1081,8032=>800,8033=>800,8034=>800,8035=>800,8036=>800,8037=>800,8038=>800,
+8039=>800,8040=>904,8041=>875,8042=>1092,8043=>1087,8044=>1003,8045=>1002,8046=>1001,8047=>1025,8048=>656,
+8049=>656,8050=>570,8051=>570,8052=>586,8053=>586,8054=>346,8055=>346,8056=>610,8057=>610,8058=>575,
+8059=>575,8060=>800,8061=>800,8064=>656,8065=>656,8066=>656,8067=>656,8068=>656,8069=>656,8070=>656,
+8071=>656,8072=>854,8073=>855,8074=>1006,8075=>1030,8076=>996,8077=>977,8078=>938,8079=>959,8080=>586,
+8081=>586,8082=>586,8083=>586,8084=>586,8085=>586,8086=>586,8087=>586,8088=>960,8089=>960,8090=>1155,
+8091=>1186,8092=>1161,8093=>1171,8094=>1087,8095=>1102,8096=>800,8097=>800,8098=>800,8099=>800,8100=>800,
+8101=>800,8102=>800,8103=>800,8104=>1005,8105=>980,8106=>1201,8107=>1192,8108=>1109,8109=>1108,8110=>1106,
+8111=>1130,8112=>656,8113=>656,8114=>656,8115=>656,8116=>640,8118=>656,8119=>656,8120=>764,8121=>764,
+8122=>764,8123=>764,8124=>854,8125=>278,8126=>201,8127=>147,8128=>278,8129=>333,8130=>586,8131=>586,
+8132=>597,8134=>586,8135=>586,8136=>911,8137=>925,8138=>941,8139=>948,8140=>826,8141=>402,8142=>403,
+8143=>147,8144=>346,8145=>346,8146=>346,8147=>346,8150=>346,8151=>346,8152=>296,8153=>296,8154=>511,
+8155=>521,8157=>434,8158=>433,8159=>333,8160=>575,8161=>575,8162=>575,8163=>575,8164=>626,8165=>626,
+8166=>575,8167=>575,8168=>744,8169=>744,8170=>901,8171=>975,8172=>837,8173=>353,8174=>351,8175=>303,
+8178=>800,8179=>800,8180=>800,8182=>800,8183=>800,8184=>979,8185=>918,8186=>936,8187=>877,8188=>895,
+8189=>333,8190=>159,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>333,8197=>250,8198=>167,8199=>556,
+8200=>278,8201=>200,8202=>100,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>333,8209=>333,
+8210=>556,8213=>1000,8214=>437,8215=>556,8219=>278,8223=>503,8227=>350,8228=>278,8229=>666,8231=>278,
+8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>500,8241=>1372,8242=>238,
+8243=>426,8244=>614,8245=>238,8246=>379,8247=>571,8248=>450,8251=>622,8252=>666,8253=>617,8254=>556,
+8255=>658,8256=>658,8257=>438,8258=>840,8259=>400,8260=>167,8261=>334,8262=>334,8263=>1222,8264=>944,
+8265=>944,8266=>556,8267=>556,8268=>537,8269=>537,8270=>389,8271=>333,8272=>658,8273=>389,8274=>634,
+8275=>568,8276=>658,8277=>793,8278=>515,8279=>855,8280=>722,8281=>725,8282=>224,8283=>722,8284=>604,
+8285=>224,8286=>224,8287=>0,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8304=>351,8305=>351,
+8308=>351,8309=>351,8310=>351,8311=>351,8312=>351,8313=>351,8314=>351,8315=>351,8316=>351,8317=>351,
+8318=>351,8319=>351,8320=>351,8321=>251,8322=>351,8323=>351,8324=>351,8325=>351,8326=>351,8327=>351,
+8328=>351,8329=>351,8330=>350,8331=>350,8332=>350,8333=>350,8334=>350,8355=>611,8356=>576,8357=>833,
+8358=>724,8360=>1286,8362=>1049,8363=>571,8368=>594,8373=>591,8448=>985,8449=>1007,8451=>1020,8453=>981,
+8454=>1042,8455=>667,8457=>930,8465=>606,8468=>883,8470=>1006,8471=>784,8476=>699,8480=>1000,8481=>1230,
+8486=>780,8487=>780,8489=>286,8490=>722,8491=>722,8494=>556,8498=>626,8501=>714,8502=>651,8503=>557,
+8504=>638,8506=>906,8507=>1155,8513=>778,8514=>611,8515=>611,8516=>667,8523=>710,8525=>1072,8526=>500,
+8531=>869,8532=>869,8533=>869,8534=>869,8535=>869,8536=>869,8537=>869,8538=>869,8539=>869,8540=>869,
+8541=>869,8542=>869,8543=>869,8544=>278,8545=>556,8546=>834,8547=>945,8548=>667,8549=>945,8550=>1223,
+8551=>1501,8552=>945,8553=>667,8554=>945,8555=>1223,8556=>611,8557=>722,8558=>722,8559=>833,8560=>278,
+8561=>556,8562=>834,8563=>834,8564=>556,8565=>834,8566=>1112,8567=>1390,8568=>834,8569=>556,8570=>834,
+8571=>1112,8572=>278,8573=>556,8574=>611,8575=>889,8592=>964,8593=>964,8594=>964,8595=>964,8596=>964,
+8597=>964,8598=>964,8599=>964,8600=>964,8601=>964,8602=>964,8603=>964,8606=>964,8607=>964,8608=>964,
+8609=>964,8610=>964,8611=>964,8612=>964,8613=>964,8614=>964,8615=>964,8616=>964,8644=>964,8645=>964,
+8646=>964,8647=>964,8648=>964,8649=>964,8650=>964,8706=>608,8710=>729,8721=>856,8722=>584,8723=>584,
+8725=>1107,8730=>597,8800=>584,8804=>584,8805=>584,9251=>500,9674=>489,9824=>626,9825=>694,9826=>595,
+9827=>776,9828=>626,9829=>694,9830=>595,9831=>776,9833=>333,9834=>556,9835=>778,9836=>778,9837=>556,
+9838=>556,9839=>556,11799=>333,64256=>607,64257=>576,64258=>603,64259=>849,64260=>849,64275=>1243,64276=>1226,
+64277=>1233,64278=>1238,64279=>1448,64285=>284,64286=>305,64287=>542,64288=>653,64289=>964,64290=>888,64291=>932,
+64292=>845,64293=>917,64294=>933,64295=>850,64296=>1006,64297=>584,64298=>840,64299=>840,64300=>840,64301=>840,
+64302=>714,64303=>714,64304=>714,64305=>651,64306=>557,64307=>638,64308=>682,64309=>348,64310=>443,64312=>670,
+64313=>354,64314=>590,64315=>595,64316=>667,64318=>704,64320=>429,64321=>670,64323=>661,64324=>660,64326=>671,
+64327=>672,64328=>600,64329=>840,64330=>756,64331=>212,64332=>591,64333=>550,64334=>568,64335=>714,65533=>788);
 $enc='';
 $diff='';
 $file='freesansbi.z';
 $ctg='freesansbi.ctg.z';
-$originalsize=113516;
+$originalsize=269952;
 ?>
\ No newline at end of file
index 5909c39c3ea6ce499e3033af4672b83ef4298743..62a3322592d31e5f0088dc9692eb50eaec53d1ae 100644 (file)
Binary files a/lib/tcpdf/fonts/freesansbi.z and b/lib/tcpdf/fonts/freesansbi.z differ
index 3c43ecdc2dda72f4f67707be189165c8309cddda..fe5d471764c29619a7ee2fdbb5f5e4f8586ca353 100644 (file)
Binary files a/lib/tcpdf/fonts/freesansi.ctg.z and b/lib/tcpdf/fonts/freesansi.ctg.z differ
index c89652bd1d5d0735dd4d4b4de6ab6fbd73faff83..5b9c3541cbc589e03c774a54f0a7ca4957bd585f 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeSansOblique';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>22,'Flags'=>96,'FontBBox'=>'[-620 -431 1459 1141]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>600);
+$desc=array('Ascent'=>1000,'Descent'=>-300,'CapHeight'=>22,'Flags'=>96,'FontBBox'=>'[-898 -431 1572 1072]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>600);
 $up=-176;
 $ut=50;
 $dw=600;
@@ -15,12 +15,12 @@ $cw=array(
 92=>278,93=>278,94=>469,95=>556,96=>333,97=>556,98=>556,99=>500,100=>556,101=>556,
 102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556,
 112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,
-122=>500,123=>334,124=>260,125=>334,126=>584,8364=>556,8218=>222,402=>278,8222=>333,8230=>1000,
-8224=>556,8225=>556,710=>333,8240=>1000,352=>667,8249=>333,338=>1000,381=>611,8216=>222,8217=>222,
-8220=>333,8221=>333,8226=>350,8211=>556,8212=>1000,732=>333,8482=>1000,353=>500,8250=>333,339=>944,
+122=>500,123=>334,124=>260,125=>334,126=>584,8364=>655,8218=>222,402=>278,8222=>333,8230=>1000,
+8224=>556,8225=>556,710=>333,8240=>1000,352=>667,8249=>250,338=>1000,381=>611,8216=>222,8217=>222,
+8220=>333,8221=>333,8226=>350,8211=>556,8212=>1000,732=>333,8482=>1000,353=>500,8250=>250,339=>944,
 382=>500,376=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>260,167=>556,
-168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>606,177=>584,
-178=>352,179=>352,180=>333,181=>556,182=>537,183=>278,184=>333,185=>250,186=>365,187=>556,
+168=>333,169=>737,170=>370,171=>444,172=>584,173=>333,174=>737,175=>333,176=>606,177=>584,
+178=>352,179=>352,180=>333,181=>556,182=>537,183=>278,184=>333,185=>250,186=>365,187=>444,
 188=>947,189=>947,190=>947,191=>611,192=>667,193=>667,194=>667,195=>667,196=>667,197=>667,
 198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,
 208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,
@@ -34,75 +34,101 @@ $cw=array(
 288=>778,289=>556,290=>778,291=>527,292=>722,293=>556,294=>722,295=>556,296=>278,297=>278,
 298=>278,299=>278,300=>278,301=>278,302=>278,303=>222,304=>278,305=>278,306=>742,307=>362,
 308=>500,309=>222,310=>667,311=>500,312=>510,313=>556,314=>222,315=>556,316=>222,317=>556,
-318=>387,319=>556,320=>500,321=>556,322=>222,323=>722,324=>556,325=>722,326=>556,327=>722,
+318=>387,319=>556,320=>409,321=>556,322=>222,323=>722,324=>556,325=>722,326=>556,327=>722,
 328=>556,329=>722,330=>722,331=>556,332=>778,333=>556,334=>778,335=>556,336=>778,337=>556,
 340=>722,341=>333,342=>722,343=>333,344=>722,345=>333,346=>667,347=>500,348=>667,349=>500,
 350=>667,351=>500,354=>611,355=>278,356=>611,357=>443,358=>611,359=>278,360=>722,361=>556,
 362=>722,363=>556,364=>722,365=>556,366=>722,367=>556,368=>722,369=>556,370=>722,371=>556,
 372=>944,373=>722,374=>667,375=>500,377=>611,378=>500,379=>611,380=>500,383=>278,384=>556,
 385=>854,386=>667,387=>556,388=>667,389=>556,390=>722,391=>722,392=>500,393=>722,394=>899,
-395=>667,396=>556,397=>556,398=>667,399=>778,400=>667,401=>611,403=>778,404=>667,405=>889,
+395=>667,396=>556,397=>566,398=>667,399=>778,400=>667,401=>611,403=>778,404=>667,405=>889,
 406=>278,407=>333,408=>741,409=>500,410=>333,411=>560,412=>833,413=>722,414=>556,415=>778,
-416=>778,417=>556,420=>842,421=>556,423=>667,424=>500,425=>611,426=>333,427=>278,428=>611,
-429=>278,430=>611,431=>722,432=>556,433=>720,435=>788,436=>616,437=>611,438=>500,439=>611,
-440=>611,441=>500,448=>260,449=>520,450=>584,451=>278,452=>1311,453=>1208,454=>1056,455=>1056,
-456=>778,457=>444,458=>1158,459=>944,460=>778,461=>667,462=>556,463=>278,464=>278,465=>778,
-466=>556,467=>722,468=>556,469=>722,470=>556,471=>722,472=>556,473=>722,474=>556,475=>722,
-476=>556,477=>556,478=>667,479=>556,480=>667,481=>556,482=>1000,483=>889,486=>778,487=>556,
+416=>778,417=>556,418=>944,419=>722,420=>842,421=>556,422=>666,423=>667,424=>500,425=>611,
+426=>333,427=>278,428=>611,429=>278,430=>611,431=>722,432=>556,433=>768,434=>722,435=>788,
+436=>616,437=>611,438=>500,439=>611,440=>611,441=>500,442=>500,443=>556,446=>556,447=>556,
+448=>260,449=>520,450=>584,451=>278,452=>1311,453=>1208,454=>1056,455=>1056,456=>778,457=>444,
+458=>1158,459=>944,460=>778,461=>667,462=>556,463=>278,464=>278,465=>778,466=>556,467=>722,
+468=>556,469=>722,470=>556,471=>722,472=>556,473=>722,474=>556,475=>722,476=>556,477=>556,
+478=>667,479=>556,480=>667,481=>556,482=>1000,483=>889,484=>778,485=>556,486=>778,487=>556,
 488=>667,489=>500,490=>778,491=>556,492=>778,493=>556,494=>611,495=>500,496=>222,497=>1333,
-498=>1222,499=>1056,500=>778,501=>556,504=>722,505=>556,506=>667,507=>556,508=>1000,509=>889,
-510=>778,511=>611,512=>667,513=>556,514=>667,515=>556,516=>667,517=>556,518=>667,519=>556,
-520=>278,521=>278,522=>278,523=>278,524=>778,525=>556,526=>778,527=>556,528=>722,529=>333,
-530=>722,531=>333,532=>722,533=>556,534=>722,535=>556,536=>667,537=>500,538=>611,539=>278,
-542=>722,543=>556,550=>667,551=>556,552=>667,553=>556,554=>778,555=>556,556=>778,557=>556,
-558=>778,559=>556,560=>778,561=>556,562=>667,563=>500,592=>556,593=>556,594=>659,595=>556,
-596=>500,598=>556,599=>556,600=>556,601=>556,603=>500,604=>500,606=>500,607=>222,608=>556,
-609=>556,610=>546,611=>621,613=>556,614=>556,615=>556,616=>222,617=>222,618=>278,620=>1000,
-621=>222,622=>1000,623=>833,624=>833,625=>833,626=>556,627=>556,628=>560,629=>556,630=>778,
-632=>741,633=>333,634=>333,635=>333,636=>333,637=>333,638=>384,639=>369,640=>546,641=>546,
-642=>500,643=>278,644=>278,645=>278,647=>278,648=>278,649=>556,650=>626,651=>539,652=>500,
-653=>722,654=>500,656=>500,658=>500,660=>556,661=>556,662=>556,664=>556,665=>522,667=>546,
-668=>500,670=>500,671=>430,672=>556,711=>333,713=>333,714=>333,715=>333,728=>333,729=>333,
-730=>333,731=>333,733=>333,768=>0,769=>0,770=>0,771=>0,772=>0,774=>0,775=>0,
-776=>0,778=>0,779=>0,783=>0,785=>0,787=>0,788=>0,884=>199,885=>199,890=>332,
-894=>278,900=>291,901=>624,902=>659,903=>358,904=>870,905=>870,906=>315,908=>876,910=>903,
-911=>882,912=>286,913=>684,914=>628,915=>582,916=>684,917=>650,918=>628,919=>683,920=>750,
-921=>236,922=>684,923=>684,924=>800,925=>654,926=>630,927=>750,928=>721,929=>638,931=>628,
-932=>628,933=>684,934=>717,935=>723,936=>745,937=>720,938=>236,939=>684,940=>593,941=>519,
-942=>595,943=>271,944=>515,945=>596,946=>516,947=>531,948=>560,949=>510,950=>462,951=>526,
-952=>526,953=>286,954=>516,955=>560,956=>607,957=>504,958=>470,959=>550,960=>661,961=>566,
-962=>535,963=>616,964=>532,965=>515,966=>741,967=>572,968=>662,969=>740,970=>286,971=>515,
-972=>535,973=>503,974=>725,981=>741,1024=>667,1025=>667,1026=>766,1027=>611,1028=>722,1029=>667,
-1030=>278,1031=>278,1032=>500,1033=>968,1034=>1173,1035=>766,1036=>664,1037=>731,1038=>530,1039=>722,
-1040=>667,1041=>639,1042=>667,1043=>611,1044=>816,1045=>667,1046=>897,1047=>652,1048=>731,1049=>731,
-1050=>664,1051=>646,1052=>833,1053=>722,1054=>778,1055=>722,1056=>667,1057=>722,1058=>611,1059=>530,
-1060=>891,1061=>667,1062=>722,1063=>642,1064=>836,1065=>837,1066=>866,1067=>886,1068=>698,1069=>717,
-1070=>1079,1071=>691,1072=>556,1073=>556,1074=>538,1075=>430,1076=>640,1077=>556,1078=>818,1079=>495,
-1080=>560,1081=>560,1082=>510,1083=>556,1084=>621,1085=>561,1086=>556,1087=>560,1088=>556,1089=>500,
-1090=>400,1091=>500,1092=>916,1093=>500,1094=>560,1095=>497,1096=>695,1097=>695,1098=>640,1099=>734,
-1100=>523,1101=>534,1102=>788,1103=>564,1104=>556,1105=>556,1106=>568,1107=>430,1108=>500,1109=>500,
-1110=>222,1111=>278,1112=>222,1113=>840,1114=>850,1115=>568,1116=>510,1117=>560,1118=>500,1119=>560,
-1164=>698,1165=>523,1166=>667,1167=>556,1168=>611,1169=>430,1170=>611,1171=>430,1172=>611,1173=>430,
-1174=>897,1175=>818,1176=>652,1177=>495,1178=>664,1179=>510,1180=>664,1181=>510,1182=>664,1183=>510,
-1184=>704,1185=>618,1186=>722,1187=>561,1188=>1010,1189=>753,1190=>1061,1191=>803,1194=>722,1195=>500,
-1196=>611,1197=>400,1198=>667,1199=>667,1200=>667,1201=>667,1202=>665,1203=>496,1204=>879,1205=>629,
-1206=>642,1207=>497,1208=>642,1209=>497,1210=>642,1211=>497,1212=>722,1213=>605,1214=>722,1215=>605,
-1216=>278,1217=>897,1218=>818,1219=>664,1220=>510,1223=>722,1224=>561,1227=>642,1228=>497,1232=>667,
-1233=>556,1234=>667,1235=>556,1236=>1000,1237=>889,1238=>667,1239=>556,1240=>722,1241=>495,1242=>722,
-1243=>495,1244=>897,1245=>818,1246=>652,1247=>495,1248=>652,1249=>495,1250=>731,1251=>560,1252=>731,
-1253=>560,1254=>778,1255=>556,1256=>780,1257=>554,1258=>780,1259=>554,1260=>717,1261=>534,1262=>530,
-1263=>500,1264=>530,1265=>500,1266=>530,1267=>500,1268=>642,1269=>497,1272=>886,1273=>734,1329=>722,
-1330=>705,1331=>774,1332=>754,1333=>722,1334=>751,1335=>485,1336=>722,1337=>782,1338=>655,1339=>699,
-1340=>417,1341=>853,1342=>791,1343=>711,1344=>588,1345=>663,1346=>665,1347=>665,1348=>756,1349=>623,
-1350=>773,1351=>603,1352=>722,1353=>648,1354=>722,1355=>751,1356=>750,1357=>722,1358=>748,1359=>667,
-1360=>699,1361=>623,1362=>417,1363=>785,1364=>638,1365=>778,1366=>716,1370=>222,1371=>133,1372=>325,
-1373=>333,1374=>344,1377=>833,1378=>556,1379=>572,1380=>581,1381=>550,1382=>588,1383=>448,1384=>556,
-1385=>568,1386=>582,1387=>545,1388=>301,1389=>799,1390=>556,1391=>554,1392=>533,1393=>548,1394=>552,
+498=>1222,499=>1056,500=>778,501=>556,503=>630,504=>722,505=>556,506=>667,507=>556,508=>1000,
+509=>889,510=>778,511=>611,512=>667,513=>556,514=>667,515=>556,516=>667,517=>556,518=>667,
+519=>556,520=>278,521=>278,522=>278,523=>278,524=>778,525=>556,526=>778,527=>556,528=>722,
+529=>333,530=>722,531=>333,532=>722,533=>556,534=>722,535=>556,536=>667,537=>500,538=>611,
+539=>278,540=>521,541=>393,542=>722,543=>556,548=>611,549=>500,550=>667,551=>556,552=>667,
+553=>556,554=>778,555=>556,556=>778,557=>556,558=>778,559=>556,560=>778,561=>556,562=>667,
+563=>500,567=>222,592=>556,593=>556,594=>659,595=>556,596=>500,597=>500,598=>556,599=>556,
+600=>556,601=>556,602=>804,603=>500,604=>500,605=>742,606=>500,607=>222,608=>556,609=>556,
+610=>546,611=>621,612=>556,613=>556,614=>556,615=>556,616=>222,617=>222,618=>278,619=>473,
+620=>427,621=>222,622=>611,623=>833,624=>833,625=>833,626=>556,627=>556,628=>560,629=>556,
+630=>778,631=>722,632=>728,633=>333,634=>333,635=>393,636=>333,637=>333,638=>384,639=>369,
+640=>546,641=>546,642=>500,643=>278,644=>278,645=>278,646=>444,647=>278,648=>278,649=>556,
+650=>626,651=>539,652=>500,653=>722,654=>500,655=>556,656=>500,657=>500,658=>500,659=>552,
+660=>556,661=>556,662=>556,663=>1000,664=>556,665=>521,666=>500,667=>546,668=>500,669=>444,
+670=>500,671=>430,672=>556,673=>556,674=>556,675=>944,676=>944,677=>944,678=>689,679=>506,
+680=>764,681=>766,682=>660,683=>577,684=>476,685=>486,686=>565,687=>621,688=>500,689=>500,
+690=>167,691=>333,692=>333,693=>393,694=>500,695=>500,696=>330,697=>278,698=>454,699=>278,
+700=>278,701=>278,702=>333,703=>333,704=>333,705=>333,706=>333,707=>333,708=>333,709=>333,
+711=>333,712=>333,713=>333,714=>333,715=>333,716=>333,717=>333,718=>333,719=>333,720=>333,
+721=>333,722=>333,723=>333,724=>333,725=>333,726=>333,727=>333,728=>333,729=>333,730=>333,
+731=>333,733=>333,734=>333,735=>510,736=>333,737=>333,738=>333,739=>333,740=>334,741=>526,
+742=>526,743=>526,744=>526,745=>526,746=>519,747=>519,748=>333,749=>333,750=>333,751=>333,
+752=>383,753=>294,754=>294,755=>327,756=>261,757=>437,758=>437,759=>333,760=>278,761=>200,
+762=>200,763=>200,764=>200,765=>333,766=>333,767=>333,768=>0,769=>0,770=>0,771=>0,
+772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,
+782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,
+792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,
+802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,
+812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,
+822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,
+832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,
+842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,848=>0,849=>0,850=>0,851=>0,
+852=>0,853=>0,854=>0,855=>0,856=>0,857=>0,858=>0,859=>0,860=>0,861=>0,
+862=>0,863=>0,864=>0,865=>0,866=>0,867=>0,868=>0,869=>0,870=>0,871=>0,
+872=>0,873=>0,874=>0,875=>0,876=>0,877=>0,878=>0,879=>0,884=>199,885=>199,
+890=>332,894=>278,900=>291,901=>624,902=>659,903=>278,904=>870,905=>870,906=>315,908=>876,
+910=>903,911=>882,912=>333,913=>765,914=>643,915=>589,916=>760,917=>659,918=>682,919=>707,
+920=>769,921=>256,922=>689,923=>765,924=>825,925=>687,926=>649,927=>766,928=>730,929=>649,
+931=>678,932=>655,933=>733,934=>753,935=>783,936=>773,937=>768,938=>285,939=>733,940=>593,
+941=>523,942=>595,943=>271,944=>549,945=>596,946=>534,947=>531,948=>566,949=>523,950=>470,
+951=>557,952=>547,953=>293,954=>516,955=>579,956=>571,957=>518,958=>499,959=>561,960=>636,
+961=>551,962=>564,963=>627,964=>505,965=>549,966=>715,967=>579,968=>662,969=>746,970=>335,
+971=>549,972=>535,973=>503,974=>725,977=>580,978=>742,979=>809,980=>620,981=>728,982=>740,
+983=>556,1008=>556,1009=>566,1012=>778,1013=>328,1024=>657,1025=>657,1026=>781,1027=>590,1028=>709,
+1029=>655,1030=>254,1031=>254,1032=>532,1033=>1002,1034=>1166,1035=>772,1036=>674,1037=>730,1038=>605,
+1039=>721,1040=>667,1041=>665,1042=>665,1043=>590,1044=>807,1045=>657,1046=>914,1047=>653,1048=>730,
+1049=>730,1050=>674,1051=>656,1052=>846,1053=>721,1054=>778,1055=>720,1056=>649,1057=>709,1058=>606,
+1059=>605,1060=>875,1061=>660,1062=>754,1063=>612,1064=>830,1065=>872,1066=>839,1067=>885,1068=>668,
+1069=>708,1070=>1099,1071=>676,1072=>556,1073=>545,1074=>521,1075=>375,1076=>572,1077=>538,1078=>815,
+1079=>488,1080=>557,1081=>557,1082=>519,1083=>508,1084=>618,1085=>558,1086=>533,1087=>557,1088=>569,
+1089=>511,1090=>392,1091=>469,1092=>922,1093=>475,1094=>588,1095=>482,1096=>693,1097=>722,1098=>644,
+1099=>731,1100=>521,1101=>509,1102=>790,1103=>550,1104=>538,1105=>538,1106=>566,1107=>375,1108=>506,
+1109=>488,1110=>224,1111=>272,1112=>226,1113=>793,1114=>849,1115=>576,1116=>519,1117=>557,1118=>469,
+1119=>557,1120=>942,1121=>693,1136=>749,1137=>666,1138=>785,1139=>528,1154=>456,1155=>0,1156=>0,
+1157=>0,1158=>0,1159=>0,1160=>0,1161=>0,1162=>751,1163=>588,1164=>685,1165=>554,1166=>656,
+1167=>606,1168=>598,1169=>396,1170=>611,1171=>409,1172=>592,1173=>448,1174=>921,1175=>826,1176=>657,
+1177=>493,1178=>680,1179=>529,1180=>678,1181=>524,1182=>695,1183=>528,1184=>846,1185=>650,1186=>741,
+1187=>578,1188=>992,1189=>700,1190=>1047,1191=>778,1192=>687,1193=>507,1194=>709,1195=>509,1196=>611,
+1197=>393,1198=>664,1199=>580,1200=>668,1201=>617,1202=>664,1203=>489,1204=>905,1205=>662,1206=>631,
+1207=>498,1208=>597,1209=>472,1210=>597,1211=>471,1212=>927,1213=>716,1214=>927,1215=>716,1216=>254,
+1217=>915,1218=>815,1219=>665,1220=>510,1221=>678,1222=>533,1223=>721,1224=>558,1225=>751,1226=>589,
+1227=>599,1228=>472,1229=>876,1230=>649,1231=>254,1232=>667,1233=>552,1234=>667,1235=>552,1236=>1000,
+1237=>889,1238=>657,1239=>538,1240=>722,1241=>511,1242=>722,1243=>511,1244=>914,1245=>815,1246=>653,
+1247=>488,1248=>611,1249=>546,1250=>730,1251=>557,1252=>730,1253=>557,1254=>774,1255=>529,1256=>785,
+1257=>528,1258=>785,1259=>528,1260=>708,1261=>509,1262=>605,1263=>469,1264=>605,1265=>469,1266=>605,
+1267=>469,1268=>612,1269=>482,1270=>601,1271=>430,1272=>885,1273=>731,1296=>667,1297=>500,1298=>673,
+1299=>557,1306=>778,1307=>556,1308=>944,1309=>722,1310=>667,1311=>510,1329=>722,1330=>705,1331=>774,
+1332=>754,1333=>722,1334=>751,1335=>485,1336=>722,1337=>782,1338=>655,1339=>699,1340=>417,1341=>853,
+1342=>791,1343=>711,1344=>588,1345=>663,1346=>665,1347=>665,1348=>756,1349=>623,1350=>773,1351=>603,
+1352=>722,1353=>648,1354=>722,1355=>751,1356=>750,1357=>722,1358=>748,1359=>667,1360=>699,1361=>623,
+1362=>417,1363=>785,1364=>638,1365=>778,1366=>716,1369=>333,1370=>222,1371=>133,1372=>325,1373=>333,
+1374=>333,1375=>333,1377=>833,1378=>556,1379=>572,1380=>581,1381=>546,1382=>588,1383=>448,1384=>556,
+1385=>568,1386=>582,1387=>552,1388=>301,1389=>799,1390=>556,1391=>554,1392=>533,1393=>548,1394=>552,
 1395=>552,1396=>544,1397=>222,1398=>544,1399=>456,1400=>556,1401=>390,1402=>833,1403=>509,1404=>547,
-1405=>533,1406=>610,1407=>887,1408=>556,1409=>545,1410=>352,1411=>853,1412=>588,1413=>579,1414=>690,
-1415=>545,1417=>278,1418=>367,1456=>70,1457=>335,1458=>329,1459=>329,1460=>70,1461=>200,1462=>200,
-1463=>188,1464=>188,1465=>70,1467=>329,1468=>70,1469=>70,1470=>488,1471=>200,1472=>212,1473=>0,
-1474=>0,1475=>278,1476=>70,1488=>640,1489=>591,1490=>466,1491=>598,1492=>622,1493=>212,1494=>351,
+1405=>533,1406=>610,1407=>887,1408=>556,1409=>545,1410=>301,1411=>853,1412=>632,1413=>579,1414=>690,
+1415=>545,1417=>278,1418=>367,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,
+1463=>0,1464=>0,1465=>0,1467=>0,1468=>0,1469=>0,1470=>488,1471=>0,1472=>212,1473=>0,
+1474=>0,1475=>278,1476=>0,1488=>640,1489=>591,1490=>466,1491=>598,1492=>622,1493=>212,1494=>351,
 1495=>623,1496=>608,1497=>200,1498=>526,1499=>550,1500=>600,1501=>623,1502=>621,1503=>212,1504=>378,
 1505=>607,1506=>587,1507=>575,1508=>568,1509=>540,1510=>590,1511=>606,1512=>547,1513=>776,1514=>687,
 1520=>424,1521=>412,1522=>400,1523=>184,1524=>344,2433=>0,2434=>300,2435=>264,2437=>594,2438=>790,
@@ -112,7 +138,7 @@ $cw=array(
 2474=>499,2475=>584,2476=>377,2477=>555,2478=>448,2479=>423,2480=>390,2482=>498,2486=>498,2487=>425,
 2488=>495,2489=>440,2492=>22,2493=>440,2494=>193,2495=>189,2496=>180,2497=>0,2498=>0,2499=>0,
 2500=>0,2503=>252,2504=>243,2507=>889,2508=>865,2509=>0,2510=>356,2519=>219,2524=>523,2525=>408,
-2527=>428,2528=>594,2529=>481,2530=>0,2531=>-199,2534=>500,2535=>437,2536=>479,2537=>530,2538=>497,
+2527=>428,2528=>594,2529=>481,2530=>0,2531=>0,2534=>500,2535=>437,2536=>479,2537=>530,2538=>497,
 2539=>500,2540=>482,2541=>503,2542=>517,2543=>481,2544=>377,2545=>377,2546=>429,2547=>383,2548=>429,
 2549=>478,2550=>545,2551=>158,2552=>365,2553=>280,2554=>357,4256=>587,4257=>620,4258=>642,4259=>815,
 4260=>600,4261=>595,4262=>799,4263=>893,4264=>622,4265=>597,4266=>939,4267=>602,4268=>603,4269=>790,
@@ -121,46 +147,93 @@ $cw=array(
 4305=>491,4306=>528,4307=>692,4308=>447,4309=>447,4310=>628,4311=>734,4312=>449,4313=>445,4314=>843,
 4315=>449,4316=>449,4317=>682,4318=>449,4319=>480,4320=>682,4321=>468,4322=>710,4323=>623,4324=>697,
 4325=>447,4326=>702,4327=>447,4328=>470,4329=>440,4330=>632,4331=>449,4332=>470,4333=>536,4334=>449,
-4335=>656,4336=>474,4337=>630,4338=>394,4339=>419,4340=>422,4341=>436,7936=>596,7937=>596,7938=>596,
-7939=>596,7940=>596,7941=>596,7942=>596,7943=>596,7944=>684,7945=>684,7946=>684,7947=>684,7948=>684,
-7949=>684,7950=>684,7951=>684,7952=>510,7953=>510,7954=>510,7955=>510,7956=>510,7957=>510,7960=>650,
-7961=>650,7962=>650,7963=>650,7964=>650,7965=>650,7968=>526,7969=>526,7970=>526,7971=>526,7972=>526,
-7973=>526,7974=>526,7975=>526,7976=>683,7977=>683,7978=>683,7979=>683,7980=>683,7981=>683,7982=>683,
-7983=>683,7984=>286,7985=>286,7986=>286,7987=>286,7988=>286,7989=>286,7990=>286,7991=>286,7992=>236,
-7993=>236,7994=>236,7995=>236,7996=>236,7997=>236,7998=>236,7999=>236,8000=>550,8001=>550,8002=>550,
-8003=>550,8004=>550,8005=>550,8008=>750,8009=>750,8010=>750,8011=>750,8012=>750,8013=>750,8016=>515,
-8017=>515,8018=>515,8019=>515,8020=>515,8021=>515,8022=>515,8023=>515,8025=>684,8027=>684,8029=>684,
-8031=>684,8032=>740,8033=>740,8034=>740,8035=>740,8036=>740,8037=>740,8038=>740,8039=>740,8040=>720,
-8041=>720,8042=>720,8043=>720,8044=>720,8045=>720,8046=>720,8047=>720,8048=>596,8049=>596,8050=>510,
-8051=>510,8052=>526,8053=>526,8054=>286,8055=>286,8056=>550,8057=>550,8058=>515,8059=>515,8060=>740,
-8061=>740,8064=>596,8065=>596,8066=>596,8067=>596,8068=>596,8069=>596,8070=>596,8071=>596,8072=>900,
-8073=>900,8074=>900,8075=>900,8076=>900,8077=>900,8078=>900,8079=>900,8080=>526,8081=>526,8082=>526,
-8083=>526,8084=>526,8085=>526,8086=>526,8087=>526,8088=>899,8089=>899,8090=>899,8091=>899,8092=>899,
-8093=>899,8094=>899,8095=>899,8096=>740,8097=>740,8098=>740,8099=>740,8100=>740,8101=>740,8102=>740,
-8103=>740,8104=>936,8105=>936,8106=>936,8107=>936,8108=>936,8109=>936,8110=>936,8111=>936,8112=>596,
-8113=>596,8114=>596,8115=>596,8116=>593,8118=>596,8119=>596,8120=>684,8121=>684,8122=>684,8123=>684,
-8124=>900,8125=>278,8126=>201,8127=>147,8128=>278,8129=>333,8130=>526,8131=>526,8132=>595,8134=>526,
-8135=>526,8136=>650,8137=>650,8138=>683,8139=>683,8140=>899,8141=>602,8142=>601,8143=>333,8144=>286,
-8145=>286,8146=>286,8147=>286,8150=>286,8151=>286,8152=>236,8153=>236,8154=>236,8155=>236,8157=>434,
-8158=>433,8159=>333,8160=>515,8161=>515,8162=>515,8163=>515,8164=>566,8165=>566,8166=>515,8167=>515,
-8168=>684,8169=>684,8170=>684,8171=>684,8172=>638,8173=>333,8174=>624,8175=>303,8178=>740,8179=>740,
-8180=>725,8182=>740,8183=>740,8184=>750,8185=>750,8186=>720,8187=>720,8188=>936,8189=>333,8190=>159,
-8204=>0,8205=>0,8208=>333,8209=>333,8210=>556,8213=>1000,8260=>167,8304=>351,8305=>351,8308=>351,
-8309=>351,8310=>351,8311=>351,8312=>351,8313=>351,8320=>351,8321=>251,8322=>351,8323=>351,8324=>351,
-8325=>353,8326=>351,8327=>351,8328=>351,8329=>351,8359=>1445,8360=>1222,8362=>869,8373=>640,8486=>720,
-8531=>869,8532=>869,8533=>869,8534=>869,8535=>869,8536=>869,8537=>869,8538=>869,8539=>869,8540=>869,
-8541=>869,8542=>869,8543=>869,8592=>987,8593=>603,8594=>987,8595=>603,8596=>1042,8597=>1042,8706=>490,
-8710=>712,8721=>711,8722=>584,8725=>947,8730=>542,8800=>584,8804=>584,8805=>584,9674=>489,9834=>555,
-63033=>556,63034=>556,63035=>556,63036=>556,63037=>556,63038=>556,63039=>556,63040=>556,63041=>556,63166=>222,
-63171=>333,63196=>556,64256=>556,64257=>500,64258=>500,64259=>778,64260=>778,64261=>556,64262=>778,64285=>200,
-64286=>305,64287=>400,64288=>587,64289=>890,64290=>848,64291=>872,64292=>800,64293=>850,64294=>873,64295=>797,
-64296=>937,64297=>584,64298=>776,64299=>776,64300=>776,64301=>776,64302=>640,64303=>640,64304=>640,64305=>591,
-64306=>466,64307=>598,64308=>622,64309=>262,64310=>351,64312=>608,64313=>270,64314=>526,64315=>550,64316=>600,
-64318=>621,64320=>378,64321=>607,64323=>575,64324=>568,64326=>590,64327=>606,64328=>547,64329=>776,64330=>687,
-64331=>212,64332=>591,64333=>550,64334=>568,64335=>640,65533=>788);
+4335=>656,4336=>474,4337=>630,4338=>394,4339=>419,4340=>422,4341=>436,4345=>528,4347=>515,7680=>667,
+7681=>556,7682=>667,7683=>556,7684=>667,7685=>556,7686=>667,7687=>556,7688=>722,7689=>500,7690=>722,
+7691=>556,7692=>722,7693=>556,7694=>722,7695=>556,7696=>722,7697=>556,7698=>722,7699=>556,7700=>667,
+7701=>556,7702=>667,7703=>556,7704=>667,7705=>556,7706=>667,7707=>556,7708=>667,7709=>556,7710=>611,
+7711=>278,7712=>778,7713=>556,7714=>722,7715=>556,7716=>722,7717=>556,7718=>722,7719=>556,7720=>722,
+7721=>556,7722=>722,7723=>556,7724=>278,7725=>222,7726=>278,7727=>278,7728=>667,7729=>500,7730=>667,
+7731=>500,7732=>667,7733=>500,7734=>556,7735=>222,7736=>556,7737=>222,7738=>556,7739=>222,7740=>556,
+7741=>222,7742=>833,7743=>833,7744=>833,7745=>833,7746=>833,7747=>833,7748=>722,7749=>556,7750=>722,
+7751=>556,7752=>722,7753=>556,7754=>722,7755=>556,7756=>778,7757=>556,7758=>778,7759=>556,7760=>778,
+7761=>556,7762=>778,7763=>556,7764=>667,7765=>556,7766=>667,7767=>556,7768=>722,7769=>333,7770=>722,
+7771=>333,7772=>722,7773=>333,7774=>722,7775=>333,7776=>667,7777=>500,7778=>667,7779=>500,7780=>667,
+7781=>500,7782=>667,7783=>500,7784=>667,7785=>500,7786=>611,7787=>278,7788=>611,7789=>278,7790=>611,
+7791=>278,7792=>611,7793=>278,7794=>722,7795=>556,7796=>722,7797=>556,7798=>722,7799=>556,7800=>722,
+7801=>556,7802=>722,7803=>556,7804=>667,7805=>500,7806=>667,7807=>500,7808=>944,7809=>722,7810=>944,
+7811=>722,7812=>944,7813=>722,7814=>944,7815=>722,7816=>944,7817=>722,7818=>667,7819=>500,7820=>667,
+7821=>500,7822=>667,7823=>500,7824=>611,7825=>500,7826=>611,7827=>500,7828=>611,7829=>500,7830=>556,
+7831=>278,7832=>722,7833=>500,7834=>555,7835=>278,7840=>667,7841=>556,7842=>667,7843=>556,7844=>667,
+7845=>556,7846=>667,7847=>556,7848=>667,7849=>556,7850=>667,7851=>556,7852=>667,7853=>556,7854=>667,
+7855=>556,7856=>667,7857=>556,7858=>667,7859=>556,7860=>667,7861=>556,7862=>667,7863=>556,7864=>667,
+7865=>556,7866=>667,7867=>556,7868=>667,7869=>556,7870=>667,7871=>556,7872=>667,7873=>556,7874=>667,
+7875=>556,7876=>667,7877=>556,7878=>667,7879=>556,7880=>278,7881=>278,7882=>278,7883=>222,7884=>778,
+7885=>556,7886=>778,7887=>556,7888=>778,7889=>556,7890=>778,7891=>556,7892=>778,7893=>556,7894=>778,
+7895=>556,7896=>778,7897=>556,7898=>778,7899=>556,7900=>778,7901=>556,7902=>778,7903=>556,7904=>778,
+7905=>556,7906=>778,7907=>556,7908=>722,7909=>556,7910=>722,7911=>556,7912=>722,7913=>556,7914=>722,
+7915=>556,7916=>722,7917=>556,7918=>722,7919=>556,7920=>722,7921=>556,7922=>667,7923=>500,7924=>667,
+7925=>500,7926=>667,7927=>500,7928=>667,7929=>500,7936=>596,7937=>596,7938=>596,7939=>596,7940=>596,
+7941=>596,7942=>596,7943=>596,7944=>718,7945=>718,7946=>796,7947=>780,7948=>746,7949=>744,7950=>718,
+7951=>718,7952=>523,7953=>523,7954=>523,7955=>523,7956=>523,7957=>523,7960=>759,7961=>751,7962=>962,
+7963=>957,7964=>958,7965=>947,7968=>557,7969=>557,7970=>557,7971=>557,7972=>557,7973=>557,7974=>557,
+7975=>557,7976=>807,7977=>796,7978=>1013,7979=>1002,7980=>1009,7981=>1000,7982=>882,7983=>919,7984=>293,
+7985=>293,7986=>361,7987=>382,7988=>347,7989=>329,7990=>352,7991=>347,7992=>353,7993=>348,7994=>555,
+7995=>557,7996=>557,7997=>545,7998=>435,7999=>448,8000=>561,8001=>561,8002=>561,8003=>561,8004=>561,
+8005=>561,8008=>792,8009=>801,8010=>1031,8011=>1029,8012=>931,8013=>931,8016=>549,8017=>549,8018=>549,
+8019=>549,8020=>549,8021=>549,8022=>549,8023=>549,8025=>838,8027=>1004,8029=>1036,8031=>936,8032=>746,
+8033=>746,8034=>746,8035=>746,8036=>746,8037=>746,8038=>746,8039=>746,8040=>768,8041=>794,8042=>1003,
+8043=>1002,8044=>922,8045=>918,8046=>871,8047=>893,8048=>596,8049=>596,8050=>523,8051=>523,8052=>557,
+8053=>557,8054=>293,8055=>293,8056=>561,8057=>561,8058=>549,8059=>549,8060=>746,8061=>746,8064=>596,
+8065=>596,8066=>596,8067=>596,8068=>596,8069=>596,8070=>596,8071=>596,8072=>859,8073=>861,8074=>948,
+8075=>928,8076=>886,8077=>895,8078=>865,8079=>864,8080=>557,8081=>557,8082=>557,8083=>557,8084=>557,
+8085=>557,8086=>557,8087=>557,8088=>890,8089=>894,8090=>1092,8091=>1084,8092=>1095,8093=>1080,8094=>953,
+8095=>986,8096=>746,8097=>746,8098=>746,8099=>746,8100=>746,8101=>746,8102=>746,8103=>746,8104=>892,
+8105=>907,8106=>1113,8107=>1095,8108=>1034,8109=>1030,8110=>983,8111=>1002,8112=>596,8113=>596,8114=>596,
+8115=>596,8116=>593,8118=>596,8119=>596,8120=>765,8121=>765,8122=>765,8123=>765,8124=>861,8125=>147,
+8126=>201,8127=>147,8128=>278,8129=>333,8130=>557,8131=>557,8132=>595,8134=>557,8135=>557,8136=>835,
+8137=>849,8138=>895,8139=>861,8140=>786,8141=>602,8142=>601,8143=>333,8144=>335,8145=>322,8146=>357,
+8147=>336,8150=>340,8151=>320,8152=>300,8153=>298,8154=>439,8155=>408,8157=>434,8158=>433,8159=>333,
+8160=>549,8161=>549,8162=>549,8163=>549,8164=>551,8165=>551,8166=>549,8167=>549,8168=>733,8169=>733,
+8170=>794,8171=>832,8172=>739,8173=>333,8174=>624,8175=>303,8178=>746,8179=>746,8180=>725,8182=>746,
+8183=>746,8184=>889,8185=>828,8186=>836,8187=>811,8188=>867,8189=>333,8190=>159,8192=>500,8193=>1000,
+8194=>500,8195=>1000,8196=>333,8197=>250,8198=>167,8199=>556,8200=>278,8201=>200,8202=>100,8203=>0,
+8204=>0,8205=>0,8206=>0,8207=>0,8208=>333,8209=>333,8210=>556,8213=>1000,8214=>312,8215=>567,
+8219=>221,8223=>333,8227=>350,8228=>278,8229=>666,8231=>278,8232=>0,8233=>0,8234=>0,8235=>0,
+8236=>0,8237=>0,8238=>0,8239=>500,8241=>1360,8242=>278,8243=>469,8244=>680,8245=>278,8246=>469,
+8247=>680,8248=>376,8251=>622,8252=>556,8253=>556,8254=>556,8255=>658,8256=>658,8257=>438,8258=>840,
+8259=>400,8260=>167,8261=>334,8262=>334,8263=>1112,8264=>834,8265=>834,8266=>556,8267=>537,8268=>537,
+8269=>537,8270=>389,8271=>278,8272=>658,8273=>389,8274=>634,8275=>500,8276=>658,8277=>1000,8278=>515,
+8279=>855,8280=>722,8281=>725,8282=>224,8283=>722,8284=>604,8285=>224,8286=>224,8287=>0,8288=>0,
+8289=>0,8290=>0,8291=>0,8292=>0,8304=>351,8305=>350,8308=>351,8309=>351,8310=>351,8311=>351,
+8312=>351,8313=>351,8314=>350,8315=>350,8316=>350,8317=>350,8318=>350,8319=>350,8320=>351,8321=>251,
+8322=>351,8323=>351,8324=>351,8325=>353,8326=>351,8327=>351,8328=>351,8329=>351,8330=>350,8331=>350,
+8332=>350,8333=>350,8334=>350,8353=>615,8354=>601,8355=>611,8356=>556,8357=>833,8358=>682,8359=>1205,
+8360=>1222,8361=>879,8362=>869,8363=>538,8365=>667,8366=>611,8368=>570,8369=>684,8370=>717,8371=>667,
+8372=>667,8373=>640,8400=>0,8401=>0,8402=>0,8403=>0,8406=>0,8407=>0,8411=>0,8412=>0,
+8413=>0,8414=>0,8415=>0,8416=>0,8417=>0,8421=>0,8422=>0,8423=>0,8424=>0,8425=>0,
+8426=>0,8427=>0,8428=>0,8429=>0,8430=>0,8431=>0,8432=>0,8448=>970,8449=>979,8451=>1019,
+8452=>556,8453=>876,8454=>922,8455=>667,8457=>867,8459=>969,8460=>615,8462=>556,8463=>572,8464=>809,
+8465=>606,8466=>874,8468=>747,8470=>934,8471=>737,8472=>600,8475=>850,8476=>699,8480=>1000,8481=>1220,
+8486=>768,8487=>744,8488=>512,8489=>286,8490=>722,8491=>722,8492=>908,8493=>623,8494=>556,8496=>562,
+8498=>556,8499=>1080,8501=>520,8502=>591,8503=>456,8504=>598,8506=>843,8507=>1220,8513=>778,8514=>556,
+8515=>556,8516=>667,8522=>516,8523=>640,8525=>936,8526=>477,8531=>869,8532=>869,8533=>869,8534=>869,
+8535=>869,8536=>869,8537=>869,8538=>869,8539=>869,8540=>869,8541=>869,8542=>869,8543=>869,8544=>278,
+8545=>556,8546=>834,8547=>945,8548=>667,8549=>945,8550=>1223,8551=>1501,8552=>945,8553=>667,8554=>945,
+8555=>1223,8556=>556,8557=>722,8558=>722,8559=>833,8560=>222,8561=>444,8562=>666,8563=>722,8564=>500,
+8565=>722,8566=>944,8567=>1166,8568=>722,8569=>500,8570=>722,8571=>944,8572=>222,8573=>500,8574=>556,
+8575=>833,8592=>987,8593=>603,8594=>987,8595=>603,8596=>1042,8597=>1042,8706=>556,8710=>712,8721=>804,
+8722=>584,8725=>947,8730=>542,8739=>200,8741=>312,8800=>584,8804=>584,8805=>584,9251=>500,9674=>489,
+9824=>626,9825=>694,9826=>595,9827=>776,9828=>626,9829=>694,9830=>595,9831=>776,9833=>333,9834=>556,
+9835=>722,9836=>722,9837=>415,9838=>377,9839=>402,11799=>333,64256=>494,64257=>471,64258=>474,64259=>659,
+64260=>654,64261=>530,64275=>1027,64276=>1056,64277=>1058,64278=>1073,64279=>1301,64285=>200,64286=>305,64287=>400,
+64288=>587,64289=>890,64290=>848,64291=>872,64292=>800,64293=>850,64294=>873,64295=>797,64296=>937,64297=>584,
+64298=>776,64299=>776,64300=>776,64301=>776,64302=>640,64303=>640,64304=>640,64305=>591,64306=>466,64307=>598,
+64308=>622,64309=>262,64310=>351,64312=>608,64313=>270,64314=>526,64315=>550,64316=>600,64318=>621,64320=>378,
+64321=>607,64323=>575,64324=>568,64326=>590,64327=>606,64328=>547,64329=>776,64330=>687,64331=>212,64332=>591,
+64333=>550,64334=>568,64335=>640,65533=>788);
 $enc='';
 $diff='';
 $file='freesansi.z';
 $ctg='freesansi.ctg.z';
-$originalsize=248072;
+$originalsize=410728;
 ?>
\ No newline at end of file
index 0f52ff6989642c801a11c0f182e5570be1999a00..d675eb2666ed7971014e07b4c8cfad465293208b 100644 (file)
Binary files a/lib/tcpdf/fonts/freesansi.z and b/lib/tcpdf/fonts/freesansi.z differ
index 2c931baf72005540bf4a45f70913dab19f2b0e5e..06f25fc8ab522afdea220c57dc3c4e24fb60ff24 100644 (file)
Binary files a/lib/tcpdf/fonts/freeserif.ctg.z and b/lib/tcpdf/fonts/freeserif.ctg.z differ
index 7dc60189d4082a5cd8037860d48f1b19a808ae67..aedc388484ef6f5e055814e0d0b317d28094e24f 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeSerif';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>10,'Flags'=>32,'FontBBox'=>'[-797 -545 2010 1166]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
+$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>10,'Flags'=>96,'FontBBox'=>'[-879 -1201 1767 2606]','ItalicAngle'=>-33.2,'StemV'=>70,'MissingWidth'=>600);
 $up=-125;
 $ut=50;
 $dw=600;
@@ -15,24 +15,24 @@ $cw=array(
 92=>278,93=>333,94=>469,95=>500,96=>333,97=>444,98=>500,99=>444,100=>500,101=>444,
 102=>333,103=>500,104=>500,105=>278,106=>278,107=>500,108=>278,109=>778,110=>500,111=>500,
 112=>500,113=>500,114=>333,115=>389,116=>278,117=>500,118=>500,119=>722,120=>500,121=>500,
-122=>444,123=>480,124=>200,125=>480,126=>541,8364=>741,8218=>333,402=>333,8222=>444,8230=>1000,
-8224=>500,8225=>500,710=>333,8240=>1000,352=>556,8249=>333,338=>889,381=>611,8216=>333,8217=>333,
-8220=>444,8221=>444,8226=>350,8211=>500,8212=>1000,732=>333,8482=>980,353=>389,8250=>333,339=>722,
+122=>444,123=>480,124=>200,125=>480,126=>541,8364=>741,8218=>250,402=>333,8222=>444,8230=>1000,
+8224=>500,8225=>500,710=>333,8240=>1000,352=>556,8249=>250,338=>889,381=>611,8216=>250,8217=>250,
+8220=>444,8221=>444,8226=>350,8211=>500,8212=>1000,732=>333,8482=>980,353=>389,8250=>250,339=>722,
 382=>444,376=>722,160=>250,161=>333,162=>500,163=>500,164=>500,165=>500,166=>200,167=>500,
-168=>333,169=>760,170=>276,171=>500,172=>564,173=>333,174=>760,175=>333,176=>400,177=>564,
-178=>300,179=>300,180=>333,181=>500,182=>453,183=>250,184=>333,185=>300,186=>310,187=>500,
+168=>333,169=>760,170=>276,171=>444,172=>564,173=>333,174=>760,175=>333,176=>400,177=>564,
+178=>320,179=>320,180=>333,181=>500,182=>453,183=>250,184=>333,185=>320,186=>310,187=>441,
 188=>750,189=>750,190=>750,191=>444,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,
 198=>889,199=>667,200=>611,201=>611,202=>611,203=>611,204=>333,205=>333,206=>333,207=>333,
 208=>722,209=>722,210=>722,211=>722,212=>722,213=>722,214=>722,215=>564,216=>722,217=>722,
-218=>722,219=>722,220=>722,221=>722,222=>556,223=>500,224=>444,225=>444,226=>444,227=>444,
+218=>722,219=>722,220=>722,221=>722,222=>576,223=>500,224=>444,225=>444,226=>444,227=>444,
 228=>444,229=>444,230=>667,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,
-238=>278,239=>278,240=>500,241=>500,242=>500,243=>500,244=>500,245=>500,246=>500,247=>564,
-248=>500,249=>500,250=>500,251=>500,252=>500,253=>500,254=>500,255=>500,256=>722,257=>444,
+238=>278,239=>278,240=>501,241=>500,242=>500,243=>500,244=>500,245=>500,246=>500,247=>564,
+248=>500,249=>500,250=>500,251=>500,252=>500,253=>500,254=>496,255=>500,256=>722,257=>444,
 258=>722,259=>444,260=>722,261=>444,262=>667,263=>444,264=>667,265=>444,266=>667,267=>444,
 268=>667,269=>444,270=>722,271=>600,272=>722,273=>500,274=>611,275=>444,276=>611,277=>444,
 278=>611,279=>444,280=>611,281=>444,282=>611,283=>444,284=>722,285=>500,286=>722,287=>500,
 288=>722,289=>500,290=>722,291=>500,292=>722,293=>500,294=>722,295=>548,296=>333,297=>278,
-298=>333,299=>278,300=>333,301=>278,302=>333,303=>278,304=>333,305=>278,306=>722,307=>556,
+298=>333,299=>278,300=>333,301=>278,302=>333,303=>278,304=>333,305=>278,306=>703,307=>529,
 308=>389,309=>278,310=>722,311=>500,312=>500,313=>611,314=>278,315=>611,316=>278,317=>611,
 318=>348,319=>611,320=>444,321=>611,322=>278,323=>722,324=>500,325=>722,326=>500,327=>722,
 328=>500,329=>556,330=>722,331=>500,332=>722,333=>500,334=>722,335=>500,336=>722,337=>500,
@@ -40,388 +40,465 @@ $cw=array(
 350=>556,351=>389,354=>611,355=>278,356=>611,357=>278,358=>611,359=>278,360=>722,361=>500,
 362=>722,363=>500,364=>722,365=>500,366=>722,367=>500,368=>722,369=>500,370=>722,371=>500,
 372=>944,373=>722,374=>722,375=>500,377=>611,378=>444,379=>611,380=>444,383=>333,384=>500,
-385=>667,386=>646,387=>500,388=>646,389=>500,390=>667,391=>667,392=>444,393=>722,394=>722,
+385=>667,386=>576,387=>500,388=>646,389=>500,390=>667,391=>667,392=>444,393=>722,394=>722,
 395=>646,396=>500,397=>534,398=>611,399=>722,400=>518,401=>556,403=>722,404=>665,405=>729,
 406=>333,407=>333,408=>810,409=>500,410=>278,411=>480,412=>944,413=>722,414=>500,415=>726,
-416=>722,417=>500,418=>1043,419=>778,420=>556,421=>500,422=>667,423=>556,424=>389,425=>627,
-426=>592,427=>278,428=>611,429=>278,430=>611,431=>722,432=>500,433=>757,434=>722,435=>822,
-436=>667,437=>611,438=>444,439=>556,440=>556,441=>389,442=>500,443=>500,444=>615,445=>439,
+416=>722,417=>516,418=>1043,419=>778,420=>556,421=>500,422=>667,423=>556,424=>389,425=>627,
+426=>592,427=>278,428=>611,429=>278,430=>611,431=>800,432=>518,433=>743,434=>722,435=>822,
+436=>667,437=>611,438=>444,439=>530,440=>556,441=>389,442=>394,443=>500,444=>615,445=>439,
 446=>421,447=>500,448=>200,449=>400,450=>600,451=>333,452=>1333,453=>1166,454=>944,455=>1000,
 456=>889,457=>556,458=>1111,459=>1000,460=>778,461=>722,462=>444,463=>333,464=>278,465=>722,
 466=>500,467=>722,468=>500,469=>722,470=>500,471=>722,472=>500,473=>722,474=>500,475=>722,
 476=>500,477=>444,478=>722,479=>444,480=>722,481=>444,482=>889,483=>667,484=>722,485=>500,
-486=>722,487=>500,488=>722,489=>500,490=>722,491=>500,492=>722,493=>500,494=>556,495=>389,
-496=>278,497=>1333,498=>1166,499=>944,500=>722,501=>500,502=>944,504=>722,505=>500,506=>722,
-507=>444,508=>889,509=>667,510=>722,511=>500,512=>722,513=>444,514=>722,515=>444,516=>611,
-517=>444,518=>611,519=>444,520=>333,521=>278,522=>333,523=>278,524=>722,525=>500,526=>722,
-527=>500,528=>667,529=>333,530=>667,531=>333,532=>722,533=>500,534=>722,535=>500,536=>556,
-537=>389,538=>611,539=>278,542=>722,543=>500,550=>722,551=>444,552=>611,553=>444,554=>722,
-555=>500,556=>722,557=>500,558=>722,559=>500,560=>722,561=>500,562=>722,563=>500,565=>597,
-567=>278,592=>444,593=>500,594=>507,595=>500,596=>444,597=>444,598=>500,599=>500,600=>444,
-601=>444,602=>722,603=>426,604=>426,605=>674,606=>454,607=>278,608=>500,609=>500,610=>484,
-611=>500,612=>582,613=>500,614=>500,615=>500,616=>278,617=>278,618=>278,619=>278,620=>278,
-621=>278,622=>556,623=>778,624=>778,625=>778,626=>500,627=>500,628=>500,629=>500,630=>668,
-631=>693,632=>640,633=>333,634=>333,635=>333,636=>333,637=>333,638=>333,639=>333,640=>487,
-641=>487,642=>389,643=>333,644=>500,645=>333,646=>500,647=>278,648=>278,649=>500,650=>517,
-651=>534,652=>500,653=>722,654=>500,655=>510,656=>444,657=>444,658=>389,659=>456,660=>444,
-661=>444,662=>444,663=>444,664=>500,665=>500,666=>454,667=>665,668=>565,669=>347,670=>500,
-671=>443,672=>500,673=>444,674=>444,675=>798,676=>795,677=>805,678=>554,679=>561,680=>678,
-681=>722,682=>554,683=>554,684=>500,685=>500,686=>611,687=>611,688=>300,689=>300,690=>278,
-691=>278,692=>278,693=>309,694=>306,695=>432,696=>310,697=>250,698=>408,699=>333,700=>500,
-701=>500,702=>333,703=>333,704=>258,705=>258,706=>374,707=>374,708=>383,709=>383,711=>333,
-712=>250,713=>333,714=>333,715=>333,716=>250,717=>333,718=>333,719=>333,720=>278,721=>278,
-722=>333,723=>333,724=>333,725=>333,726=>333,727=>333,728=>333,729=>333,730=>333,731=>333,
-733=>333,734=>336,735=>352,736=>311,737=>200,738=>243,739=>328,740=>300,741=>460,742=>460,
-743=>460,744=>460,745=>460,746=>477,747=>475,748=>339,749=>500,750=>444,751=>383,752=>383,
-753=>294,754=>294,755=>327,756=>261,757=>437,758=>437,759=>333,760=>278,761=>175,762=>175,
-763=>175,764=>175,765=>337,766=>337,767=>326,768=>0,769=>0,770=>0,771=>0,772=>0,
-773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,
-783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,
-793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,
-803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,
-813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,
-823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,
-833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,
-843=>0,844=>0,845=>0,846=>0,848=>0,849=>0,850=>0,851=>0,852=>0,853=>0,
-854=>0,855=>0,856=>0,857=>0,858=>0,859=>0,860=>0,861=>0,862=>0,863=>0,
-864=>0,865=>0,866=>0,867=>0,868=>0,869=>0,870=>0,871=>0,872=>0,873=>0,
-874=>0,875=>0,876=>0,877=>0,878=>0,879=>0,884=>199,885=>199,890=>332,894=>278,
-900=>267,901=>333,902=>722,903=>250,904=>800,905=>902,906=>507,908=>818,910=>861,911=>871,
-912=>267,913=>722,914=>667,915=>586,916=>660,917=>611,918=>611,919=>722,920=>726,921=>333,
-922=>722,923=>722,924=>889,925=>722,926=>628,927=>722,928=>722,929=>556,931=>627,932=>611,
-933=>696,934=>742,935=>722,936=>863,937=>757,938=>333,939=>656,940=>587,941=>426,942=>534,
-943=>267,944=>534,945=>587,946=>534,947=>480,948=>534,949=>426,950=>480,951=>534,952=>534,
-953=>267,954=>527,955=>480,956=>534,957=>480,958=>480,959=>500,960=>587,961=>534,962=>439,
-963=>534,964=>426,965=>534,966=>640,967=>480,968=>693,969=>693,970=>267,971=>534,972=>500,
-973=>534,974=>693,976=>534,977=>587,978=>620,979=>809,980=>620,981=>640,982=>684,983=>534,
-986=>510,987=>426,988=>611,989=>445,990=>613,991=>613,992=>627,993=>526,1008=>534,1009=>534,
-1010=>485,1013=>361,1024=>611,1025=>667,1026=>768,1027=>556,1028=>667,1029=>556,1030=>333,1031=>333,
-1032=>389,1033=>969,1034=>980,1035=>698,1036=>722,1037=>722,1038=>746,1039=>722,1040=>771,1041=>646,
-1042=>667,1043=>626,1044=>747,1045=>667,1046=>997,1047=>532,1048=>824,1049=>824,1050=>750,1051=>750,
-1052=>990,1053=>823,1054=>771,1055=>818,1056=>604,1057=>719,1058=>667,1059=>731,1060=>869,1061=>771,
-1062=>823,1063=>747,1064=>1122,1065=>1122,1066=>757,1067=>981,1068=>646,1069=>698,1070=>1104,1071=>749,
-1072=>500,1073=>552,1074=>500,1075=>443,1076=>531,1077=>438,1078=>716,1079=>417,1080=>527,1081=>527,
-1082=>525,1083=>530,1084=>666,1085=>565,1086=>552,1087=>565,1088=>552,1089=>438,1090=>476,1091=>500,
-1092=>667,1093=>500,1094=>497,1095=>531,1096=>810,1097=>810,1098=>556,1099=>719,1100=>491,1101=>445,
-1102=>783,1103=>487,1104=>444,1105=>438,1106=>548,1107=>418,1108=>444,1109=>389,1110=>278,1111=>278,
-1112=>278,1113=>714,1114=>706,1115=>548,1116=>525,1117=>527,1118=>500,1119=>500,1120=>1056,1121=>693,
-1122=>654,1123=>567,1124=>969,1125=>686,1126=>730,1127=>502,1128=>1059,1129=>765,1130=>997,1131=>716,
-1132=>1295,1133=>963,1134=>532,1135=>473,1136=>863,1137=>693,1138=>726,1139=>500,1140=>801,1141=>480,
-1142=>801,1143=>480,1144=>1356,1145=>969,1146=>771,1147=>500,1148=>1056,1149=>693,1150=>1056,1151=>693,
-1152=>754,1153=>497,1154=>424,1155=>369,1156=>689,1157=>445,1158=>445,1160=>1080,1161=>1076,1162=>824,
-1163=>565,1164=>556,1165=>504,1166=>556,1167=>500,1168=>556,1169=>418,1170=>556,1171=>418,1172=>573,
-1173=>468,1174=>1053,1175=>766,1176=>556,1177=>389,1178=>722,1179=>500,1180=>722,1181=>500,1182=>722,
-1183=>500,1184=>852,1185=>671,1186=>722,1187=>500,1188=>984,1189=>660,1190=>1014,1191=>714,1192=>722,
-1193=>542,1194=>667,1195=>444,1196=>611,1197=>484,1198=>722,1199=>500,1200=>722,1201=>500,1202=>722,
-1203=>500,1204=>967,1205=>723,1206=>722,1207=>500,1208=>722,1209=>500,1210=>722,1211=>500,1212=>866,
-1213=>561,1214=>866,1215=>561,1216=>333,1217=>997,1218=>716,1219=>722,1220=>500,1221=>750,1222=>530,
-1223=>722,1224=>500,1225=>823,1226=>565,1227=>722,1228=>500,1229=>990,1230=>666,1231=>500,1232=>722,
-1233=>500,1234=>722,1235=>500,1236=>889,1237=>667,1238=>611,1239=>438,1240=>722,1241=>444,1242=>722,
-1243=>444,1244=>997,1245=>716,1246=>532,1247=>417,1248=>556,1249=>389,1250=>824,1251=>527,1252=>824,
-1253=>527,1254=>771,1255=>552,1256=>722,1257=>500,1258=>722,1259=>500,1260=>698,1261=>445,1262=>731,
-1263=>500,1264=>731,1265=>500,1266=>731,1267=>500,1268=>747,1269=>531,1272=>981,1273=>719,1280=>556,
-1281=>500,1282=>900,1283=>819,1284=>605,1285=>515,1286=>841,1287=>566,1288=>974,1289=>530,1290=>1035,
-1291=>565,1292=>722,1293=>444,1294=>611,1295=>476,1457=>0,1458=>0,1460=>0,1461=>0,1462=>0,
-1463=>0,1464=>0,1465=>0,1467=>0,1468=>0,1472=>126,1475=>418,1488=>537,1489=>537,1490=>350,
-1491=>537,1492=>537,1493=>350,1494=>350,1495=>537,1496=>537,1497=>350,1498=>537,1499=>537,1500=>537,
-1501=>537,1502=>537,1503=>350,1504=>350,1505=>537,1506=>537,1507=>537,1508=>537,1509=>537,1510=>537,
-1511=>537,1512=>537,1513=>537,1514=>537,1520=>537,1521=>537,1522=>537,1523=>396,1524=>396,1548=>226,
-1563=>250,1567=>473,1569=>350,1570=>321,1571=>249,1572=>399,1573=>249,1574=>776,1575=>249,1576=>950,
-1577=>424,1578=>925,1579=>924,1580=>738,1581=>748,1582=>701,1583=>397,1584=>399,1585=>328,1586=>331,
-1587=>951,1588=>949,1589=>949,1590=>949,1591=>557,1592=>550,1593=>625,1594=>602,1601=>801,1602=>696,
-1603=>757,1604=>655,1605=>549,1606=>651,1607=>424,1608=>399,1609=>776,1610=>776,1611=>0,1613=>0,
-1614=>0,1615=>0,1616=>0,1617=>0,1618=>0,1619=>0,1620=>0,1621=>0,1632=>297,1633=>254,
-1634=>427,1635=>497,1636=>440,1637=>465,1638=>466,1639=>421,1640=>459,1641=>424,1643=>212,1652=>300,
-1662=>926,1670=>750,1688=>338,1711=>874,1740=>776,1748=>176,1920=>395,1921=>440,1922=>511,1923=>478,
-1924=>424,1925=>380,1926=>394,1927=>406,1928=>416,1929=>414,1930=>412,1931=>472,1932=>439,1933=>452,
-1934=>414,1935=>503,1936=>773,1937=>387,1938=>419,1939=>522,1940=>412,1941=>394,1942=>388,1943=>456,
-1944=>504,1945=>404,1946=>393,1947=>436,1948=>475,1949=>779,1950=>775,1951=>846,1952=>490,1953=>444,
-1954=>414,1955=>487,1956=>404,1957=>427,1958=>32,1959=>32,1960=>39,1961=>40,1962=>39,1963=>40,
-1964=>40,1965=>40,1966=>40,1967=>40,1968=>0,2305=>415,2306=>398,2307=>398,2309=>862,2310=>1042,
-2311=>553,2312=>553,2313=>597,2314=>848,2315=>967,2316=>828,2317=>654,2319=>654,2321=>1042,2323=>1042,
-2324=>1042,2325=>743,2326=>798,2327=>694,2328=>694,2329=>730,2330=>734,2331=>888,2332=>814,2333=>834,
-2334=>734,2335=>629,2336=>629,2337=>653,2338=>609,2339=>694,2340=>654,2341=>694,2342=>588,2343=>694,
-2344=>654,2345=>654,2346=>615,2347=>788,2348=>621,2349=>694,2350=>694,2351=>694,2352=>575,2353=>575,
-2354=>787,2355=>848,2356=>848,2357=>621,2359=>615,2360=>734,2361=>609,2364=>398,2365=>569,2366=>341,
-2367=>341,2368=>341,2369=>0,2370=>0,2371=>0,2372=>0,2373=>415,2375=>615,2376=>615,2377=>341,
-2379=>341,2380=>341,2381=>0,2384=>1047,2392=>743,2393=>798,2394=>694,2395=>814,2396=>653,2397=>609,
-2398=>788,2400=>967,2401=>828,2402=>0,2403=>0,2404=>398,2405=>478,2406=>455,2407=>420,2408=>569,
-2409=>509,2410=>702,2411=>629,2412=>569,2413=>702,2414=>609,2415=>609,2416=>626,2433=>0,2434=>300,
-2435=>312,2437=>594,2438=>776,2439=>469,2440=>513,2441=>535,2442=>561,2443=>604,2444=>481,2447=>580,
-2448=>604,2451=>540,2452=>620,2453=>570,2454=>485,2455=>484,2456=>471,2457=>457,2458=>408,2459=>452,
-2460=>591,2461=>551,2462=>771,2463=>414,2464=>404,2465=>522,2466=>415,2467=>450,2468=>551,2469=>477,
-2470=>478,2471=>449,2472=>448,2474=>535,2475=>611,2476=>443,2477=>534,2478=>492,2479=>474,2480=>442,
-2482=>542,2486=>507,2487=>467,2488=>523,2489=>419,2492=>0,2493=>419,2494=>202,2495=>189,2496=>202,
-2497=>0,2498=>0,2499=>0,2500=>0,2503=>294,2504=>289,2507=>774,2508=>825,2509=>0,2510=>356,
-2519=>219,2524=>523,2525=>420,2527=>469,2528=>604,2529=>481,2530=>0,2531=>0,2534=>500,2535=>437,
-2536=>479,2537=>507,2538=>497,2539=>500,2540=>482,2541=>503,2542=>517,2543=>481,2544=>443,2545=>443,
-2546=>429,2547=>383,2548=>432,2549=>478,2550=>539,2551=>158,2552=>365,2553=>280,2554=>357,2565=>744,
-2566=>914,2567=>690,2568=>670,2569=>596,2570=>596,2575=>498,2576=>744,2579=>596,2580=>744,2581=>550,
-2582=>534,2583=>618,2584=>690,2585=>546,2586=>518,2587=>592,2588=>492,2589=>574,2590=>514,2591=>526,
-2592=>556,2593=>524,2594=>528,2595=>574,2596=>484,2597=>534,2598=>504,2599=>534,2600=>538,2602=>534,
-2603=>506,2604=>562,2605=>516,2606=>546,2607=>670,2608=>538,2610=>726,2611=>726,2613=>514,2614=>546,
-2616=>546,2617=>517,2620=>286,2622=>172,2623=>190,2624=>190,2625=>1,2626=>1,2631=>1,2632=>1,
-2635=>1,2636=>1,2637=>1,2649=>534,2650=>618,2651=>492,2652=>484,2654=>506,2662=>616,2663=>480,
-2664=>560,2665=>480,2666=>468,2667=>492,2668=>514,2669=>538,2670=>572,2671=>560,2672=>1,2674=>498,
-2675=>596,2676=>900,2946=>443,2947=>791,2949=>1167,2950=>1375,2951=>1088,2952=>758,2953=>631,2954=>1441,
-2958=>773,2959=>773,2960=>887,2962=>966,2963=>966,2964=>2019,2965=>869,2969=>884,2970=>779,2972=>887,
-2974=>1117,2975=>756,2979=>1578,2980=>883,2984=>719,2985=>1168,2986=>602,2990=>802,2991=>852,2992=>580,
-2993=>703,2994=>832,2995=>1032,2996=>827,2997=>939,2999=>1109,3000=>1114,3001=>1365,3006=>580,3007=>226,
-3008=>376,3009=>518,3010=>771,3014=>885,3015=>640,3016=>1076,3018=>1482,3019=>1265,3020=>1947,3021=>234,
-3031=>1032,3074=>330,3075=>225,3077=>450,3078=>457,3079=>397,3080=>726,3081=>439,3082=>686,3083=>824,
-3084=>539,3086=>395,3087=>395,3088=>423,3090=>447,3091=>442,3092=>604,3093=>370,3094=>452,3095=>398,
-3096=>634,3097=>445,3098=>433,3099=>433,3100=>445,3101=>390,3102=>592,3103=>453,3104=>388,3105=>440,
-3106=>439,3107=>478,3108=>420,3109=>420,3110=>421,3111=>420,3112=>413,3114=>424,3115=>427,3116=>415,
-3117=>422,3120=>396,3122=>419,3330=>417,3331=>221,3333=>1055,3334=>1193,3335=>792,3336=>1467,3337=>570,
-3338=>1243,3339=>676,3340=>898,3342=>1008,3343=>1004,3344=>1538,3346=>585,3347=>981,3348=>1254,3349=>775,
-3350=>798,3351=>692,3352=>1095,3353=>809,3354=>726,3355=>963,3356=>703,3357=>1244,3358=>1104,3359=>462,
-3360=>531,3361=>983,3362=>1027,3363=>1102,3364=>780,3365=>731,3366=>485,3367=>738,3368=>747,3370=>780,
-3371=>961,3372=>1023,3373=>500,3374=>510,3375=>792,3376=>528,3377=>511,3378=>713,3379=>553,3380=>516,
-3381=>715,3382=>785,3383=>920,3384=>980,3385=>977,3390=>403,3391=>283,3392=>323,3393=>275,3394=>258,
-3395=>378,3398=>543,3399=>478,3400=>1086,3402=>1127,3403=>1038,3404=>676,3405=>89,3415=>676,3424=>676,
-3425=>1008,3430=>675,3431=>668,3432=>673,3433=>737,3434=>721,3435=>702,3436=>702,3437=>687,3438=>675,
-3439=>683,3440=>375,3458=>468,3459=>318,3461=>660,3465=>778,3466=>807,3467=>830,3473=>838,3476=>860,
-3481=>1000,3482=>973,3483=>860,3484=>997,3486=>740,3488=>838,3489=>886,3490=>886,3492=>1295,3493=>1295,
-3495=>838,3496=>860,3497=>860,3498=>860,3499=>1403,3501=>973,3502=>838,3503=>660,3504=>860,3505=>973,
-3507=>660,3508=>886,3509=>838,3510=>860,3511=>973,3512=>838,3513=>860,3514=>886,3515=>807,3517=>830,
-3520=>838,3521=>973,3522=>886,3523=>886,3524=>973,3525=>830,3526=>973,3530=>0,3535=>432,3536=>380,
-3537=>420,3538=>0,3539=>0,3540=>0,3542=>0,3544=>501,3545=>652,3551=>648,3585=>581,3586=>529,
-3587=>596,3588=>581,3589=>594,3590=>649,3591=>494,3592=>561,3593=>690,3594=>529,3595=>596,3596=>792,
-3597=>793,3598=>632,3599=>632,3600=>562,3601=>707,3602=>795,3603=>891,3604=>580,3605=>591,3606=>581,
-3607=>642,3608=>555,3609=>689,3610=>615,3611=>615,3612=>600,3613=>600,3614=>671,3615=>671,3616=>632,
-3617=>591,3618=>536,3619=>511,3620=>581,3621=>561,3622=>632,3623=>559,3624=>593,3625=>701,3626=>573,
-3627=>643,3628=>773,3629=>561,3630=>561,3631=>506,3632=>501,3633=>0,3634=>466,3635=>467,3636=>0,
-3637=>0,3638=>0,3639=>0,3640=>0,3641=>0,3642=>0,3647=>667,3648=>329,3649=>582,3650=>406,
-3651=>406,3652=>406,3653=>267,3654=>525,3655=>0,3656=>0,3657=>0,3658=>0,3659=>0,3660=>0,
-3661=>0,3662=>0,3663=>707,3664=>568,3665=>568,3666=>615,3667=>639,3668=>679,3669=>680,3670=>515,
-3671=>767,3672=>643,3673=>608,3674=>683,3675=>1485,4256=>453,4257=>448,4258=>546,4259=>619,4260=>478,
-4261=>481,4262=>459,4263=>707,4264=>467,4265=>471,4266=>842,4267=>464,4268=>443,4269=>707,4270=>460,
-4271=>465,4272=>686,4273=>440,4274=>550,4275=>561,4276=>580,4277=>467,4278=>630,4279=>466,4280=>517,
-4281=>456,4282=>502,4283=>464,4284=>534,4285=>440,4286=>443,4287=>522,4288=>460,4289=>463,4290=>536,
-4291=>455,4292=>468,4293=>449,4304=>454,4305=>452,4306=>544,4307=>629,4308=>451,4309=>452,4310=>452,
-4311=>702,4312=>451,4313=>452,4314=>820,4315=>451,4316=>453,4317=>695,4318=>449,4319=>448,4320=>694,
-4321=>501,4322=>544,4323=>517,4324=>560,4325=>450,4326=>627,4327=>452,4328=>491,4329=>452,4330=>485,
-4331=>452,4332=>485,4333=>443,4334=>500,4335=>582,4336=>455,4337=>451,4338=>480,4339=>414,4340=>453,
-4341=>418,4608=>583,4609=>770,4610=>560,4611=>525,4612=>525,4613=>583,4614=>758,4616=>598,4617=>787,
-4618=>817,4619=>583,4620=>758,4621=>612,4622=>875,4623=>817,4624=>817,4625=>1050,4626=>1050,4627=>817,
-4628=>1050,4629=>817,4630=>787,4631=>1021,4632=>933,4633=>1137,4634=>1067,4635=>980,4636=>1065,4637=>962,
-4638=>962,4639=>1097,4640=>831,4641=>1021,4642=>851,4643=>735,4644=>875,4645=>968,4646=>817,4647=>881,
-4648=>583,4649=>642,4650=>583,4651=>758,4652=>700,4653=>583,4654=>700,4655=>758,4656=>583,4657=>787,
-4658=>787,4659=>583,4660=>729,4661=>583,4662=>583,4663=>817,4664=>642,4665=>817,4666=>846,4667=>642,
-4668=>758,4669=>744,4670=>642,4671=>817,4672=>700,4673=>700,4674=>700,4675=>758,4676=>700,4677=>700,
-4678=>729,4680=>846,4682=>1079,4683=>700,4684=>700,4685=>1021,4688=>700,4689=>700,4690=>700,4691=>758,
-4692=>700,4693=>758,4694=>729,4696=>846,4698=>1079,4699=>700,4700=>700,4701=>1021,4704=>525,4705=>758,
-4706=>758,4707=>525,4708=>700,4709=>773,4710=>525,4711=>787,4712=>525,4713=>758,4714=>758,4715=>525,
-4716=>700,4717=>773,4718=>525,4719=>525,4720=>729,4721=>729,4722=>729,4723=>802,4724=>729,4725=>729,
-4726=>758,4727=>729,4728=>758,4729=>758,4730=>758,4731=>817,4732=>758,4733=>817,4734=>758,4735=>758,
-4736=>612,4737=>817,4738=>817,4739=>612,4740=>787,4741=>583,4742=>875,4744=>962,4746=>992,4747=>700,
-4748=>758,4749=>904,4752=>408,4753=>583,4754=>525,4755=>554,4756=>481,4757=>554,4758=>642,4759=>671,
-4760=>700,4761=>758,4762=>729,4763=>700,4764=>671,4765=>700,4766=>758,4767=>700,4768=>583,4769=>735,
-4770=>822,4771=>583,4772=>793,4773=>583,4774=>583,4775=>694,4776=>554,4777=>729,4778=>773,4779=>554,
-4780=>700,4781=>554,4782=>554,4784=>992,4786=>1021,4787=>671,4788=>787,4789=>904,4792=>729,4793=>904,
-4794=>948,4795=>729,4796=>875,4797=>729,4798=>729,4800=>1137,4801=>1000,4802=>1167,4803=>758,4804=>875,
-4805=>1108,4808=>758,4809=>875,4810=>700,4811=>700,4812=>700,4813=>992,4814=>758,4816=>554,4817=>787,
-4818=>758,4819=>583,4820=>758,4821=>496,4822=>612,4824=>525,4825=>700,4826=>700,4827=>525,4828=>685,
-4829=>729,4830=>510,4831=>729,4832=>962,4833=>962,4834=>962,4835=>962,4836=>962,4837=>1021,4838=>962,
-4839=>962,4840=>467,4841=>525,4842=>671,4843=>612,4844=>612,4845=>671,4846=>671,4848=>612,4849=>875,
-4850=>817,4851=>642,4852=>729,4853=>729,4854=>758,4855=>817,4856=>700,4857=>758,4858=>715,4859=>700,
-4860=>700,4861=>787,4862=>758,4863=>700,4864=>700,4865=>758,4866=>715,4867=>700,4868=>700,4869=>787,
-4870=>758,4871=>700,4872=>467,4873=>671,4874=>671,4875=>612,4876=>612,4877=>583,4878=>525,4880=>846,
-4882=>904,4883=>554,4884=>700,4885=>817,4888=>525,4889=>729,4890=>729,4891=>612,4892=>671,4893=>583,
-4894=>525,4896=>817,4897=>1021,4898=>1021,4899=>817,4900=>992,4901=>758,4902=>817,4903=>1021,4904=>1079,
-4905=>1137,4906=>1137,4907=>1050,4908=>1312,4909=>1050,4910=>1050,4911=>1123,4912=>647,4913=>793,4914=>822,
-4915=>647,4916=>793,4917=>764,4918=>583,4919=>647,4920=>583,4921=>793,4922=>822,4923=>583,4924=>793,
-4925=>764,4926=>583,4927=>793,4928=>540,4929=>758,4930=>583,4931=>467,4932=>583,4933=>481,4934=>612,
-4936=>758,4937=>700,4938=>758,4939=>700,4940=>831,4941=>671,4942=>758,4943=>700,4944=>758,4945=>758,
-4946=>758,4947=>817,4948=>758,4949=>758,4950=>817,4951=>758,4952=>642,4953=>980,4954=>758,4961=>233,
-4962=>583,4963=>408,4964=>408,4965=>525,4966=>525,4967=>233,4968=>700,4969=>671,4970=>612,4971=>642,
-4972=>642,4973=>642,4974=>583,4975=>700,4976=>758,4977=>642,4978=>583,4979=>700,4980=>729,4981=>720,
-4982=>583,4983=>758,4984=>700,4985=>904,4986=>612,4987=>583,4988=>875,7424=>484,7427=>447,7429=>484,
-7431=>425,7435=>295,7436=>542,7437=>409,7438=>616,7451=>431,7452=>509,7456=>500,7457=>722,7458=>444,
-7465=>408,7553=>500,7556=>525,7557=>278,7559=>507,7565=>500,7680=>722,7681=>444,7682=>667,7683=>500,
-7684=>667,7685=>500,7686=>667,7687=>500,7688=>667,7689=>444,7690=>722,7691=>500,7692=>722,7693=>500,
-7694=>722,7695=>500,7696=>722,7697=>500,7698=>722,7699=>500,7700=>611,7701=>444,7702=>611,7703=>444,
-7704=>611,7705=>444,7706=>611,7707=>444,7708=>611,7709=>444,7710=>556,7711=>333,7712=>722,7713=>500,
-7714=>722,7715=>500,7716=>722,7717=>500,7718=>722,7719=>500,7720=>722,7721=>500,7722=>722,7723=>500,
-7724=>333,7725=>278,7726=>333,7727=>278,7728=>722,7729=>500,7730=>722,7731=>500,7732=>722,7733=>500,
-7734=>611,7735=>278,7736=>611,7737=>278,7738=>611,7739=>278,7740=>611,7741=>278,7742=>889,7743=>778,
-7744=>889,7745=>778,7746=>889,7747=>778,7748=>722,7749=>500,7750=>722,7751=>500,7752=>722,7753=>500,
-7754=>722,7755=>500,7756=>722,7757=>500,7758=>722,7759=>500,7760=>722,7761=>500,7762=>722,7763=>500,
-7764=>556,7765=>500,7766=>556,7767=>500,7768=>667,7769=>333,7770=>667,7771=>333,7772=>667,7773=>333,
-7774=>667,7775=>333,7776=>556,7777=>389,7778=>556,7779=>389,7780=>556,7781=>389,7782=>556,7783=>389,
-7784=>556,7785=>389,7786=>611,7787=>278,7788=>611,7789=>278,7790=>611,7791=>278,7792=>611,7793=>278,
-7794=>722,7795=>500,7796=>722,7797=>500,7798=>722,7799=>500,7800=>722,7801=>500,7802=>722,7803=>500,
-7804=>722,7805=>500,7806=>722,7807=>500,7808=>944,7809=>722,7810=>944,7811=>722,7812=>944,7813=>722,
-7814=>944,7815=>722,7816=>944,7817=>722,7818=>722,7819=>500,7820=>722,7821=>500,7822=>722,7823=>500,
-7824=>611,7825=>444,7826=>611,7827=>444,7828=>611,7829=>444,7830=>500,7831=>278,7832=>722,7833=>500,
-7834=>444,7835=>333,7840=>722,7841=>444,7842=>807,7843=>529,7844=>722,7845=>444,7846=>722,7847=>444,
-7848=>807,7849=>529,7850=>722,7851=>444,7852=>722,7853=>444,7854=>722,7855=>444,7856=>722,7857=>444,
-7858=>807,7859=>529,7860=>722,7861=>444,7862=>722,7863=>444,7864=>611,7865=>444,7866=>696,7867=>529,
-7868=>611,7869=>444,7870=>611,7871=>444,7872=>611,7873=>444,7874=>696,7875=>529,7876=>611,7877=>444,
-7878=>611,7879=>444,7880=>333,7881=>278,7882=>333,7883=>278,7884=>722,7885=>500,7886=>807,7887=>585,
-7888=>722,7889=>500,7890=>722,7891=>500,7892=>807,7893=>585,7894=>722,7895=>500,7896=>722,7897=>500,
-7898=>722,7899=>500,7900=>722,7901=>500,7902=>807,7903=>585,7904=>722,7905=>500,7906=>722,7907=>500,
-7908=>722,7909=>500,7910=>807,7911=>585,7912=>722,7913=>500,7914=>722,7915=>500,7916=>807,7917=>585,
-7918=>722,7919=>500,7920=>722,7921=>500,7922=>722,7923=>500,7924=>722,7925=>500,7926=>807,7927=>585,
-7928=>722,7929=>500,7936=>587,7937=>587,7938=>587,7939=>587,7940=>587,7941=>587,7942=>587,7943=>587,
-7944=>722,7945=>722,7946=>833,7947=>833,7948=>833,7949=>833,7950=>833,7951=>833,7952=>426,7953=>426,
-7954=>426,7955=>426,7956=>426,7957=>426,7960=>889,7961=>889,7962=>944,7963=>944,7964=>944,7965=>944,
-7968=>534,7969=>534,7970=>534,7971=>534,7972=>534,7973=>534,7974=>534,7975=>534,7976=>889,7977=>889,
-7978=>1000,7979=>1000,7980=>1000,7981=>1000,7982=>1000,7983=>1000,7984=>267,7985=>267,7986=>267,7987=>267,
-7988=>267,7989=>267,7990=>267,7991=>267,7992=>556,7993=>556,7994=>696,7995=>696,7996=>696,7997=>696,
-7998=>696,7999=>696,8000=>500,8001=>500,8002=>500,8003=>500,8004=>500,8005=>500,8008=>889,8009=>889,
-8010=>944,8011=>1000,8012=>944,8013=>1000,8016=>534,8017=>534,8018=>534,8019=>534,8020=>534,8021=>534,
-8022=>534,8023=>534,8025=>889,8027=>1000,8029=>1000,8031=>1000,8032=>693,8033=>693,8034=>693,8035=>693,
-8036=>693,8037=>693,8038=>693,8039=>693,8040=>944,8041=>944,8042=>1000,8043=>1000,8044=>1000,8045=>1000,
-8046=>1000,8047=>1000,8048=>587,8049=>587,8050=>426,8051=>426,8052=>534,8053=>534,8054=>267,8055=>267,
-8056=>500,8057=>500,8058=>534,8059=>534,8060=>693,8061=>693,8064=>587,8065=>587,8066=>587,8067=>587,
-8068=>587,8069=>587,8070=>587,8071=>587,8072=>944,8073=>944,8074=>1000,8075=>1000,8076=>1000,8077=>1000,
-8078=>1000,8079=>1000,8080=>534,8081=>534,8082=>534,8083=>534,8084=>534,8085=>534,8086=>534,8087=>534,
-8088=>1116,8089=>1116,8090=>1227,8091=>1227,8092=>1227,8093=>1227,8094=>1227,8095=>1227,8096=>693,8097=>693,
-8098=>693,8099=>693,8100=>693,8101=>693,8102=>693,8103=>693,8104=>1171,8105=>1171,8106=>1227,8107=>1227,
-8108=>1227,8109=>1227,8110=>1227,8111=>1227,8112=>587,8113=>587,8114=>587,8115=>587,8116=>587,8118=>587,
-8119=>587,8120=>722,8121=>722,8122=>722,8123=>722,8124=>944,8125=>250,8126=>332,8127=>500,8128=>500,
-8129=>534,8130=>534,8131=>534,8132=>534,8134=>534,8135=>534,8136=>722,8137=>722,8138=>889,8139=>889,
-8140=>949,8141=>500,8142=>500,8143=>500,8144=>267,8145=>267,8146=>267,8147=>267,8150=>267,8151=>267,
-8152=>333,8153=>333,8154=>500,8155=>500,8157=>500,8158=>500,8159=>500,8160=>534,8161=>534,8162=>534,
-8163=>534,8164=>534,8165=>534,8166=>534,8167=>534,8168=>696,8169=>696,8170=>889,8171=>889,8172=>778,
-8173=>534,8174=>534,8175=>500,8178=>693,8179=>693,8180=>693,8182=>693,8183=>693,8184=>889,8185=>889,
-8186=>889,8187=>889,8188=>1000,8189=>500,8190=>500,8193=>1000,8194=>500,8195=>1000,8196=>333,8197=>250,
-8198=>167,8201=>200,8203=>0,8204=>0,8205=>0,8208=>333,8209=>333,8210=>500,8213=>1000,8215=>500,
-8219=>333,8223=>444,8227=>350,8241=>1363,8242=>247,8243=>411,8244=>611,8245=>220,8246=>440,8247=>660,
+486=>722,487=>500,488=>722,489=>500,490=>722,491=>500,492=>722,493=>500,494=>530,495=>389,
+496=>278,497=>1333,498=>1166,499=>944,500=>722,501=>500,502=>944,503=>522,504=>722,505=>500,
+506=>722,507=>444,508=>889,509=>667,510=>722,511=>500,512=>722,513=>444,514=>722,515=>444,
+516=>611,517=>444,518=>611,519=>444,520=>333,521=>278,522=>333,523=>278,524=>722,525=>500,
+526=>722,527=>500,528=>667,529=>333,530=>667,531=>333,532=>500,533=>500,534=>722,535=>500,
+536=>556,537=>389,538=>611,539=>278,540=>424,541=>455,542=>722,543=>500,544=>715,545=>588,
+546=>565,547=>468,548=>611,549=>444,550=>722,551=>444,552=>611,553=>444,554=>722,555=>500,
+556=>722,557=>500,558=>722,559=>500,560=>722,561=>500,562=>722,563=>500,564=>407,565=>597,
+566=>379,567=>278,568=>771,569=>760,570=>722,571=>667,572=>444,573=>611,574=>611,575=>389,
+576=>444,577=>444,578=>444,579=>667,580=>722,581=>722,582=>611,583=>444,584=>389,585=>278,
+586=>796,587=>590,588=>667,589=>333,590=>722,591=>500,592=>444,593=>500,594=>507,595=>500,
+596=>444,597=>444,598=>500,599=>500,600=>444,601=>444,602=>722,603=>426,604=>426,605=>674,
+606=>454,607=>278,608=>500,609=>500,610=>484,611=>500,612=>582,613=>500,614=>500,615=>500,
+616=>278,617=>278,618=>278,619=>278,620=>278,621=>278,622=>556,623=>778,624=>778,625=>778,
+626=>500,627=>500,628=>500,629=>491,630=>668,631=>693,632=>640,633=>333,634=>333,635=>333,
+636=>333,637=>333,638=>333,639=>333,640=>446,641=>446,642=>389,643=>333,644=>500,645=>333,
+646=>500,647=>278,648=>278,649=>500,650=>517,651=>514,652=>500,653=>722,654=>500,655=>510,
+656=>524,657=>444,658=>389,659=>456,660=>444,661=>444,662=>444,663=>444,664=>722,665=>468,
+666=>454,667=>665,668=>524,669=>347,670=>500,671=>443,672=>500,673=>444,674=>444,675=>798,
+676=>795,677=>805,678=>554,679=>561,680=>678,681=>722,682=>554,683=>554,684=>500,685=>500,
+686=>611,687=>611,688=>300,689=>300,690=>278,691=>278,692=>278,693=>309,694=>306,695=>432,
+696=>310,697=>250,698=>408,699=>333,700=>333,701=>333,702=>333,703=>333,704=>258,705=>258,
+706=>374,707=>374,708=>383,709=>383,711=>333,712=>250,713=>333,714=>333,715=>333,716=>250,
+717=>333,718=>333,719=>333,720=>278,721=>278,722=>333,723=>333,724=>333,725=>333,726=>333,
+727=>333,728=>333,729=>333,730=>333,731=>333,733=>382,734=>336,735=>352,736=>311,737=>200,
+738=>243,739=>328,740=>300,741=>460,742=>460,743=>460,744=>460,745=>460,746=>477,747=>475,
+748=>339,749=>333,750=>444,751=>383,752=>383,753=>294,754=>294,755=>327,756=>261,757=>437,
+758=>437,759=>333,760=>278,761=>175,762=>175,763=>175,764=>175,765=>337,766=>337,767=>326,
+768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,
+778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,
+788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,
+798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,
+808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,
+818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,
+828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,
+838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,
+848=>0,849=>0,850=>0,851=>0,852=>0,853=>0,854=>0,855=>0,856=>0,857=>0,
+858=>0,859=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,866=>0,867=>0,
+868=>0,869=>0,870=>0,871=>0,872=>0,873=>0,874=>0,875=>0,876=>0,877=>0,
+878=>0,879=>0,884=>199,885=>199,890=>332,894=>278,900=>267,901=>333,902=>722,903=>250,
+904=>800,905=>902,906=>507,908=>818,910=>861,911=>871,912=>286,913=>722,914=>667,915=>586,
+916=>660,917=>611,918=>611,919=>722,920=>726,921=>333,922=>722,923=>722,924=>889,925=>722,
+926=>628,927=>722,928=>722,929=>556,931=>627,932=>611,933=>696,934=>742,935=>722,936=>808,
+937=>743,938=>333,939=>718,940=>583,941=>426,942=>536,943=>286,944=>514,945=>583,946=>527,
+947=>480,948=>534,949=>426,950=>466,951=>536,952=>534,953=>286,954=>544,955=>476,956=>536,
+957=>480,958=>514,959=>500,960=>587,961=>528,962=>452,963=>537,964=>420,965=>514,966=>643,
+967=>480,968=>693,969=>693,970=>286,971=>514,972=>500,973=>514,974=>693,976=>534,977=>587,
+978=>620,979=>809,980=>620,981=>640,982=>684,983=>534,984=>556,985=>500,986=>594,987=>426,
+988=>556,989=>445,990=>656,991=>400,992=>722,993=>570,994=>960,995=>673,996=>581,997=>429,
+998=>560,999=>407,1000=>450,1001=>321,1002=>842,1003=>593,1004=>564,1005=>413,1006=>618,1007=>438,
+1008=>534,1009=>534,1010=>485,1011=>278,1012=>726,1013=>361,1014=>361,1015=>576,1016=>542,1017=>667,
+1018=>889,1019=>709,1020=>534,1021=>667,1022=>1000,1023=>1000,1024=>615,1025=>613,1026=>748,1027=>570,
+1028=>659,1029=>487,1030=>329,1031=>329,1032=>381,1033=>943,1034=>985,1035=>827,1036=>669,1037=>723,
+1038=>709,1039=>723,1040=>711,1041=>576,1042=>626,1043=>570,1044=>639,1045=>613,1046=>937,1047=>580,
+1048=>723,1049=>723,1050=>669,1051=>684,1052=>891,1053=>723,1054=>722,1055=>723,1056=>576,1057=>659,
+1058=>608,1059=>709,1060=>750,1061=>714,1062=>728,1063=>682,1064=>984,1065=>988,1066=>725,1067=>863,
+1068=>576,1069=>659,1070=>966,1071=>648,1072=>434,1073=>495,1074=>468,1075=>386,1076=>488,1077=>436,
+1078=>662,1079=>404,1080=>524,1081=>524,1082=>498,1083=>490,1084=>632,1085=>524,1086=>491,1087=>524,
+1088=>500,1089=>422,1090=>422,1091=>471,1092=>694,1093=>482,1094=>522,1095=>506,1096=>756,1097=>754,
+1098=>503,1099=>626,1100=>431,1101=>430,1102=>664,1103=>492,1104=>434,1105=>434,1106=>479,1107=>386,
+1108=>430,1109=>347,1110=>269,1111=>278,1112=>278,1113=>677,1114=>711,1115=>514,1116=>498,1117=>524,
+1118=>471,1119=>524,1120=>978,1121=>664,1122=>718,1123=>506,1124=>939,1125=>647,1126=>912,1127=>643,
+1128=>1248,1129=>894,1130=>948,1131=>662,1132=>1299,1133=>911,1134=>516,1135=>391,1136=>870,1137=>694,
+1138=>726,1139=>491,1140=>780,1141=>550,1142=>780,1143=>550,1144=>1207,1145=>946,1146=>877,1147=>611,
+1148=>978,1149=>664,1150=>978,1151=>664,1152=>594,1153=>428,1154=>232,1155=>0,1156=>0,1157=>0,
+1158=>0,1159=>0,1160=>0,1161=>0,1162=>715,1163=>522,1164=>562,1165=>430,1166=>556,1167=>511,
+1168=>564,1169=>398,1170=>586,1171=>402,1172=>573,1173=>463,1174=>1001,1175=>688,1176=>580,1177=>414,
+1178=>698,1179=>517,1180=>734,1181=>537,1182=>671,1183=>498,1184=>842,1185=>573,1186=>732,1187=>524,
+1188=>926,1189=>652,1190=>1014,1191=>721,1192=>671,1193=>531,1194=>667,1195=>437,1196=>611,1197=>454,
+1198=>722,1199=>563,1200=>722,1201=>562,1202=>783,1203=>517,1204=>967,1205=>693,1206=>691,1207=>510,
+1208=>718,1209=>538,1210=>674,1211=>508,1212=>866,1213=>566,1214=>866,1215=>566,1216=>333,1217=>937,
+1218=>662,1219=>626,1220=>446,1221=>702,1222=>489,1223=>722,1224=>497,1225=>823,1226=>545,1227=>674,
+1228=>504,1229=>889,1230=>630,1231=>333,1232=>711,1233=>434,1234=>711,1235=>434,1236=>889,1237=>644,
+1238=>613,1239=>449,1240=>722,1241=>449,1242=>722,1243=>449,1244=>937,1245=>662,1246=>580,1247=>404,
+1248=>530,1249=>366,1250=>723,1251=>524,1252=>723,1253=>524,1254=>722,1255=>491,1256=>722,1257=>491,
+1258=>722,1259=>491,1260=>659,1261=>430,1262=>709,1263=>471,1264=>709,1265=>471,1266=>709,1267=>471,
+1268=>682,1269=>506,1270=>564,1271=>388,1272=>863,1273=>626,1274=>556,1275=>388,1276=>720,1277=>445,
+1278=>722,1279=>495,1280=>556,1281=>504,1282=>900,1283=>634,1284=>553,1285=>471,1286=>803,1287=>518,
+1288=>964,1289=>637,1290=>968,1291=>682,1292=>722,1293=>433,1294=>710,1295=>504,1296=>532,1297=>409,
+1298=>702,1299=>489,1300=>960,1301=>644,1302=>823,1303=>702,1304=>961,1305=>766,1306=>722,1307=>504,
+1308=>944,1309=>693,1310=>690,1311=>502,1312=>994,1313=>695,1314=>1011,1315=>727,1425=>0,1426=>0,
+1427=>0,1428=>0,1429=>0,1430=>0,1431=>418,1432=>0,1433=>0,1434=>0,1435=>0,1436=>0,
+1437=>0,1438=>0,1439=>0,1440=>0,1441=>0,1442=>0,1443=>0,1444=>0,1445=>0,1446=>0,
+1447=>0,1448=>0,1449=>0,1450=>0,1451=>0,1452=>0,1453=>0,1454=>0,1455=>0,1456=>0,
+1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1466=>0,
+1467=>0,1468=>0,1469=>0,1470=>440,1471=>0,1472=>126,1473=>0,1474=>0,1475=>418,1476=>0,
+1477=>0,1478=>350,1479=>0,1488=>537,1489=>537,1490=>350,1491=>537,1492=>537,1493=>350,1494=>350,
+1495=>537,1496=>537,1497=>350,1498=>537,1499=>537,1500=>537,1501=>537,1502=>537,1503=>350,1504=>350,
+1505=>537,1506=>537,1507=>537,1508=>537,1509=>537,1510=>537,1511=>537,1512=>537,1513=>537,1514=>537,
+1520=>537,1521=>537,1522=>537,1523=>396,1524=>396,1548=>226,1563=>250,1567=>473,1569=>350,1570=>321,
+1571=>249,1572=>399,1573=>249,1574=>776,1575=>249,1576=>950,1577=>424,1578=>925,1579=>924,1580=>738,
+1581=>748,1582=>701,1583=>397,1584=>399,1585=>328,1586=>331,1587=>951,1588=>949,1589=>949,1590=>949,
+1591=>557,1592=>550,1593=>625,1594=>602,1601=>801,1602=>696,1603=>757,1604=>655,1605=>549,1606=>651,
+1607=>424,1608=>399,1609=>776,1610=>776,1611=>0,1613=>0,1614=>0,1615=>0,1616=>0,1617=>0,
+1618=>0,1619=>0,1620=>0,1621=>0,1632=>297,1633=>254,1634=>427,1635=>497,1636=>440,1637=>465,
+1638=>466,1639=>421,1640=>459,1641=>424,1643=>212,1652=>300,1662=>926,1670=>750,1688=>338,1711=>874,
+1740=>776,1748=>176,1920=>450,1921=>501,1922=>582,1923=>544,1924=>482,1925=>433,1926=>448,1927=>462,
+1928=>474,1929=>471,1930=>469,1931=>537,1932=>499,1933=>514,1934=>471,1935=>572,1936=>880,1937=>440,
+1938=>476,1939=>594,1940=>469,1941=>448,1942=>441,1943=>519,1944=>573,1945=>459,1946=>447,1947=>496,
+1948=>541,1949=>887,1950=>883,1951=>964,1952=>558,1953=>505,1954=>471,1955=>554,1956=>459,1957=>486,
+1958=>36,1959=>36,1960=>43,1961=>45,1962=>43,1963=>45,1964=>45,1965=>45,1966=>45,1967=>45,
+1968=>0,2305=>415,2306=>398,2307=>398,2309=>862,2310=>1042,2311=>553,2312=>553,2313=>597,2314=>848,
+2315=>967,2316=>828,2317=>654,2319=>654,2321=>1042,2323=>1042,2324=>1042,2325=>743,2326=>798,2327=>694,
+2328=>694,2329=>730,2330=>734,2331=>888,2332=>814,2333=>834,2334=>734,2335=>629,2336=>629,2337=>653,
+2338=>609,2339=>694,2340=>654,2341=>694,2342=>588,2343=>694,2344=>654,2345=>654,2346=>615,2347=>788,
+2348=>621,2349=>694,2350=>694,2351=>694,2352=>575,2353=>575,2354=>787,2355=>848,2356=>848,2357=>621,
+2359=>615,2360=>734,2361=>609,2364=>398,2365=>569,2366=>341,2367=>341,2368=>341,2369=>0,2370=>0,
+2371=>0,2372=>0,2373=>415,2375=>615,2376=>615,2377=>341,2379=>341,2380=>341,2381=>0,2384=>1047,
+2392=>743,2393=>798,2394=>694,2395=>814,2396=>653,2397=>609,2398=>788,2400=>967,2401=>828,2402=>0,
+2403=>0,2404=>398,2405=>478,2406=>455,2407=>420,2408=>569,2409=>509,2410=>702,2411=>629,2412=>569,
+2413=>702,2414=>609,2415=>609,2416=>626,2433=>0,2434=>300,2435=>312,2437=>594,2438=>776,2439=>469,
+2440=>513,2441=>535,2442=>561,2443=>604,2444=>481,2447=>580,2448=>604,2451=>540,2452=>620,2453=>570,
+2454=>485,2455=>484,2456=>471,2457=>457,2458=>408,2459=>452,2460=>591,2461=>551,2462=>771,2463=>414,
+2464=>404,2465=>522,2466=>415,2467=>450,2468=>551,2469=>477,2470=>478,2471=>449,2472=>448,2474=>535,
+2475=>611,2476=>443,2477=>534,2478=>492,2479=>474,2480=>442,2482=>542,2486=>507,2487=>467,2488=>523,
+2489=>419,2492=>0,2493=>419,2494=>202,2495=>189,2496=>202,2497=>0,2498=>0,2499=>0,2500=>0,
+2503=>294,2504=>289,2507=>774,2508=>825,2509=>0,2510=>356,2519=>219,2524=>523,2525=>420,2527=>469,
+2528=>604,2529=>481,2530=>0,2531=>0,2534=>500,2535=>437,2536=>479,2537=>507,2538=>497,2539=>500,
+2540=>482,2541=>503,2542=>517,2543=>481,2544=>443,2545=>443,2546=>429,2547=>383,2548=>432,2549=>478,
+2550=>539,2551=>158,2552=>365,2553=>280,2554=>357,2561=>0,2562=>0,2563=>385,2565=>728,2566=>884,
+2567=>656,2568=>656,2569=>580,2570=>580,2575=>482,2576=>728,2579=>580,2580=>728,2581=>534,2582=>518,
+2583=>602,2584=>674,2585=>530,2586=>502,2587=>576,2588=>476,2589=>558,2590=>501,2591=>510,2592=>540,
+2593=>508,2594=>512,2595=>558,2596=>468,2597=>518,2598=>488,2599=>518,2600=>522,2602=>518,2603=>490,
+2604=>546,2605=>500,2606=>530,2607=>654,2608=>522,2610=>710,2611=>710,2613=>498,2614=>530,2616=>530,
+2617=>501,2620=>286,2622=>156,2623=>174,2624=>174,2625=>0,2626=>0,2631=>0,2632=>0,2635=>0,
+2636=>0,2637=>0,2641=>0,2649=>534,2650=>618,2651=>492,2652=>484,2654=>506,2662=>616,2663=>480,
+2664=>560,2665=>480,2666=>468,2667=>492,2668=>514,2669=>538,2670=>572,2671=>560,2672=>0,2673=>0,
+2674=>498,2675=>596,2676=>900,2677=>0,2946=>345,2947=>616,2949=>910,2950=>1072,2951=>848,2952=>591,
+2953=>492,2954=>1123,2958=>602,2959=>602,2960=>691,2962=>753,2963=>753,2964=>1597,2965=>677,2969=>697,
+2970=>607,2972=>691,2974=>871,2975=>589,2979=>1230,2980=>688,2984=>560,2985=>911,2986=>477,2990=>625,
+2991=>672,2992=>452,2993=>553,2994=>651,2995=>804,2996=>645,2997=>740,2999=>865,3000=>870,3001=>1067,
+3006=>452,3007=>176,3008=>293,3009=>404,3010=>601,3014=>690,3015=>503,3016=>839,3018=>1188,3019=>982,
+3020=>1519,3021=>234,3031=>804,3330=>417,3331=>221,3333=>1055,3334=>1195,3335=>792,3336=>1467,3337=>569,
+3338=>1243,3339=>676,3340=>897,3342=>1008,3343=>1004,3344=>1538,3346=>585,3347=>981,3348=>1254,3349=>775,
+3350=>798,3351=>691,3352=>1095,3353=>809,3354=>726,3355=>963,3356=>703,3357=>1244,3358=>1103,3359=>462,
+3360=>531,3361=>983,3362=>1027,3363=>1102,3364=>779,3365=>731,3366=>485,3367=>737,3368=>747,3370=>779,
+3371=>961,3372=>1023,3373=>500,3374=>510,3375=>792,3376=>527,3377=>511,3378=>713,3379=>553,3380=>516,
+3381=>715,3382=>785,3383=>920,3384=>977,3385=>977,3389=>375,3390=>403,3391=>283,3392=>323,3393=>275,
+3394=>258,3395=>378,3396=>378,3398=>542,3399=>478,3400=>1069,3402=>1127,3403=>1038,3404=>676,3405=>89,
+3415=>676,3424=>676,3425=>1006,3430=>559,3431=>659,3432=>674,3433=>933,3434=>671,3435=>699,3436=>703,
+3437=>688,3438=>677,3439=>684,3440=>375,3458=>355,3459=>241,3461=>501,3465=>591,3466=>613,3467=>630,
+3473=>636,3476=>653,3481=>760,3482=>739,3483=>653,3484=>757,3486=>562,3488=>636,3489=>673,3490=>673,
+3492=>984,3493=>984,3495=>636,3496=>653,3497=>653,3498=>653,3499=>1066,3501=>739,3502=>636,3503=>501,
+3504=>653,3505=>739,3507=>501,3508=>673,3509=>636,3510=>653,3511=>739,3512=>636,3513=>653,3514=>673,
+3515=>613,3517=>630,3520=>636,3521=>739,3522=>673,3523=>673,3524=>739,3525=>630,3526=>739,3530=>0,
+3535=>328,3536=>288,3537=>319,3538=>0,3539=>0,3540=>0,3542=>0,3544=>380,3545=>495,3551=>492,
+3585=>532,3586=>472,3587=>534,3588=>532,3589=>544,3590=>583,3591=>417,3592=>488,3593=>604,3594=>472,
+3595=>534,3596=>716,3597=>717,3598=>568,3599=>568,3600=>457,3601=>637,3602=>731,3603=>790,3604=>531,
+3605=>542,3606=>522,3607=>577,3608=>468,3609=>603,3610=>554,3611=>554,3612=>556,3613=>556,3614=>604,
+3615=>604,3616=>568,3617=>542,3618=>496,3619=>442,3620=>530,3621=>512,3622=>568,3623=>478,3624=>543,
+3625=>614,3626=>525,3627=>578,3628=>659,3629=>514,3630=>514,3631=>450,3632=>402,3633=>0,3634=>378,
+3635=>415,3636=>0,3637=>0,3638=>0,3639=>0,3640=>0,3641=>0,3642=>0,3647=>620,3648=>286,
+3649=>521,3650=>447,3651=>426,3652=>424,3653=>333,3654=>453,3655=>0,3656=>0,3657=>0,3658=>0,
+3659=>0,3660=>0,3661=>0,3662=>0,3663=>657,3664=>528,3665=>528,3666=>571,3667=>594,3668=>631,
+3669=>632,3670=>478,3671=>713,3672=>597,3673=>565,3674=>615,3675=>1381,4256=>453,4257=>448,4258=>546,
+4259=>619,4260=>478,4261=>481,4262=>459,4263=>707,4264=>467,4265=>471,4266=>842,4267=>464,4268=>443,
+4269=>707,4270=>460,4271=>465,4272=>686,4273=>440,4274=>550,4275=>561,4276=>580,4277=>467,4278=>630,
+4279=>466,4280=>517,4281=>456,4282=>502,4283=>464,4284=>534,4285=>440,4286=>443,4287=>522,4288=>460,
+4289=>463,4290=>536,4291=>455,4292=>468,4293=>449,4304=>454,4305=>452,4306=>544,4307=>629,4308=>451,
+4309=>452,4310=>452,4311=>702,4312=>451,4313=>452,4314=>820,4315=>451,4316=>453,4317=>695,4318=>449,
+4319=>448,4320=>694,4321=>501,4322=>544,4323=>517,4324=>560,4325=>450,4326=>627,4327=>452,4328=>491,
+4329=>452,4330=>485,4331=>452,4332=>485,4333=>443,4334=>500,4335=>582,4336=>455,4337=>451,4338=>480,
+4339=>414,4340=>453,4341=>418,4345=>528,4347=>410,4608=>583,4609=>770,4610=>560,4611=>525,4612=>525,
+4613=>583,4614=>758,4616=>598,4617=>787,4618=>817,4619=>583,4620=>758,4621=>612,4622=>875,4623=>817,
+4624=>817,4625=>1050,4626=>1050,4627=>817,4628=>1050,4629=>817,4630=>787,4631=>1021,4632=>933,4633=>1137,
+4634=>1067,4635=>980,4636=>1065,4637=>962,4638=>962,4639=>1097,4640=>831,4641=>1021,4642=>851,4643=>735,
+4644=>875,4645=>968,4646=>817,4647=>881,4648=>583,4649=>642,4650=>583,4651=>758,4652=>700,4653=>583,
+4654=>700,4655=>758,4656=>583,4657=>787,4658=>787,4659=>583,4660=>729,4661=>583,4662=>583,4663=>817,
+4664=>642,4665=>817,4666=>846,4667=>642,4668=>758,4669=>744,4670=>642,4671=>817,4672=>700,4673=>700,
+4674=>700,4675=>758,4676=>700,4677=>700,4678=>729,4680=>846,4682=>1079,4683=>700,4684=>700,4685=>1021,
+4688=>700,4689=>700,4690=>700,4691=>758,4692=>700,4693=>758,4694=>729,4696=>846,4698=>1079,4699=>700,
+4700=>700,4701=>1021,4704=>525,4705=>758,4706=>758,4707=>525,4708=>700,4709=>773,4710=>525,4711=>787,
+4712=>525,4713=>758,4714=>758,4715=>525,4716=>700,4717=>773,4718=>525,4719=>525,4720=>729,4721=>729,
+4722=>729,4723=>802,4724=>729,4725=>729,4726=>758,4727=>729,4728=>758,4729=>758,4730=>758,4731=>817,
+4732=>758,4733=>817,4734=>758,4735=>758,4736=>612,4737=>817,4738=>817,4739=>612,4740=>787,4741=>583,
+4742=>875,4744=>962,4746=>992,4747=>700,4748=>758,4749=>904,4752=>408,4753=>583,4754=>525,4755=>554,
+4756=>481,4757=>554,4758=>642,4759=>671,4760=>700,4761=>758,4762=>729,4763=>700,4764=>671,4765=>700,
+4766=>758,4767=>700,4768=>583,4769=>735,4770=>822,4771=>583,4772=>793,4773=>583,4774=>583,4775=>694,
+4776=>554,4777=>729,4778=>773,4779=>554,4780=>700,4781=>554,4782=>554,4784=>992,4786=>1021,4787=>671,
+4788=>787,4789=>904,4792=>729,4793=>904,4794=>948,4795=>729,4796=>875,4797=>729,4798=>729,4800=>1137,
+4802=>1167,4803=>758,4804=>875,4805=>1108,4808=>758,4809=>875,4810=>700,4811=>700,4812=>700,4813=>992,
+4814=>758,4816=>554,4817=>787,4818=>758,4819=>583,4820=>758,4821=>496,4822=>612,4824=>525,4825=>700,
+4826=>700,4827=>525,4828=>685,4829=>729,4830=>510,4831=>729,4832=>962,4833=>962,4834=>962,4835=>962,
+4836=>962,4837=>1021,4838=>962,4839=>962,4840=>467,4841=>525,4842=>671,4843=>612,4844=>612,4845=>671,
+4846=>671,4848=>612,4849=>875,4850=>817,4851=>642,4852=>729,4853=>729,4854=>758,4855=>817,4856=>700,
+4857=>758,4858=>715,4859=>700,4860=>700,4861=>787,4862=>758,4863=>700,4864=>700,4865=>758,4866=>715,
+4867=>700,4868=>700,4869=>787,4870=>758,4871=>700,4872=>467,4873=>671,4874=>671,4875=>612,4876=>612,
+4877=>583,4878=>525,4880=>846,4882=>904,4883=>554,4884=>700,4885=>817,4888=>525,4889=>729,4890=>729,
+4891=>612,4892=>671,4893=>583,4894=>525,4896=>817,4897=>1021,4898=>1021,4899=>817,4900=>992,4901=>758,
+4902=>817,4903=>1021,4904=>1079,4905=>1137,4906=>1137,4907=>1050,4908=>1312,4909=>1050,4910=>1050,4911=>1123,
+4912=>647,4913=>793,4914=>822,4915=>647,4916=>793,4917=>764,4918=>583,4919=>647,4920=>583,4921=>793,
+4922=>822,4923=>583,4924=>793,4925=>764,4926=>583,4927=>793,4928=>540,4929=>758,4930=>583,4931=>467,
+4932=>583,4933=>481,4934=>612,4936=>758,4937=>700,4938=>758,4939=>700,4940=>831,4941=>671,4942=>758,
+4943=>700,4944=>758,4945=>758,4946=>758,4947=>817,4948=>758,4949=>758,4950=>817,4951=>758,4952=>642,
+4953=>980,4954=>758,4961=>233,4962=>583,4963=>408,4964=>408,4965=>525,4966=>525,4967=>233,4968=>700,
+4969=>671,4970=>612,4971=>642,4972=>642,4973=>642,4974=>583,4975=>700,4976=>758,4977=>642,4978=>583,
+4979=>700,4980=>729,4981=>720,4982=>583,4983=>758,4984=>700,4985=>904,4986=>612,4987=>583,4988=>875,
+5024=>711,5025=>678,5026=>604,5027=>667,5028=>796,5029=>301,5030=>516,5031=>544,5032=>457,5033=>716,
+5034=>703,5035=>383,5036=>628,5037=>709,5038=>455,5039=>601,5040=>472,5041=>574,5042=>730,5043=>939,
+5044=>498,5045=>528,5046=>667,5047=>891,5048=>505,5049=>792,5050=>957,5051=>725,5052=>595,5053=>733,
+5054=>698,5055=>638,5056=>720,5057=>732,5058=>624,5059=>638,5060=>565,5061=>903,5062=>655,5063=>681,
+5064=>675,5065=>949,5066=>683,5067=>547,5068=>693,5069=>732,5070=>529,5071=>569,5072=>536,5073=>677,
+5074=>631,5075=>382,5076=>973,5077=>543,5078=>607,5079=>652,5080=>652,5081=>693,5082=>514,5083=>803,
+5084=>658,5085=>597,5086=>627,5087=>659,5088=>679,5089=>706,5090=>563,5091=>618,5092=>767,5093=>776,
+5094=>731,5095=>492,5096=>808,5097=>823,5098=>796,5099=>689,5100=>716,5101=>518,5102=>521,5103=>719,
+5104=>563,5105=>776,5106=>634,5107=>822,5108=>621,5920=>502,5921=>502,5922=>500,5923=>498,5924=>500,
+5925=>502,5926=>502,5927=>502,5928=>500,5929=>503,5930=>502,5931=>502,5932=>500,5933=>500,5934=>500,
+5935=>796,5936=>500,5937=>502,5938=>0,5939=>0,5940=>0,5941=>230,5942=>397,6480=>537,6481=>537,
+6482=>531,6483=>678,6484=>682,6485=>628,6486=>732,6487=>721,6488=>598,6489=>583,6490=>702,6491=>554,
+6492=>683,6493=>554,6494=>710,6495=>695,6496=>523,6497=>678,6498=>589,6499=>272,6500=>506,6501=>515,
+6502=>515,6503=>210,6504=>210,6505=>515,6506=>515,6507=>515,6508=>229,6509=>705,6512=>649,6513=>538,
+6514=>568,6515=>520,6516=>544,6656=>820,6657=>958,6658=>758,6659=>859,6660=>958,6661=>727,6662=>904,
+6663=>940,6664=>850,6665=>905,6666=>838,6667=>961,6668=>1000,6669=>880,6670=>1189,6671=>1246,6672=>1177,
+6673=>757,6674=>1246,6675=>1192,6676=>709,6677=>1192,6678=>1075,6679=>0,6680=>0,6681=>534,6682=>690,
+6683=>0,6686=>697,6687=>500,7424=>484,7425=>595,7426=>667,7427=>446,7428=>446,7429=>483,7430=>483,
+7431=>409,7432=>426,7433=>278,7434=>260,7435=>483,7436=>409,7437=>595,7438=>483,7439=>483,7440=>426,
+7441=>500,7442=>489,7443=>668,7444=>722,7445=>378,7448=>372,7449=>446,7450=>446,7451=>409,7452=>483,
+7453=>488,7454=>660,7455=>500,7456=>483,7457=>632,7458=>409,7459=>355,7462=>392,7463=>483,7464=>483,
+7465=>372,7466=>541,7467=>470,7468=>484,7469=>595,7470=>446,7471=>446,7472=>483,7473=>409,7474=>409,
+7475=>483,7476=>483,7477=>223,7478=>260,7479=>483,7480=>409,7481=>595,7482=>483,7483=>483,7484=>483,
+7485=>378,7486=>372,7487=>446,7488=>409,7489=>483,7490=>632,7491=>297,7492=>297,7493=>335,7494=>446,
+7495=>335,7496=>335,7497=>297,7498=>297,7499=>285,7500=>285,7501=>335,7502=>186,7503=>335,7504=>521,
+7505=>335,7506=>335,7507=>297,7510=>335,7511=>186,7512=>335,7513=>326,7514=>521,7515=>335,7517=>353,
+7518=>321,7519=>357,7520=>430,7521=>321,7522=>186,7523=>223,7524=>335,7525=>335,7526=>353,7527=>321,
+7528=>353,7529=>430,7530=>321,7531=>754,7532=>500,7533=>500,7534=>333,7535=>778,7536=>500,7537=>500,
+7538=>333,7539=>333,7540=>389,7541=>278,7542=>444,7543=>500,7544=>483,7546=>774,7547=>217,7548=>278,
+7549=>500,7550=>483,7551=>514,7552=>500,7553=>500,7554=>333,7555=>676,7556=>525,7557=>278,7558=>802,
+7559=>507,7560=>500,7561=>333,7562=>389,7563=>384,7564=>500,7565=>500,7566=>444,7680=>722,7681=>444,
+7682=>667,7683=>500,7684=>667,7685=>500,7686=>667,7687=>500,7688=>667,7689=>444,7690=>722,7691=>500,
+7692=>722,7693=>500,7694=>722,7695=>500,7696=>720,7697=>500,7698=>722,7699=>500,7700=>611,7701=>444,
+7702=>611,7703=>444,7704=>611,7705=>444,7706=>611,7707=>444,7708=>611,7709=>444,7710=>556,7711=>333,
+7712=>722,7713=>500,7714=>722,7715=>500,7716=>722,7717=>500,7718=>722,7719=>500,7720=>722,7721=>500,
+7722=>722,7723=>500,7724=>333,7725=>278,7726=>333,7727=>278,7728=>722,7729=>500,7730=>722,7731=>500,
+7732=>722,7733=>500,7734=>611,7735=>278,7736=>611,7737=>278,7738=>611,7739=>278,7740=>611,7741=>278,
+7742=>889,7743=>778,7744=>889,7745=>778,7746=>889,7747=>778,7748=>722,7749=>500,7750=>722,7751=>500,
+7752=>722,7753=>500,7754=>722,7755=>500,7756=>722,7757=>500,7758=>722,7759=>500,7760=>722,7761=>500,
+7762=>722,7763=>500,7764=>556,7765=>500,7766=>556,7767=>500,7768=>667,7769=>333,7770=>667,7771=>333,
+7772=>667,7773=>333,7774=>667,7775=>333,7776=>556,7777=>389,7778=>556,7779=>389,7780=>556,7781=>389,
+7782=>556,7783=>389,7784=>556,7785=>389,7786=>611,7787=>278,7788=>611,7789=>278,7790=>611,7791=>278,
+7792=>611,7793=>278,7794=>722,7795=>500,7796=>722,7797=>500,7798=>722,7799=>500,7800=>722,7801=>500,
+7802=>722,7803=>500,7804=>722,7805=>500,7806=>722,7807=>500,7808=>944,7809=>722,7810=>944,7811=>722,
+7812=>944,7813=>722,7814=>944,7815=>722,7816=>944,7817=>722,7818=>722,7819=>500,7820=>722,7821=>500,
+7822=>722,7823=>500,7824=>611,7825=>444,7826=>611,7827=>444,7828=>611,7829=>444,7830=>500,7831=>278,
+7832=>722,7833=>500,7834=>444,7835=>333,7840=>722,7841=>444,7842=>807,7843=>529,7844=>722,7845=>444,
+7846=>722,7847=>444,7848=>722,7849=>454,7850=>722,7851=>444,7852=>722,7853=>444,7854=>722,7855=>444,
+7856=>722,7857=>444,7858=>722,7859=>454,7860=>722,7861=>444,7862=>722,7863=>444,7864=>611,7865=>444,
+7866=>611,7867=>444,7868=>611,7869=>444,7870=>611,7871=>444,7872=>611,7873=>444,7874=>613,7875=>444,
+7876=>611,7877=>444,7878=>611,7879=>444,7880=>333,7881=>278,7882=>333,7883=>278,7884=>722,7885=>500,
+7886=>722,7887=>500,7888=>722,7889=>500,7890=>722,7891=>500,7892=>722,7893=>500,7894=>722,7895=>500,
+7896=>722,7897=>500,7898=>722,7899=>516,7900=>722,7901=>516,7902=>720,7903=>516,7904=>722,7905=>516,
+7906=>722,7907=>516,7908=>722,7909=>500,7910=>717,7911=>500,7912=>800,7913=>518,7914=>800,7915=>518,
+7916=>800,7917=>518,7918=>800,7919=>518,7920=>800,7921=>518,7922=>722,7923=>500,7924=>722,7925=>500,
+7926=>722,7927=>501,7928=>722,7929=>500,7936=>583,7937=>583,7938=>583,7939=>583,7940=>583,7941=>583,
+7942=>583,7943=>583,7944=>722,7945=>722,7946=>813,7947=>817,7948=>763,7949=>765,7950=>720,7951=>722,
+7952=>426,7953=>426,7954=>426,7955=>426,7956=>426,7957=>426,7960=>770,7961=>770,7962=>902,7963=>919,
+7964=>940,7965=>936,7968=>536,7969=>536,7970=>536,7971=>536,7972=>536,7973=>536,7974=>536,7975=>536,
+7976=>847,7977=>859,7978=>986,7979=>1010,7980=>1026,7981=>1029,7982=>918,7983=>921,7984=>286,7985=>286,
+7986=>302,7987=>320,7988=>300,7989=>306,7990=>312,7991=>303,7992=>475,7993=>507,7994=>617,7995=>654,
+7996=>655,7997=>660,7998=>551,7999=>566,8000=>500,8001=>500,8002=>500,8003=>500,8004=>500,8005=>500,
+8008=>816,8009=>825,8010=>969,8011=>995,8012=>938,8013=>955,8016=>514,8017=>514,8018=>514,8019=>514,
+8020=>514,8021=>514,8022=>514,8023=>514,8025=>818,8027=>988,8029=>989,8031=>893,8032=>693,8033=>693,
+8034=>693,8035=>693,8036=>693,8037=>693,8038=>693,8039=>693,8040=>836,8041=>843,8042=>1006,8043=>1024,
+8044=>974,8045=>986,8046=>905,8047=>896,8048=>583,8049=>583,8050=>426,8051=>426,8052=>536,8053=>536,
+8054=>286,8055=>286,8056=>500,8057=>500,8058=>514,8059=>514,8060=>693,8061=>693,8064=>583,8065=>583,
+8066=>583,8067=>583,8068=>583,8069=>583,8070=>583,8071=>583,8072=>888,8073=>889,8074=>984,8075=>991,
+8076=>943,8077=>948,8078=>884,8079=>886,8080=>536,8081=>536,8082=>536,8083=>536,8084=>536,8085=>536,
+8086=>536,8087=>536,8088=>1017,8089=>1026,8090=>1153,8091=>1179,8092=>1195,8093=>1199,8094=>1088,8095=>1088,
+8096=>693,8097=>693,8098=>693,8099=>693,8100=>693,8101=>693,8102=>693,8103=>693,8104=>1034,8105=>1040,
+8106=>1210,8107=>1229,8108=>1176,8109=>1186,8110=>1098,8111=>1090,8112=>583,8113=>583,8114=>583,8115=>583,
+8116=>583,8118=>583,8119=>583,8120=>722,8121=>722,8122=>722,8123=>722,8124=>889,8125=>250,8126=>332,
+8127=>500,8128=>500,8129=>534,8130=>536,8131=>536,8132=>536,8134=>536,8135=>536,8136=>761,8137=>800,
+8138=>829,8139=>893,8140=>883,8141=>500,8142=>500,8143=>500,8144=>286,8145=>286,8146=>286,8147=>286,
+8150=>286,8151=>286,8152=>333,8153=>333,8154=>447,8155=>537,8157=>500,8158=>500,8159=>500,8160=>514,
+8161=>514,8162=>514,8163=>514,8164=>528,8165=>528,8166=>514,8167=>514,8168=>696,8169=>696,8170=>816,
+8171=>828,8172=>721,8173=>333,8174=>333,8175=>500,8178=>693,8179=>693,8180=>693,8182=>693,8183=>693,
+8184=>832,8185=>899,8186=>847,8187=>852,8188=>928,8189=>500,8190=>500,8192=>500,8193=>1000,8194=>500,
+8195=>1000,8196=>333,8197=>250,8198=>167,8199=>500,8200=>250,8201=>200,8202=>100,8203=>0,8204=>0,
+8205=>0,8206=>0,8207=>0,8208=>333,8209=>333,8210=>500,8213=>1000,8214=>293,8215=>478,8219=>250,
+8223=>444,8227=>350,8228=>620,8229=>620,8231=>250,8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,
+8237=>0,8238=>0,8239=>250,8241=>1363,8242=>247,8243=>411,8244=>611,8245=>220,8246=>440,8247=>660,
 8248=>469,8251=>629,8252=>666,8253=>444,8254=>500,8255=>953,8256=>953,8257=>314,8258=>931,8259=>333,
-8260=>167,8261=>383,8262=>383,8263=>888,8264=>777,8265=>777,8266=>500,8267=>453,8304=>300,8305=>300,
-8308=>300,8309=>300,8310=>300,8311=>300,8312=>300,8313=>300,8314=>300,8315=>300,8316=>300,8319=>300,
-8320=>300,8321=>300,8322=>300,8323=>300,8324=>300,8325=>300,8326=>300,8327=>300,8328=>300,8329=>300,
-8330=>300,8331=>300,8332=>300,8352=>698,8353=>667,8354=>667,8355=>556,8356=>500,8357=>778,8358=>722,
-8359=>630,8360=>1056,8361=>944,8367=>1340,8370=>611,8413=>0,8416=>0,8450=>667,8451=>954,8453=>1000,
-8457=>822,8458=>500,8459=>969,8460=>663,8461=>822,8462=>500,8463=>500,8464=>809,8465=>638,8466=>874,
-8467=>417,8469=>822,8470=>954,8471=>760,8472=>832,8473=>656,8474=>722,8475=>850,8476=>795,8477=>767,
-8478=>667,8479=>667,8480=>879,8483=>722,8484=>731,8486=>757,8487=>757,8488=>663,8490=>722,8491=>722,
-8492=>908,8493=>614,8494=>533,8496=>562,8497=>895,8498=>556,8499=>1080,8501=>558,8502=>642,8503=>315,
-8504=>532,8505=>417,8531=>750,8532=>750,8533=>750,8534=>750,8535=>750,8536=>750,8537=>750,8538=>750,
-8539=>750,8540=>750,8541=>750,8542=>750,8543=>750,8544=>333,8545=>630,8546=>927,8547=>1019,8548=>722,
-8549=>1019,8550=>1316,8551=>1629,8552=>1019,8553=>722,8554=>1019,8555=>1316,8556=>611,8557=>667,8558=>722,
-8559=>889,8560=>278,8561=>556,8562=>834,8563=>778,8564=>500,8565=>778,8566=>1056,8567=>1334,8568=>778,
-8569=>500,8570=>778,8571=>1056,8572=>278,8573=>444,8574=>500,8575=>778,8592=>964,8593=>472,8594=>964,
-8595=>500,8596=>964,8597=>499,8598=>964,8599=>964,8600=>964,8601=>964,8602=>964,8603=>964,8604=>1009,
-8605=>1009,8606=>964,8607=>500,8608=>964,8609=>499,8610=>1093,8611=>1093,8612=>1093,8613=>500,8614=>1093,
-8615=>500,8616=>500,8617=>964,8618=>964,8619=>964,8620=>964,8621=>1151,8622=>964,8624=>482,8625=>482,
-8626=>482,8627=>482,8628=>658,8629=>658,8630=>1069,8631=>1069,8634=>939,8635=>939,8636=>964,8637=>964,
-8638=>499,8639=>499,8640=>964,8641=>964,8642=>499,8643=>499,8644=>964,8645=>840,8646=>964,8647=>964,
-8648=>840,8649=>964,8650=>840,8651=>964,8652=>964,8653=>964,8654=>964,8655=>964,8656=>964,8657=>550,
-8658=>964,8659=>550,8660=>964,8661=>550,8662=>1047,8663=>1047,8664=>1047,8665=>1047,8666=>964,8667=>964,
-8668=>1092,8669=>1092,8672=>964,8674=>964,8704=>587,8705=>716,8706=>494,8707=>587,8708=>587,8709=>746,
-8710=>612,8711=>713,8712=>536,8713=>536,8714=>439,8715=>536,8716=>536,8717=>439,8719=>823,8720=>823,
-8721=>713,8722=>564,8723=>564,8724=>564,8725=>636,8726=>636,8727=>471,8728=>497,8729=>497,8730=>549,
-8731=>549,8732=>549,8733=>636,8734=>853,8735=>509,8736=>509,8737=>509,8738=>509,8739=>200,8740=>250,
-8741=>320,8742=>320,8743=>654,8744=>654,8745=>654,8746=>654,8747=>416,8748=>750,8749=>1083,8750=>722,
-8751=>750,8756=>565,8757=>568,8758=>250,8759=>629,8760=>564,8761=>758,8762=>564,8763=>636,8764=>636,
-8765=>636,8768=>264,8769=>636,8770=>636,8771=>636,8772=>636,8773=>636,8774=>636,8775=>636,8776=>636,
-8777=>636,8778=>636,8779=>636,8781=>636,8782=>636,8783=>636,8784=>564,8785=>564,8786=>564,8787=>564,
-8788=>735,8789=>755,8790=>564,8791=>564,8793=>564,8794=>564,8796=>564,8800=>564,8801=>636,8802=>636,
-8803=>636,8804=>636,8805=>636,8806=>636,8807=>636,8808=>636,8809=>636,8810=>918,8811=>918,8812=>410,
-8813=>636,8814=>636,8815=>636,8816=>636,8817=>636,8818=>636,8819=>636,8820=>636,8821=>636,8822=>636,
-8823=>636,8824=>636,8825=>636,8826=>636,8827=>636,8828=>636,8829=>636,8830=>636,8831=>636,8832=>636,
-8833=>636,8834=>636,8835=>636,8836=>636,8837=>636,8838=>636,8839=>636,8840=>636,8841=>636,8842=>636,
-8843=>636,8844=>654,8845=>654,8846=>654,8847=>636,8848=>636,8849=>636,8850=>636,8851=>654,8852=>654,
-8853=>636,8854=>636,8855=>636,8856=>636,8857=>636,8858=>636,8859=>636,8860=>636,8861=>636,8862=>636,
-8863=>636,8864=>636,8865=>636,8866=>600,8867=>600,8868=>712,8869=>712,8870=>466,8871=>466,8873=>588,
-8874=>710,8875=>588,8876=>466,8877=>466,8878=>588,8879=>588,8882=>636,8883=>636,8884=>636,8885=>636,
-8886=>1296,8887=>1296,8888=>966,8890=>626,8891=>654,8892=>654,8893=>654,8896=>744,8897=>744,8898=>764,
-8899=>764,8900=>512,8901=>250,8902=>471,8903=>629,8904=>722,8907=>816,8908=>816,8909=>636,8910=>636,
-8911=>636,8912=>636,8913=>636,8914=>654,8915=>654,8916=>654,8917=>636,8918=>636,8919=>636,8920=>1215,
-8921=>1215,8922=>636,8923=>636,8924=>636,8925=>636,8926=>636,8927=>636,8928=>636,8929=>636,8930=>636,
-8931=>636,8932=>636,8933=>636,8934=>636,8935=>636,8936=>636,8937=>636,8938=>636,8939=>636,8940=>636,
-8941=>636,8942=>250,8943=>1000,8944=>1000,8945=>1000,8960=>780,8961=>444,8968=>474,8969=>474,8970=>474,
-8971=>474,8976=>564,8986=>805,8992=>686,8993=>686,8994=>658,8995=>658,9001=>329,9002=>329,9031=>777,
-9032=>777,9040=>777,9047=>777,9054=>777,9115=>384,9116=>384,9117=>384,9118=>384,9119=>384,9120=>384,
-9121=>388,9122=>388,9123=>388,9124=>388,9125=>388,9126=>388,9127=>494,9128=>494,9129=>494,9130=>494,
-9131=>494,9132=>494,9133=>494,9134=>686,9251=>500,9312=>788,9313=>788,9314=>788,9315=>788,9316=>788,
-9317=>788,9318=>788,9319=>788,9320=>788,9321=>788,9472=>889,9473=>889,9474=>889,9475=>889,9476=>889,
-9477=>889,9478=>889,9479=>889,9480=>889,9481=>889,9482=>889,9483=>889,9484=>889,9485=>889,9486=>889,
-9487=>889,9488=>889,9489=>889,9490=>889,9491=>889,9492=>889,9493=>889,9494=>889,9495=>889,9496=>889,
-9497=>889,9498=>889,9499=>889,9500=>889,9501=>889,9502=>889,9503=>889,9504=>889,9505=>889,9506=>889,
-9507=>889,9508=>889,9509=>889,9510=>889,9511=>889,9512=>889,9513=>889,9514=>889,9515=>889,9516=>889,
-9517=>889,9518=>889,9519=>889,9520=>889,9521=>889,9522=>889,9523=>889,9524=>889,9525=>889,9526=>889,
-9527=>889,9528=>889,9529=>889,9530=>889,9531=>889,9532=>889,9533=>889,9534=>889,9535=>889,9536=>889,
-9537=>889,9538=>889,9539=>889,9540=>889,9541=>889,9542=>889,9543=>889,9544=>889,9545=>889,9546=>889,
-9547=>889,9552=>889,9553=>889,9554=>889,9555=>889,9556=>889,9557=>889,9558=>889,9559=>889,9560=>889,
-9561=>889,9562=>889,9563=>889,9564=>889,9565=>889,9566=>889,9567=>889,9568=>889,9569=>889,9570=>889,
-9571=>889,9572=>889,9573=>889,9574=>889,9575=>889,9576=>889,9577=>889,9578=>889,9579=>889,9580=>889,
-9581=>889,9600=>761,9601=>761,9602=>761,9603=>761,9604=>761,9605=>761,9606=>761,9607=>761,9608=>761,
-9609=>761,9610=>761,9611=>761,9612=>761,9613=>761,9614=>761,9615=>761,9616=>761,9620=>761,9621=>761,
-9632=>761,9633=>761,9650=>892,9651=>892,9654=>892,9660=>892,9661=>892,9664=>892,9670=>788,9671=>788,
-9674=>494,9675=>791,9676=>684,9679=>791,9680=>791,9681=>791,9682=>791,9683=>791,9684=>791,9685=>791,
-9686=>791,9687=>791,9698=>761,9699=>761,9700=>761,9701=>761,9703=>761,9704=>761,9705=>761,9706=>761,
-9711=>851,9733=>816,9734=>823,9740=>799,9741=>972,9742=>719,9744=>761,9745=>761,9746=>761,9753=>760,
-9754=>960,9755=>960,9756=>939,9757=>500,9758=>939,9759=>500,9760=>500,9762=>805,9763=>805,9766=>494,
-9768=>494,9770=>805,9772=>640,9774=>805,9775=>805,9776=>600,9777=>600,9778=>600,9779=>600,9780=>600,
-9781=>600,9782=>600,9783=>600,9784=>805,9785=>805,9786=>805,9787=>805,9788=>805,9789=>777,9790=>777,
-9791=>541,9792=>541,9793=>541,9794=>799,9795=>700,9796=>583,9797=>541,9798=>652,9799=>583,9800=>805,
-9801=>805,9802=>805,9803=>1013,9804=>833,9805=>1152,9806=>1152,9807=>1152,9808=>704,9809=>805,9810=>1152,
-9811=>805,9812=>800,9813=>800,9814=>800,9815=>800,9816=>800,9817=>800,9818=>800,9819=>800,9820=>800,
-9821=>800,9822=>800,9823=>800,9824=>626,9825=>694,9826=>595,9827=>776,9829=>694,9830=>595,9833=>333,
-9834=>555,9835=>722,9836=>722,9837=>415,9838=>377,9839=>402,9840=>776,9841=>776,9985=>974,9986=>961,
-9987=>974,9988=>980,9990=>789,9991=>790,9992=>791,9993=>690,9996=>549,9997=>855,9998=>911,9999=>933,
-10000=>911,10001=>945,10002=>974,10003=>755,10004=>846,10005=>762,10006=>761,10007=>571,10008=>677,10009=>763,
-10010=>760,10011=>759,10012=>754,10013=>494,10014=>552,10015=>537,10016=>577,10017=>692,10018=>786,10019=>788,
-10020=>788,10021=>790,10022=>793,10023=>794,10025=>823,10026=>789,10027=>841,10028=>823,10029=>833,10030=>816,
-10031=>831,10032=>923,10033=>744,10034=>723,10035=>749,10036=>790,10037=>792,10038=>695,10039=>776,10040=>768,
-10041=>792,10042=>759,10043=>707,10044=>708,10045=>682,10046=>701,10047=>826,10048=>815,10049=>789,10050=>789,
-10051=>707,10052=>687,10053=>696,10054=>689,10055=>786,10056=>787,10057=>713,10058=>791,10059=>785,10061=>873,
-10063=>762,10064=>762,10065=>759,10066=>759,10070=>784,10072=>138,10073=>277,10074=>415,10075=>392,10076=>392,
-10077=>668,10078=>668,10081=>732,10082=>544,10083=>544,10084=>910,10085=>667,10086=>760,10087=>760,10102=>788,
-10103=>788,10104=>788,10105=>788,10106=>788,10107=>788,10108=>788,10109=>788,10110=>788,10111=>788,10112=>788,
-10113=>788,10114=>788,10115=>788,10116=>788,10117=>788,10118=>788,10119=>788,10120=>788,10121=>788,10122=>788,
-10123=>788,10124=>788,10125=>788,10126=>788,10127=>788,10128=>788,10129=>788,10130=>788,10131=>788,10132=>894,
-10136=>748,10137=>924,10138=>748,10139=>918,10140=>927,10141=>928,10142=>928,10143=>834,10144=>873,10145=>828,
-10146=>924,10147=>924,10148=>917,10149=>930,10150=>931,10151=>463,10152=>883,10153=>836,10154=>836,10155=>867,
-10156=>867,10157=>696,10158=>696,10159=>874,10161=>874,10162=>760,10163=>946,10164=>771,10165=>865,10166=>771,
-10167=>888,10168=>967,10169=>888,10170=>831,10171=>873,10172=>927,10173=>970,10174=>918,10229=>1000,10230=>1000,
-10231=>1000,10232=>1000,10233=>1000,10234=>1000,10235=>1000,10236=>1000,10752=>860,10753=>860,10754=>860,10755=>766,
-10756=>766,10761=>745,11799=>333,12289=>1000,12290=>1000,12291=>1000,12293=>1000,12295=>1000,12296=>1000,12297=>998,
-12298=>1000,12299=>1000,12300=>1000,12301=>1000,12302=>1000,12303=>1000,12304=>1000,12305=>1000,12306=>1000,12308=>1000,
-12309=>1000,12353=>1000,12354=>1000,12355=>1000,12356=>1000,12357=>1000,12358=>1000,12359=>1000,12360=>1000,12361=>1000,
-12362=>1000,12363=>1000,12364=>1000,12365=>1000,12366=>1000,12367=>1000,12368=>1000,12369=>1000,12370=>1000,12371=>1000,
-12372=>1000,12373=>1000,12374=>1000,12375=>1000,12376=>1000,12377=>1000,12378=>1000,12379=>1000,12380=>1000,12381=>1000,
-12382=>1000,12383=>1000,12384=>1000,12385=>1000,12386=>1000,12387=>1000,12388=>1000,12389=>1000,12390=>1000,12391=>1000,
-12392=>1000,12393=>1000,12394=>1000,12395=>1000,12396=>1000,12397=>1000,12398=>1000,12399=>1000,12400=>1000,12401=>1000,
-12402=>1000,12403=>1000,12404=>1000,12405=>1000,12406=>1000,12407=>1000,12408=>1000,12409=>1000,12410=>1000,12411=>1000,
-12412=>1000,12413=>1000,12414=>1000,12415=>1000,12416=>1000,12417=>1000,12418=>1000,12419=>1000,12420=>1000,12421=>1000,
-12422=>1000,12423=>1000,12424=>1000,12425=>1000,12426=>1000,12427=>1000,12428=>1000,12429=>1000,12430=>1000,12431=>1000,
-12432=>1000,12433=>1000,12434=>1000,12435=>1000,12436=>1273,12441=>1000,12443=>1000,12449=>1000,12450=>1000,12451=>1000,
-12452=>1000,12453=>1000,12454=>1000,12455=>1000,12456=>1000,12457=>1000,12458=>1000,12459=>1000,12460=>1000,12461=>1000,
-12462=>1000,12463=>1000,12464=>1000,12465=>1000,12466=>1000,12467=>1000,12468=>1000,12469=>1000,12470=>1000,12471=>1000,
-12472=>1000,12473=>1000,12474=>1000,12475=>1000,12476=>1000,12477=>1000,12478=>1000,12479=>1000,12480=>1000,12481=>1000,
-12482=>1000,12483=>1000,12484=>1000,12485=>1000,12486=>1000,12487=>1000,12488=>1000,12489=>1000,12490=>1000,12491=>1000,
-12492=>1000,12493=>1000,12494=>1000,12495=>1000,12496=>1000,12497=>1000,12498=>1000,12499=>1000,12500=>1000,12501=>1000,
-12502=>1000,12503=>1000,12504=>1000,12505=>1000,12506=>1000,12507=>1000,12508=>1000,12509=>1000,12510=>1000,12511=>1000,
-12512=>1000,12513=>1000,12514=>1000,12515=>1000,12516=>1000,12517=>1000,12518=>1000,12519=>1000,12520=>1000,12521=>1000,
-12522=>1000,12523=>1000,12524=>1000,12525=>1000,12526=>1000,12527=>1000,12528=>1000,12529=>1000,12530=>1000,12531=>1000,
-12532=>1000,12533=>1000,12534=>1000,12535=>1273,12536=>1273,12537=>1273,12538=>1273,12539=>1000,12540=>1000,63033=>500,
-63034=>500,63035=>500,63036=>500,63037=>500,63038=>500,63039=>500,63040=>500,63041=>500,63196=>500,64256=>605,
-64257=>556,64258=>556,64259=>824,64260=>821,64262=>677,64298=>537,64299=>537,64300=>537,64301=>537,64302=>537,
-64303=>537,64304=>537,64305=>537,64306=>350,64307=>537,64308=>537,64309=>350,64310=>350,64312=>537,64313=>350,
-64314=>537,64315=>537,64316=>537,64318=>537,64320=>350,64321=>537,64323=>537,64324=>537,64326=>537,64327=>537,
-64328=>537,64329=>537,64330=>537,64331=>350,64332=>537,64333=>537,64334=>537,64342=>926,64343=>926,64344=>308,
-64345=>308,64378=>750,64379=>750,64380=>580,64381=>580,64394=>338,64395=>338,64402=>874,64403=>874,64404=>329,
-64405=>329,64508=>776,64509=>700,64510=>304,64511=>304,65010=>640,65020=>837,65136=>300,65140=>300,65142=>300,
-65144=>300,65146=>300,65148=>300,65152=>724,65153=>321,65154=>275,65155=>249,65156=>275,65164=>301,65165=>249,
-65166=>275,65167=>950,65168=>950,65169=>293,65170=>293,65173=>925,65174=>925,65175=>308,65176=>308,65177=>924,
-65178=>924,65179=>298,65180=>298,65181=>738,65182=>738,65183=>574,65184=>574,65185=>748,65186=>750,65187=>600,
-65188=>600,65189=>701,65190=>775,65191=>596,65192=>596,65193=>397,65194=>397,65195=>399,65196=>399,65197=>328,
-65198=>328,65199=>331,65200=>331,65201=>951,65202=>951,65203=>600,65204=>600,65205=>949,65206=>949,65207=>649,
-65208=>649,65209=>949,65210=>949,65211=>823,65212=>823,65213=>949,65214=>949,65215=>805,65216=>805,65217=>557,
-65218=>557,65219=>460,65220=>460,65221=>550,65222=>550,65223=>455,65224=>550,65225=>625,65226=>575,65227=>674,
-65228=>550,65229=>602,65230=>577,65231=>578,65232=>577,65233=>801,65234=>801,65235=>300,65236=>300,65237=>696,
-65238=>696,65239=>650,65240=>650,65241=>757,65242=>757,65243=>318,65244=>318,65245=>655,65246=>655,65247=>206,
-65248=>206,65249=>549,65250=>549,65251=>403,65252=>403,65253=>651,65254=>651,65255=>323,65256=>323,65257=>424,
-65258=>622,65259=>525,65260=>476,65261=>399,65262=>399,65265=>776,65266=>776,65267=>296,65268=>264,65269=>676,
-65270=>724,65271=>676,65272=>724,65273=>676,65274=>724,65275=>676,65276=>724,65533=>788);
+8260=>167,8261=>383,8262=>383,8263=>888,8264=>777,8265=>777,8266=>500,8267=>453,8268=>453,8269=>450,
+8270=>500,8271=>278,8272=>882,8273=>500,8274=>497,8275=>500,8276=>953,8277=>512,8278=>410,8279=>855,
+8280=>620,8281=>620,8282=>179,8283=>621,8284=>564,8285=>179,8286=>179,8287=>111,8288=>0,8289=>0,
+8290=>0,8291=>0,8292=>0,8304=>320,8305=>300,8308=>320,8309=>320,8310=>320,8311=>320,8312=>320,
+8313=>320,8314=>300,8315=>300,8316=>300,8317=>216,8318=>216,8319=>300,8320=>320,8321=>320,8322=>320,
+8323=>320,8324=>320,8325=>320,8326=>320,8327=>320,8328=>320,8329=>320,8330=>300,8331=>300,8332=>300,
+8333=>216,8334=>216,8336=>320,8337=>320,8338=>320,8339=>320,8340=>320,8352=>698,8353=>667,8354=>667,
+8355=>556,8356=>500,8357=>778,8358=>722,8359=>940,8360=>1026,8361=>813,8362=>869,8363=>512,8365=>722,
+8366=>611,8367=>1340,8368=>489,8369=>601,8370=>619,8371=>722,8372=>556,8373=>611,8400=>0,8401=>0,
+8402=>0,8403=>0,8404=>0,8405=>0,8406=>0,8407=>0,8408=>0,8409=>0,8410=>0,8411=>0,
+8412=>0,8413=>0,8414=>0,8415=>0,8416=>0,8417=>0,8418=>0,8419=>0,8420=>0,8421=>0,
+8422=>0,8423=>0,8424=>0,8425=>0,8426=>0,8427=>0,8428=>0,8429=>0,8430=>0,8431=>0,
+8432=>0,8448=>751,8449=>723,8450=>674,8451=>954,8452=>556,8453=>781,8454=>806,8455=>518,8456=>667,
+8457=>822,8458=>490,8459=>824,8460=>663,8461=>818,8462=>500,8463=>500,8464=>578,8465=>613,8466=>715,
+8467=>417,8468=>778,8469=>751,8470=>880,8471=>760,8472=>832,8473=>589,8474=>729,8475=>892,8476=>711,
+8477=>755,8478=>667,8479=>667,8480=>879,8481=>1156,8483=>722,8484=>659,8485=>389,8486=>743,8487=>757,
+8488=>663,8489=>286,8490=>722,8491=>722,8492=>846,8493=>613,8494=>533,8495=>363,8496=>587,8497=>690,
+8498=>556,8499=>1021,8500=>387,8501=>537,8502=>537,8503=>350,8504=>537,8505=>417,8506=>906,8507=>1155,
+8513=>663,8514=>485,8515=>485,8516=>637,8522=>516,8523=>778,8525=>899,8526=>500,8531=>750,8532=>750,
+8533=>750,8534=>750,8535=>750,8536=>750,8537=>750,8538=>750,8539=>750,8540=>750,8541=>750,8542=>750,
+8543=>750,8544=>333,8545=>630,8546=>927,8547=>1019,8548=>722,8549=>1019,8550=>1316,8551=>1629,8552=>1019,
+8553=>722,8554=>1019,8555=>1316,8556=>611,8557=>667,8558=>722,8559=>889,8560=>278,8561=>556,8562=>834,
+8563=>778,8564=>500,8565=>778,8566=>1056,8567=>1334,8568=>778,8569=>500,8570=>778,8571=>1056,8572=>278,
+8573=>444,8574=>500,8575=>778,8592=>964,8593=>472,8594=>964,8595=>500,8596=>964,8597=>499,8598=>964,
+8599=>964,8600=>964,8601=>964,8602=>964,8603=>964,8604=>1009,8605=>1009,8606=>964,8607=>500,8608=>964,
+8609=>499,8610=>1093,8611=>1093,8612=>1093,8613=>500,8614=>1093,8615=>500,8616=>500,8617=>964,8618=>964,
+8619=>964,8620=>964,8621=>1151,8622=>964,8624=>482,8625=>482,8626=>482,8627=>482,8628=>658,8629=>658,
+8630=>1069,8631=>1069,8634=>939,8635=>939,8636=>964,8637=>964,8638=>499,8639=>499,8640=>964,8641=>964,
+8642=>499,8643=>499,8644=>964,8645=>840,8646=>964,8647=>964,8648=>840,8649=>964,8650=>840,8651=>964,
+8652=>964,8653=>964,8654=>964,8655=>964,8656=>964,8657=>550,8658=>964,8659=>550,8660=>964,8661=>550,
+8662=>1047,8663=>1047,8664=>1047,8665=>1047,8666=>964,8667=>964,8668=>1092,8669=>1092,8672=>964,8674=>964,
+8704=>587,8705=>716,8706=>494,8707=>587,8708=>587,8709=>746,8710=>612,8711=>612,8712=>536,8713=>536,
+8714=>439,8715=>536,8716=>536,8717=>439,8718=>506,8719=>823,8720=>823,8721=>713,8722=>564,8723=>564,
+8724=>564,8725=>636,8726=>636,8727=>471,8728=>497,8729=>497,8730=>549,8731=>549,8732=>549,8733=>636,
+8734=>853,8735=>509,8736=>575,8737=>559,8738=>509,8739=>200,8740=>250,8741=>320,8742=>320,8743=>564,
+8744=>564,8745=>654,8746=>654,8747=>416,8748=>750,8749=>1083,8750=>722,8751=>750,8752=>1083,8753=>697,
+8754=>722,8755=>722,8756=>565,8757=>568,8758=>250,8759=>629,8760=>564,8761=>758,8762=>564,8763=>636,
+8764=>636,8765=>636,8766=>503,8767=>614,8768=>636,8769=>636,8770=>636,8771=>636,8772=>636,8773=>636,
+8774=>636,8775=>636,8776=>636,8777=>636,8778=>636,8779=>636,8780=>636,8781=>636,8782=>636,8783=>636,
+8784=>564,8785=>564,8786=>564,8787=>564,8788=>735,8789=>755,8790=>564,8791=>564,8792=>564,8793=>564,
+8794=>564,8795=>564,8796=>600,8797=>564,8798=>564,8799=>564,8800=>564,8801=>636,8802=>636,8803=>636,
+8804=>636,8805=>636,8806=>636,8807=>636,8808=>636,8809=>636,8810=>900,8811=>899,8812=>410,8813=>636,
+8814=>636,8815=>636,8816=>636,8817=>636,8818=>636,8819=>636,8820=>636,8821=>636,8822=>636,8823=>636,
+8824=>636,8825=>636,8826=>636,8827=>636,8828=>636,8829=>636,8830=>636,8831=>636,8832=>636,8833=>636,
+8834=>636,8835=>636,8836=>636,8837=>636,8838=>636,8839=>636,8840=>636,8841=>636,8842=>636,8843=>636,
+8844=>654,8845=>654,8846=>654,8847=>636,8848=>636,8849=>636,8850=>636,8851=>636,8852=>636,8853=>636,
+8854=>636,8855=>636,8856=>636,8857=>636,8858=>636,8859=>636,8860=>636,8861=>636,8862=>636,8863=>636,
+8864=>636,8865=>636,8866=>600,8867=>600,8868=>712,8869=>712,8870=>466,8871=>466,8872=>595,8873=>588,
+8874=>710,8875=>706,8876=>595,8877=>596,8878=>588,8879=>706,8880=>636,8881=>636,8882=>636,8883=>636,
+8884=>636,8885=>636,8886=>1296,8887=>1296,8888=>966,8889=>564,8890=>626,8891=>564,8892=>564,8893=>566,
+8894=>570,8895=>582,8896=>744,8897=>744,8898=>764,8899=>764,8900=>512,8901=>250,8902=>471,8903=>629,
+8904=>636,8905=>636,8906=>636,8907=>816,8908=>816,8909=>636,8910=>636,8911=>636,8912=>636,8913=>636,
+8914=>654,8915=>654,8916=>654,8917=>636,8918=>564,8919=>564,8920=>1215,8921=>1215,8922=>636,8923=>636,
+8924=>636,8925=>636,8926=>636,8927=>636,8928=>636,8929=>636,8930=>636,8931=>636,8932=>636,8933=>636,
+8934=>636,8935=>636,8936=>636,8937=>636,8938=>636,8939=>636,8940=>636,8941=>636,8942=>250,8943=>1000,
+8944=>1000,8945=>1000,8946=>601,8947=>536,8948=>464,8949=>536,8950=>536,8951=>464,8952=>536,8953=>536,
+8954=>601,8955=>536,8956=>464,8957=>536,8958=>464,8959=>600,8960=>780,8961=>442,8962=>794,8968=>474,
+8969=>474,8970=>474,8971=>474,8976=>564,8977=>503,8978=>791,8979=>791,8980=>593,8981=>560,8982=>563,
+8983=>563,8984=>800,8985=>564,8986=>805,8988=>474,8989=>474,8990=>474,8991=>474,8992=>686,8993=>686,
+8994=>658,8995=>658,8996=>800,9000=>800,9001=>329,9002=>329,9031=>777,9032=>777,9040=>777,9047=>777,
+9054=>777,9088=>800,9089=>800,9090=>800,9091=>800,9094=>800,9095=>800,9096=>800,9097=>800,9098=>800,
+9100=>800,9103=>788,9104=>788,9105=>788,9106=>788,9108=>800,9109=>800,9110=>800,9111=>800,9112=>800,
+9113=>800,9114=>800,9115=>384,9116=>384,9117=>384,9118=>384,9119=>384,9120=>384,9121=>388,9122=>388,
+9123=>388,9124=>388,9125=>388,9126=>388,9127=>494,9128=>494,9129=>494,9130=>494,9131=>494,9132=>494,
+9133=>494,9134=>686,9138=>1287,9139=>1287,9140=>860,9141=>861,9166=>800,9167=>800,9180=>896,9181=>896,
+9182=>903,9183=>904,9184=>910,9185=>910,9186=>761,9187=>910,9189=>942,9190=>817,9251=>500,9312=>788,
+9313=>788,9314=>788,9315=>788,9316=>788,9317=>788,9318=>788,9319=>788,9320=>788,9321=>788,9472=>889,
+9473=>889,9474=>889,9475=>889,9484=>889,9485=>889,9486=>889,9487=>889,9488=>889,9489=>889,9490=>889,
+9491=>889,9492=>889,9493=>889,9494=>889,9495=>889,9496=>889,9497=>889,9498=>889,9499=>889,9500=>889,
+9501=>889,9502=>889,9503=>889,9504=>889,9505=>889,9506=>889,9507=>889,9508=>889,9509=>889,9510=>889,
+9511=>889,9512=>889,9513=>889,9514=>889,9515=>889,9516=>889,9517=>889,9518=>889,9519=>889,9520=>889,
+9521=>889,9522=>889,9523=>889,9524=>889,9525=>889,9526=>889,9527=>889,9528=>889,9529=>889,9530=>889,
+9531=>889,9532=>889,9533=>889,9534=>889,9535=>889,9536=>889,9537=>889,9538=>889,9539=>889,9540=>889,
+9541=>889,9542=>889,9543=>889,9544=>889,9545=>889,9546=>889,9547=>889,9552=>889,9553=>889,9554=>889,
+9555=>889,9556=>889,9557=>889,9558=>889,9559=>889,9560=>889,9561=>889,9562=>889,9563=>889,9564=>889,
+9565=>889,9566=>889,9567=>889,9568=>889,9569=>889,9570=>889,9571=>889,9572=>889,9573=>889,9574=>889,
+9575=>889,9576=>889,9577=>889,9578=>889,9579=>889,9580=>889,9581=>889,9582=>889,9583=>889,9584=>889,
+9585=>889,9586=>889,9587=>889,9588=>889,9589=>889,9590=>889,9591=>889,9592=>889,9593=>889,9594=>889,
+9595=>889,9596=>600,9597=>889,9598=>600,9599=>889,9600=>761,9601=>761,9602=>761,9603=>761,9604=>761,
+9605=>761,9606=>761,9607=>761,9608=>761,9609=>761,9610=>761,9611=>761,9612=>761,9613=>761,9614=>761,
+9615=>761,9616=>761,9617=>1000,9619=>1000,9620=>761,9621=>761,9622=>761,9623=>761,9624=>761,9625=>761,
+9626=>761,9627=>761,9628=>761,9629=>761,9630=>761,9631=>761,9632=>761,9633=>761,9634=>761,9635=>761,
+9636=>761,9637=>761,9638=>761,9639=>761,9640=>761,9641=>761,9642=>532,9643=>532,9644=>761,9645=>761,
+9646=>761,9647=>761,9648=>761,9649=>761,9650=>892,9651=>892,9652=>446,9653=>446,9654=>892,9655=>892,
+9656=>446,9657=>446,9658=>892,9659=>892,9660=>892,9661=>892,9662=>446,9663=>446,9664=>892,9665=>892,
+9666=>446,9667=>446,9668=>892,9669=>892,9670=>788,9671=>788,9672=>788,9673=>791,9674=>494,9675=>791,
+9676=>791,9677=>785,9678=>791,9679=>791,9680=>791,9681=>791,9682=>791,9683=>791,9684=>791,9685=>791,
+9686=>791,9687=>791,9688=>761,9689=>761,9690=>761,9691=>761,9692=>791,9693=>791,9694=>791,9695=>791,
+9696=>791,9697=>791,9698=>761,9699=>761,9700=>761,9701=>761,9702=>791,9703=>761,9704=>761,9705=>761,
+9706=>761,9707=>761,9708=>892,9709=>892,9710=>892,9711=>851,9712=>761,9713=>761,9714=>761,9715=>761,
+9716=>791,9717=>791,9718=>791,9719=>791,9720=>761,9721=>761,9722=>761,9723=>761,9724=>761,9725=>570,
+9726=>570,9727=>761,9728=>800,9729=>800,9730=>748,9731=>800,9732=>800,9733=>811,9734=>816,9735=>468,
+9736=>677,9737=>724,9738=>944,9739=>944,9740=>686,9741=>944,9742=>715,9743=>715,9744=>757,9745=>755,
+9746=>755,9747=>756,9748=>800,9749=>837,9750=>719,9751=>719,9752=>782,9753=>822,9754=>954,9755=>954,
+9756=>933,9757=>489,9758=>933,9759=>489,9760=>517,9761=>660,9762=>724,9763=>732,9764=>886,9765=>577,
+9766=>489,9767=>563,9768=>490,9769=>770,9770=>725,9771=>860,9772=>668,9773=>753,9774=>724,9775=>730,
+9776=>600,9777=>600,9778=>600,9779=>600,9780=>600,9781=>600,9782=>600,9783=>600,9784=>730,9785=>724,
+9786=>724,9787=>724,9788=>799,9789=>659,9790=>659,9791=>495,9792=>495,9793=>495,9794=>686,9795=>661,
+9796=>544,9797=>608,9798=>605,9799=>545,9800=>804,9801=>583,9802=>796,9803=>1006,9804=>825,9805=>1189,
+9806=>1144,9807=>1189,9808=>683,9809=>808,9810=>1146,9811=>797,9812=>758,9813=>757,9814=>758,9815=>758,
+9816=>758,9817=>758,9818=>758,9819=>758,9820=>758,9821=>758,9822=>758,9823=>758,9824=>770,9825=>770,
+9826=>770,9827=>770,9828=>770,9829=>770,9830=>770,9831=>770,9832=>895,9833=>333,9834=>555,9835=>722,
+9836=>722,9837=>415,9838=>377,9839=>402,9840=>642,9841=>655,9842=>869,9843=>905,9844=>905,9845=>905,
+9846=>905,9847=>905,9848=>905,9849=>905,9850=>905,9851=>1016,9852=>1064,9853=>1064,9854=>954,9855=>606,
+9856=>522,9857=>522,9858=>522,9859=>522,9860=>522,9861=>522,9862=>845,9863=>844,9864=>844,9865=>844,
+9866=>748,9867=>748,9868=>748,9869=>748,9870=>748,9871=>748,9872=>726,9873=>726,9874=>963,9875=>770,
+9876=>1038,9877=>388,9878=>997,9879=>787,9880=>508,9881=>809,9882=>1014,9883=>859,9884=>818,9885=>972,
+9888=>1000,9889=>546,9890=>784,9891=>786,9892=>738,9893=>542,9894=>601,9895=>700,9896=>511,9897=>861,
+9898=>611,9899=>611,9900=>544,9901=>782,9902=>1025,9903=>1141,9904=>1000,9905=>513,9906=>510,9907=>642,
+9908=>722,9909=>719,9910=>777,9911=>495,9912=>602,9913=>836,9914=>666,9915=>666,9916=>691,9920=>689,
+9921=>689,9922=>689,9923=>689,9985=>974,9986=>961,9987=>974,9988=>980,9990=>789,9991=>790,9992=>791,
+9993=>690,9996=>549,9997=>855,9998=>911,9999=>933,10000=>911,10001=>945,10002=>974,10003=>755,10004=>846,
+10005=>762,10006=>761,10007=>571,10008=>677,10009=>763,10010=>760,10011=>759,10012=>754,10013=>494,10014=>552,
+10015=>537,10016=>577,10017=>692,10018=>786,10019=>788,10020=>788,10021=>790,10022=>793,10023=>794,10025=>823,
+10026=>789,10027=>841,10028=>823,10029=>833,10030=>816,10031=>831,10032=>923,10033=>744,10034=>723,10035=>749,
+10036=>790,10037=>792,10038=>695,10039=>776,10040=>768,10041=>792,10042=>759,10043=>707,10044=>708,10045=>682,
+10046=>701,10047=>826,10048=>815,10049=>789,10050=>789,10051=>707,10052=>687,10053=>696,10054=>689,10055=>786,
+10056=>787,10057=>713,10058=>791,10059=>785,10061=>873,10063=>762,10064=>762,10065=>759,10066=>759,10070=>784,
+10072=>138,10073=>277,10074=>415,10075=>392,10076=>392,10077=>668,10078=>668,10081=>732,10082=>544,10083=>544,
+10084=>910,10085=>667,10086=>760,10087=>760,10088=>390,10089=>390,10090=>317,10091=>317,10092=>276,10093=>276,
+10094=>509,10095=>509,10096=>410,10097=>410,10098=>234,10099=>234,10100=>334,10101=>334,10102=>788,10103=>788,
+10104=>788,10105=>788,10106=>788,10107=>788,10108=>788,10109=>788,10110=>788,10111=>788,10112=>788,10113=>788,
+10114=>788,10115=>788,10116=>788,10117=>788,10118=>788,10119=>788,10120=>788,10121=>788,10122=>788,10123=>788,
+10124=>788,10125=>788,10126=>788,10127=>788,10128=>788,10129=>788,10130=>788,10131=>788,10132=>894,10136=>748,
+10137=>924,10138=>748,10139=>918,10140=>927,10141=>928,10142=>928,10143=>834,10144=>873,10145=>828,10146=>924,
+10147=>924,10148=>917,10149=>930,10150=>931,10151=>463,10152=>883,10153=>836,10154=>836,10155=>867,10156=>867,
+10157=>696,10158=>696,10159=>874,10161=>874,10162=>760,10163=>946,10164=>771,10165=>865,10166=>771,10167=>888,
+10168=>967,10169=>888,10170=>831,10171=>873,10172=>927,10173=>970,10174=>918,10214=>545,10215=>545,10216=>329,
+10217=>329,10218=>496,10219=>496,10229=>1000,10230=>1000,10231=>1000,10232=>1000,10233=>1000,10234=>1000,10235=>1000,
+10236=>1000,10752=>860,10753=>860,10754=>860,10755=>766,10756=>766,10757=>756,10758=>756,10761=>745,10781=>702,
+10815=>722,11008=>1000,11009=>1000,11010=>1000,11011=>1000,11012=>1222,11013=>1000,11014=>1000,11015=>1000,11016=>1000,
+11017=>1000,11018=>1000,11019=>1000,11020=>1244,11021=>1000,11026=>770,11027=>770,11028=>770,11029=>770,11030=>770,
+11031=>770,11032=>770,11033=>770,11034=>770,11035=>1000,11036=>1000,11037=>283,11038=>283,11039=>846,11040=>846,
+11041=>799,11042=>799,11043=>807,11044=>1000,11045=>461,11046=>461,11047=>461,11048=>461,11049=>360,11050=>360,
+11051=>283,11052=>854,11053=>854,11054=>628,11055=>628,11088=>589,11089=>443,11090=>443,11091=>802,11092=>803,
+11392=>677,11393=>463,11394=>532,11395=>381,11396=>615,11397=>438,11398=>969,11399=>660,11400=>647,11401=>440,
+11402=>593,11403=>402,11404=>573,11405=>407,11406=>698,11407=>512,11408=>726,11409=>493,11410=>267,11411=>201,
+11412=>610,11413=>433,11414=>654,11415=>468,11416=>735,11417=>536,11418=>698,11419=>511,11420=>555,11421=>378,
+11422=>722,11423=>489,11424=>724,11425=>528,11426=>517,11427=>388,11428=>647,11429=>438,11430=>615,11431=>436,
+11432=>651,11433=>462,11434=>762,11435=>538,11436=>654,11437=>461,11438=>635,11439=>461,11440=>964,11441=>677,
+11456=>689,11457=>464,11493=>499,11494=>496,11495=>986,11496=>466,11497=>444,11498=>934,11517=>256,11518=>617,
+11519=>287,11799=>333,42560=>611,42561=>444,42562=>611,42563=>444,42564=>556,42565=>389,42566=>368,42567=>286,
+42572=>1145,42573=>775,42576=>1016,42577=>736,42578=>915,42579=>684,42580=>966,42581=>664,42582=>1042,42583=>648,
+42584=>722,42585=>491,42588=>1042,42589=>648,42590=>780,42591=>550,42594=>911,42595=>633,42596=>957,42597=>635,
+42598=>1139,42599=>777,42607=>0,42608=>0,42609=>0,42610=>0,42611=>519,42620=>0,42622=>510,64256=>589,
+64257=>534,64258=>530,64259=>805,64260=>799,64262=>677,64285=>350,64286=>0,64287=>537,64288=>537,64297=>564,
+64298=>537,64299=>537,64300=>537,64301=>537,64302=>537,64303=>537,64304=>537,64305=>537,64306=>350,64307=>537,
+64308=>537,64309=>350,64310=>350,64312=>537,64313=>350,64314=>537,64315=>537,64316=>537,64318=>537,64320=>350,
+64321=>537,64323=>537,64324=>537,64326=>537,64327=>537,64328=>537,64329=>537,64330=>537,64331=>350,64332=>537,
+64333=>537,64334=>537,64335=>537,64342=>926,64343=>926,64344=>308,64345=>308,64378=>750,64379=>750,64380=>580,
+64381=>580,64394=>338,64395=>338,64402=>874,64403=>874,64404=>329,64405=>329,64508=>776,64509=>700,64510=>304,
+64511=>304,65010=>640,65020=>837,65136=>300,65140=>300,65142=>300,65144=>300,65146=>300,65148=>300,65152=>724,
+65153=>321,65154=>275,65155=>249,65156=>275,65157=>399,65158=>399,65159=>249,65160=>275,65161=>776,65162=>776,
+65163=>301,65164=>264,65165=>249,65166=>275,65167=>950,65168=>950,65169=>293,65170=>293,65171=>424,65172=>622,
+65173=>925,65174=>925,65175=>308,65176=>308,65177=>924,65178=>924,65179=>298,65180=>298,65181=>738,65182=>738,
+65183=>574,65184=>574,65185=>748,65186=>750,65187=>600,65188=>600,65189=>701,65190=>775,65191=>596,65192=>596,
+65193=>397,65194=>397,65195=>399,65196=>399,65197=>328,65198=>328,65199=>331,65200=>331,65201=>951,65202=>951,
+65203=>600,65204=>600,65205=>949,65206=>949,65207=>649,65208=>649,65209=>949,65210=>949,65211=>823,65212=>823,
+65213=>949,65214=>949,65215=>805,65216=>805,65217=>557,65218=>557,65219=>460,65220=>460,65221=>550,65222=>550,
+65223=>455,65224=>550,65225=>625,65226=>575,65227=>674,65228=>550,65229=>602,65230=>577,65231=>578,65232=>577,
+65233=>801,65234=>801,65235=>300,65236=>300,65237=>696,65238=>696,65239=>650,65240=>650,65241=>757,65242=>757,
+65243=>318,65244=>318,65245=>655,65246=>655,65247=>206,65248=>206,65249=>549,65250=>549,65251=>403,65252=>403,
+65253=>651,65254=>651,65255=>323,65256=>323,65257=>424,65258=>622,65259=>525,65260=>476,65261=>399,65262=>399,
+65263=>776,65264=>776,65265=>776,65266=>776,65267=>296,65268=>264,65269=>676,65270=>724,65271=>676,65272=>724,
+65273=>676,65274=>724,65275=>676,65276=>724,65279=>0,65533=>788);
 $enc='';
 $diff='';
 $file='freeserif.z';
 $ctg='freeserif.ctg.z';
-$originalsize=1829396;
+$originalsize=1483772;
 ?>
\ No newline at end of file
index 978bd47e1b45d3e012019cca73905f44bf4ab646..67f609700b6977267e9e25c85e117d82f5789788 100644 (file)
Binary files a/lib/tcpdf/fonts/freeserif.z and b/lib/tcpdf/fonts/freeserif.z differ
index 69da3f9152f9999833fcdb664472b20a746b3f6b..77bfed16b5fd8affeac3df0b10b925b5bdaffd14 100644 (file)
Binary files a/lib/tcpdf/fonts/freeserifb.ctg.z and b/lib/tcpdf/fonts/freeserifb.ctg.z differ
index 1389756b1cc775ae6614c19de40f6643be488ad6..f3b98c5868b544fd1adfaf1ad256c5fb319edd88 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeSerifBold';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>16,'Flags'=>32,'FontBBox'=>'[-560 -488 1860 1173]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
+$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>16,'Flags'=>32,'FontBBox'=>'[-796 -306 1860 932]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
 $up=-125;
 $ut=50;
 $dw=600;
@@ -15,8 +15,8 @@ $cw=array(
 92=>278,93=>333,94=>581,95=>500,96=>333,97=>500,98=>556,99=>444,100=>556,101=>444,
 102=>333,103=>500,104=>556,105=>278,106=>333,107=>556,108=>278,109=>833,110=>556,111=>500,
 112=>556,113=>556,114=>444,115=>389,116=>333,117=>556,118=>500,119=>722,120=>500,121=>500,
-122=>444,123=>394,124=>220,125=>394,126=>520,8364=>500,8218=>333,402=>333,8222=>500,8230=>1000,
-8224=>500,8225=>500,710=>333,8240=>1000,352=>556,8249=>333,338=>1000,381=>667,8216=>333,8217=>333,
+122=>444,123=>394,124=>220,125=>394,126=>520,8364=>761,8218=>250,402=>333,8222=>500,8230=>1000,
+8224=>500,8225=>500,710=>333,8240=>1000,352=>556,8249=>333,338=>1000,381=>667,8216=>250,8217=>250,
 8220=>500,8221=>500,8226=>524,8211=>500,8212=>1000,732=>333,8482=>1000,353=>389,8250=>333,339=>722,
 382=>444,376=>722,160=>250,161=>333,162=>500,163=>500,164=>500,165=>500,166=>220,167=>500,
 168=>333,169=>747,170=>300,171=>500,172=>680,173=>333,174=>747,175=>333,176=>400,177=>676,
@@ -24,231 +24,259 @@ $cw=array(
 188=>750,189=>750,190=>750,191=>500,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,
 198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>389,205=>389,206=>389,207=>389,
 208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>676,216=>778,217=>722,
-218=>722,219=>722,220=>722,221=>722,222=>611,223=>556,224=>500,225=>500,226=>500,227=>500,
+218=>722,219=>722,220=>722,221=>722,222=>632,223=>556,224=>500,225=>500,226=>500,227=>500,
 228=>500,229=>500,230=>722,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,
 238=>278,239=>278,240=>500,241=>556,242=>500,243=>500,244=>500,245=>500,246=>500,247=>676,
 248=>500,249=>556,250=>556,251=>556,252=>556,253=>500,254=>556,255=>500,256=>722,257=>500,
 258=>722,259=>500,260=>722,261=>500,262=>722,263=>444,264=>722,265=>444,266=>722,267=>444,
-268=>722,269=>444,270=>722,271=>556,272=>722,273=>556,274=>667,275=>444,276=>667,277=>444,
+268=>722,269=>444,270=>722,271=>616,272=>722,273=>556,274=>667,275=>444,276=>667,277=>444,
 278=>667,279=>444,280=>667,281=>444,282=>667,283=>444,284=>778,285=>500,286=>778,287=>500,
 288=>778,289=>500,290=>778,291=>500,292=>778,293=>556,294=>778,295=>556,296=>389,297=>278,
 298=>389,299=>278,300=>389,301=>278,302=>389,303=>278,304=>389,305=>278,306=>882,307=>486,
-308=>500,309=>333,310=>778,311=>556,312=>534,313=>667,314=>278,315=>667,316=>278,317=>667,
-318=>278,319=>667,320=>528,321=>667,322=>278,323=>722,324=>556,325=>722,326=>556,327=>722,
-328=>556,329=>704,330=>722,331=>556,332=>778,333=>500,334=>778,335=>500,336=>778,337=>500,
+308=>500,309=>338,310=>778,311=>556,312=>534,313=>667,314=>278,315=>667,316=>278,317=>667,
+318=>398,319=>667,320=>528,321=>667,322=>278,323=>722,324=>556,325=>722,326=>556,327=>722,
+328=>556,329=>556,330=>722,331=>556,332=>778,333=>500,334=>778,335=>500,336=>778,337=>500,
 340=>722,341=>444,342=>722,343=>444,344=>722,345=>444,346=>556,347=>389,348=>556,349=>389,
-350=>556,351=>389,354=>667,355=>333,356=>667,357=>333,358=>667,359=>333,360=>722,361=>556,
+350=>556,351=>389,354=>667,355=>333,356=>667,357=>449,358=>667,359=>333,360=>722,361=>556,
 362=>722,363=>556,364=>722,365=>556,366=>722,367=>556,368=>722,369=>556,370=>722,371=>556,
 372=>1000,373=>722,374=>722,375=>500,377=>667,378=>444,379=>667,380=>444,383=>333,384=>556,
-385=>667,386=>667,387=>556,388=>667,389=>556,390=>722,391=>722,392=>444,393=>722,394=>724,
-395=>667,396=>556,397=>550,398=>667,399=>778,400=>631,401=>611,403=>778,404=>776,405=>807,
-406=>327,407=>389,408=>887,409=>556,410=>278,411=>495,412=>1000,413=>722,414=>556,415=>778,
-416=>778,417=>500,418=>1192,419=>795,420=>611,421=>556,422=>748,423=>556,424=>389,425=>650,
-426=>391,427=>333,428=>667,429=>333,430=>667,431=>722,432=>556,433=>811,434=>685,435=>853,
-436=>705,437=>667,438=>444,439=>654,440=>654,441=>508,442=>500,443=>500,444=>654,445=>520,
-446=>444,447=>611,448=>220,449=>444,450=>570,451=>333,452=>1391,453=>1168,454=>1000,455=>1164,
+385=>805,386=>648,387=>556,388=>667,389=>556,390=>722,391=>915,392=>605,393=>722,394=>862,
+395=>667,396=>556,397=>550,398=>667,399=>778,400=>631,401=>611,403=>903,404=>776,405=>807,
+406=>327,407=>389,408=>887,409=>556,410=>278,411=>495,412=>1000,413=>864,414=>556,415=>778,
+416=>778,417=>550,418=>1192,419=>795,420=>749,421=>556,422=>748,423=>556,424=>389,425=>650,
+426=>465,427=>333,428=>667,429=>333,430=>667,431=>839,432=>629,433=>811,434=>685,435=>853,
+436=>705,437=>667,438=>444,439=>593,440=>654,441=>508,442=>500,443=>500,444=>654,445=>520,
+446=>444,447=>611,448=>220,449=>418,450=>570,451=>333,452=>1391,453=>1168,454=>1000,455=>1164,
 456=>997,457=>611,458=>1222,459=>1055,460=>889,461=>722,462=>500,463=>386,464=>278,465=>778,
 466=>500,467=>722,468=>556,469=>722,470=>556,471=>722,472=>556,473=>722,474=>556,475=>722,
-476=>556,477=>444,478=>722,479=>500,480=>1112,481=>890,482=>1000,483=>722,484=>778,485=>500,
-486=>778,487=>500,488=>764,489=>556,490=>778,491=>500,492=>778,493=>500,494=>654,495=>508,
-496=>333,497=>1391,498=>1168,499=>1000,500=>778,501=>500,504=>722,505=>556,506=>722,507=>500,
-508=>1000,509=>722,510=>778,511=>500,512=>1038,513=>816,514=>1085,515=>863,516=>983,517=>760,
-518=>1030,519=>807,520=>702,521=>278,522=>749,523=>278,524=>1094,525=>816,526=>1141,527=>863,
-528=>712,529=>444,530=>712,531=>444,532=>1038,533=>872,534=>1085,535=>919,536=>556,537=>389,
-538=>667,539=>333,542=>774,543=>556,548=>667,549=>444,550=>722,551=>500,552=>667,553=>444,
-554=>778,555=>500,556=>778,557=>500,558=>778,559=>500,560=>778,561=>500,562=>722,563=>500,
-592=>500,593=>523,594=>523,595=>556,596=>444,598=>556,599=>556,600=>444,601=>444,602=>611,
-603=>440,604=>440,605=>611,607=>333,608=>500,609=>500,610=>556,613=>556,614=>556,615=>556,
-616=>278,617=>333,618=>278,619=>278,621=>278,622=>667,623=>833,624=>833,625=>833,626=>556,
-627=>556,628=>556,629=>500,631=>715,632=>667,633=>444,634=>444,635=>444,636=>444,637=>444,
-638=>394,639=>394,640=>556,641=>556,642=>389,643=>333,644=>333,645=>333,647=>333,648=>333,
-649=>500,650=>557,651=>529,652=>500,653=>722,654=>500,655=>500,656=>444,658=>508,660=>500,
-661=>500,662=>500,664=>778,665=>502,667=>722,668=>556,670=>556,671=>444,672=>556,673=>500,
-674=>500,686=>611,687=>722,711=>333,728=>333,729=>333,730=>333,731=>333,733=>333,734=>333,
-768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,
-778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,
-788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,
-798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,
-808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,
-818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,
-828=>0,829=>0,830=>0,831=>0,864=>0,865=>0,884=>199,885=>199,890=>0,894=>333,
-900=>330,901=>333,902=>722,903=>250,904=>811,905=>958,906=>569,908=>859,910=>902,911=>895,
-912=>330,913=>722,914=>667,915=>611,916=>759,917=>667,918=>667,919=>774,920=>778,921=>386,
-922=>777,923=>722,924=>943,925=>722,926=>650,927=>778,928=>812,929=>611,931=>650,932=>667,
-933=>722,934=>868,935=>722,936=>868,937=>811,938=>0,939=>722,940=>605,941=>440,942=>605,
-943=>330,944=>550,945=>605,946=>550,947=>550,948=>550,949=>440,950=>495,951=>605,952=>550,
-953=>330,954=>608,955=>495,956=>605,957=>495,958=>495,959=>550,960=>605,961=>550,962=>440,
-963=>550,964=>440,965=>550,966=>660,967=>495,968=>715,969=>715,970=>330,971=>550,972=>550,
-973=>550,974=>715,976=>550,977=>605,978=>722,979=>782,980=>722,981=>660,982=>715,986=>650,
-987=>550,988=>611,989=>513,991=>495,992=>722,993=>802,1008=>550,1009=>550,1010=>477,1024=>667,
-1025=>667,1026=>932,1027=>611,1028=>722,1029=>556,1030=>389,1031=>389,1032=>500,1033=>1032,1034=>1032,
-1035=>932,1036=>778,1037=>778,1038=>722,1039=>778,1040=>722,1041=>667,1042=>667,1043=>591,1044=>778,
-1045=>667,1046=>1107,1047=>564,1048=>773,1049=>773,1050=>764,1051=>778,1052=>944,1053=>778,1054=>778,
-1055=>774,1056=>611,1057=>722,1058=>667,1059=>722,1060=>800,1061=>722,1062=>773,1063=>778,1064=>1113,
-1065=>1112,1066=>867,1067=>970,1068=>630,1069=>722,1070=>1114,1071=>735,1072=>500,1073=>500,1074=>502,
-1075=>443,1076=>556,1077=>444,1078=>750,1079=>408,1080=>574,1081=>574,1082=>534,1083=>544,1084=>676,
-1085=>556,1086=>500,1087=>556,1088=>556,1089=>444,1090=>494,1091=>500,1092=>825,1093=>500,1094=>556,
-1095=>556,1096=>818,1097=>818,1098=>612,1099=>762,1100=>512,1101=>444,1102=>790,1103=>512,1104=>444,
-1105=>444,1106=>556,1107=>458,1108=>444,1109=>389,1110=>278,1111=>278,1112=>333,1113=>792,1114=>786,
-1115=>556,1116=>534,1117=>556,1118=>500,1119=>556,1164=>611,1165=>512,1166=>611,1167=>556,1168=>611,
-1169=>458,1170=>611,1171=>458,1172=>611,1173=>458,1174=>1107,1175=>750,1176=>580,1177=>389,1178=>778,
-1179=>534,1180=>778,1181=>534,1182=>778,1183=>534,1184=>967,1185=>633,1186=>778,1187=>556,1188=>1014,
-1189=>735,1190=>778,1191=>830,1192=>722,1193=>444,1194=>722,1195=>444,1196=>667,1197=>494,1198=>722,
-1199=>500,1200=>722,1201=>500,1202=>722,1203=>500,1204=>1046,1205=>778,1206=>778,1207=>556,1208=>778,
-1209=>556,1210=>778,1211=>556,1212=>778,1213=>444,1214=>778,1215=>444,1216=>389,1217=>1107,1218=>750,
-1219=>778,1220=>534,1223=>778,1224=>556,1227=>778,1228=>556,1232=>722,1233=>500,1234=>722,1235=>500,
-1236=>1000,1237=>722,1238=>667,1239=>444,1240=>778,1241=>444,1242=>778,1243=>444,1244=>1107,1245=>750,
-1246=>564,1247=>408,1248=>654,1249=>389,1250=>773,1251=>574,1252=>773,1253=>574,1254=>778,1255=>500,
-1256=>778,1257=>500,1258=>778,1259=>500,1260=>722,1261=>444,1262=>722,1263=>890,1264=>722,1265=>500,
-1266=>722,1267=>500,1268=>778,1269=>556,1272=>970,1273=>762,1425=>0,1426=>0,1427=>0,1428=>0,
-1429=>0,1430=>0,1431=>0,1432=>0,1433=>0,1434=>0,1435=>0,1436=>0,1437=>0,1438=>0,
-1439=>0,1440=>0,1441=>0,1443=>0,1444=>0,1445=>0,1446=>0,1447=>0,1448=>0,1449=>0,
-1450=>0,1451=>0,1452=>0,1453=>0,1454=>0,1455=>0,1456=>0,1457=>0,1458=>0,1459=>0,
-1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1467=>0,1468=>0,1469=>0,1470=>433,
-1471=>0,1472=>155,1473=>0,1474=>0,1475=>400,1476=>0,1488=>593,1489=>498,1490=>339,1491=>523,
-1492=>561,1493=>266,1494=>291,1495=>559,1496=>576,1497=>266,1498=>496,1499=>501,1500=>510,1501=>542,
-1502=>581,1503=>273,1504=>347,1505=>512,1506=>552,1507=>493,1508=>491,1509=>537,1510=>561,1511=>544,
-1512=>502,1513=>716,1514=>571,1520=>532,1521=>532,1522=>532,1548=>250,4256=>475,4257=>469,4258=>573,
-4259=>650,4260=>502,4261=>506,4262=>481,4263=>746,4264=>491,4265=>495,4266=>888,4267=>488,4268=>464,
-4269=>745,4270=>483,4271=>489,4272=>721,4273=>464,4274=>578,4275=>590,4276=>611,4277=>491,4278=>663,
-4279=>489,4280=>544,4281=>479,4282=>527,4283=>488,4284=>560,4285=>461,4286=>467,4287=>546,4288=>483,
-4289=>487,4290=>562,4291=>477,4292=>491,4293=>471,4304=>522,4305=>518,4306=>621,4307=>716,4308=>517,
-4309=>519,4310=>518,4311=>796,4312=>518,4313=>518,4314=>934,4315=>517,4316=>519,4317=>787,4318=>515,
-4319=>514,4320=>788,4321=>573,4322=>620,4323=>593,4324=>639,4325=>516,4326=>714,4327=>518,4328=>572,
-4329=>518,4330=>555,4331=>518,4332=>562,4333=>509,4334=>572,4335=>677,4336=>523,4337=>517,4338=>595,
-4339=>480,4340=>519,4341=>484,7680=>722,7681=>500,7682=>667,7683=>556,7684=>667,7685=>556,7686=>667,
-7687=>556,7688=>722,7689=>444,7690=>724,7691=>556,7692=>724,7693=>556,7694=>724,7695=>556,7696=>724,
-7697=>556,7698=>724,7699=>556,7700=>667,7701=>444,7702=>667,7703=>444,7704=>667,7705=>444,7706=>667,
-7707=>444,7708=>667,7709=>444,7710=>611,7711=>333,7712=>778,7713=>500,7714=>774,7715=>556,7716=>774,
-7717=>556,7718=>774,7719=>556,7720=>774,7721=>556,7722=>774,7723=>556,7724=>386,7725=>278,7726=>389,
-7727=>278,7728=>764,7729=>556,7730=>764,7731=>556,7732=>764,7733=>556,7734=>664,7735=>278,7736=>664,
-7737=>278,7738=>664,7739=>278,7740=>664,7741=>278,7742=>943,7743=>833,7744=>943,7745=>833,7746=>943,
-7747=>833,7748=>722,7749=>556,7750=>722,7751=>556,7752=>722,7753=>556,7754=>722,7755=>556,7756=>778,
-7757=>500,7758=>778,7759=>500,7760=>778,7761=>500,7762=>778,7763=>500,7764=>611,7765=>556,7766=>611,
-7767=>556,7768=>712,7769=>444,7770=>712,7771=>444,7772=>712,7773=>444,7774=>712,7775=>444,7776=>556,
-7777=>389,7778=>556,7779=>389,7780=>556,7781=>389,7782=>556,7783=>389,7784=>556,7785=>389,7786=>667,
-7787=>333,7788=>667,7789=>333,7790=>667,7791=>333,7792=>667,7793=>333,7794=>722,7795=>556,7796=>722,
-7797=>556,7798=>722,7799=>556,7800=>722,7801=>556,7802=>722,7803=>556,7804=>722,7805=>500,7806=>722,
-7807=>500,7808=>1000,7809=>722,7810=>1000,7811=>722,7812=>1000,7813=>722,7814=>1000,7815=>722,7816=>1000,
-7817=>722,7818=>722,7819=>500,7820=>722,7821=>500,7822=>722,7823=>500,7824=>667,7825=>444,7826=>667,
-7827=>444,7828=>667,7829=>444,7830=>556,7831=>333,7832=>722,7833=>500,7835=>333,7840=>722,7841=>500,
-7842=>825,7843=>603,7844=>722,7845=>500,7846=>722,7847=>500,7848=>722,7849=>500,7850=>722,7851=>500,
-7852=>722,7853=>500,7854=>722,7855=>500,7856=>722,7857=>500,7858=>825,7859=>603,7860=>722,7861=>500,
-7862=>722,7863=>500,7864=>667,7865=>444,7866=>770,7867=>547,7868=>667,7869=>444,7870=>667,7871=>444,
-7872=>667,7873=>444,7874=>667,7875=>444,7876=>667,7877=>444,7878=>667,7879=>444,7880=>386,7881=>278,
-7882=>386,7883=>278,7884=>778,7885=>500,7886=>881,7887=>603,7888=>778,7889=>500,7890=>778,7891=>500,
-7892=>881,7893=>603,7894=>778,7895=>500,7896=>778,7897=>500,7898=>894,7899=>616,7900=>894,7901=>616,
-7902=>881,7903=>603,7904=>778,7905=>500,7906=>778,7907=>500,7908=>722,7909=>556,7910=>722,7911=>556,
-7912=>838,7913=>672,7914=>838,7915=>672,7916=>825,7917=>659,7918=>722,7919=>556,7920=>722,7921=>556,
-7922=>722,7923=>500,7924=>722,7925=>500,7926=>825,7927=>603,7928=>722,7929=>500,7936=>605,7937=>605,
-7938=>605,7939=>605,7940=>605,7941=>605,7942=>605,7943=>605,7944=>722,7945=>722,7946=>722,7947=>722,
-7948=>722,7949=>722,7950=>722,7951=>722,7952=>440,7953=>440,7954=>440,7955=>440,7956=>440,7957=>440,
-7960=>667,7961=>667,7962=>667,7963=>667,7964=>667,7965=>667,7968=>605,7969=>605,7970=>605,7971=>605,
-7972=>605,7973=>605,7974=>605,7975=>605,7976=>774,7977=>774,7978=>774,7979=>774,7980=>774,7981=>774,
-7982=>774,7983=>774,7984=>330,7985=>330,7986=>330,7987=>330,7988=>330,7989=>330,7990=>330,7991=>330,
-7992=>386,7993=>386,7994=>386,7995=>386,7996=>386,7997=>386,7998=>386,7999=>386,8000=>550,8001=>550,
-8002=>550,8003=>550,8004=>550,8005=>550,8008=>778,8009=>778,8010=>778,8011=>778,8012=>778,8013=>778,
-8016=>550,8017=>550,8018=>550,8019=>550,8020=>550,8021=>550,8022=>550,8023=>550,8025=>722,8027=>722,
-8029=>722,8031=>722,8032=>715,8033=>715,8034=>715,8035=>715,8036=>715,8037=>715,8038=>715,8039=>715,
-8040=>811,8041=>811,8042=>811,8043=>811,8044=>811,8045=>811,8046=>811,8047=>811,8048=>605,8049=>605,
-8050=>440,8051=>440,8052=>605,8053=>605,8054=>330,8055=>330,8056=>550,8057=>550,8058=>550,8059=>550,
-8060=>715,8061=>715,8064=>605,8065=>605,8066=>605,8067=>605,8068=>605,8069=>605,8070=>605,8071=>605,
-8072=>722,8073=>722,8074=>722,8075=>722,8076=>722,8077=>722,8078=>722,8079=>722,8080=>605,8081=>605,
-8082=>605,8083=>605,8084=>605,8085=>605,8086=>605,8087=>605,8088=>774,8089=>774,8090=>774,8091=>774,
-8092=>774,8093=>774,8094=>774,8095=>774,8096=>715,8097=>715,8098=>715,8099=>715,8100=>715,8101=>715,
-8102=>715,8103=>715,8104=>811,8105=>811,8106=>811,8107=>811,8108=>811,8109=>811,8110=>811,8111=>811,
-8112=>605,8113=>605,8114=>605,8115=>605,8116=>605,8118=>605,8119=>605,8120=>722,8121=>722,8122=>722,
-8123=>722,8124=>952,8125=>500,8126=>0,8127=>500,8128=>500,8129=>550,8130=>605,8131=>605,8132=>605,
-8134=>605,8135=>605,8136=>667,8137=>667,8138=>774,8139=>774,8140=>774,8141=>500,8142=>500,8143=>500,
-8144=>330,8145=>330,8146=>330,8147=>330,8150=>330,8151=>330,8152=>386,8153=>386,8154=>386,8155=>386,
-8157=>500,8158=>500,8159=>500,8160=>550,8161=>550,8162=>550,8163=>550,8164=>550,8165=>550,8166=>550,
-8167=>550,8168=>722,8169=>722,8170=>722,8171=>722,8172=>611,8173=>550,8174=>550,8175=>500,8178=>715,
-8179=>715,8180=>715,8182=>715,8183=>715,8184=>778,8185=>778,8186=>811,8187=>811,8188=>811,8189=>500,
-8190=>500,8204=>0,8205=>0,8206=>0,8207=>0,8208=>333,8209=>333,8210=>500,8213=>1000,8214=>333,
-8219=>333,8223=>500,8227=>560,8228=>250,8229=>500,8241=>1820,8242=>373,8248=>469,8251=>727,8252=>666,
-8253=>695,8255=>953,8256=>953,8257=>338,8258=>931,8259=>333,8260=>167,8261=>332,8262=>332,8263=>1000,
-8264=>833,8265=>833,8267=>540,8304=>300,8308=>300,8309=>300,8310=>300,8311=>300,8312=>300,8313=>300,
-8320=>300,8321=>274,8322=>300,8323=>300,8324=>300,8325=>300,8326=>300,8327=>300,8328=>300,8329=>300,
-8352=>710,8353=>722,8354=>783,8355=>611,8356=>500,8357=>833,8358=>722,8359=>700,8360=>1101,8361=>1000,
-8363=>513,8373=>500,8451=>1122,8457=>1011,8458=>500,8459=>960,8463=>556,8464=>792,8465=>737,8466=>800,
-8467=>427,8470=>954,8471=>1048,8472=>666,8475=>747,8476=>955,8478=>722,8479=>722,8480=>891,8483=>722,
-8486=>811,8487=>811,8489=>333,8490=>764,8491=>722,8492=>806,8494=>551,8497=>723,8498=>611,8499=>1203,
-8501=>666,8502=>651,8503=>329,8504=>549,8531=>750,8532=>750,8533=>750,8534=>750,8535=>750,8536=>750,
-8537=>750,8538=>750,8539=>750,8540=>750,8541=>750,8542=>750,8543=>750,8544=>386,8545=>772,8546=>1158,
-8547=>1108,8548=>722,8549=>1108,8550=>1494,8551=>1880,8552=>1108,8553=>722,8554=>1108,8555=>1494,8556=>664,
-8557=>722,8558=>724,8559=>943,8560=>278,8561=>556,8562=>834,8563=>778,8564=>500,8565=>778,8566=>1056,
-8567=>1334,8568=>778,8569=>500,8570=>778,8571=>1056,8572=>278,8573=>444,8574=>556,8575=>833,8592=>964,
-8593=>523,8594=>964,8595=>523,8596=>964,8597=>964,8598=>964,8599=>964,8600=>964,8601=>964,8602=>964,
-8603=>964,8604=>1152,8605=>1152,8606=>964,8607=>964,8608=>964,8609=>964,8610=>1078,8611=>1078,8612=>964,
-8613=>964,8614=>964,8615=>964,8616=>964,8617=>964,8618=>964,8619=>964,8620=>964,8621=>1168,8622=>964,
-8624=>622,8625=>622,8630=>1069,8631=>1069,8632=>964,8633=>964,8634=>980,8635=>980,8636=>964,8637=>964,
-8638=>557,8639=>556,8640=>964,8641=>964,8642=>557,8643=>556,8644=>964,8645=>964,8646=>964,8647=>964,
-8648=>964,8649=>964,8650=>964,8651=>964,8652=>964,8653=>964,8654=>964,8655=>964,8656=>964,8657=>630,
-8658=>964,8659=>630,8660=>964,8661=>630,8662=>1063,8663=>1063,8664=>1063,8665=>1063,8666=>964,8667=>964,
-8668=>1100,8669=>1100,8672=>964,8674=>964,8676=>964,8677=>964,8704=>627,8705=>716,8706=>558,8707=>627,
-8708=>627,8709=>500,8710=>612,8711=>719,8713=>576,8714=>576,8716=>576,8717=>576,8720=>733,8721=>713,
-8722=>676,8723=>676,8724=>676,8725=>750,8727=>570,8729=>570,8730=>549,8733=>676,8734=>752,8736=>555,
-8737=>555,8738=>555,8739=>240,8740=>531,8741=>478,8742=>705,8743=>694,8744=>694,8745=>694,8746=>694,
-8747=>323,8756=>629,8757=>629,8761=>947,8764=>676,8765=>676,8766=>763,8768=>305,8769=>676,8770=>676,
-8771=>676,8773=>676,8776=>676,8777=>676,8778=>676,8781=>676,8782=>676,8783=>676,8784=>676,8785=>676,
-8786=>676,8787=>676,8788=>947,8789=>947,8790=>676,8791=>676,8796=>676,8800=>570,8801=>676,8802=>676,
-8804=>570,8805=>570,8806=>676,8807=>676,8808=>676,8809=>676,8810=>1047,8811=>1047,8812=>450,8813=>676,
-8814=>676,8815=>676,8816=>676,8817=>676,8818=>676,8819=>676,8820=>676,8821=>676,8822=>676,8823=>676,
-8824=>676,8825=>676,8826=>676,8827=>676,8828=>676,8829=>676,8830=>676,8831=>676,8832=>676,8833=>676,
-8834=>676,8835=>676,8836=>676,8837=>676,8838=>676,8839=>676,8840=>676,8841=>676,8842=>676,8843=>676,
-8846=>694,8847=>676,8848=>676,8849=>676,8850=>676,8851=>694,8852=>694,8853=>738,8854=>738,8855=>738,
-8856=>738,8857=>738,8858=>738,8859=>738,8861=>738,8862=>678,8863=>678,8864=>678,8865=>678,8866=>487,
-8867=>487,8868=>752,8869=>752,8871=>487,8873=>659,8874=>831,8876=>487,8877=>487,8878=>659,8879=>659,
-8882=>676,8883=>676,8884=>676,8885=>676,8886=>1380,8887=>1380,8888=>1027,8890=>626,8891=>694,8892=>694,
-8893=>694,8900=>512,8903=>676,8904=>759,8905=>632,8906=>632,8907=>1000,8908=>1000,8909=>676,8910=>694,
-8911=>694,8912=>676,8913=>676,8914=>694,8915=>694,8916=>694,8918=>676,8919=>676,8920=>1441,8921=>1441,
-8922=>676,8923=>676,8924=>676,8925=>676,8926=>676,8927=>676,8928=>676,8929=>676,8930=>676,8931=>676,
-8934=>676,8935=>676,8936=>676,8937=>676,8938=>676,8939=>676,8940=>676,8941=>676,8960=>737,8968=>411,
-8969=>411,8970=>411,8971=>411,8976=>680,8994=>951,8995=>951,9001=>398,9002=>398,9251=>500,9472=>1000,
-9473=>1000,9474=>1000,9475=>1000,9476=>1000,9477=>1000,9478=>1000,9479=>1000,9480=>1000,9481=>1000,9482=>1000,
-9483=>1000,9484=>1000,9485=>1000,9486=>1000,9487=>1000,9488=>1000,9489=>1000,9490=>1000,9491=>1000,9492=>1000,
-9493=>1000,9494=>1000,9495=>1000,9496=>1000,9497=>1000,9498=>1000,9499=>1000,9500=>1000,9501=>1000,9502=>1000,
-9503=>1000,9504=>1000,9505=>1000,9506=>1000,9507=>1000,9508=>1000,9509=>1000,9510=>1000,9511=>1000,9512=>1000,
-9513=>1000,9514=>1000,9515=>1000,9516=>1000,9517=>1000,9518=>1000,9519=>1000,9520=>1000,9521=>1000,9522=>1000,
-9523=>1000,9524=>1000,9525=>1000,9526=>1000,9527=>1000,9528=>1000,9529=>1000,9530=>1000,9531=>1000,9532=>1000,
-9533=>1000,9534=>1000,9535=>1000,9536=>1000,9537=>1000,9538=>1000,9539=>1000,9540=>1000,9541=>1000,9542=>1000,
-9543=>1000,9544=>1000,9545=>1000,9546=>1000,9547=>1000,9552=>1000,9553=>1000,9554=>1000,9555=>1000,9556=>1000,
-9557=>1000,9558=>1000,9559=>1000,9560=>1000,9561=>1000,9562=>1000,9563=>1000,9564=>1000,9565=>1000,9566=>1000,
-9567=>1000,9568=>1000,9569=>1000,9570=>1000,9571=>1000,9572=>1000,9573=>1000,9574=>1000,9575=>1000,9576=>1000,
-9577=>1000,9578=>1000,9579=>1000,9580=>1000,9600=>1000,9601=>1000,9602=>1000,9603=>1000,9604=>1000,9605=>1000,
-9606=>1000,9607=>1000,9608=>1000,9609=>1000,9610=>1000,9611=>1000,9612=>1000,9613=>1000,9614=>1000,9615=>1000,
-9616=>1000,9617=>1000,9618=>1000,9619=>1000,9620=>1000,9621=>1000,9622=>1000,9623=>1000,9624=>1000,9625=>1000,
-9626=>1000,9627=>1000,9628=>1000,9629=>1000,9630=>1000,9631=>1000,9632=>678,9633=>678,9642=>309,9650=>681,
-9651=>681,9654=>681,9660=>681,9661=>681,9664=>681,9670=>580,9671=>580,9674=>494,9675=>738,9676=>604,
-9679=>738,9702=>524,9733=>1003,9824=>618,9825=>645,9826=>587,9827=>582,9828=>582,9829=>645,9830=>587,
-9831=>618,9833=>333,9834=>556,9835=>778,9836=>778,9837=>556,9838=>556,9839=>556,10214=>561,10215=>561,
-11799=>333,12353=>1000,12354=>1000,12355=>1000,12356=>1000,12357=>1000,12358=>1000,12359=>1000,12360=>1000,12361=>1000,
-12362=>1000,12363=>1000,12364=>1000,12365=>1000,12366=>1000,12367=>1000,12368=>1000,12369=>1000,12370=>1000,12371=>1000,
-12372=>1000,12373=>1000,12374=>1000,12375=>1000,12376=>1000,12377=>1000,12378=>1000,12379=>1000,12380=>1000,12381=>1000,
-12382=>1000,12383=>1000,12384=>1000,12385=>1000,12386=>1000,12387=>1000,12388=>1000,12389=>1000,12390=>1000,12391=>1000,
-12392=>1000,12393=>1000,12394=>1000,12395=>1000,12396=>1000,12397=>1000,12398=>1000,12399=>1000,12400=>1000,12401=>1000,
-12402=>1000,12403=>1000,12404=>1000,12405=>1000,12406=>1000,12407=>1000,12408=>1000,12409=>1000,12410=>1000,12411=>1000,
-12412=>1000,12413=>1000,12414=>1000,12415=>1000,12416=>1000,12417=>1000,12418=>1000,12419=>1000,12420=>1000,12421=>1000,
-12422=>1000,12423=>1000,12424=>1000,12425=>1000,12426=>1000,12427=>1000,12428=>1000,12429=>1000,12430=>1000,12431=>1000,
-12432=>1000,12433=>1000,12434=>1000,12435=>1000,12449=>1000,12450=>1000,12451=>1000,12452=>1000,12453=>1000,12454=>1000,
-12455=>1000,12456=>1000,12457=>1000,12458=>1000,12459=>1000,12460=>1000,12461=>1000,12462=>1000,12463=>1000,12464=>1000,
-12465=>1000,12466=>1000,12467=>1000,12468=>1000,12469=>1000,12470=>1000,12471=>1000,12472=>1000,12473=>1000,12474=>1000,
-12475=>1000,12476=>1000,12477=>1000,12478=>1000,12479=>1000,12480=>1000,12481=>1000,12482=>1000,12483=>1000,12484=>1000,
-12485=>1000,12486=>1000,12487=>1000,12488=>1000,12489=>1000,12490=>1000,12491=>1000,12492=>1000,12493=>1000,12494=>1000,
-12495=>1000,12496=>1000,12497=>1000,12498=>1000,12499=>1000,12500=>1000,12501=>1000,12502=>1000,12503=>1000,12504=>1000,
-12505=>1000,12506=>1000,12507=>1000,12508=>1000,12509=>1000,12510=>1000,12511=>1000,12512=>1000,12513=>1000,12514=>1000,
-12515=>1000,12516=>1000,12517=>1000,12518=>1000,12519=>1000,12520=>1000,12521=>1000,12522=>1000,12523=>1000,12524=>1000,
-12525=>1000,12526=>1000,12527=>1000,12528=>1000,12529=>1000,12530=>1000,12531=>1000,12532=>1000,12533=>1000,12534=>1000,
-59393=>266,59394=>496,59395=>496,63033=>500,63034=>500,63035=>500,63036=>500,63037=>500,63038=>500,63039=>500,
-63040=>500,63041=>500,63166=>333,63171=>333,63196=>500,64256=>556,64257=>556,64258=>556,64259=>834,64260=>834,
-64262=>723,64285=>266,64286=>0,64287=>532,64288=>552,64297=>570,64298=>716,64299=>716,64300=>716,64301=>716,
-64302=>593,64303=>593,64304=>593,64305=>498,64306=>339,64307=>523,64308=>561,64309=>266,64310=>291,64311=>559,
-64312=>576,64313=>266,64314=>496,64315=>501,64316=>510,64317=>542,64318=>581,64319=>273,64320=>347,64321=>512,
-64322=>552,64323=>493,64324=>491,64325=>537,64326=>561,64327=>544,64328=>502,64329=>716,64330=>571,64331=>266,
+476=>556,477=>444,478=>722,479=>500,480=>722,481=>500,482=>1000,483=>722,484=>778,485=>500,
+486=>778,487=>500,488=>764,489=>556,490=>778,491=>500,492=>778,493=>500,494=>593,495=>502,
+496=>338,497=>1391,498=>1168,499=>1000,500=>778,501=>500,502=>995,503=>603,504=>722,505=>556,
+506=>722,507=>500,508=>1000,509=>722,510=>778,511=>500,512=>722,513=>500,514=>722,515=>500,
+516=>667,517=>444,518=>667,519=>444,520=>386,521=>278,522=>386,523=>278,524=>778,525=>500,
+526=>778,527=>500,528=>712,529=>444,530=>712,531=>444,532=>722,533=>556,534=>722,535=>556,
+536=>556,537=>389,538=>667,539=>333,540=>464,541=>455,542=>774,543=>556,544=>731,545=>649,
+546=>568,547=>494,548=>667,549=>444,550=>722,551=>500,552=>667,553=>444,554=>778,555=>500,
+556=>778,557=>500,558=>778,559=>500,560=>778,561=>500,562=>722,563=>500,564=>437,565=>636,
+566=>415,567=>338,568=>776,569=>760,570=>722,571=>722,572=>444,573=>664,574=>667,575=>389,
+576=>451,577=>505,578=>479,579=>686,580=>750,581=>722,582=>667,583=>478,584=>500,585=>333,
+586=>808,587=>608,588=>712,589=>444,590=>757,591=>500,592=>500,593=>523,594=>523,595=>556,
+596=>444,598=>556,599=>556,600=>444,601=>444,602=>611,603=>440,604=>440,605=>611,607=>333,
+608=>500,609=>500,610=>556,613=>556,614=>556,615=>556,616=>278,617=>333,618=>278,619=>278,
+621=>278,622=>667,623=>833,624=>833,625=>833,626=>556,627=>556,628=>556,629=>500,631=>715,
+632=>667,633=>444,634=>444,635=>444,636=>444,637=>444,638=>394,639=>394,640=>556,641=>556,
+642=>389,643=>333,644=>333,645=>433,647=>333,648=>333,649=>500,650=>557,651=>529,652=>500,
+653=>722,654=>500,655=>500,656=>444,658=>502,660=>500,661=>500,662=>500,664=>778,665=>510,
+667=>722,668=>556,670=>556,671=>444,672=>556,673=>500,674=>500,686=>611,687=>722,697=>250,
+698=>408,699=>250,700=>250,701=>250,702=>300,703=>300,706=>333,707=>333,708=>333,709=>333,
+711=>333,712=>333,713=>333,714=>333,715=>333,716=>300,717=>333,718=>333,719=>333,720=>278,
+721=>278,722=>300,723=>300,724=>333,725=>333,726=>333,727=>333,728=>333,729=>333,730=>333,
+731=>333,733=>400,734=>333,735=>352,741=>526,742=>526,743=>526,744=>526,745=>526,746=>519,
+747=>519,748=>333,749=>333,750=>480,751=>333,752=>333,753=>333,754=>333,755=>327,756=>261,
+757=>437,758=>437,759=>400,760=>278,761=>175,762=>175,763=>175,764=>175,765=>333,766=>337,
+767=>432,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,
+777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,
+787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,
+797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,
+807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,
+817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,
+827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,
+837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,845=>0,846=>0,
+847=>0,848=>0,849=>0,850=>0,851=>0,852=>0,853=>0,854=>0,855=>0,856=>0,
+857=>0,858=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,884=>199,885=>199,
+890=>0,894=>333,900=>330,901=>415,902=>722,903=>250,904=>811,905=>938,906=>556,908=>840,
+910=>886,911=>879,912=>330,913=>722,914=>667,915=>611,916=>759,917=>667,918=>667,919=>774,
+920=>778,921=>386,922=>777,923=>722,924=>943,925=>722,926=>650,927=>778,928=>812,929=>611,
+931=>650,932=>667,933=>738,934=>868,935=>722,936=>924,937=>811,938=>386,939=>738,940=>605,
+941=>440,942=>605,943=>330,944=>550,945=>605,946=>550,947=>550,948=>550,949=>440,950=>495,
+951=>605,952=>550,953=>330,954=>608,955=>495,956=>605,957=>495,958=>495,959=>550,960=>605,
+961=>550,962=>440,963=>550,964=>440,965=>550,966=>660,967=>495,968=>715,969=>715,970=>330,
+971=>550,972=>550,973=>550,974=>715,976=>550,977=>605,978=>722,979=>871,980=>722,981=>660,
+982=>715,983=>550,984=>611,985=>550,986=>650,987=>514,988=>611,989=>513,990=>715,991=>439,
+992=>722,993=>605,1008=>550,1009=>550,1010=>477,1011=>333,1012=>778,1013=>424,1014=>424,1015=>632,
+1016=>575,1017=>722,1018=>943,1019=>809,1020=>550,1021=>722,1022=>722,1023=>722,1024=>667,1025=>667,
+1026=>848,1027=>611,1028=>722,1029=>556,1030=>386,1031=>386,1032=>500,1033=>1042,1034=>1032,1035=>912,
+1036=>770,1037=>774,1038=>738,1039=>778,1040=>722,1041=>648,1042=>667,1043=>599,1044=>708,1045=>667,
+1046=>1106,1047=>652,1048=>774,1049=>774,1050=>770,1051=>788,1052=>943,1053=>774,1054=>778,1055=>812,
+1056=>611,1057=>722,1058=>667,1059=>738,1060=>868,1061=>722,1062=>774,1063=>754,1064=>1115,1065=>1115,
+1066=>782,1067=>970,1068=>630,1069=>722,1070=>1114,1071=>729,1072=>500,1073=>500,1074=>510,1075=>430,
+1076=>545,1077=>438,1078=>781,1079=>445,1080=>556,1081=>556,1082=>556,1083=>542,1084=>668,1085=>558,
+1086=>500,1087=>558,1088=>549,1089=>444,1090=>494,1091=>486,1092=>809,1093=>500,1094=>560,1095=>556,
+1096=>818,1097=>820,1098=>612,1099=>756,1100=>512,1101=>496,1102=>770,1103=>546,1104=>438,1105=>444,
+1106=>549,1107=>430,1108=>488,1109=>386,1110=>272,1111=>278,1112=>333,1113=>784,1114=>786,1115=>552,
+1116=>556,1117=>556,1118=>484,1119=>556,1120=>1018,1121=>699,1122=>781,1123=>612,1124=>1033,1125=>778,
+1126=>993,1127=>692,1128=>1371,1129=>975,1130=>1106,1131=>781,1132=>1474,1133=>1066,1134=>650,1135=>424,
+1136=>970,1137=>769,1138=>770,1139=>590,1140=>808,1141=>578,1142=>808,1143=>650,1144=>1284,1145=>973,
+1146=>928,1147=>672,1148=>1018,1149=>693,1150=>1018,1151=>699,1152=>650,1153=>444,1154=>258,1155=>0,
+1156=>0,1157=>0,1158=>0,1159=>0,1160=>0,1161=>0,1162=>774,1163=>558,1164=>630,1165=>512,
+1166=>611,1167=>556,1168=>614,1169=>458,1170=>614,1171=>443,1172=>631,1173=>562,1174=>1155,1175=>828,
+1176=>652,1177=>452,1178=>819,1179=>600,1180=>816,1181=>590,1182=>920,1183=>664,1184=>967,1185=>633,
+1186=>774,1187=>562,1188=>984,1189=>698,1190=>1069,1191=>841,1192=>722,1193=>524,1194=>722,1195=>444,
+1196=>667,1197=>494,1198=>722,1199=>606,1200=>722,1201=>606,1202=>722,1203=>560,1204=>1046,1205=>778,
+1206=>754,1207=>560,1208=>810,1209=>590,1210=>754,1211=>556,1212=>945,1213=>606,1214=>945,1215=>606,
+1216=>386,1217=>1106,1218=>781,1219=>770,1220=>534,1221=>788,1222=>550,1223=>774,1224=>556,1225=>774,
+1226=>558,1227=>778,1228=>556,1229=>943,1230=>677,1231=>386,1232=>722,1233=>500,1234=>722,1235=>500,
+1236=>1000,1237=>722,1238=>667,1239=>444,1240=>778,1241=>444,1242=>778,1243=>444,1244=>1106,1245=>781,
+1246=>652,1247=>445,1248=>654,1249=>389,1250=>774,1251=>556,1252=>774,1253=>556,1254=>778,1255=>500,
+1256=>778,1257=>500,1258=>778,1259=>500,1260=>722,1261=>496,1262=>738,1263=>500,1264=>738,1265=>500,
+1266=>738,1267=>500,1268=>754,1269=>556,1270=>599,1271=>443,1272=>970,1273=>756,1296=>652,1297=>452,
+1298=>788,1299=>550,1306=>778,1307=>556,1308=>1000,1309=>722,1310=>770,1311=>558,1425=>0,1426=>0,
+1427=>0,1428=>0,1429=>0,1430=>0,1431=>0,1432=>0,1433=>0,1434=>0,1435=>0,1436=>0,
+1437=>0,1438=>0,1439=>0,1440=>0,1441=>0,1442=>0,1443=>0,1444=>0,1445=>0,1446=>0,
+1447=>0,1448=>0,1449=>0,1450=>0,1451=>0,1452=>0,1453=>0,1454=>0,1455=>0,1456=>0,
+1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1466=>0,
+1467=>0,1468=>0,1469=>0,1470=>433,1471=>0,1472=>155,1473=>0,1474=>0,1475=>400,1476=>0,
+1477=>0,1478=>347,1479=>0,1488=>593,1489=>498,1490=>339,1491=>523,1492=>561,1493=>266,1494=>291,
+1495=>559,1496=>576,1497=>266,1498=>496,1499=>501,1500=>510,1501=>542,1502=>581,1503=>273,1504=>347,
+1505=>512,1506=>552,1507=>493,1508=>491,1509=>537,1510=>561,1511=>544,1512=>502,1513=>716,1514=>571,
+1520=>532,1521=>532,1522=>532,1523=>396,1524=>432,3585=>590,3586=>578,3587=>661,3588=>592,3589=>592,
+3590=>699,3591=>447,3592=>534,3593=>692,3594=>578,3595=>659,3596=>899,3597=>804,3598=>633,3599=>637,
+3600=>484,3601=>730,3602=>876,3603=>915,3604=>592,3605=>592,3606=>578,3607=>670,3608=>542,3609=>671,
+3610=>621,3611=>618,3612=>621,3613=>617,3614=>708,3615=>708,3616=>637,3617=>589,3618=>552,3619=>484,
+3620=>590,3621=>569,3622=>637,3623=>526,3624=>599,3625=>802,3626=>579,3627=>668,3628=>778,3629=>560,
+3630=>514,3631=>510,3632=>412,3633=>0,3634=>423,3635=>452,3636=>0,3637=>0,3638=>0,3639=>0,
+3640=>0,3641=>0,3642=>0,3647=>665,3648=>357,3649=>624,3650=>529,3651=>486,3652=>475,3653=>423,
+3654=>500,3655=>0,3656=>0,3657=>0,3658=>0,3659=>0,3660=>0,3661=>0,3662=>0,3663=>657,
+3664=>548,3665=>548,3666=>592,3667=>614,3668=>631,3669=>643,3670=>508,3671=>744,3672=>622,3673=>585,
+3674=>721,3675=>1381,4256=>475,4257=>469,4258=>573,4259=>650,4260=>502,4261=>506,4262=>481,4263=>746,
+4264=>491,4265=>495,4266=>888,4267=>488,4268=>464,4269=>745,4270=>483,4271=>489,4272=>721,4273=>464,
+4274=>578,4275=>590,4276=>611,4277=>491,4278=>663,4279=>489,4280=>544,4281=>479,4282=>527,4283=>488,
+4284=>560,4285=>461,4286=>467,4287=>546,4288=>483,4289=>487,4290=>562,4291=>477,4292=>491,4293=>471,
+4304=>522,4305=>518,4306=>621,4307=>716,4308=>517,4309=>519,4310=>518,4311=>796,4312=>518,4313=>518,
+4314=>934,4315=>517,4316=>519,4317=>787,4318=>515,4319=>514,4320=>788,4321=>573,4322=>620,4323=>593,
+4324=>639,4325=>516,4326=>714,4327=>518,4328=>572,4329=>518,4330=>555,4331=>518,4332=>562,4333=>509,
+4334=>572,4335=>677,4336=>523,4337=>517,4338=>595,4339=>480,4340=>519,4341=>484,4345=>621,4347=>450,
+5024=>718,5025=>768,5026=>633,5027=>878,5028=>1001,5029=>371,5030=>576,5031=>754,5032=>531,5033=>774,
+5034=>692,5035=>499,5036=>668,5037=>829,5038=>575,5039=>681,5040=>485,5041=>607,5042=>885,5043=>974,
+5044=>588,5045=>583,5046=>726,5047=>947,5048=>558,5049=>832,5050=>1096,5051=>780,5052=>595,5053=>869,
+5054=>752,5055=>710,5056=>761,5057=>802,5058=>760,5059=>656,5060=>655,5061=>982,5062=>684,5063=>801,
+5064=>805,5065=>1042,5066=>755,5067=>612,5068=>707,5069=>889,5070=>584,5071=>623,5072=>536,5073=>763,
+5074=>763,5075=>498,5076=>1052,5077=>600,5078=>730,5079=>714,5080=>714,5081=>697,5082=>543,5083=>943,
+5084=>718,5085=>630,5086=>660,5087=>692,5088=>841,5089=>861,5090=>617,5091=>733,5092=>898,5093=>896,
+5094=>781,5095=>612,5096=>830,5097=>948,5098=>886,5099=>757,5100=>796,5101=>578,5102=>601,5103=>797,
+5104=>623,5105=>886,5106=>730,5107=>827,5108=>648,7680=>722,7681=>500,7682=>667,7683=>556,7684=>667,
+7685=>556,7686=>667,7687=>556,7688=>722,7689=>444,7690=>724,7691=>556,7692=>724,7693=>556,7694=>724,
+7695=>556,7696=>724,7697=>556,7698=>724,7699=>556,7700=>667,7701=>444,7702=>667,7703=>444,7704=>667,
+7705=>444,7706=>667,7707=>444,7708=>667,7709=>444,7710=>611,7711=>333,7712=>778,7713=>500,7714=>774,
+7715=>556,7716=>774,7717=>556,7718=>774,7719=>556,7720=>774,7721=>556,7722=>774,7723=>556,7724=>386,
+7725=>278,7726=>389,7727=>278,7728=>764,7729=>556,7730=>764,7731=>556,7732=>764,7733=>556,7734=>664,
+7735=>278,7736=>664,7737=>278,7738=>664,7739=>278,7740=>664,7741=>278,7742=>943,7743=>833,7744=>943,
+7745=>833,7746=>943,7747=>833,7748=>722,7749=>556,7750=>722,7751=>556,7752=>722,7753=>556,7754=>722,
+7755=>556,7756=>778,7757=>500,7758=>778,7759=>500,7760=>778,7761=>500,7762=>778,7763=>500,7764=>611,
+7765=>556,7766=>611,7767=>556,7768=>712,7769=>444,7770=>712,7771=>444,7772=>712,7773=>444,7774=>712,
+7775=>444,7776=>556,7777=>389,7778=>556,7779=>389,7780=>556,7781=>389,7782=>556,7783=>389,7784=>556,
+7785=>389,7786=>667,7787=>333,7788=>667,7789=>333,7790=>667,7791=>333,7792=>667,7793=>333,7794=>722,
+7795=>556,7796=>722,7797=>556,7798=>722,7799=>556,7800=>722,7801=>556,7802=>722,7803=>556,7804=>722,
+7805=>500,7806=>722,7807=>500,7808=>1000,7809=>722,7810=>1000,7811=>722,7812=>1000,7813=>722,7814=>1000,
+7815=>722,7816=>1000,7817=>722,7818=>722,7819=>500,7820=>722,7821=>500,7822=>722,7823=>500,7824=>667,
+7825=>444,7826=>667,7827=>444,7828=>667,7829=>444,7830=>556,7831=>333,7832=>722,7833=>500,7834=>507,
+7835=>333,7840=>722,7841=>500,7842=>722,7843=>500,7844=>722,7845=>500,7846=>722,7847=>500,7848=>722,
+7849=>500,7850=>722,7851=>500,7852=>722,7853=>500,7854=>722,7855=>500,7856=>722,7857=>500,7858=>825,
+7859=>603,7860=>722,7861=>500,7862=>722,7863=>500,7864=>667,7865=>444,7866=>667,7867=>444,7868=>667,
+7869=>444,7870=>667,7871=>444,7872=>667,7873=>444,7874=>667,7875=>444,7876=>667,7877=>444,7878=>667,
+7879=>444,7880=>386,7881=>278,7882=>386,7883=>278,7884=>778,7885=>500,7886=>778,7887=>500,7888=>778,
+7889=>500,7890=>778,7891=>500,7892=>778,7893=>500,7894=>778,7895=>500,7896=>778,7897=>500,7898=>774,
+7899=>550,7900=>774,7901=>550,7902=>774,7903=>549,7904=>778,7905=>550,7906=>778,7907=>550,7908=>722,
+7909=>556,7910=>722,7911=>556,7912=>838,7913=>672,7914=>838,7915=>672,7916=>825,7917=>659,7918=>839,
+7919=>629,7920=>839,7921=>629,7922=>722,7923=>500,7924=>722,7925=>500,7926=>722,7927=>500,7928=>722,
+7929=>500,7936=>605,7937=>605,7938=>605,7939=>605,7940=>605,7941=>605,7942=>605,7943=>605,7944=>722,
+7945=>722,7946=>830,7947=>833,7948=>761,7949=>798,7950=>721,7951=>722,7952=>440,7953=>440,7954=>440,
+7955=>440,7956=>440,7957=>440,7960=>817,7961=>826,7962=>944,7963=>970,7964=>964,7965=>1009,7968=>605,
+7969=>605,7970=>605,7971=>605,7972=>605,7973=>605,7974=>605,7975=>605,7976=>926,7977=>921,7978=>1038,
+7979=>1064,7980=>1092,7981=>1102,7982=>1005,7983=>991,7984=>330,7985=>330,7986=>330,7987=>330,7988=>330,
+7989=>330,7990=>330,7991=>330,7992=>534,7993=>541,7994=>653,7995=>659,7996=>705,7997=>714,7998=>612,
+7999=>614,8000=>550,8001=>550,8002=>550,8003=>550,8004=>550,8005=>550,8008=>885,8009=>886,8010=>1038,
+8011=>1052,8012=>997,8013=>1021,8016=>550,8017=>550,8018=>550,8019=>550,8020=>550,8021=>550,8022=>550,
+8023=>550,8025=>870,8027=>1014,8029=>1043,8031=>944,8032=>715,8033=>715,8034=>715,8035=>715,8036=>715,
+8037=>715,8038=>715,8039=>715,8040=>905,8041=>913,8042=>1066,8043=>1085,8044=>1034,8045=>1044,8046=>980,
+8047=>961,8048=>605,8049=>605,8050=>440,8051=>440,8052=>605,8053=>605,8054=>330,8055=>330,8056=>550,
+8057=>550,8058=>550,8059=>550,8060=>715,8061=>715,8064=>605,8065=>605,8066=>605,8067=>605,8068=>605,
+8069=>605,8070=>605,8071=>605,8072=>886,8073=>887,8074=>985,8075=>993,8076=>937,8077=>956,8078=>874,
+8079=>878,8080=>605,8081=>605,8082=>605,8083=>605,8084=>605,8085=>605,8086=>605,8087=>605,8088=>1096,
+8089=>1092,8090=>1223,8091=>1250,8092=>1270,8093=>1283,8094=>1174,8095=>1162,8096=>715,8097=>715,8098=>715,
+8099=>715,8100=>715,8101=>715,8102=>715,8103=>715,8104=>1057,8105=>1073,8106=>1228,8107=>1251,8108=>1202,
+8109=>1210,8110=>1151,8111=>1131,8112=>605,8113=>605,8114=>605,8115=>605,8116=>605,8118=>605,8119=>605,
+8120=>722,8121=>722,8122=>722,8123=>722,8124=>883,8125=>500,8126=>0,8127=>500,8128=>500,8129=>550,
+8130=>605,8131=>605,8132=>605,8134=>605,8135=>605,8136=>790,8137=>830,8138=>909,8139=>931,8140=>950,
+8141=>500,8142=>500,8143=>500,8144=>330,8145=>330,8146=>330,8147=>330,8150=>330,8151=>330,8152=>386,
+8153=>386,8154=>506,8155=>550,8157=>500,8158=>500,8159=>500,8160=>550,8161=>550,8162=>550,8163=>550,
+8164=>550,8165=>550,8166=>550,8167=>550,8168=>738,8169=>738,8170=>858,8171=>880,8172=>764,8173=>550,
+8174=>550,8175=>500,8178=>715,8179=>715,8180=>715,8182=>715,8183=>715,8184=>884,8185=>857,8186=>927,
+8187=>892,8188=>988,8189=>500,8190=>500,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>333,8197=>250,
+8198=>167,8199=>500,8200=>250,8201=>200,8202=>100,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,
+8208=>333,8209=>333,8210=>500,8213=>1000,8214=>333,8215=>478,8219=>250,8223=>500,8227=>560,8228=>250,
+8229=>500,8231=>250,8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>250,
+8241=>1588,8242=>270,8243=>492,8244=>714,8245=>270,8246=>484,8247=>693,8248=>469,8251=>727,8252=>666,
+8253=>695,8254=>500,8255=>953,8256=>953,8257=>338,8258=>931,8259=>333,8260=>167,8261=>332,8262=>332,
+8263=>1000,8264=>833,8265=>833,8266=>500,8267=>540,8268=>528,8269=>523,8270=>500,8271=>333,8272=>953,
+8273=>500,8274=>497,8275=>576,8276=>953,8277=>785,8278=>450,8279=>881,8280=>620,8281=>620,8282=>179,
+8283=>621,8284=>569,8285=>179,8286=>179,8287=>111,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,
+8304=>300,8305=>278,8308=>300,8309=>300,8310=>300,8311=>300,8312=>300,8313=>300,8314=>300,8315=>300,
+8316=>300,8317=>216,8318=>216,8319=>318,8320=>300,8321=>274,8322=>300,8323=>300,8324=>300,8325=>300,
+8326=>300,8327=>300,8328=>300,8329=>300,8330=>300,8331=>300,8332=>300,8333=>216,8334=>216,8352=>710,
+8353=>722,8354=>783,8355=>611,8356=>500,8357=>833,8358=>722,8359=>960,8360=>1101,8361=>1000,8362=>889,
+8363=>532,8365=>742,8366=>631,8369=>609,8370=>639,8371=>660,8372=>556,8373=>500,8448=>752,8449=>746,
+8451=>1009,8457=>923,8458=>500,8459=>1035,8462=>556,8463=>556,8464=>792,8465=>737,8466=>800,8467=>427,
+8468=>835,8470=>879,8471=>1048,8472=>666,8475=>747,8476=>955,8478=>722,8479=>722,8480=>891,8481=>1156,
+8483=>722,8486=>811,8487=>811,8489=>333,8490=>764,8491=>722,8492=>806,8494=>551,8497=>723,8498=>611,
+8499=>1203,8501=>593,8502=>498,8503=>339,8504=>523,8506=>906,8507=>1156,8523=>778,8525=>866,8526=>500,
+8531=>750,8532=>750,8533=>750,8534=>750,8535=>750,8536=>750,8537=>750,8538=>750,8539=>750,8540=>750,
+8541=>750,8542=>750,8543=>750,8544=>386,8545=>772,8546=>1158,8547=>1108,8548=>722,8549=>1108,8550=>1494,
+8551=>1880,8552=>1108,8553=>722,8554=>1108,8555=>1494,8556=>664,8557=>722,8558=>724,8559=>943,8560=>278,
+8561=>556,8562=>834,8563=>778,8564=>500,8565=>778,8566=>1056,8567=>1334,8568=>778,8569=>500,8570=>778,
+8571=>1056,8572=>278,8573=>444,8574=>556,8575=>833,8592=>964,8593=>523,8594=>964,8595=>523,8596=>964,
+8597=>964,8598=>964,8599=>964,8600=>964,8601=>964,8602=>964,8603=>964,8604=>1152,8605=>1152,8606=>964,
+8607=>964,8608=>964,8609=>964,8610=>1078,8611=>1078,8612=>964,8613=>964,8614=>964,8615=>964,8616=>964,
+8617=>964,8618=>964,8619=>964,8620=>964,8621=>1168,8622=>964,8624=>622,8625=>622,8630=>1069,8631=>1069,
+8632=>964,8633=>964,8634=>980,8635=>980,8636=>964,8637=>964,8638=>557,8639=>556,8640=>964,8641=>964,
+8642=>557,8643=>556,8644=>964,8645=>964,8646=>964,8647=>964,8648=>964,8649=>964,8650=>964,8651=>964,
+8652=>964,8653=>964,8654=>964,8655=>964,8656=>964,8657=>630,8658=>964,8659=>630,8660=>964,8661=>630,
+8662=>1063,8663=>1063,8664=>1063,8665=>1063,8666=>964,8667=>964,8668=>1100,8669=>1100,8672=>964,8674=>964,
+8676=>964,8677=>964,8704=>627,8705=>716,8706=>558,8707=>627,8708=>627,8709=>500,8710=>612,8711=>719,
+8713=>576,8714=>576,8716=>576,8717=>576,8720=>733,8721=>713,8722=>676,8723=>676,8724=>676,8725=>750,
+8727=>570,8729=>570,8730=>549,8733=>676,8734=>752,8736=>555,8737=>555,8738=>555,8739=>240,8740=>531,
+8741=>478,8742=>705,8743=>694,8744=>694,8745=>694,8746=>694,8747=>323,8756=>629,8757=>629,8761=>947,
+8764=>676,8765=>676,8766=>763,8768=>305,8769=>676,8770=>676,8771=>676,8773=>676,8776=>676,8777=>676,
+8778=>676,8781=>676,8782=>676,8783=>676,8784=>676,8785=>676,8786=>676,8787=>676,8788=>947,8789=>947,
+8790=>676,8791=>676,8796=>676,8800=>570,8801=>676,8802=>676,8804=>570,8805=>570,8806=>676,8807=>676,
+8808=>676,8809=>676,8810=>1047,8811=>1047,8812=>450,8813=>676,8814=>676,8815=>676,8816=>676,8817=>676,
+8818=>676,8819=>676,8820=>676,8821=>676,8822=>676,8823=>676,8824=>676,8825=>676,8826=>676,8827=>676,
+8828=>676,8829=>676,8830=>676,8831=>676,8832=>676,8833=>676,8834=>676,8835=>676,8836=>676,8837=>676,
+8838=>676,8839=>676,8840=>676,8841=>676,8842=>676,8843=>676,8846=>694,8847=>676,8848=>676,8849=>676,
+8850=>676,8851=>694,8852=>694,8853=>738,8854=>738,8855=>738,8856=>738,8857=>738,8858=>738,8859=>738,
+8861=>738,8862=>678,8863=>678,8864=>678,8865=>678,8866=>487,8867=>487,8868=>752,8869=>752,8871=>487,
+8873=>659,8874=>831,8876=>487,8877=>487,8878=>659,8879=>659,8882=>676,8883=>676,8884=>676,8885=>676,
+8886=>1380,8887=>1380,8888=>1027,8890=>626,8891=>694,8892=>694,8893=>694,8900=>512,8903=>676,8904=>759,
+8905=>632,8906=>632,8907=>1000,8908=>1000,8909=>676,8910=>694,8911=>694,8912=>676,8913=>676,8914=>694,
+8915=>694,8916=>694,8918=>676,8919=>676,8920=>1441,8921=>1441,8922=>676,8923=>676,8924=>676,8925=>676,
+8926=>676,8927=>676,8928=>676,8929=>676,8930=>676,8931=>676,8934=>676,8935=>676,8936=>676,8937=>676,
+8938=>676,8939=>676,8940=>676,8941=>676,8960=>737,8968=>411,8969=>411,8970=>411,8971=>411,8976=>680,
+8994=>951,8995=>951,9001=>398,9002=>398,9251=>500,9472=>1000,9473=>1000,9474=>1000,9475=>1000,9476=>1000,
+9477=>1000,9478=>1000,9479=>1000,9480=>1000,9481=>1000,9482=>1000,9483=>1000,9484=>1000,9485=>1000,9486=>1000,
+9487=>1000,9488=>1000,9489=>1000,9490=>1000,9491=>1000,9492=>1000,9493=>1000,9494=>1000,9495=>1000,9496=>1000,
+9497=>1000,9498=>1000,9499=>1000,9500=>1000,9501=>1000,9502=>1000,9503=>1000,9504=>1000,9505=>1000,9506=>1000,
+9507=>1000,9508=>1000,9509=>1000,9510=>1000,9511=>1000,9512=>1000,9513=>1000,9514=>1000,9515=>1000,9516=>1000,
+9517=>1000,9518=>1000,9519=>1000,9520=>1000,9521=>1000,9522=>1000,9523=>1000,9524=>1000,9525=>1000,9526=>1000,
+9527=>1000,9528=>1000,9529=>1000,9530=>1000,9531=>1000,9532=>1000,9533=>1000,9534=>1000,9535=>1000,9536=>1000,
+9537=>1000,9538=>1000,9539=>1000,9540=>1000,9541=>1000,9542=>1000,9543=>1000,9544=>1000,9545=>1000,9546=>1000,
+9547=>1000,9552=>1000,9553=>1000,9554=>1000,9555=>1000,9556=>1000,9557=>1000,9558=>1000,9559=>1000,9560=>1000,
+9561=>1000,9562=>1000,9563=>1000,9564=>1000,9565=>1000,9566=>1000,9567=>1000,9568=>1000,9569=>1000,9570=>1000,
+9571=>1000,9572=>1000,9573=>1000,9574=>1000,9575=>1000,9576=>1000,9577=>1000,9578=>1000,9579=>1000,9580=>1000,
+9600=>1000,9601=>1000,9602=>1000,9603=>1000,9604=>1000,9605=>1000,9606=>1000,9607=>1000,9608=>1000,9609=>1000,
+9610=>1000,9611=>1000,9612=>1000,9613=>1000,9614=>1000,9615=>1000,9616=>1000,9617=>1000,9618=>1000,9620=>1000,
+9621=>1000,9622=>1000,9623=>1000,9624=>1000,9625=>1000,9626=>1000,9627=>1000,9628=>1000,9629=>1000,9630=>1000,
+9631=>1000,9632=>678,9633=>678,9642=>309,9650=>681,9651=>681,9654=>681,9655=>681,9660=>681,9661=>681,
+9664=>681,9665=>681,9670=>580,9671=>580,9674=>494,9675=>738,9676=>732,9679=>738,9702=>524,9711=>851,
+9733=>1003,9734=>1003,9824=>618,9825=>645,9826=>587,9827=>582,9828=>582,9829=>645,9830=>587,9831=>618,
+9833=>333,9834=>556,9835=>778,9836=>778,9837=>556,9838=>556,9839=>556,10214=>561,10215=>561,11799=>333,
+64256=>613,64257=>559,64258=>559,64259=>846,64260=>836,64262=>723,64285=>266,64286=>0,64287=>532,64288=>552,
+64297=>570,64298=>716,64299=>716,64300=>716,64301=>716,64302=>593,64303=>593,64304=>593,64305=>498,64306=>339,
+64307=>523,64308=>561,64309=>266,64310=>291,64312=>576,64313=>266,64314=>496,64315=>501,64316=>510,64318=>581,
+64320=>347,64321=>512,64323=>493,64324=>491,64326=>561,64327=>544,64328=>502,64329=>716,64330=>571,64331=>266,
 64332=>498,64333=>501,64334=>491,64335=>593,65533=>788);
 $enc='';
 $diff='';
 $file='freeserifb.z';
 $ctg='freeserifb.ctg.z';
-$originalsize=397068;
+$originalsize=467208;
 ?>
\ No newline at end of file
index 132807c527218f6aeb3a0c38e58e5557eb940416..95e31362ff3107a6ff7d5c526242c9a3a9a61c9e 100644 (file)
Binary files a/lib/tcpdf/fonts/freeserifb.z and b/lib/tcpdf/fonts/freeserifb.z differ
index 678161ee8bb8a27495ad863bb242a3cfe1ef0ed1..86d46ef303483061579458e951c9643390790528 100644 (file)
Binary files a/lib/tcpdf/fonts/freeserifbi.ctg.z and b/lib/tcpdf/fonts/freeserifbi.ctg.z differ
index c005e9255f197bf37b7e9dd653e259940a789af1..79a1735239142bc5800442b03fcaffb07abcea8e 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeSerifBoldItalic';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>-24,'Flags'=>96,'FontBBox'=>'[-575 -1120 1867 1571]','ItalicAngle'=>-16.3,'StemV'=>120,'MissingWidth'=>600);
+$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>-24,'Flags'=>96,'FontBBox'=>'[-787 -1120 1867 1571]','ItalicAngle'=>-16.3,'StemV'=>120,'MissingWidth'=>600);
 $up=-125;
 $ut=50;
 $dw=600;
@@ -15,8 +15,8 @@ $cw=array(
 92=>278,93=>333,94=>570,95=>500,96=>333,97=>500,98=>500,99=>444,100=>500,101=>444,
 102=>333,103=>500,104=>556,105=>278,106=>278,107=>500,108=>278,109=>778,110=>556,111=>500,
 112=>500,113=>500,114=>389,115=>389,116=>278,117=>556,118=>444,119=>667,120=>500,121=>444,
-122=>389,123=>348,124=>220,125=>348,126=>570,8364=>500,8218=>333,402=>333,8222=>500,8230=>1000,
-8224=>500,8225=>500,710=>333,8240=>1000,352=>556,8249=>333,338=>944,381=>611,8216=>333,8217=>333,
+122=>389,123=>348,124=>220,125=>348,126=>570,8364=>761,8218=>250,402=>333,8222=>500,8230=>1000,
+8224=>500,8225=>500,710=>333,8240=>1000,352=>556,8249=>333,338=>944,381=>611,8216=>250,8217=>250,
 8220=>500,8221=>500,8226=>350,8211=>500,8212=>1000,732=>333,8482=>1000,353=>389,8250=>333,339=>722,
 382=>389,376=>611,160=>250,161=>389,162=>500,163=>500,164=>500,165=>500,166=>220,167=>500,
 168=>333,169=>747,170=>266,171=>500,172=>606,173=>333,174=>747,175=>333,176=>400,177=>570,
@@ -24,81 +24,116 @@ $cw=array(
 188=>750,189=>750,190=>750,191=>500,192=>667,193=>667,194=>667,195=>667,196=>667,197=>667,
 198=>944,199=>667,200=>667,201=>667,202=>667,203=>667,204=>389,205=>389,206=>389,207=>389,
 208=>722,209=>722,210=>722,211=>722,212=>722,213=>722,214=>722,215=>570,216=>722,217=>722,
-218=>722,219=>722,220=>722,221=>611,222=>611,223=>500,224=>500,225=>500,226=>500,227=>500,
+218=>722,219=>722,220=>722,221=>611,222=>609,223=>500,224=>500,225=>500,226=>500,227=>500,
 228=>500,229=>500,230=>722,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,
 238=>278,239=>278,240=>500,241=>556,242=>500,243=>500,244=>500,245=>500,246=>500,247=>570,
 248=>500,249=>556,250=>556,251=>556,252=>556,253=>444,254=>500,255=>444,256=>667,257=>500,
 258=>667,259=>500,260=>667,261=>500,262=>667,263=>444,264=>667,265=>444,266=>667,267=>444,
-268=>667,269=>444,270=>722,271=>644,272=>722,273=>500,274=>667,275=>444,276=>667,277=>444,
+268=>667,269=>444,270=>722,271=>616,272=>722,273=>500,274=>667,275=>444,276=>667,277=>444,
 278=>667,279=>444,280=>667,281=>444,282=>667,283=>444,284=>722,285=>500,286=>722,287=>500,
 288=>722,289=>500,290=>722,291=>500,292=>778,293=>556,294=>778,295=>556,296=>389,297=>278,
 298=>389,299=>278,300=>389,301=>278,302=>389,303=>278,304=>389,305=>278,306=>826,307=>547,
 308=>500,309=>278,310=>667,311=>500,312=>534,313=>611,314=>278,315=>611,316=>278,317=>638,
-318=>424,319=>611,320=>528,321=>611,322=>278,323=>722,324=>556,325=>722,326=>556,327=>722,
+318=>424,319=>611,320=>424,321=>611,322=>278,323=>722,324=>556,325=>722,326=>556,327=>722,
 328=>556,329=>556,330=>722,331=>547,332=>722,333=>500,334=>722,335=>500,336=>722,337=>500,
 340=>667,341=>389,342=>667,343=>389,344=>667,345=>389,346=>556,347=>389,348=>556,349=>389,
-350=>556,351=>389,354=>611,355=>278,356=>611,357=>278,358=>611,359=>278,360=>722,361=>556,
+350=>556,351=>389,354=>611,355=>278,356=>611,357=>308,358=>611,359=>278,360=>722,361=>556,
 362=>722,363=>556,364=>722,365=>556,366=>722,367=>556,368=>722,369=>556,370=>722,371=>556,
 372=>889,373=>667,374=>611,375=>444,377=>611,378=>389,379=>611,380=>389,383=>333,384=>500,
-385=>809,386=>733,387=>500,388=>591,389=>500,390=>722,391=>962,392=>681,393=>722,394=>864,
-395=>733,396=>500,397=>550,398=>670,399=>722,400=>631,401=>769,403=>962,404=>716,405=>745,
+385=>850,386=>667,387=>575,388=>630,389=>500,390=>722,391=>929,392=>654,393=>722,394=>864,
+395=>684,396=>500,397=>546,398=>670,399=>722,400=>631,401=>769,403=>929,404=>716,405=>745,
 406=>278,407=>389,408=>829,409=>500,410=>278,411=>495,412=>853,413=>919,414=>556,415=>722,
 416=>908,417=>640,418=>1014,419=>778,420=>757,421=>500,422=>611,423=>556,424=>389,425=>730,
-426=>333,427=>278,428=>611,429=>298,430=>611,431=>920,432=>730,433=>811,434=>678,435=>611,
-436=>581,437=>611,438=>389,439=>614,440=>614,441=>461,442=>445,443=>500,444=>614,445=>500,
-446=>389,447=>500,448=>220,452=>1355,453=>1133,454=>889,455=>1109,456=>887,457=>556,458=>1222,
-459=>1000,460=>834,461=>667,462=>500,463=>393,464=>278,465=>722,466=>500,467=>722,468=>556,
-469=>722,470=>556,471=>722,472=>556,473=>722,474=>556,475=>722,476=>556,477=>444,478=>667,
-479=>500,480=>667,481=>500,482=>944,483=>722,484=>722,485=>500,486=>722,487=>500,488=>664,
-489=>500,490=>722,491=>500,492=>722,493=>500,494=>614,495=>461,496=>278,497=>1355,498=>1133,
-499=>889,500=>722,501=>500,504=>722,505=>556,506=>667,507=>500,508=>944,509=>722,510=>722,
-511=>500,512=>667,513=>500,514=>667,515=>500,516=>670,517=>444,518=>670,519=>444,520=>393,
-521=>278,522=>393,523=>278,524=>722,525=>500,526=>722,527=>500,528=>672,529=>389,530=>672,
-531=>389,532=>722,533=>556,534=>722,535=>556,536=>556,537=>389,538=>611,539=>278,542=>778,
-543=>556,550=>667,551=>500,552=>670,553=>444,554=>722,555=>500,556=>722,557=>500,558=>722,
-559=>500,560=>722,561=>500,562=>611,563=>444,592=>500,593=>605,594=>605,595=>500,596=>444,
-599=>668,600=>444,601=>444,603=>440,608=>569,609=>500,613=>556,616=>278,617=>330,618=>278,
-623=>778,629=>500,633=>389,643=>333,648=>278,649=>500,650=>557,651=>492,652=>444,653=>667,
-654=>444,658=>461,670=>500,711=>333,714=>333,715=>333,728=>333,729=>333,730=>333,731=>333,
-733=>333,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,
-777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,
-787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,
-797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,
-807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,
-817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,
-827=>0,828=>0,829=>0,830=>0,831=>0,864=>0,865=>0,884=>199,885=>199,890=>0,
-894=>333,900=>330,901=>333,902=>667,903=>250,904=>775,905=>913,906=>497,908=>792,910=>920,
-911=>849,912=>330,913=>667,914=>667,915=>637,916=>740,917=>667,918=>611,919=>778,920=>722,
-921=>389,922=>677,923=>667,924=>889,925=>722,926=>650,927=>722,928=>778,929=>611,931=>730,
-932=>621,933=>722,934=>748,935=>667,936=>868,937=>741,938=>389,939=>722,940=>605,941=>440,
-942=>605,943=>330,944=>550,945=>605,946=>550,947=>550,948=>550,949=>440,950=>495,951=>605,
-952=>550,953=>330,954=>608,955=>495,956=>605,957=>495,958=>495,959=>550,960=>605,961=>550,
-962=>440,963=>550,964=>440,965=>550,966=>660,967=>495,968=>715,969=>715,970=>330,971=>550,
-972=>550,973=>550,974=>715,976=>550,977=>605,978=>722,979=>854,980=>722,981=>660,982=>715,
-985=>550,986=>650,987=>550,988=>667,989=>513,990=>611,991=>495,992=>671,993=>662,1008=>550,
-1009=>550,1010=>477,1013=>411,1024=>667,1025=>667,1026=>728,1027=>667,1028=>722,1029=>556,1030=>389,
-1031=>389,1032=>500,1033=>987,1034=>913,1035=>788,1036=>778,1037=>870,1038=>722,1039=>869,1040=>667,
-1041=>733,1042=>667,1043=>656,1044=>864,1045=>667,1046=>1107,1047=>564,1048=>870,1049=>870,1050=>775,
-1051=>855,1052=>889,1053=>778,1054=>722,1055=>869,1056=>611,1057=>667,1058=>611,1059=>766,1060=>833,
-1061=>667,1062=>869,1063=>823,1064=>1208,1065=>1209,1066=>796,1067=>1060,1068=>712,1069=>732,1070=>1195,
-1071=>821,1072=>500,1073=>500,1074=>444,1075=>389,1076=>534,1077=>444,1078=>1051,1079=>408,1080=>556,
-1081=>556,1082=>534,1083=>637,1084=>859,1085=>560,1086=>500,1087=>556,1088=>500,1089=>444,1090=>778,
-1091=>444,1092=>764,1093=>500,1094=>556,1095=>556,1096=>806,1097=>806,1098=>591,1099=>744,1100=>444,
-1101=>451,1102=>765,1103=>594,1104=>444,1105=>444,1106=>451,1107=>458,1108=>444,1109=>389,1110=>278,
-1111=>278,1112=>278,1113=>731,1114=>658,1115=>556,1116=>558,1117=>556,1118=>444,1119=>556,1164=>712,
-1165=>444,1166=>611,1167=>500,1168=>611,1169=>458,1170=>667,1171=>458,1172=>667,1173=>458,1174=>1107,
-1175=>1051,1176=>657,1177=>439,1178=>772,1179=>534,1180=>772,1181=>534,1182=>772,1183=>534,1184=>772,
-1185=>534,1186=>778,1187=>560,1188=>778,1189=>560,1190=>1085,1191=>556,1192=>667,1193=>444,1194=>667,
-1195=>444,1196=>611,1197=>494,1198=>611,1199=>611,1200=>611,1201=>611,1202=>667,1203=>500,1204=>869,
-1205=>556,1206=>823,1207=>556,1208=>823,1209=>556,1210=>823,1211=>556,1212=>620,1213=>444,1214=>620,
-1215=>444,1216=>389,1217=>1107,1218=>1051,1219=>772,1220=>534,1223=>778,1224=>560,1227=>823,1228=>556,
-1232=>667,1233=>500,1234=>667,1235=>500,1236=>944,1237=>722,1238=>667,1239=>444,1240=>722,1241=>444,
-1242=>722,1243=>444,1244=>1107,1245=>1051,1246=>564,1247=>408,1248=>614,1249=>461,1250=>870,1251=>556,
-1252=>870,1253=>556,1254=>722,1255=>500,1256=>722,1257=>500,1258=>722,1259=>500,1260=>732,1261=>451,
-1262=>766,1263=>444,1264=>766,1265=>444,1266=>766,1267=>444,1268=>823,1269=>556,1272=>1060,1273=>744,
-1488=>504,1489=>504,1490=>313,1491=>504,1492=>504,1493=>285,1494=>285,1495=>504,1496=>504,1497=>285,
-1498=>517,1499=>504,1500=>504,1501=>504,1502=>504,1503=>281,1504=>285,1505=>504,1506=>504,1507=>526,
-1508=>504,1509=>491,1510=>504,1511=>549,1512=>513,1513=>538,1514=>504,4256=>475,4257=>469,4258=>573,
+426=>455,427=>349,428=>611,429=>298,430=>611,431=>902,432=>714,433=>811,434=>678,435=>611,
+436=>581,437=>611,438=>389,439=>619,440=>614,441=>461,442=>445,443=>500,444=>614,445=>500,
+446=>389,447=>504,448=>220,449=>418,450=>570,451=>333,452=>1355,453=>1133,454=>889,455=>1109,
+456=>887,457=>556,458=>1222,459=>1000,460=>834,461=>667,462=>500,463=>393,464=>278,465=>722,
+466=>500,467=>722,468=>556,469=>722,470=>556,471=>722,472=>556,473=>722,474=>556,475=>722,
+476=>556,477=>444,478=>667,479=>500,480=>667,481=>500,482=>944,483=>722,484=>722,485=>500,
+486=>722,487=>500,488=>664,489=>500,490=>722,491=>500,492=>722,493=>500,494=>619,495=>513,
+496=>278,497=>1355,498=>1133,499=>889,500=>722,501=>500,502=>944,503=>660,504=>722,505=>556,
+506=>667,507=>500,508=>944,509=>722,510=>722,511=>500,512=>667,513=>500,514=>667,515=>500,
+516=>670,517=>444,518=>670,519=>444,520=>393,521=>278,522=>393,523=>278,524=>722,525=>500,
+526=>722,527=>500,528=>672,529=>389,530=>672,531=>389,532=>722,533=>556,534=>722,535=>556,
+536=>556,537=>389,538=>611,539=>278,540=>424,541=>455,542=>778,543=>556,544=>731,545=>618,
+546=>568,547=>500,548=>667,549=>444,550=>667,551=>500,552=>670,553=>444,554=>722,555=>500,
+556=>722,557=>500,558=>722,559=>500,560=>722,561=>500,562=>611,563=>444,564=>422,565=>621,
+566=>413,567=>278,568=>800,569=>784,570=>644,571=>667,572=>444,573=>664,574=>611,575=>389,
+576=>451,577=>444,578=>444,579=>667,580=>722,581=>722,582=>670,583=>444,584=>500,585=>278,
+586=>808,587=>608,588=>672,589=>389,590=>611,591=>444,592=>500,593=>590,594=>590,595=>500,
+596=>444,599=>668,600=>444,601=>444,603=>430,608=>569,609=>500,613=>556,616=>278,617=>320,
+618=>278,623=>778,629=>500,633=>389,643=>333,648=>278,649=>500,650=>557,651=>492,652=>444,
+653=>667,654=>444,658=>513,670=>500,697=>250,698=>408,699=>250,700=>250,701=>250,702=>300,
+703=>300,706=>333,707=>333,708=>333,709=>333,711=>333,712=>333,713=>333,714=>333,715=>333,
+716=>300,717=>333,718=>333,719=>333,720=>278,721=>278,722=>300,723=>300,724=>333,725=>333,
+726=>333,727=>333,728=>333,729=>333,730=>333,731=>333,733=>333,734=>333,735=>352,741=>526,
+742=>526,743=>526,744=>526,745=>526,746=>519,747=>519,748=>333,749=>333,750=>480,751=>333,
+752=>333,753=>333,754=>333,755=>327,756=>261,757=>437,758=>437,759=>400,760=>278,761=>175,
+762=>175,763=>175,764=>175,765=>0,766=>337,767=>432,768=>0,769=>0,770=>0,771=>0,
+772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,
+782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,
+792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,
+802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,
+812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,
+822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,
+832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,
+842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,848=>0,849=>0,850=>0,851=>0,
+852=>0,853=>0,854=>0,855=>0,856=>0,857=>0,858=>0,860=>0,861=>0,862=>0,
+863=>0,864=>0,865=>0,884=>199,885=>199,890=>0,894=>333,900=>330,901=>333,902=>667,
+903=>250,904=>819,905=>955,906=>539,908=>835,910=>961,911=>889,912=>320,913=>667,914=>667,
+915=>637,916=>740,917=>667,918=>611,919=>778,920=>722,921=>389,922=>677,923=>667,924=>889,
+925=>722,926=>650,927=>722,928=>778,929=>611,931=>730,932=>621,933=>722,934=>748,935=>667,
+936=>858,937=>741,938=>389,939=>722,940=>590,941=>430,942=>548,943=>320,944=>536,945=>590,
+946=>536,947=>548,948=>550,949=>430,950=>482,951=>548,952=>525,953=>320,954=>564,955=>510,
+956=>589,957=>522,958=>482,959=>536,960=>629,961=>536,962=>470,963=>536,964=>464,965=>536,
+966=>643,967=>482,968=>715,969=>715,970=>320,971=>536,972=>536,973=>536,974=>715,976=>508,
+977=>589,978=>722,979=>931,980=>722,981=>660,982=>715,983=>536,984=>611,985=>536,986=>620,
+987=>524,988=>667,989=>535,990=>708,991=>428,992=>671,993=>633,1008=>550,1009=>550,1010=>477,
+1011=>278,1012=>722,1013=>411,1014=>411,1015=>609,1016=>500,1017=>667,1018=>896,1019=>769,1020=>536,
+1021=>667,1022=>667,1023=>667,1024=>670,1025=>670,1026=>762,1027=>637,1028=>667,1029=>556,1030=>393,
+1031=>393,1032=>500,1033=>1085,1034=>1049,1035=>747,1036=>736,1037=>778,1038=>746,1039=>778,1040=>667,
+1041=>667,1042=>667,1043=>637,1044=>778,1045=>670,1046=>1044,1047=>650,1048=>778,1049=>778,1050=>736,
+1051=>814,1052=>896,1053=>778,1054=>722,1055=>778,1056=>614,1057=>667,1058=>611,1059=>746,1060=>748,
+1061=>667,1062=>778,1063=>742,1064=>1136,1065=>1135,1066=>779,1067=>984,1068=>664,1069=>732,1070=>1069,
+1071=>779,1072=>500,1073=>508,1074=>486,1075=>414,1076=>486,1077=>444,1078=>982,1079=>476,1080=>556,
+1081=>556,1082=>564,1083=>585,1084=>757,1085=>552,1086=>500,1087=>556,1088=>500,1089=>444,1090=>778,
+1091=>532,1092=>764,1093=>500,1094=>556,1095=>556,1096=>806,1097=>806,1098=>644,1099=>744,1100=>470,
+1101=>488,1102=>757,1103=>586,1104=>444,1105=>444,1106=>524,1107=>414,1108=>488,1109=>389,1110=>278,
+1111=>278,1112=>278,1113=>772,1114=>745,1115=>556,1116=>564,1117=>556,1118=>532,1119=>556,1120=>990,
+1121=>690,1122=>804,1123=>751,1124=>1017,1125=>752,1126=>900,1127=>728,1128=>1236,1129=>927,1130=>1044,
+1131=>826,1132=>1401,1133=>1016,1134=>620,1135=>476,1136=>858,1137=>769,1138=>722,1139=>544,1140=>796,
+1141=>584,1142=>796,1143=>584,1144=>1268,1145=>1023,1146=>895,1147=>612,1148=>990,1149=>690,1150=>990,
+1151=>635,1152=>620,1153=>444,1154=>372,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>0,
+1161=>0,1162=>778,1163=>556,1164=>664,1165=>470,1166=>614,1167=>473,1168=>624,1169=>448,1170=>624,
+1171=>448,1172=>733,1173=>485,1174=>1080,1175=>982,1176=>650,1177=>476,1178=>772,1179=>564,1180=>772,
+1181=>590,1182=>738,1183=>499,1184=>862,1185=>718,1186=>778,1187=>552,1188=>976,1189=>682,1190=>1085,
+1191=>787,1192=>667,1193=>480,1194=>667,1195=>444,1196=>534,1197=>778,1198=>611,1199=>640,1200=>611,
+1201=>640,1202=>694,1203=>500,1204=>1004,1205=>518,1206=>742,1207=>556,1208=>742,1209=>556,1210=>716,
+1211=>556,1212=>844,1213=>530,1214=>844,1215=>530,1216=>393,1217=>1044,1218=>982,1219=>736,1220=>534,
+1221=>814,1222=>585,1223=>778,1224=>552,1225=>778,1226=>552,1227=>742,1228=>556,1229=>896,1230=>757,
+1231=>393,1232=>667,1233=>500,1234=>667,1235=>500,1236=>891,1237=>646,1238=>670,1239=>444,1240=>659,
+1241=>372,1242=>619,1243=>372,1244=>1044,1245=>994,1246=>650,1247=>476,1248=>604,1249=>459,1250=>778,
+1251=>539,1252=>778,1253=>539,1254=>722,1255=>500,1256=>722,1257=>500,1258=>722,1259=>500,1260=>732,
+1261=>488,1262=>746,1263=>532,1264=>746,1265=>532,1266=>746,1267=>532,1268=>742,1269=>556,1270=>637,
+1271=>448,1272=>984,1273=>744,1296=>652,1297=>452,1298=>814,1299=>585,1306=>722,1307=>500,1308=>889,
+1309=>656,1310=>736,1311=>564,1425=>0,1426=>0,1427=>0,1428=>0,1429=>0,1430=>0,1431=>0,
+1432=>0,1433=>0,1434=>0,1435=>0,1436=>0,1437=>0,1438=>0,1439=>0,1440=>0,1441=>0,
+1442=>0,1443=>0,1444=>0,1445=>0,1446=>0,1447=>0,1448=>0,1449=>0,1450=>0,1451=>0,
+1452=>0,1453=>0,1454=>0,1455=>0,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,
+1462=>0,1463=>0,1464=>0,1465=>0,1466=>0,1467=>0,1468=>0,1469=>0,1470=>433,1471=>0,
+1472=>155,1473=>0,1474=>0,1475=>400,1476=>0,1477=>0,1478=>347,1479=>0,1488=>593,1489=>498,
+1490=>339,1491=>523,1492=>561,1493=>266,1494=>291,1495=>559,1496=>576,1497=>266,1498=>496,1499=>501,
+1500=>510,1501=>542,1502=>581,1503=>273,1504=>347,1505=>512,1506=>552,1507=>493,1508=>491,1509=>537,
+1510=>561,1511=>544,1512=>502,1513=>716,1514=>571,1520=>532,1521=>532,1522=>532,1523=>396,1524=>432,
+3585=>590,3586=>578,3587=>661,3588=>592,3589=>592,3590=>699,3591=>447,3592=>534,3593=>692,3594=>578,
+3595=>659,3596=>899,3597=>804,3598=>633,3599=>637,3600=>484,3601=>730,3602=>876,3603=>915,3604=>592,
+3605=>592,3606=>578,3607=>670,3608=>542,3609=>671,3610=>621,3611=>618,3612=>621,3613=>617,3614=>708,
+3615=>708,3616=>637,3617=>589,3618=>552,3619=>484,3620=>590,3621=>569,3622=>637,3623=>526,3624=>599,
+3625=>802,3626=>579,3627=>668,3628=>778,3629=>560,3630=>514,3631=>510,3632=>442,3633=>0,3634=>423,
+3635=>452,3636=>0,3637=>0,3638=>0,3639=>0,3640=>0,3641=>0,3642=>0,3647=>665,3648=>357,
+3649=>624,3650=>529,3651=>486,3652=>475,3653=>423,3654=>500,3655=>0,3656=>0,3657=>0,3658=>0,
+3659=>0,3660=>0,3661=>0,3662=>0,3663=>657,3664=>548,3665=>548,3666=>592,3667=>614,3668=>631,
+3669=>643,3670=>508,3671=>744,3672=>622,3673=>585,3674=>721,3675=>1381,4256=>475,4257=>469,4258=>573,
 4259=>650,4260=>502,4261=>506,4262=>481,4263=>746,4264=>491,4265=>495,4266=>888,4267=>488,4268=>464,
 4269=>745,4270=>483,4271=>489,4272=>721,4273=>464,4274=>578,4275=>590,4276=>611,4277=>491,4278=>663,
 4279=>489,4280=>544,4281=>479,4282=>527,4283=>488,4284=>560,4285=>461,4286=>467,4287=>546,4288=>483,
@@ -106,62 +141,80 @@ $cw=array(
 4309=>519,4310=>518,4311=>796,4312=>518,4313=>518,4314=>934,4315=>517,4316=>519,4317=>787,4318=>515,
 4319=>514,4320=>788,4321=>573,4322=>620,4323=>593,4324=>639,4325=>516,4326=>714,4327=>518,4328=>572,
 4329=>518,4330=>555,4331=>518,4332=>562,4333=>509,4334=>572,4335=>677,4336=>523,4337=>517,4338=>595,
-4339=>480,4340=>519,4341=>484,7680=>667,7681=>500,7682=>667,7683=>500,7684=>667,7685=>500,7686=>667,
-7687=>500,7688=>667,7689=>444,7690=>744,7691=>500,7692=>744,7693=>500,7694=>744,7695=>500,7696=>744,
-7697=>500,7698=>744,7699=>500,7700=>667,7701=>444,7702=>667,7703=>444,7704=>670,7705=>444,7706=>670,
-7707=>444,7708=>670,7709=>444,7710=>656,7711=>333,7712=>722,7713=>500,7714=>778,7715=>556,7716=>778,
-7717=>556,7718=>778,7719=>556,7720=>778,7721=>556,7722=>778,7723=>556,7724=>393,7725=>278,7726=>389,
-7727=>278,7728=>664,7729=>500,7730=>664,7731=>500,7732=>664,7733=>500,7734=>609,7735=>278,7736=>609,
-7737=>278,7738=>609,7739=>278,7740=>609,7741=>278,7742=>896,7743=>778,7744=>896,7745=>778,7746=>896,
-7747=>778,7748=>722,7749=>556,7750=>722,7751=>556,7752=>722,7753=>556,7754=>722,7755=>556,7756=>722,
-7757=>500,7758=>722,7759=>500,7760=>722,7761=>500,7762=>722,7763=>500,7764=>614,7765=>500,7766=>614,
-7767=>500,7768=>672,7769=>389,7770=>672,7771=>389,7772=>672,7773=>389,7774=>672,7775=>389,7776=>556,
-7777=>389,7778=>556,7779=>389,7780=>556,7781=>389,7782=>556,7783=>389,7784=>556,7785=>389,7786=>611,
-7787=>278,7788=>611,7789=>278,7790=>611,7791=>278,7792=>611,7793=>278,7794=>722,7795=>556,7796=>722,
-7797=>556,7798=>722,7799=>556,7800=>722,7801=>556,7802=>722,7803=>556,7804=>667,7805=>444,7806=>667,
-7807=>444,7808=>889,7809=>667,7810=>889,7811=>667,7812=>889,7813=>667,7814=>889,7815=>667,7816=>889,
-7817=>667,7818=>667,7819=>500,7820=>667,7821=>500,7822=>611,7823=>444,7824=>611,7825=>389,7826=>611,
-7827=>389,7828=>611,7829=>389,7830=>556,7831=>278,7832=>667,7833=>444,7835=>333,7840=>667,7841=>500,
-7842=>667,7843=>500,7844=>667,7845=>500,7846=>667,7847=>500,7848=>667,7849=>500,7850=>667,7851=>500,
-7852=>667,7853=>500,7854=>667,7855=>500,7856=>667,7857=>500,7858=>667,7859=>500,7860=>667,7861=>500,
-7862=>667,7863=>500,7864=>670,7865=>444,7866=>670,7867=>444,7868=>670,7869=>444,7870=>667,7871=>444,
-7872=>667,7873=>444,7874=>667,7875=>444,7876=>667,7877=>444,7878=>670,7879=>444,7880=>393,7881=>278,
-7882=>393,7883=>278,7884=>722,7885=>500,7886=>722,7887=>500,7888=>722,7889=>500,7890=>722,7891=>500,
-7892=>722,7893=>500,7894=>722,7895=>500,7896=>722,7897=>500,7898=>908,7899=>640,7900=>908,7901=>640,
-7902=>908,7903=>640,7904=>908,7905=>640,7906=>908,7907=>640,7908=>722,7909=>556,7910=>722,7911=>556,
-7912=>920,7913=>730,7914=>920,7915=>730,7916=>920,7917=>730,7918=>920,7919=>730,7920=>920,7921=>730,
-7922=>611,7923=>444,7924=>611,7925=>444,7926=>611,7927=>444,7928=>611,7929=>444,7936=>605,7937=>605,
-7938=>605,7939=>605,7940=>605,7941=>605,7942=>605,7943=>605,7944=>667,7945=>667,7946=>667,7947=>667,
-7948=>667,7949=>667,7950=>667,7951=>667,7952=>440,7953=>440,7954=>440,7955=>440,7956=>440,7957=>440,
-7960=>667,7961=>667,7962=>667,7963=>667,7964=>667,7965=>667,7968=>605,7969=>605,7970=>605,7971=>605,
-7972=>605,7973=>605,7974=>605,7975=>605,7976=>778,7977=>778,7978=>778,7979=>778,7980=>778,7981=>778,
-7982=>778,7983=>778,7984=>330,7985=>330,7986=>330,7987=>330,7988=>330,7989=>330,7990=>330,7991=>330,
-7992=>389,7993=>389,7994=>389,7995=>389,7996=>389,7997=>389,7998=>389,7999=>389,8000=>550,8001=>550,
-8002=>550,8003=>550,8004=>550,8005=>550,8008=>722,8009=>722,8010=>722,8011=>722,8012=>722,8013=>722,
-8016=>550,8017=>550,8018=>550,8019=>550,8020=>550,8021=>550,8022=>550,8023=>550,8025=>722,8027=>722,
-8029=>722,8031=>722,8032=>715,8033=>715,8034=>715,8035=>715,8036=>715,8037=>715,8038=>715,8039=>715,
-8040=>741,8041=>741,8042=>741,8043=>741,8044=>741,8045=>741,8046=>741,8047=>741,8048=>605,8049=>605,
-8050=>440,8051=>440,8052=>605,8053=>605,8054=>330,8055=>330,8056=>550,8057=>550,8058=>550,8059=>550,
-8060=>715,8061=>715,8064=>605,8065=>605,8066=>605,8067=>605,8068=>605,8069=>605,8070=>605,8071=>605,
-8072=>667,8073=>667,8074=>667,8075=>667,8076=>667,8077=>667,8078=>667,8079=>667,8080=>605,8081=>605,
-8082=>605,8083=>605,8084=>605,8085=>605,8086=>605,8087=>605,8088=>778,8089=>778,8090=>778,8091=>778,
-8092=>778,8093=>778,8094=>778,8095=>778,8096=>715,8097=>715,8098=>715,8099=>715,8100=>715,8101=>715,
-8102=>715,8103=>715,8104=>741,8105=>741,8106=>741,8107=>741,8108=>741,8109=>741,8110=>741,8111=>741,
-8112=>605,8113=>605,8114=>605,8115=>605,8116=>605,8118=>605,8119=>605,8120=>667,8121=>667,8122=>667,
-8123=>667,8124=>667,8125=>250,8126=>0,8127=>500,8128=>500,8129=>550,8130=>605,8131=>605,8132=>605,
-8134=>605,8135=>605,8136=>667,8137=>667,8138=>778,8139=>778,8140=>778,8141=>500,8142=>500,8143=>500,
-8144=>330,8145=>330,8146=>330,8147=>330,8150=>330,8151=>330,8152=>389,8153=>389,8154=>389,8155=>389,
-8157=>500,8158=>500,8159=>500,8160=>550,8161=>550,8162=>550,8163=>550,8164=>550,8165=>550,8166=>550,
-8167=>550,8168=>722,8169=>722,8170=>722,8171=>722,8172=>611,8173=>550,8174=>550,8175=>500,8178=>715,
-8179=>715,8180=>715,8182=>715,8183=>715,8184=>722,8185=>722,8186=>741,8187=>741,8188=>741,8189=>500,
-8190=>500,8208=>333,8209=>333,8210=>500,8213=>1000,8219=>333,8223=>500,8227=>560,8241=>1618,8242=>278,
-8243=>556,8244=>834,8251=>727,8252=>778,8253=>733,8255=>953,8256=>953,8257=>338,8258=>931,8259=>333,
-8260=>167,8261=>332,8262=>332,8263=>1000,8264=>889,8265=>889,8266=>500,8304=>300,8308=>300,8309=>300,
-8310=>300,8311=>300,8312=>300,8313=>300,8319=>300,8320=>300,8321=>274,8322=>300,8323=>300,8324=>300,
-8325=>300,8326=>300,8327=>300,8328=>300,8329=>300,8352=>667,8353=>667,8354=>667,8355=>667,8356=>500,
-8357=>778,8358=>722,8359=>705,8361=>889,8373=>500,8451=>1067,8455=>631,8457=>1056,8462=>556,8463=>556,
-8470=>981,8471=>747,8483=>667,8486=>741,8487=>741,8489=>330,8490=>664,8491=>667,8494=>551,8495=>444,
-8498=>667,8500=>500,8501=>504,8502=>504,8503=>313,8504=>504,8531=>750,8532=>750,8533=>750,8534=>750,
+4339=>480,4340=>519,4341=>484,4345=>621,4347=>410,5024=>718,5025=>768,5026=>633,5027=>878,5028=>1001,
+5029=>371,5030=>576,5031=>754,5032=>531,5033=>774,5034=>692,5035=>499,5036=>668,5037=>829,5038=>575,
+5039=>681,5040=>485,5041=>607,5042=>885,5043=>974,5044=>588,5045=>583,5046=>726,5047=>947,5048=>558,
+5049=>832,5050=>1096,5051=>780,5052=>595,5053=>869,5054=>752,5055=>710,5056=>761,5057=>802,5058=>760,
+5059=>656,5060=>655,5061=>982,5062=>684,5063=>801,5064=>805,5065=>1042,5066=>755,5067=>612,5068=>707,
+5069=>889,5070=>584,5071=>623,5072=>536,5073=>763,5074=>763,5075=>498,5076=>1052,5077=>600,5078=>730,
+5079=>714,5080=>714,5081=>697,5082=>543,5083=>943,5084=>718,5085=>630,5086=>660,5087=>692,5088=>841,
+5089=>861,5090=>617,5091=>733,5092=>898,5093=>896,5094=>781,5095=>612,5096=>830,5097=>948,5098=>886,
+5099=>757,5100=>796,5101=>578,5102=>601,5103=>797,5104=>623,5105=>886,5106=>730,5107=>827,5108=>648,
+7680=>667,7681=>500,7682=>667,7683=>500,7684=>667,7685=>500,7686=>667,7687=>500,7688=>667,7689=>444,
+7690=>744,7691=>500,7692=>744,7693=>500,7694=>744,7695=>500,7696=>744,7697=>500,7698=>744,7699=>500,
+7700=>667,7701=>444,7702=>667,7703=>444,7704=>670,7705=>444,7706=>670,7707=>444,7708=>670,7709=>444,
+7710=>656,7711=>333,7712=>722,7713=>500,7714=>778,7715=>556,7716=>778,7717=>556,7718=>778,7719=>556,
+7720=>778,7721=>556,7722=>778,7723=>556,7724=>393,7725=>278,7726=>389,7727=>278,7728=>664,7729=>500,
+7730=>664,7731=>500,7732=>664,7733=>500,7734=>609,7735=>278,7736=>609,7737=>278,7738=>609,7739=>278,
+7740=>609,7741=>278,7742=>896,7743=>778,7744=>896,7745=>778,7746=>896,7747=>778,7748=>722,7749=>556,
+7750=>722,7751=>556,7752=>722,7753=>556,7754=>722,7755=>556,7756=>722,7757=>500,7758=>722,7759=>500,
+7760=>722,7761=>500,7762=>722,7763=>500,7764=>614,7765=>500,7766=>614,7767=>500,7768=>672,7769=>389,
+7770=>672,7771=>389,7772=>672,7773=>389,7774=>672,7775=>389,7776=>556,7777=>389,7778=>556,7779=>389,
+7780=>556,7781=>389,7782=>556,7783=>389,7784=>556,7785=>389,7786=>611,7787=>278,7788=>611,7789=>278,
+7790=>611,7791=>278,7792=>611,7793=>278,7794=>722,7795=>556,7796=>722,7797=>556,7798=>722,7799=>556,
+7800=>722,7801=>556,7802=>722,7803=>556,7804=>667,7805=>444,7806=>667,7807=>444,7808=>889,7809=>667,
+7810=>889,7811=>667,7812=>889,7813=>667,7814=>889,7815=>667,7816=>889,7817=>667,7818=>667,7819=>500,
+7820=>667,7821=>500,7822=>611,7823=>444,7824=>611,7825=>389,7826=>611,7827=>389,7828=>611,7829=>389,
+7830=>556,7831=>278,7832=>667,7833=>444,7834=>507,7835=>333,7840=>667,7841=>500,7842=>667,7843=>500,
+7844=>667,7845=>500,7846=>667,7847=>500,7848=>667,7849=>500,7850=>667,7851=>500,7852=>667,7853=>500,
+7854=>667,7855=>500,7856=>667,7857=>500,7858=>667,7859=>500,7860=>667,7861=>500,7862=>667,7863=>500,
+7864=>670,7865=>444,7866=>670,7867=>444,7868=>670,7869=>444,7870=>667,7871=>444,7872=>667,7873=>444,
+7874=>667,7875=>444,7876=>667,7877=>444,7878=>670,7879=>444,7880=>393,7881=>278,7882=>393,7883=>278,
+7884=>722,7885=>500,7886=>722,7887=>500,7888=>722,7889=>500,7890=>722,7891=>500,7892=>722,7893=>500,
+7894=>722,7895=>500,7896=>722,7897=>500,7898=>908,7899=>640,7900=>908,7901=>640,7902=>908,7903=>640,
+7904=>908,7905=>640,7906=>908,7907=>640,7908=>722,7909=>556,7910=>722,7911=>556,7912=>902,7913=>714,
+7914=>902,7915=>714,7916=>902,7917=>714,7918=>902,7919=>714,7920=>902,7921=>714,7922=>611,7923=>444,
+7924=>611,7925=>444,7926=>611,7927=>444,7928=>611,7929=>444,7936=>590,7937=>590,7938=>590,7939=>590,
+7940=>590,7941=>590,7942=>590,7943=>590,7944=>724,7945=>753,7946=>891,7947=>912,7948=>822,7949=>853,
+7950=>796,7951=>787,7952=>430,7953=>430,7954=>430,7955=>430,7956=>430,7957=>430,7960=>864,7961=>905,
+7962=>1034,7963=>1038,7964=>1031,7965=>1045,7968=>548,7969=>548,7970=>548,7971=>548,7972=>548,7973=>548,
+7974=>548,7975=>548,7976=>976,7977=>1009,7978=>1132,7979=>1141,7980=>1138,7981=>1154,7982=>1079,7983=>1071,
+7984=>320,7985=>320,7986=>320,7987=>320,7988=>320,7989=>320,7990=>320,7991=>320,7992=>593,7993=>620,
+7994=>746,7995=>762,7996=>742,7997=>773,7998=>691,7999=>683,8000=>536,8001=>536,8002=>536,8003=>536,
+8004=>536,8005=>536,8008=>899,8009=>928,8010=>1086,8011=>1118,8012=>1020,8013=>1028,8016=>536,8017=>536,
+8018=>536,8019=>536,8020=>536,8021=>536,8022=>536,8023=>536,8025=>959,8027=>1085,8029=>1108,8031=>1027,
+8032=>715,8033=>715,8034=>715,8035=>715,8036=>715,8037=>715,8038=>715,8039=>715,8040=>946,8041=>960,
+8042=>1133,8043=>1148,8044=>1059,8045=>1081,8046=>1020,8047=>1016,8048=>590,8049=>590,8050=>430,8051=>430,
+8052=>548,8053=>548,8054=>320,8055=>320,8056=>536,8057=>536,8058=>536,8059=>536,8060=>715,8061=>715,
+8064=>590,8065=>590,8066=>590,8067=>590,8068=>590,8069=>590,8070=>590,8071=>590,8072=>842,8073=>877,
+8074=>1011,8075=>1031,8076=>947,8077=>975,8078=>907,8079=>893,8080=>548,8081=>548,8082=>548,8083=>548,
+8084=>548,8085=>548,8086=>548,8087=>548,8088=>1030,8089=>1066,8090=>1188,8091=>1199,8092=>1196,8093=>1211,
+8094=>1134,8095=>1129,8096=>715,8097=>715,8098=>715,8099=>715,8100=>715,8101=>715,8102=>715,8103=>715,
+8104=>1060,8105=>1076,8106=>1264,8107=>1287,8108=>1179,8109=>1204,8110=>1137,8111=>1135,8112=>590,8113=>590,
+8114=>590,8115=>590,8116=>590,8118=>590,8119=>590,8120=>667,8121=>667,8122=>752,8123=>728,8124=>775,
+8125=>250,8126=>0,8127=>500,8128=>500,8129=>550,8130=>548,8131=>548,8132=>548,8134=>548,8135=>548,
+8136=>884,8137=>859,8138=>982,8139=>968,8140=>839,8141=>500,8142=>500,8143=>500,8144=>320,8145=>320,
+8146=>320,8147=>320,8150=>320,8151=>320,8152=>389,8153=>389,8154=>599,8155=>592,8157=>500,8158=>500,
+8159=>500,8160=>536,8161=>536,8162=>536,8163=>536,8164=>536,8165=>536,8166=>536,8167=>536,8168=>722,
+8169=>722,8170=>1007,8171=>932,8172=>842,8173=>550,8174=>550,8175=>500,8178=>715,8179=>715,8180=>715,
+8182=>715,8183=>715,8184=>971,8185=>853,8186=>1004,8187=>875,8188=>862,8189=>500,8190=>500,8192=>500,
+8193=>1000,8194=>500,8195=>1000,8196=>333,8197=>250,8198=>167,8199=>500,8200=>250,8201=>200,8202=>100,
+8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>333,8209=>333,8210=>500,8213=>1000,8214=>333,
+8215=>478,8219=>250,8223=>500,8227=>560,8228=>250,8229=>478,8231=>0,8232=>0,8233=>0,8234=>0,
+8235=>0,8236=>0,8237=>0,8238=>250,8239=>0,8241=>1618,8242=>278,8243=>556,8244=>834,8245=>270,
+8246=>468,8247=>630,8248=>469,8251=>727,8252=>778,8253=>733,8254=>500,8255=>953,8256=>953,8257=>338,
+8258=>931,8259=>333,8260=>167,8261=>332,8262=>332,8263=>1000,8264=>889,8265=>889,8266=>500,8267=>453,
+8268=>479,8269=>492,8270=>500,8271=>333,8272=>953,8273=>500,8274=>521,8275=>576,8276=>953,8277=>785,
+8278=>410,8279=>881,8280=>620,8281=>620,8282=>179,8283=>621,8284=>569,8285=>179,8286=>179,8287=>111,
+8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8304=>300,8305=>219,8308=>300,8309=>300,8310=>300,
+8311=>300,8312=>300,8313=>300,8314=>300,8315=>300,8316=>300,8317=>216,8318=>216,8319=>300,8320=>300,
+8321=>274,8322=>300,8323=>300,8324=>300,8325=>300,8326=>300,8327=>300,8328=>300,8329=>300,8330=>300,
+8331=>300,8332=>300,8333=>216,8334=>216,8352=>667,8353=>667,8354=>667,8355=>667,8356=>500,8357=>742,
+8358=>722,8359=>1008,8360=>953,8361=>889,8362=>889,8363=>532,8365=>742,8366=>631,8369=>609,8370=>639,
+8371=>742,8372=>576,8373=>500,8448=>664,8449=>665,8451=>925,8453=>693,8454=>787,8455=>631,8457=>867,
+8462=>556,8463=>556,8468=>778,8470=>806,8471=>747,8480=>879,8481=>1050,8483=>667,8486=>741,8487=>741,
+8489=>320,8490=>664,8491=>667,8494=>551,8495=>444,8498=>667,8500=>500,8501=>537,8502=>537,8503=>350,
+8504=>537,8506=>942,8507=>1050,8523=>698,8525=>856,8526=>462,8531=>750,8532=>750,8533=>750,8534=>750,
 8535=>750,8536=>750,8537=>750,8538=>750,8539=>750,8540=>750,8541=>750,8542=>750,8543=>750,8544=>393,
 8545=>786,8546=>1179,8547=>1060,8548=>667,8549=>1060,8550=>1453,8551=>1846,8552=>1060,8553=>667,8554=>1060,
 8555=>1453,8556=>609,8557=>667,8558=>744,8559=>896,8560=>278,8561=>556,8562=>834,8563=>722,8564=>444,
@@ -170,13 +223,16 @@ $cw=array(
 8601=>964,8602=>964,8603=>964,8606=>964,8607=>964,8608=>964,8609=>964,8610=>964,8611=>964,8612=>964,
 8613=>964,8614=>964,8615=>964,8616=>964,8633=>964,8634=>964,8644=>964,8645=>964,8646=>964,8647=>964,
 8648=>964,8649=>964,8650=>964,8676=>964,8677=>964,8706=>494,8710=>612,8721=>713,8722=>606,8725=>750,
-8730=>549,8734=>752,8800=>570,8804=>570,8805=>570,9674=>494,9833=>333,9834=>556,9835=>778,9836=>778,
-9837=>556,9838=>556,9839=>556,11799=>333,63033=>500,63034=>500,63035=>500,63036=>500,63037=>500,63038=>500,
-63039=>500,63040=>500,63041=>500,63166=>278,63171=>333,63196=>500,64256=>583,64257=>556,64258=>556,64259=>824,
-64260=>821,64262=>662,65533=>788);
+8730=>549,8734=>752,8800=>570,8804=>570,8805=>570,9251=>500,9674=>494,9676=>732,9824=>618,9825=>645,
+9826=>587,9827=>582,9828=>582,9829=>645,9830=>587,9831=>618,9833=>333,9834=>556,9835=>778,9836=>778,
+9837=>556,9838=>556,9839=>556,11799=>333,64256=>583,64257=>558,64258=>551,64259=>822,64260=>818,64262=>662,
+64285=>266,64286=>0,64287=>532,64288=>552,64297=>570,64298=>716,64299=>716,64300=>716,64301=>716,64302=>593,
+64303=>593,64304=>593,64305=>498,64306=>339,64307=>523,64308=>561,64309=>266,64310=>291,64312=>576,64313=>266,
+64314=>496,64315=>501,64316=>510,64318=>581,64320=>347,64321=>512,64323=>493,64324=>491,64326=>561,64327=>544,
+64328=>502,64329=>716,64330=>571,64331=>266,64332=>498,64333=>501,64334=>491,64335=>593,65533=>788);
 $enc='';
 $diff='';
 $file='freeserifbi.z';
 $ctg='freeserifbi.ctg.z';
-$originalsize=245112;
+$originalsize=452752;
 ?>
\ No newline at end of file
index 290a818edca89e460da0467ceb39a7628c4dad52..63125cf5432c1da1efde0ef14f45358876ca4ee8 100644 (file)
Binary files a/lib/tcpdf/fonts/freeserifbi.z and b/lib/tcpdf/fonts/freeserifbi.z differ
index 36388c36c74daae6912d8ee9fbed8313809cc1aa..1a99cb55f528c004dbf93b93a442b90c5e9ad570 100644 (file)
Binary files a/lib/tcpdf/fonts/freeserifi.ctg.z and b/lib/tcpdf/fonts/freeserifi.ctg.z differ
index 807cff2f8bc529fee4376ff034b465f2a0ce8ec3..df824e2749a720ac58426fdafe916b3c581eaf08 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 $type='TrueTypeUnicode';
 $name='FreeSerifItalic';
-$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>-29,'Flags'=>96,'FontBBox'=>'[-674 -438 1673 1114]','ItalicAngle'=>-16.5,'StemV'=>70,'MissingWidth'=>600);
+$desc=array('Ascent'=>900,'Descent'=>-300,'CapHeight'=>-29,'Flags'=>96,'FontBBox'=>'[-879 -434 1673 900]','ItalicAngle'=>-16.5,'StemV'=>70,'MissingWidth'=>600);
 $up=-125;
 $ut=50;
 $dw=600;
@@ -15,12 +15,12 @@ $cw=array(
 92=>278,93=>389,94=>422,95=>500,96=>333,97=>500,98=>500,99=>444,100=>500,101=>444,
 102=>278,103=>500,104=>500,105=>278,106=>278,107=>444,108=>278,109=>722,110=>500,111=>500,
 112=>500,113=>500,114=>389,115=>389,116=>278,117=>500,118=>444,119=>667,120=>444,121=>444,
-122=>389,123=>400,124=>275,125=>400,126=>541,8364=>500,8218=>333,402=>278,8222=>556,8230=>889,
-8224=>500,8225=>500,710=>333,8240=>1000,352=>500,8249=>333,338=>944,381=>556,8216=>333,8217=>333,
-8220=>556,8221=>556,8226=>350,8211=>500,8212=>889,732=>333,8482=>980,353=>389,8250=>333,339=>667,
+122=>389,123=>400,124=>275,125=>400,126=>541,8364=>741,8218=>250,402=>278,8222=>444,8230=>889,
+8224=>500,8225=>500,710=>333,8240=>1000,352=>500,8249=>250,338=>944,381=>556,8216=>250,8217=>250,
+8220=>444,8221=>444,8226=>350,8211=>500,8212=>1000,732=>333,8482=>980,353=>389,8250=>250,339=>667,
 382=>389,376=>556,160=>250,161=>389,162=>500,163=>500,164=>500,165=>500,166=>275,167=>500,
-168=>333,169=>760,170=>276,171=>500,172=>675,173=>333,174=>760,175=>333,176=>400,177=>675,
-178=>300,179=>300,180=>333,181=>500,182=>523,183=>250,184=>333,185=>250,186=>310,187=>500,
+168=>333,169=>760,170=>276,171=>444,172=>675,173=>333,174=>760,175=>333,176=>400,177=>675,
+178=>300,179=>300,180=>333,181=>500,182=>523,183=>250,184=>333,185=>250,186=>310,187=>444,
 188=>750,189=>750,190=>750,191=>500,192=>611,193=>611,194=>611,195=>611,196=>611,197=>611,
 198=>889,199=>667,200=>611,201=>611,202=>611,203=>611,204=>333,205=>333,206=>333,207=>333,
 208=>722,209=>667,210=>722,211=>722,212=>722,213=>722,214=>722,215=>675,216=>722,217=>722,
@@ -34,99 +34,142 @@ $cw=array(
 288=>722,289=>500,290=>722,291=>500,292=>722,293=>500,294=>722,295=>500,296=>333,297=>278,
 298=>333,299=>278,300=>333,301=>278,302=>333,303=>278,304=>333,305=>278,306=>707,307=>553,
 308=>444,309=>278,310=>667,311=>444,312=>444,313=>556,314=>278,315=>556,316=>278,317=>556,
-318=>278,319=>556,320=>528,321=>556,322=>278,323=>667,324=>500,325=>667,326=>500,327=>667,
+318=>278,319=>556,320=>278,321=>556,322=>278,323=>667,324=>500,325=>667,326=>500,327=>667,
 328=>500,329=>500,330=>667,331=>500,332=>722,333=>500,334=>722,335=>500,336=>722,337=>500,
 340=>611,341=>389,342=>611,343=>389,344=>611,345=>389,346=>500,347=>389,348=>500,349=>389,
 350=>500,351=>389,354=>556,355=>278,356=>556,357=>278,358=>556,359=>278,360=>722,361=>500,
 362=>722,363=>500,364=>722,365=>500,366=>722,367=>500,368=>722,369=>500,370=>722,371=>500,
 372=>833,373=>667,374=>556,375=>444,377=>556,378=>389,379=>556,380=>389,383=>278,384=>500,
-385=>781,386=>682,387=>500,388=>611,389=>500,390=>667,391=>866,392=>703,393=>722,394=>892,
-395=>682,396=>500,397=>534,398=>611,399=>722,400=>518,401=>611,403=>863,404=>611,405=>728,
+385=>781,386=>610,387=>551,388=>611,389=>549,390=>667,391=>866,392=>703,393=>722,394=>892,
+395=>682,396=>500,397=>520,398=>611,399=>722,400=>518,401=>611,403=>863,404=>611,405=>728,
 406=>278,407=>333,408=>792,409=>444,410=>278,411=>480,412=>900,413=>779,414=>500,415=>722,
-416=>932,417=>500,418=>908,419=>722,420=>772,421=>500,422=>611,423=>500,424=>389,425=>657,
-426=>428,427=>278,428=>556,429=>278,430=>556,431=>948,432=>721,433=>747,434=>755,435=>636,
-436=>549,437=>556,438=>389,439=>556,440=>556,441=>389,442=>389,443=>500,444=>615,445=>439,
+416=>932,417=>608,418=>908,419=>722,420=>772,421=>500,422=>611,423=>500,424=>389,425=>657,
+426=>461,427=>313,428=>556,429=>335,430=>556,431=>948,432=>721,433=>747,434=>755,435=>636,
+436=>549,437=>556,438=>389,439=>525,440=>556,441=>424,442=>416,443=>500,444=>615,445=>439,
 446=>389,447=>500,448=>275,449=>500,450=>600,451=>333,452=>1278,453=>1111,454=>889,455=>1000,
 456=>834,457=>556,458=>1101,459=>935,460=>778,461=>611,462=>500,463=>339,464=>278,465=>722,
 466=>500,467=>722,468=>500,469=>722,470=>500,471=>722,472=>500,473=>722,474=>500,475=>722,
 476=>500,477=>444,478=>611,479=>500,480=>611,481=>500,482=>889,483=>667,484=>722,485=>500,
-486=>722,487=>500,488=>652,489=>444,490=>722,491=>500,492=>722,493=>500,494=>556,495=>389,
-496=>278,497=>1278,498=>1111,499=>889,500=>817,501=>595,504=>657,505=>500,506=>611,507=>500,
-508=>889,509=>667,510=>722,511=>500,512=>611,513=>500,514=>611,515=>500,516=>604,517=>444,
-518=>604,519=>444,520=>339,521=>278,522=>339,523=>278,524=>722,525=>500,526=>722,527=>500,
-528=>616,529=>389,530=>616,531=>389,532=>722,533=>500,534=>722,535=>500,536=>500,537=>389,
-538=>556,539=>278,542=>722,543=>500,550=>611,551=>500,552=>604,553=>444,554=>722,555=>500,
-556=>722,557=>500,558=>722,559=>500,560=>722,561=>500,562=>556,563=>444,592=>500,593=>587,
-594=>587,595=>500,596=>444,599=>697,600=>444,601=>444,603=>426,604=>426,608=>640,609=>500,
-613=>500,616=>278,618=>278,623=>722,629=>500,633=>389,643=>278,647=>278,648=>278,649=>500,
-650=>517,651=>500,652=>444,653=>667,654=>444,658=>389,670=>444,711=>333,728=>333,729=>333,
-730=>333,731=>333,733=>333,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,
-775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,
-785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,
-795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,
-805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,
-815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,
-825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,864=>0,
-865=>0,884=>199,885=>199,890=>332,894=>333,900=>257,901=>333,902=>641,903=>250,904=>797,
-905=>874,906=>486,908=>720,910=>802,911=>825,912=>267,913=>641,914=>581,915=>611,916=>660,
-917=>611,918=>606,919=>742,920=>672,921=>333,922=>667,923=>641,924=>833,925=>657,926=>678,
-927=>682,928=>749,929=>611,931=>657,932=>596,933=>676,934=>722,935=>611,936=>863,937=>744,
-938=>333,939=>696,940=>587,941=>426,942=>534,943=>267,944=>534,945=>587,946=>534,947=>480,
-948=>534,949=>426,950=>480,951=>534,952=>534,953=>267,954=>527,955=>480,956=>534,957=>480,
-958=>480,959=>534,960=>587,961=>534,962=>426,963=>534,964=>426,965=>534,966=>640,967=>480,
-968=>693,969=>693,970=>267,971=>534,972=>534,973=>534,974=>693,976=>534,977=>587,978=>620,
-979=>707,980=>620,981=>640,982=>684,983=>534,985=>534,986=>426,987=>426,988=>611,989=>445,
-991=>480,993=>616,1008=>534,1009=>534,1010=>485,1013=>280,1024=>611,1025=>611,1026=>669,1027=>556,
-1028=>667,1029=>500,1030=>333,1031=>333,1032=>444,1033=>896,1034=>922,1035=>758,1036=>743,1037=>814,
-1038=>730,1039=>814,1040=>611,1041=>682,1042=>611,1043=>640,1044=>747,1045=>611,1046=>1073,1047=>508,
-1048=>814,1049=>814,1050=>729,1051=>755,1052=>833,1053=>722,1054=>722,1055=>805,1056=>611,1057=>667,
-1058=>556,1059=>730,1060=>801,1061=>611,1062=>807,1063=>772,1064=>1063,1065=>1065,1066=>731,1067=>961,
-1068=>645,1069=>671,1070=>1191,1071=>746,1072=>500,1073=>500,1074=>429,1075=>354,1076=>552,1077=>444,
-1078=>1058,1079=>363,1080=>500,1081=>500,1082=>491,1083=>538,1084=>731,1085=>500,1086=>500,1087=>500,
-1088=>500,1089=>444,1090=>722,1091=>444,1092=>771,1093=>444,1094=>500,1095=>500,1096=>750,1097=>750,
-1098=>492,1099=>684,1100=>420,1101=>457,1102=>700,1103=>560,1104=>444,1105=>444,1106=>500,1107=>454,
-1108=>444,1109=>389,1110=>278,1111=>278,1112=>278,1113=>694,1114=>646,1115=>500,1116=>491,1117=>500,
-1118=>444,1119=>500,1164=>645,1165=>420,1166=>611,1167=>500,1168=>556,1169=>418,1170=>556,1171=>354,
-1172=>598,1173=>452,1174=>1073,1175=>1058,1176=>575,1177=>391,1178=>743,1179=>491,1180=>743,1181=>491,
-1182=>743,1183=>491,1184=>743,1185=>491,1186=>722,1187=>500,1188=>722,1189=>500,1190=>1000,1191=>500,
-1192=>667,1193=>444,1194=>667,1195=>444,1196=>556,1197=>484,1198=>556,1199=>556,1200=>556,1201=>556,
-1202=>611,1203=>444,1204=>807,1205=>500,1206=>772,1207=>500,1208=>772,1209=>500,1210=>722,1211=>500,
-1212=>722,1213=>444,1214=>722,1215=>444,1216=>333,1217=>1073,1218=>1058,1219=>743,1220=>491,1223=>722,
-1224=>500,1227=>772,1228=>500,1232=>611,1233=>500,1234=>611,1235=>500,1236=>889,1237=>667,1238=>611,
-1239=>444,1240=>722,1241=>444,1242=>444,1243=>444,1244=>1073,1245=>1058,1246=>575,1247=>391,1248=>575,
-1249=>391,1250=>814,1251=>500,1252=>814,1253=>500,1254=>722,1255=>500,1256=>722,1257=>500,1258=>722,
-1259=>500,1260=>671,1261=>457,1262=>730,1263=>444,1264=>730,1265=>444,1266=>730,1267=>444,1268=>772,
-1269=>500,1272=>1021,1273=>684,1457=>0,1458=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,
-1465=>0,1467=>0,1472=>126,1475=>418,1488=>537,1489=>537,1490=>350,1491=>537,1492=>537,1493=>350,
-1494=>350,1495=>537,1496=>537,1497=>350,1498=>537,1499=>537,1500=>537,1501=>537,1502=>537,1503=>350,
-1504=>350,1505=>537,1506=>537,1507=>537,1508=>537,1509=>537,1510=>537,1511=>537,1512=>537,1513=>537,
-1514=>537,1520=>537,1521=>537,1522=>537,1523=>396,1524=>396,2404=>318,2405=>446,2433=>0,2434=>300,
-2435=>312,2437=>594,2438=>776,2439=>469,2440=>513,2441=>535,2442=>561,2443=>604,2444=>481,2447=>580,
-2448=>604,2451=>540,2452=>620,2453=>570,2454=>485,2455=>484,2456=>471,2457=>457,2458=>408,2459=>452,
-2460=>591,2461=>551,2462=>771,2463=>414,2464=>404,2465=>522,2466=>415,2467=>450,2468=>551,2469=>477,
-2470=>478,2471=>449,2472=>448,2474=>535,2475=>611,2476=>443,2477=>534,2478=>492,2479=>474,2480=>442,
-2482=>542,2486=>507,2487=>467,2488=>523,2489=>419,2492=>0,2493=>419,2494=>202,2495=>189,2496=>202,
-2497=>0,2498=>0,2499=>0,2500=>0,2503=>294,2504=>289,2507=>774,2508=>825,2509=>0,2510=>356,
-2519=>219,2524=>523,2525=>420,2527=>469,2528=>604,2529=>481,2530=>0,2531=>0,2534=>500,2535=>437,
-2536=>479,2537=>507,2538=>497,2539=>500,2540=>482,2541=>503,2542=>517,2543=>481,2544=>443,2545=>443,
-2546=>429,2547=>383,2548=>432,2549=>478,2550=>539,2551=>158,2552=>365,2553=>280,2554=>357,3585=>606,
-3586=>550,3587=>622,3588=>604,3589=>619,3590=>674,3591=>461,3592=>499,3593=>613,3594=>550,3595=>622,
-3596=>817,3597=>817,3598=>656,3599=>656,3600=>463,3601=>717,3602=>820,3603=>826,3604=>604,3605=>616,
-3606=>602,3607=>650,3608=>514,3609=>626,3610=>626,3611=>626,3612=>647,3613=>647,3614=>676,3615=>676,
-3616=>643,3617=>616,3618=>574,3619=>480,3620=>602,3621=>579,3622=>643,3623=>483,3624=>606,3625=>654,
-3626=>579,3627=>654,3628=>676,3629=>584,3630=>584,3631=>524,3632=>444,3633=>0,3634=>408,3635=>408,
-3636=>0,3637=>0,3638=>0,3639=>0,3640=>0,3641=>0,3642=>0,3647=>712,3648=>320,3649=>586,
-3650=>321,3651=>317,3652=>321,3653=>290,3654=>599,3655=>0,3656=>0,3657=>0,3658=>0,3659=>0,
-3660=>0,3661=>0,3662=>0,3663=>780,3664=>672,3665=>672,3666=>672,3667=>672,3668=>672,3669=>672,
-3670=>672,3671=>672,3672=>672,3673=>672,3674=>694,3675=>938,4256=>453,4257=>448,4258=>546,4259=>619,
-4260=>478,4261=>481,4262=>459,4263=>707,4264=>467,4265=>471,4266=>842,4267=>464,4268=>443,4269=>707,
-4270=>460,4271=>465,4272=>686,4273=>440,4274=>550,4275=>561,4276=>580,4277=>467,4278=>630,4279=>466,
-4280=>517,4281=>456,4282=>502,4283=>464,4284=>534,4285=>440,4286=>443,4287=>522,4288=>460,4289=>463,
-4290=>536,4291=>455,4292=>468,4293=>449,4304=>454,4305=>452,4306=>544,4307=>629,4308=>451,4309=>452,
-4310=>452,4311=>702,4312=>451,4313=>452,4314=>820,4315=>451,4316=>453,4317=>695,4318=>449,4319=>448,
-4320=>694,4321=>501,4322=>544,4323=>517,4324=>560,4325=>450,4326=>627,4327=>452,4328=>491,4329=>452,
-4330=>485,4331=>452,4332=>485,4333=>443,4334=>500,4335=>582,4336=>455,4337=>451,4338=>480,4339=>414,
-4340=>453,4341=>418,7680=>611,7681=>500,7682=>611,7683=>500,7684=>611,7685=>500,7686=>611,7687=>500,
+486=>722,487=>500,488=>652,489=>444,490=>730,491=>500,492=>730,493=>500,494=>525,495=>446,
+496=>278,497=>1278,498=>1111,499=>889,500=>817,501=>595,502=>944,503=>607,504=>657,505=>500,
+506=>611,507=>500,508=>889,509=>667,510=>722,511=>500,512=>611,513=>500,514=>611,515=>500,
+516=>604,517=>444,518=>604,519=>444,520=>339,521=>278,522=>339,523=>278,524=>722,525=>500,
+526=>722,527=>500,528=>616,529=>389,530=>616,531=>389,532=>722,533=>500,534=>722,535=>500,
+536=>500,537=>389,538=>556,539=>278,540=>424,541=>455,542=>722,543=>500,544=>781,545=>588,
+546=>568,547=>468,548=>611,549=>444,550=>611,551=>500,552=>604,553=>444,554=>722,555=>500,
+556=>722,557=>500,558=>722,559=>500,560=>722,561=>500,562=>556,563=>444,564=>405,565=>597,
+566=>377,567=>278,568=>775,569=>767,570=>722,571=>667,572=>444,573=>611,574=>611,575=>389,
+576=>444,577=>444,578=>444,579=>667,580=>750,581=>697,582=>611,583=>444,584=>389,585=>278,
+586=>796,587=>590,588=>667,589=>333,590=>722,591=>500,592=>500,593=>564,594=>564,595=>500,
+596=>444,597=>444,598=>500,599=>697,600=>444,601=>444,602=>722,603=>416,604=>426,605=>674,
+606=>454,607=>278,608=>640,609=>500,610=>484,611=>500,612=>582,613=>500,614=>500,615=>500,
+616=>278,617=>278,618=>278,619=>278,620=>278,621=>278,622=>556,623=>722,624=>722,625=>716,
+626=>500,627=>500,628=>500,629=>500,630=>668,631=>693,632=>640,633=>389,634=>389,635=>333,
+636=>389,637=>333,638=>333,639=>333,640=>487,641=>487,642=>389,643=>278,644=>500,645=>333,
+646=>500,647=>278,648=>278,649=>500,650=>517,651=>500,652=>444,653=>667,654=>444,655=>510,
+656=>524,657=>444,658=>446,659=>456,660=>444,661=>444,662=>444,663=>444,664=>722,665=>442,
+666=>454,667=>665,668=>585,669=>347,670=>444,671=>443,672=>500,673=>444,674=>444,675=>798,
+676=>795,677=>805,678=>554,679=>561,680=>678,681=>614,682=>554,683=>554,684=>500,685=>500,
+686=>611,687=>611,688=>300,689=>300,690=>278,691=>278,692=>278,693=>309,694=>306,695=>432,
+696=>310,697=>250,698=>408,699=>333,700=>500,701=>500,702=>333,703=>333,704=>258,705=>258,
+706=>374,707=>374,708=>383,709=>383,711=>333,712=>250,713=>333,714=>333,715=>333,716=>250,
+717=>333,718=>333,719=>333,720=>278,721=>278,722=>333,723=>333,724=>333,725=>333,726=>333,
+727=>333,728=>333,729=>333,730=>333,731=>333,733=>333,734=>336,735=>352,736=>311,737=>200,
+738=>243,739=>328,740=>300,741=>460,742=>460,743=>460,744=>460,745=>460,746=>477,747=>475,
+748=>339,749=>330,750=>444,751=>383,752=>383,753=>294,754=>294,755=>327,756=>261,757=>437,
+758=>437,759=>333,760=>278,761=>175,762=>175,763=>175,764=>175,765=>337,766=>337,767=>326,
+768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,
+778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,
+788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,
+798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,
+808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,
+818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,
+828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,
+838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,
+848=>0,849=>0,850=>0,851=>0,852=>0,853=>0,854=>0,855=>0,856=>0,857=>0,
+858=>0,859=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,866=>0,867=>0,
+868=>0,869=>0,870=>0,871=>0,872=>0,873=>0,874=>0,875=>0,876=>0,877=>0,
+878=>0,879=>0,884=>199,885=>199,890=>332,894=>333,900=>257,901=>333,902=>661,903=>250,
+904=>841,905=>950,906=>559,908=>815,910=>877,911=>899,912=>270,913=>661,914=>581,915=>611,
+916=>660,917=>611,918=>606,919=>742,920=>672,921=>333,922=>667,923=>641,924=>833,925=>657,
+926=>678,927=>682,928=>749,929=>611,931=>657,932=>596,933=>676,934=>722,935=>611,936=>812,
+937=>743,938=>333,939=>696,940=>564,941=>416,942=>506,943=>270,944=>504,945=>564,946=>509,
+947=>496,948=>520,949=>416,950=>398,951=>506,952=>533,953=>270,954=>491,955=>488,956=>501,
+957=>486,958=>430,959=>510,960=>608,961=>506,962=>423,963=>524,964=>425,965=>504,966=>618,
+967=>459,968=>693,969=>693,970=>270,971=>504,972=>510,973=>504,974=>693,976=>534,977=>587,
+978=>620,979=>820,980=>620,981=>640,982=>684,983=>504,984=>555,985=>534,986=>548,987=>496,
+988=>610,989=>470,990=>633,991=>410,992=>687,993=>544,1008=>534,1009=>534,1010=>485,1011=>278,
+1012=>722,1013=>280,1014=>280,1015=>610,1016=>500,1017=>704,1018=>832,1019=>703,1020=>533,1021=>704,
+1022=>704,1023=>704,1024=>604,1025=>604,1026=>668,1027=>611,1028=>666,1029=>500,1030=>339,1031=>339,
+1032=>444,1033=>972,1034=>977,1035=>703,1036=>664,1037=>720,1038=>728,1039=>728,1040=>611,1041=>610,
+1042=>611,1043=>611,1044=>682,1045=>604,1046=>976,1047=>592,1048=>720,1049=>720,1050=>664,1051=>719,
+1052=>828,1053=>722,1054=>722,1055=>749,1056=>603,1057=>667,1058=>556,1059=>728,1060=>722,1061=>611,
+1062=>728,1063=>666,1064=>997,1065=>1005,1066=>710,1067=>891,1068=>594,1069=>632,1070=>1024,1071=>696,
+1072=>500,1073=>500,1074=>442,1075=>344,1076=>503,1077=>440,1078=>932,1079=>402,1080=>500,1081=>500,
+1082=>491,1083=>487,1084=>624,1085=>500,1086=>500,1087=>500,1088=>500,1089=>441,1090=>722,1091=>500,
+1092=>741,1093=>444,1094=>500,1095=>500,1096=>750,1097=>750,1098=>545,1099=>683,1100=>433,1101=>432,
+1102=>700,1103=>503,1104=>440,1105=>440,1106=>500,1107=>344,1108=>442,1109=>389,1110=>278,1111=>278,
+1112=>278,1113=>686,1114=>696,1115=>500,1116=>491,1117=>500,1118=>500,1119=>500,1120=>964,1121=>684,
+1122=>708,1123=>690,1124=>975,1125=>646,1126=>800,1127=>628,1128=>1096,1129=>795,1130=>952,1131=>730,
+1132=>1260,1133=>892,1134=>574,1135=>400,1136=>812,1137=>694,1138=>721,1139=>500,1140=>745,1141=>533,
+1142=>745,1143=>533,1144=>1193,1145=>967,1146=>868,1147=>602,1148=>964,1149=>684,1150=>964,1151=>684,
+1152=>548,1153=>443,1154=>320,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>0,1161=>0,
+1162=>720,1163=>500,1164=>602,1165=>433,1166=>611,1167=>500,1168=>552,1169=>424,1170=>593,1171=>424,
+1172=>611,1173=>432,1174=>992,1175=>932,1176=>592,1177=>396,1178=>681,1179=>491,1180=>700,1181=>532,
+1182=>664,1183=>491,1184=>776,1185=>690,1186=>729,1187=>500,1188=>908,1189=>660,1190=>1034,1191=>694,
+1192=>667,1193=>531,1194=>666,1195=>443,1196=>556,1197=>775,1198=>556,1199=>574,1200=>555,1201=>574,
+1202=>660,1203=>443,1204=>798,1205=>581,1206=>674,1207=>500,1208=>690,1209=>516,1210=>640,1211=>500,
+1212=>785,1213=>558,1214=>787,1215=>559,1216=>339,1217=>976,1218=>932,1219=>664,1220=>491,1221=>719,
+1222=>487,1223=>722,1224=>500,1225=>722,1226=>500,1227=>666,1228=>500,1229=>828,1230=>624,1231=>339,
+1232=>611,1233=>500,1234=>611,1235=>500,1236=>889,1237=>667,1238=>604,1239=>444,1240=>722,1241=>444,
+1242=>722,1243=>444,1244=>976,1245=>932,1246=>592,1247=>402,1248=>525,1249=>446,1250=>720,1251=>500,
+1252=>720,1253=>500,1254=>722,1255=>500,1256=>722,1257=>500,1258=>722,1259=>500,1260=>632,1261=>432,
+1262=>728,1263=>500,1264=>728,1265=>500,1266=>728,1267=>500,1268=>666,1269=>500,1270=>611,1271=>424,
+1272=>891,1273=>683,1296=>532,1297=>409,1298=>719,1299=>487,1306=>722,1307=>500,1308=>833,1309=>656,
+1310=>664,1311=>491,1425=>0,1426=>0,1427=>0,1428=>0,1429=>0,1430=>0,1431=>418,1432=>0,
+1433=>0,1434=>0,1435=>0,1436=>0,1437=>0,1438=>0,1439=>0,1440=>0,1441=>0,1442=>0,
+1443=>0,1444=>0,1445=>0,1446=>0,1447=>0,1448=>0,1449=>0,1450=>0,1451=>0,1452=>0,
+1453=>0,1454=>0,1455=>0,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,
+1463=>0,1464=>0,1465=>0,1466=>0,1467=>0,1468=>0,1469=>0,1470=>440,1471=>0,1472=>126,
+1473=>0,1474=>0,1475=>418,1476=>0,1477=>0,1478=>350,1479=>0,1488=>537,1489=>537,1490=>350,
+1491=>537,1492=>537,1493=>350,1494=>350,1495=>537,1496=>537,1497=>350,1498=>537,1499=>537,1500=>537,
+1501=>537,1502=>537,1503=>350,1504=>350,1505=>537,1506=>537,1507=>537,1508=>537,1509=>537,1510=>537,
+1511=>537,1512=>537,1513=>537,1514=>537,1520=>537,1521=>537,1522=>537,1523=>396,1524=>396,2404=>318,
+2405=>446,2433=>0,2434=>300,2435=>312,2437=>594,2438=>776,2439=>469,2440=>513,2441=>535,2442=>561,
+2443=>604,2444=>481,2447=>580,2448=>604,2451=>540,2452=>620,2453=>570,2454=>485,2455=>484,2456=>471,
+2457=>457,2458=>408,2459=>452,2460=>591,2461=>551,2462=>771,2463=>414,2464=>404,2465=>522,2466=>415,
+2467=>450,2468=>551,2469=>477,2470=>478,2471=>449,2472=>448,2474=>535,2475=>611,2476=>443,2477=>534,
+2478=>492,2479=>474,2480=>442,2482=>542,2486=>507,2487=>467,2488=>523,2489=>419,2492=>0,2493=>419,
+2494=>202,2495=>189,2496=>202,2497=>0,2498=>0,2499=>0,2500=>0,2503=>294,2504=>289,2507=>774,
+2508=>825,2509=>0,2510=>356,2519=>219,2524=>523,2525=>420,2527=>469,2528=>604,2529=>481,2530=>0,
+2531=>0,2534=>500,2535=>437,2536=>479,2537=>507,2538=>497,2539=>500,2540=>482,2541=>503,2542=>517,
+2543=>481,2544=>443,2545=>443,2546=>429,2547=>383,2548=>432,2549=>478,2550=>539,2551=>158,2552=>365,
+2553=>280,2554=>357,3585=>512,3586=>453,3587=>512,3588=>519,3589=>529,3590=>561,3591=>411,3592=>437,
+3593=>552,3594=>452,3595=>509,3596=>707,3597=>707,3598=>574,3599=>570,3600=>406,3601=>607,3602=>686,
+3603=>749,3604=>494,3605=>497,3606=>509,3607=>552,3608=>461,3609=>565,3610=>527,3611=>523,3612=>556,
+3613=>551,3614=>570,3615=>570,3616=>571,3617=>531,3618=>493,3619=>433,3620=>513,3621=>491,3622=>571,
+3623=>439,3624=>510,3625=>594,3626=>484,3627=>554,3628=>616,3629=>493,3630=>496,3631=>417,3632=>392,
+3633=>0,3634=>366,3635=>366,3636=>0,3637=>0,3638=>0,3639=>0,3640=>0,3641=>0,3642=>0,
+3647=>662,3648=>297,3649=>544,3650=>298,3651=>329,3652=>328,3653=>326,3654=>488,3655=>0,3656=>0,
+3657=>0,3658=>0,3659=>0,3660=>0,3661=>0,3662=>0,3663=>725,3664=>624,3665=>624,3666=>624,
+3667=>624,3668=>624,3669=>624,3670=>624,3671=>624,3672=>624,3673=>624,3674=>645,3675=>872,4256=>453,
+4257=>448,4258=>546,4259=>619,4260=>478,4261=>481,4262=>459,4263=>707,4264=>467,4265=>471,4266=>842,
+4267=>464,4268=>443,4269=>707,4270=>460,4271=>465,4272=>686,4273=>440,4274=>550,4275=>561,4276=>580,
+4277=>467,4278=>630,4279=>466,4280=>517,4281=>456,4282=>502,4283=>464,4284=>534,4285=>440,4286=>443,
+4287=>522,4288=>460,4289=>463,4290=>536,4291=>455,4292=>468,4293=>449,4304=>454,4305=>452,4306=>544,
+4307=>629,4308=>451,4309=>452,4310=>452,4311=>702,4312=>451,4313=>452,4314=>820,4315=>451,4316=>453,
+4317=>695,4318=>449,4319=>448,4320=>694,4321=>501,4322=>544,4323=>517,4324=>560,4325=>450,4326=>627,
+4327=>452,4328=>491,4329=>452,4330=>485,4331=>452,4332=>485,4333=>443,4334=>500,4335=>582,4336=>455,
+4337=>451,4338=>480,4339=>414,4340=>453,4341=>418,4345=>544,4347=>410,5024=>711,5025=>678,5026=>604,
+5027=>667,5028=>796,5029=>301,5030=>516,5031=>544,5032=>457,5033=>716,5034=>703,5035=>383,5036=>628,
+5037=>709,5038=>455,5039=>601,5040=>472,5041=>574,5042=>730,5043=>939,5044=>498,5045=>528,5046=>667,
+5047=>891,5048=>505,5049=>792,5050=>957,5051=>725,5052=>595,5053=>733,5054=>698,5055=>638,5056=>720,
+5057=>732,5058=>624,5059=>638,5060=>565,5061=>903,5062=>655,5063=>681,5064=>675,5065=>949,5066=>683,
+5067=>547,5068=>693,5069=>732,5070=>529,5071=>569,5072=>536,5073=>677,5074=>631,5075=>382,5076=>973,
+5077=>543,5078=>607,5079=>652,5080=>652,5081=>693,5082=>514,5083=>803,5084=>658,5085=>597,5086=>627,
+5087=>659,5088=>679,5089=>706,5090=>563,5091=>618,5092=>767,5093=>776,5094=>731,5095=>492,5096=>808,
+5097=>823,5098=>796,5099=>689,5100=>716,5101=>518,5102=>521,5103=>719,5104=>563,5105=>776,5106=>634,
+5107=>822,5108=>621,7680=>611,7681=>500,7682=>611,7683=>500,7684=>611,7685=>500,7686=>611,7687=>500,
 7688=>667,7689=>444,7690=>722,7691=>500,7692=>722,7693=>500,7694=>722,7695=>500,7696=>722,7697=>500,
 7698=>722,7699=>500,7700=>611,7701=>444,7702=>611,7703=>444,7704=>604,7705=>444,7706=>604,7707=>444,
 7708=>604,7709=>444,7710=>611,7711=>278,7712=>722,7713=>500,7714=>722,7715=>500,7716=>722,7717=>500,
@@ -141,56 +184,76 @@ $cw=array(
 7798=>722,7799=>500,7800=>722,7801=>500,7802=>722,7803=>500,7804=>611,7805=>444,7806=>611,7807=>444,
 7808=>833,7809=>667,7810=>833,7811=>667,7812=>833,7813=>667,7814=>833,7815=>667,7816=>833,7817=>667,
 7818=>611,7819=>444,7820=>611,7821=>444,7822=>556,7823=>444,7824=>556,7825=>389,7826=>556,7827=>389,
-7828=>556,7829=>389,7830=>500,7831=>278,7832=>667,7833=>444,7835=>278,7840=>611,7841=>500,7842=>611,
-7843=>500,7844=>611,7845=>500,7846=>611,7847=>500,7848=>611,7849=>500,7850=>611,7851=>500,7852=>611,
-7853=>500,7854=>611,7855=>500,7856=>611,7857=>500,7858=>611,7859=>500,7860=>611,7861=>500,7862=>611,
-7863=>500,7864=>604,7865=>444,7866=>604,7867=>444,7868=>604,7869=>444,7870=>611,7871=>444,7872=>611,
-7873=>444,7874=>611,7875=>444,7876=>611,7877=>444,7878=>604,7879=>444,7880=>339,7881=>278,7882=>339,
-7883=>278,7884=>722,7885=>500,7886=>722,7887=>500,7888=>722,7889=>500,7890=>722,7891=>500,7892=>722,
-7893=>500,7894=>722,7895=>500,7896=>722,7897=>500,7908=>722,7909=>500,7910=>722,7911=>500,7922=>556,
-7923=>444,7924=>556,7925=>444,7926=>556,7927=>444,7928=>556,7929=>444,7936=>587,7937=>587,7938=>587,
-7939=>587,7940=>587,7941=>587,7942=>587,7943=>587,7944=>641,7945=>641,7946=>641,7947=>641,7948=>641,
-7949=>641,7950=>641,7951=>641,7952=>426,7953=>426,7954=>426,7955=>426,7956=>426,7957=>426,7960=>611,
-7961=>611,7962=>611,7963=>611,7964=>611,7965=>611,7968=>534,7969=>534,7970=>534,7971=>534,7972=>534,
-7973=>534,7974=>534,7975=>534,7976=>742,7977=>742,7978=>742,7979=>742,7980=>742,7981=>742,7982=>742,
-7983=>742,7984=>267,7985=>267,7986=>267,7987=>267,7988=>267,7989=>267,7990=>267,7991=>267,7992=>333,
-7993=>333,7994=>333,7995=>333,7996=>333,7997=>333,7998=>333,7999=>333,8000=>534,8001=>534,8002=>534,
-8003=>534,8004=>534,8005=>534,8008=>682,8009=>682,8010=>682,8011=>682,8012=>682,8013=>682,8016=>534,
-8017=>534,8018=>534,8019=>534,8020=>534,8021=>534,8022=>534,8023=>534,8025=>620,8027=>620,8029=>620,
-8031=>620,8032=>693,8033=>693,8034=>693,8035=>693,8036=>693,8037=>693,8038=>693,8039=>693,8040=>744,
-8041=>744,8042=>744,8043=>744,8044=>744,8045=>744,8046=>744,8047=>744,8048=>587,8049=>587,8050=>426,
-8051=>426,8052=>534,8053=>534,8054=>267,8055=>267,8056=>534,8057=>534,8058=>534,8059=>534,8060=>693,
-8061=>693,8064=>587,8065=>587,8066=>587,8067=>587,8068=>587,8069=>587,8070=>587,8071=>587,8072=>641,
-8073=>641,8074=>641,8075=>641,8076=>641,8077=>641,8078=>641,8079=>641,8080=>534,8081=>534,8082=>534,
-8083=>534,8084=>534,8085=>534,8086=>534,8087=>534,8088=>742,8089=>742,8090=>742,8091=>742,8092=>742,
-8093=>742,8094=>742,8095=>742,8096=>693,8097=>693,8098=>693,8099=>693,8100=>693,8101=>693,8102=>693,
-8103=>693,8104=>744,8105=>744,8106=>744,8107=>744,8108=>744,8109=>744,8110=>744,8111=>744,8112=>587,
-8113=>587,8114=>587,8115=>587,8116=>587,8118=>587,8119=>587,8120=>641,8121=>641,8122=>641,8123=>641,
-8124=>641,8125=>250,8126=>332,8127=>500,8128=>500,8129=>534,8130=>534,8131=>534,8132=>534,8134=>534,
-8135=>534,8136=>611,8137=>611,8138=>742,8139=>742,8140=>742,8141=>500,8142=>500,8143=>500,8144=>267,
-8145=>267,8146=>267,8147=>267,8150=>267,8151=>267,8152=>333,8153=>333,8154=>333,8155=>333,8157=>500,
-8158=>500,8159=>500,8160=>534,8161=>534,8162=>534,8163=>534,8164=>534,8165=>534,8166=>534,8167=>534,
-8168=>676,8169=>676,8170=>676,8171=>676,8172=>611,8173=>534,8174=>534,8175=>500,8178=>693,8179=>693,
-8180=>693,8182=>693,8183=>693,8184=>682,8185=>682,8186=>744,8187=>744,8188=>744,8189=>500,8190=>500,
-8204=>0,8205=>0,8208=>333,8209=>333,8210=>500,8213=>889,8219=>333,8223=>556,8227=>350,8228=>250,
-8229=>500,8241=>1601,8248=>469,8251=>629,8252=>666,8253=>500,8255=>953,8256=>1000,8257=>314,8258=>931,
-8259=>333,8260=>167,8261=>480,8262=>480,8263=>1000,8264=>833,8265=>833,8304=>300,8308=>300,8309=>300,
-8310=>300,8311=>300,8312=>300,8313=>300,8320=>300,8321=>250,8322=>300,8323=>300,8324=>300,8325=>300,
-8326=>300,8327=>300,8328=>300,8329=>300,8352=>698,8353=>667,8354=>667,8355=>611,8356=>500,8357=>722,
-8358=>667,8359=>611,8361=>833,8373=>611,8462=>500,8470=>1023,8471=>760,8479=>610,8483=>611,8486=>744,
-8487=>744,8494=>533,8498=>611,8531=>750,8532=>750,8533=>750,8534=>750,8535=>750,8536=>750,8537=>750,
-8538=>750,8539=>750,8540=>750,8541=>750,8542=>750,8543=>750,8544=>339,8545=>678,8546=>1017,8547=>950,
-8548=>611,8549=>950,8550=>1289,8551=>1628,8552=>950,8553=>611,8554=>950,8555=>1289,8556=>556,8557=>667,
-8558=>722,8559=>828,8560=>278,8561=>556,8562=>834,8563=>722,8564=>444,8565=>722,8566=>1000,8567=>1278,
-8568=>722,8569=>444,8570=>722,8571=>1000,8572=>278,8573=>444,8574=>500,8575=>722,8592=>964,8593=>499,
-8594=>964,8595=>499,8706=>494,8710=>612,8721=>713,8722=>675,8723=>675,8725=>750,8730=>549,8734=>677,
-8747=>416,8748=>750,8749=>1083,8750=>722,8751=>750,8800=>564,8804=>675,8805=>675,8992=>686,8993=>686,
-9674=>494,9833=>333,9834=>555,9835=>722,9836=>722,9837=>415,9838=>377,9839=>402,11799=>333,63033=>500,
-63034=>500,63035=>500,63036=>500,63037=>500,63038=>500,63039=>500,63040=>500,63041=>500,63166=>278,63171=>333,
-63196=>500,64256=>526,64257=>500,64258=>500,64259=>747,64260=>748,64262=>665,65533=>788);
+7828=>556,7829=>389,7830=>500,7831=>278,7832=>667,7833=>444,7834=>444,7835=>278,7840=>611,7841=>500,
+7842=>611,7843=>500,7844=>611,7845=>500,7846=>611,7847=>500,7848=>611,7849=>500,7850=>611,7851=>500,
+7852=>611,7853=>500,7854=>611,7855=>500,7856=>611,7857=>500,7858=>611,7859=>500,7860=>611,7861=>500,
+7862=>611,7863=>500,7864=>604,7865=>444,7866=>604,7867=>444,7868=>604,7869=>444,7870=>611,7871=>444,
+7872=>611,7873=>444,7874=>611,7875=>444,7876=>611,7877=>444,7878=>604,7879=>444,7880=>339,7881=>278,
+7882=>339,7883=>278,7884=>722,7885=>500,7886=>722,7887=>500,7888=>722,7889=>500,7890=>722,7891=>500,
+7892=>722,7893=>500,7894=>722,7895=>500,7896=>722,7897=>500,7898=>932,7899=>608,7900=>932,7901=>608,
+7902=>807,7903=>585,7904=>932,7905=>608,7906=>932,7907=>608,7908=>722,7909=>500,7910=>722,7911=>500,
+7912=>948,7913=>721,7914=>948,7915=>721,7916=>807,7917=>585,7918=>948,7919=>721,7920=>948,7921=>721,
+7922=>556,7923=>444,7924=>556,7925=>444,7926=>556,7927=>444,7928=>556,7929=>444,7936=>564,7937=>564,
+7938=>564,7939=>564,7940=>564,7941=>564,7942=>564,7943=>564,7944=>661,7945=>661,7946=>794,7947=>811,
+7948=>792,7949=>803,7950=>661,7951=>648,7952=>416,7953=>416,7954=>416,7955=>416,7956=>416,7957=>416,
+7960=>740,7961=>795,7962=>923,7963=>940,7964=>996,7965=>986,7968=>506,7969=>506,7970=>506,7971=>506,
+7972=>506,7973=>506,7974=>506,7975=>506,7976=>879,7977=>901,7978=>1036,7979=>1035,7980=>1099,7981=>1100,
+7982=>954,7983=>959,7984=>270,7985=>270,7986=>267,7987=>267,7988=>267,7989=>267,7990=>267,7991=>267,
+7992=>490,7993=>529,7994=>655,7995=>654,7996=>705,7997=>713,7998=>570,7999=>573,8000=>558,8001=>510,
+8002=>510,8003=>510,8004=>510,8005=>510,8008=>797,8009=>867,8010=>1026,8011=>1022,8012=>993,8013=>1017,
+8016=>504,8017=>504,8018=>504,8019=>504,8020=>504,8021=>504,8022=>504,8023=>504,8025=>916,8027=>1062,
+8029=>1100,8031=>933,8032=>693,8033=>693,8034=>693,8035=>693,8036=>693,8037=>693,8038=>693,8039=>693,
+8040=>852,8041=>909,8042=>1072,8043=>1072,8044=>1032,8045=>1047,8046=>930,8047=>946,8048=>564,8049=>564,
+8050=>416,8051=>416,8052=>506,8053=>506,8054=>270,8055=>270,8056=>510,8057=>510,8058=>504,8059=>504,
+8060=>693,8061=>693,8064=>564,8065=>564,8066=>564,8067=>564,8068=>564,8069=>564,8070=>564,8071=>564,
+8072=>821,8073=>854,8074=>998,8075=>1011,8076=>992,8077=>1001,8078=>866,8079=>858,8080=>506,8081=>506,
+8082=>506,8083=>506,8084=>506,8085=>506,8086=>506,8087=>506,8088=>999,8089=>1044,8090=>1179,8091=>1165,
+8092=>1227,8093=>1229,8094=>1080,8095=>1085,8096=>693,8097=>693,8098=>693,8099=>693,8100=>693,8101=>693,
+8102=>693,8103=>693,8104=>1037,8105=>1113,8106=>1264,8107=>1264,8108=>1219,8109=>1241,8110=>1120,8111=>1132,
+8112=>564,8113=>564,8114=>564,8115=>564,8116=>564,8118=>564,8119=>564,8120=>661,8121=>661,8122=>661,
+8123=>661,8124=>831,8125=>192,8126=>332,8127=>500,8128=>500,8129=>534,8130=>506,8131=>506,8132=>506,
+8134=>506,8135=>506,8136=>611,8137=>816,8138=>889,8139=>908,8140=>881,8141=>500,8142=>500,8143=>500,
+8144=>270,8145=>270,8146=>270,8147=>270,8150=>270,8151=>270,8152=>333,8153=>333,8154=>497,8155=>521,
+8157=>500,8158=>500,8159=>500,8160=>504,8161=>504,8162=>504,8163=>504,8164=>506,8165=>506,8166=>504,
+8167=>504,8168=>676,8169=>676,8170=>905,8171=>901,8172=>783,8173=>333,8174=>333,8175=>500,8178=>693,
+8179=>693,8180=>693,8182=>693,8183=>693,8184=>907,8185=>833,8186=>963,8187=>875,8188=>952,8189=>500,
+8190=>500,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>333,8197=>250,8198=>167,8199=>500,8200=>250,
+8201=>200,8202=>100,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>333,8209=>333,8210=>500,
+8213=>1000,8214=>293,8215=>465,8219=>250,8223=>444,8227=>350,8228=>250,8229=>500,8231=>250,8232=>0,
+8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>250,8241=>1601,8242=>247,8243=>411,
+8244=>611,8245=>220,8246=>440,8247=>660,8248=>469,8251=>629,8252=>666,8253=>500,8254=>500,8255=>953,
+8256=>1000,8257=>314,8258=>931,8259=>333,8260=>167,8261=>480,8262=>480,8263=>1000,8264=>833,8265=>833,
+8266=>500,8267=>453,8268=>453,8269=>450,8270=>500,8271=>278,8272=>882,8273=>500,8274=>497,8275=>500,
+8276=>953,8277=>512,8278=>410,8279=>855,8280=>620,8281=>620,8282=>179,8283=>621,8284=>564,8285=>179,
+8286=>179,8287=>111,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8304=>300,8305=>235,8308=>300,
+8309=>300,8310=>300,8311=>300,8312=>300,8313=>300,8314=>300,8315=>300,8316=>300,8317=>216,8318=>216,
+8319=>318,8320=>300,8321=>250,8322=>300,8323=>300,8324=>300,8325=>300,8326=>300,8327=>300,8328=>300,
+8329=>300,8330=>300,8331=>300,8332=>300,8333=>216,8334=>216,8352=>698,8353=>667,8354=>667,8355=>611,
+8356=>500,8357=>722,8358=>667,8359=>988,8360=>953,8361=>833,8362=>869,8363=>512,8365=>722,8366=>611,
+8369=>589,8370=>619,8371=>722,8372=>556,8373=>611,8400=>0,8401=>0,8402=>0,8403=>0,8404=>0,
+8405=>0,8406=>0,8407=>0,8408=>0,8409=>0,8410=>0,8411=>0,8412=>0,8413=>0,8414=>0,
+8415=>0,8416=>0,8417=>0,8418=>0,8419=>0,8420=>0,8421=>0,8422=>0,8423=>0,8424=>0,
+8425=>0,8426=>0,8427=>0,8428=>0,8429=>0,8430=>0,8431=>0,8432=>0,8448=>664,8449=>665,
+8451=>954,8453=>693,8454=>787,8457=>822,8462=>500,8463=>500,8468=>777,8470=>823,8471=>760,8478=>616,
+8479=>610,8480=>879,8481=>1156,8483=>611,8486=>743,8487=>743,8489=>286,8490=>722,8491=>722,8494=>533,
+8498=>556,8501=>537,8502=>537,8503=>350,8504=>537,8506=>906,8507=>1155,8523=>778,8525=>856,8526=>500,
+8531=>750,8532=>750,8533=>750,8534=>750,8535=>750,8536=>750,8537=>750,8538=>750,8539=>750,8540=>750,
+8541=>750,8542=>750,8543=>750,8544=>339,8545=>678,8546=>1017,8547=>950,8548=>611,8549=>950,8550=>1289,
+8551=>1628,8552=>950,8553=>611,8554=>950,8555=>1289,8556=>556,8557=>667,8558=>722,8559=>828,8560=>278,
+8561=>556,8562=>834,8563=>722,8564=>444,8565=>722,8566=>1000,8567=>1278,8568=>722,8569=>444,8570=>722,
+8571=>1000,8572=>278,8573=>444,8574=>500,8575=>722,8592=>964,8593=>499,8594=>964,8595=>499,8706=>494,
+8710=>612,8721=>713,8722=>675,8723=>675,8725=>750,8730=>549,8734=>677,8747=>416,8748=>750,8749=>1083,
+8750=>722,8751=>750,8800=>564,8804=>675,8805=>675,8992=>686,8993=>686,9251=>500,9674=>494,9676=>791,
+9824=>626,9825=>694,9826=>595,9827=>776,9828=>626,9829=>694,9830=>595,9831=>776,9833=>333,9834=>555,
+9835=>722,9836=>722,9837=>415,9838=>377,9839=>402,11799=>333,64256=>526,64257=>500,64258=>500,64259=>747,
+64260=>748,64262=>665,64285=>350,64286=>0,64287=>537,64288=>537,64297=>564,64298=>537,64299=>537,64300=>537,
+64301=>537,64302=>537,64303=>537,64304=>537,64305=>537,64306=>350,64307=>537,64308=>537,64309=>350,64310=>350,
+64312=>537,64313=>350,64314=>537,64315=>537,64316=>537,64318=>537,64320=>350,64321=>537,64323=>537,64324=>537,
+64326=>537,64327=>537,64328=>537,64329=>537,64330=>537,64331=>350,64332=>537,64333=>537,64334=>537,64335=>537,
+65533=>788);
 $enc='';
 $diff='';
 $file='freeserifi.z';
 $ctg='freeserifi.ctg.z';
-$originalsize=535848;
+$originalsize=629968;
 ?>
\ No newline at end of file
index 66fbfa4194dd279742372b115a6db65acee0d457..c191bde42aae6406b6804bd72c559fcd40c13881 100644 (file)
Binary files a/lib/tcpdf/fonts/freeserifi.z and b/lib/tcpdf/fonts/freeserifi.z differ
index 478ea41c8910eb8a28c09e396c502a2616d622b1..61ab5c553aea89ef9d6cd193284e63b472a0cba5 100644 (file)
-<?php\r
-//============================================================+\r
-// File name   : htmlcolors.php\r
-// Begin       : 2002-04-09\r
-// Last Update : 2008-11-17\r
-// Version     : 1.0.002\r
-// License     : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)\r
-//     ----------------------------------------------------------------------------\r
-//  Copyright (C) 2002-2009  Nicola Asuni - Tecnick.com S.r.l.\r
-//     \r
-//     This program is free software: you can redistribute it and/or modify\r
-//     it under the terms of the GNU Lesser General Public License as published by\r
-//     the Free Software Foundation, either version 2.1 of the License, or\r
-//     (at your option) any later version.\r
-//     \r
-//     This program is distributed in the hope that it will be useful,\r
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-//     GNU Lesser General Public License for more details.\r
-//     \r
-//     You should have received a copy of the GNU Lesser General Public License\r
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
-//     \r
-//     See LICENSE.TXT file for more information.\r
-//  ----------------------------------------------------------------------------\r
-//\r
-// Description : Array of WEB safe colors\r
-//\r
-// Author: Nicola Asuni\r
-//\r
-// (c) Copyright:\r
-//               Nicola Asuni\r
-//               Tecnick.com S.r.l.\r
-//               Via della Pace, 11\r
-//               09044 Quartucciu (CA)\r
-//               ITALY\r
-//               www.tecnick.com\r
-//               info@tecnick.com\r
-//============================================================+\r
-\r
-/**\r
- * Array of WEB safe colors.\r
- * @author Nicola Asuni\r
- * @copyright 2004-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\r
- * @package com.tecnick.tcpdf\r
- * @link http://www.tcpdf.org\r
- * @license http://www.gnu.org/copyleft/lesser.html LGPL\r
- * @since 2.9.000 (2008-03-26)\r
-*/\r
-\r
-/**\r
- * Array of WEB safe colors\r
+<?php
+//============================================================+
+// File name   : htmlcolors.php
+// Begin       : 2002-04-09
+// Last Update : 2009-09-06
+// Version     : 1.0.003
+// License     : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
+//     ----------------------------------------------------------------------------
+//  Copyright (C) 2002-2009  Nicola Asuni - Tecnick.com S.r.l.
+//     
+//     This program is free software: you can redistribute it and/or modify
+//     it under the terms of the GNU Lesser General Public License as published by
+//     the Free Software Foundation, either version 2.1 of the License, or
+//     (at your option) any later version.
+//     
+//     This program is distributed in the hope that it will be useful,
+//     but WITHOUT ANY WARRANTY; without even the implied warranty of
+//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//     GNU Lesser General Public License for more details.
+//     
+//     You should have received a copy of the GNU Lesser General Public License
+//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//     
+//     See LICENSE.TXT file for more information.
+//  ----------------------------------------------------------------------------
+//
+// Description : Array of WEB safe colors
+//
+// Author: Nicola Asuni
+//
+// (c) Copyright:
+//               Nicola Asuni
+//               Tecnick.com S.r.l.
+//               Via della Pace, 11
+//               09044 Quartucciu (CA)
+//               ITALY
+//               www.tecnick.com
+//               info@tecnick.com
+//============================================================+
+
+/**
+ * Array of WEB safe colors.
+ * @author Nicola Asuni
+ * @copyright 2004-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
+ * @package com.tecnick.tcpdf
+ * @link http://www.tcpdf.org
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL
+ * @since 2.9.000 (2008-03-26)
+*/
+
+/**
+ * Array of WEB safe colors
  */
-global $webcolor;\r
-$webcolor = array (\r
-'aliceblue' => 'f0f8ff',\r
-'antiquewhite' => 'faebd7',\r
-'aqua' => '00ffff',\r
-'aquamarine' => '7fffd4',\r
-'azure' => 'f0ffff',\r
-'beige' => 'f5f5dc',\r
-'bisque' => 'ffe4c4',\r
-'black' => '000000',\r
-'blanchedalmond' => 'ffebcd',\r
-'blue' => '0000ff',\r
-'blueviolet' => '8a2be2',\r
-'brown' => 'a52a2a',\r
-'burlywood' => 'deb887',\r
-'cadetblue' => '5f9ea0',\r
-'chartreuse' => '7fff00',\r
-'chocolate' => 'd2691e',\r
-'coral' => 'ff7f50',\r
-'cornflowerblue' => '6495ed',\r
-'cornsilk' => 'fff8dc',\r
-'crimson' => 'dc143c',\r
-'cyan' => '00ffff',\r
-'darkblue' => '00008b',\r
-'darkcyan' => '008b8b',\r
-'darkgoldenrod' => 'b8860b',\r
-'darkgray' => 'a9a9a9',\r
-'darkgrey' => 'a9a9a9',\r
-'darkgreen' => '006400',\r
-'darkkhaki' => 'bdb76b',\r
-'darkmagenta' => '8b008b',\r
-'darkolivegreen' => '556b2f',\r
-'darkorange' => 'ff8c00',\r
-'darkorchid' => '9932cc',\r
-'darkred' => '8b0000',\r
-'darksalmon' => 'e9967a',\r
-'darkseagreen' => '8fbc8f',\r
-'darkslateblue' => '483d8b',\r
-'darkslategray' => '2f4f4f',\r
-'darkslategrey' => '2f4f4f',\r
-'darkturquoise' => '00ced1',\r
-'darkviolet' => '9400d3',\r
-'deeppink' => 'ff1493',\r
-'deepskyblue' => '00bfff',\r
-'dimgray' => '696969',\r
-'dimgrey' => '696969',\r
-'dodgerblue' => '1e90ff',\r
-'firebrick' => 'b22222',\r
-'floralwhite' => 'fffaf0',\r
-'forestgreen' => '228b22',\r
-'fuchsia' => 'ff00ff',\r
-'gainsboro' => 'dcdcdc',\r
-'ghostwhite' => 'f8f8ff',\r
-'gold' => 'ffd700',\r
-'goldenrod' => 'daa520',\r
-'gray' => '808080',\r
-'grey' => '808080',\r
-'green' => '008000',\r
-'greenyellow' => 'adff2f',\r
-'honeydew' => 'f0fff0',\r
-'hotpink' => 'ff69b4',\r
-'indianred ' => 'cd5c5c',\r
-'indigo ' => '4b0082',\r
-'ivory' => 'fffff0',\r
-'khaki' => 'f0e68c',\r
-'lavender' => 'e6e6fa',\r
-'lavenderblush' => 'fff0f5',\r
-'lawngreen' => '7cfc00',\r
-'lemonchiffon' => 'fffacd',\r
-'lightblue' => 'add8e6',\r
-'lightcoral' => 'f08080',\r
-'lightcyan' => 'e0ffff',\r
-'lightgoldenrodyellow' => 'fafad2',\r
-'lightgray' => 'd3d3d3',\r
-'lightgrey' => 'd3d3d3',\r
-'lightgreen' => '90ee90',\r
-'lightpink' => 'ffb6c1',\r
-'lightsalmon' => 'ffa07a',\r
-'lightseagreen' => '20b2aa',\r
-'lightskyblue' => '87cefa',\r
-'lightslategray' => '778899',\r
-'lightslategrey' => '778899',\r
-'lightsteelblue' => 'b0c4de',\r
-'lightyellow' => 'ffffe0',\r
-'lime' => '00ff00',\r
-'limegreen' => '32cd32',\r
-'linen' => 'faf0e6',\r
-'magenta' => 'ff00ff',\r
-'maroon' => '800000',\r
-'mediumaquamarine' => '66cdaa',\r
-'mediumblue' => '0000cd',\r
-'mediumorchid' => 'ba55d3',\r
-'mediumpurple' => '9370d8',\r
-'mediumseagreen' => '3cb371',\r
-'mediumslateblue' => '7b68ee',\r
-'mediumspringgreen' => '00fa9a',\r
-'mediumturquoise' => '48d1cc',\r
-'mediumvioletred' => 'c71585',\r
-'midnightblue' => '191970',\r
-'mintcream' => 'f5fffa',\r
-'mistyrose' => 'ffe4e1',\r
-'moccasin' => 'ffe4b5',\r
-'navajowhite' => 'ffdead',\r
-'navy' => '000080',\r
-'oldlace' => 'fdf5e6',\r
-'olive' => '808000',\r
-'olivedrab' => '6b8e23',\r
-'orange' => 'ffa500',\r
-'orangered' => 'ff4500',\r
-'orchid' => 'da70d6',\r
-'palegoldenrod' => 'eee8aa',\r
-'palegreen' => '98fb98',\r
-'paleturquoise' => 'afeeee',\r
-'palevioletred' => 'd87093',\r
-'papayawhip' => 'ffefd5',\r
-'peachpuff' => 'ffdab9',\r
-'peru' => 'cd853f',\r
-'pink' => 'ffc0cb',\r
-'plum' => 'dda0dd',\r
-'powderblue' => 'b0e0e6',\r
-'purple' => '800080',\r
-'red' => 'ff0000',\r
-'rosybrown' => 'bc8f8f',\r
-'royalblue' => '4169e1',\r
-'saddlebrown' => '8b4513',\r
-'salmon' => 'fa8072',\r
-'sandybrown' => 'f4a460',\r
-'seagreen' => '2e8b57',\r
-'seashell' => 'fff5ee',\r
-'sienna' => 'a0522d',\r
-'silver' => 'c0c0c0',\r
-'skyblue' => '87ceeb',\r
-'slateblue' => '6a5acd',\r
-'slategray' => '708090',\r
-'slategrey' => '708090',\r
-'snow' => 'fffafa',\r
-'springgreen' => '00ff7f',\r
-'steelblue' => '4682b4',\r
-'tan' => 'd2b48c',\r
-'teal' => '008080',\r
-'thistle' => 'd8bfd8',\r
-'tomato' => 'ff6347',\r
-'turquoise' => '40e0d0',\r
-'violet' => 'ee82ee',\r
-'wheat' => 'f5deb3',\r
-'white' => 'ffffff',\r
-'whitesmoke' => 'f5f5f5',\r
-'yellow' => 'ffff00',\r
-'yellowgreen' => '9acd32'\r
-);\r
-\r
-//============================================================+\r
-// END OF FILE                                                 \r
-//============================================================+\r
+global $webcolor;
+$webcolor = array (
+'aliceblue' => 'f0f8ff',
+'antiquewhite' => 'faebd7',
+'aqua' => '00ffff',
+'aquamarine' => '7fffd4',
+'azure' => 'f0ffff',
+'beige' => 'f5f5dc',
+'bisque' => 'ffe4c4',
+'black' => '000000',
+'blanchedalmond' => 'ffebcd',
+'blue' => '0000ff',
+'blueviolet' => '8a2be2',
+'brown' => 'a52a2a',
+'burlywood' => 'deb887',
+'cadetblue' => '5f9ea0',
+'chartreuse' => '7fff00',
+'chocolate' => 'd2691e',
+'coral' => 'ff7f50',
+'cornflowerblue' => '6495ed',
+'cornsilk' => 'fff8dc',
+'crimson' => 'dc143c',
+'cyan' => '00ffff',
+'darkblue' => '00008b',
+'darkcyan' => '008b8b',
+'darkgoldenrod' => 'b8860b',
+'dkgray' => 'a9a9a9',
+'darkgray' => 'a9a9a9',
+'darkgrey' => 'a9a9a9',
+'darkgreen' => '006400',
+'darkkhaki' => 'bdb76b',
+'darkmagenta' => '8b008b',
+'darkolivegreen' => '556b2f',
+'darkorange' => 'ff8c00',
+'darkorchid' => '9932cc',
+'darkred' => '8b0000',
+'darksalmon' => 'e9967a',
+'darkseagreen' => '8fbc8f',
+'darkslateblue' => '483d8b',
+'darkslategray' => '2f4f4f',
+'darkslategrey' => '2f4f4f',
+'darkturquoise' => '00ced1',
+'darkviolet' => '9400d3',
+'deeppink' => 'ff1493',
+'deepskyblue' => '00bfff',
+'dimgray' => '696969',
+'dimgrey' => '696969',
+'dodgerblue' => '1e90ff',
+'firebrick' => 'b22222',
+'floralwhite' => 'fffaf0',
+'forestgreen' => '228b22',
+'fuchsia' => 'ff00ff',
+'gainsboro' => 'dcdcdc',
+'ghostwhite' => 'f8f8ff',
+'gold' => 'ffd700',
+'goldenrod' => 'daa520',
+'gray' => '808080',
+'grey' => '808080',
+'green' => '008000',
+'greenyellow' => 'adff2f',
+'honeydew' => 'f0fff0',
+'hotpink' => 'ff69b4',
+'indianred ' => 'cd5c5c',
+'indigo ' => '4b0082',
+'ivory' => 'fffff0',
+'khaki' => 'f0e68c',
+'lavender' => 'e6e6fa',
+'lavenderblush' => 'fff0f5',
+'lawngreen' => '7cfc00',
+'lemonchiffon' => 'fffacd',
+'lightblue' => 'add8e6',
+'lightcoral' => 'f08080',
+'lightcyan' => 'e0ffff',
+'lightgoldenrodyellow' => 'fafad2',
+'ltgray' => 'd3d3d3',
+'lightgray' => 'd3d3d3',
+'lightgrey' => 'd3d3d3',
+'lightgreen' => '90ee90',
+'lightpink' => 'ffb6c1',
+'lightsalmon' => 'ffa07a',
+'lightseagreen' => '20b2aa',
+'lightskyblue' => '87cefa',
+'lightslategray' => '778899',
+'lightslategrey' => '778899',
+'lightsteelblue' => 'b0c4de',
+'lightyellow' => 'ffffe0',
+'lime' => '00ff00',
+'limegreen' => '32cd32',
+'linen' => 'faf0e6',
+'magenta' => 'ff00ff',
+'maroon' => '800000',
+'mediumaquamarine' => '66cdaa',
+'mediumblue' => '0000cd',
+'mediumorchid' => 'ba55d3',
+'mediumpurple' => '9370d8',
+'mediumseagreen' => '3cb371',
+'mediumslateblue' => '7b68ee',
+'mediumspringgreen' => '00fa9a',
+'mediumturquoise' => '48d1cc',
+'mediumvioletred' => 'c71585',
+'midnightblue' => '191970',
+'mintcream' => 'f5fffa',
+'mistyrose' => 'ffe4e1',
+'moccasin' => 'ffe4b5',
+'navajowhite' => 'ffdead',
+'navy' => '000080',
+'oldlace' => 'fdf5e6',
+'olive' => '808000',
+'olivedrab' => '6b8e23',
+'orange' => 'ffa500',
+'orangered' => 'ff4500',
+'orchid' => 'da70d6',
+'palegoldenrod' => 'eee8aa',
+'palegreen' => '98fb98',
+'paleturquoise' => 'afeeee',
+'palevioletred' => 'd87093',
+'papayawhip' => 'ffefd5',
+'peachpuff' => 'ffdab9',
+'peru' => 'cd853f',
+'pink' => 'ffc0cb',
+'plum' => 'dda0dd',
+'powderblue' => 'b0e0e6',
+'purple' => '800080',
+'red' => 'ff0000',
+'rosybrown' => 'bc8f8f',
+'royalblue' => '4169e1',
+'saddlebrown' => '8b4513',
+'salmon' => 'fa8072',
+'sandybrown' => 'f4a460',
+'seagreen' => '2e8b57',
+'seashell' => 'fff5ee',
+'sienna' => 'a0522d',
+'silver' => 'c0c0c0',
+'skyblue' => '87ceeb',
+'slateblue' => '6a5acd',
+'slategray' => '708090',
+'slategrey' => '708090',
+'snow' => 'fffafa',
+'springgreen' => '00ff7f',
+'steelblue' => '4682b4',
+'tan' => 'd2b48c',
+'teal' => '008080',
+'thistle' => 'd8bfd8',
+'tomato' => 'ff6347',
+'turquoise' => '40e0d0',
+'violet' => 'ee82ee',
+'wheat' => 'f5deb3',
+'white' => 'ffffff',
+'whitesmoke' => 'f5f5f5',
+'yellow' => 'ffff00',
+'yellowgreen' => '9acd32'
+);
+
+//============================================================+
+// END OF FILE                                                 
+//============================================================+
 ?>
similarity index 60%
rename from lib/tcpdf/README-MOODLE.TXT
rename to lib/tcpdf/readme_moodle.txt
index df4d09a2f101b8d08bcd368d0861c38637255ccc..ae2a2dca9892740aabd880fd6298e414c0323373 100644 (file)
@@ -1,8 +1,18 @@
-Moodle-specific changes to TCPDF are tracked here.
-==================================================
+Description of TCPDF library import
+===================================
+* delete cache/ doc/ examples/ config/tcpdf_config_alt.php config/lang/ images/
+* remove all fonts but the core ones (courier.php, helveticabi.php,
+    helveticab.php, helveticai.php, helvetica.php, symbol.php, timesbi.php,
+    timesb.php, timesi.php, times.php, zapfdingbats.php) and FreeFont
+* remove font/utils/
+
+2009/11/19
+----------
+Upgrade to tcpdf_php5 TCPDF 4.8.014 (MDL-20888)
+by David Mudrak <david.mudrak@gmail.com>
 
-2008/07/20
-==========
+2009/07/20
+----------
 Upgrade to tcpdf_php5 TCPDF 4.6.020 (MDL-19876)
 by David Mudrak <david.mudrak@gmail.com>
 
@@ -17,7 +27,7 @@ by David Mudrak <david.mudrak@gmail.com>
     TCPDF at all. Credit to Chardelle Busch for this solution in MDL-17179
 
 2008/07/29
-==========
+----------
 Upgrade to tcpdf_php5 TCPDF 4.0.015 (MDL-15055)
 by David Mudrak <david.mudrak@gmail.com>
 
@@ -28,25 +38,3 @@ by David Mudrak <david.mudrak@gmail.com>
     K_PATH_URL_CACHE can't be mapped in Moodle as datadir should not be
     accessible directly. However, it doesn't seem to be used within the
     library code.
-
-
-
-18 Nov 2009
-Description of modifications to remove ereg related functions deprecated as of php 5.3. Patch below.
-
-Index: tcpdf.php
-===================================================================
-RCS file: /cvsroot/moodle/moodle/lib/tcpdf/tcpdf.php,v
-retrieving revision 1.3
-diff -u -r1.3 tcpdf.php
---- tcpdf.php  20 Jul 2009 17:31:48 -0000      1.3
-+++ tcpdf.php  18 Nov 2009 05:48:56 -0000
-@@ -7595,7 +7595,7 @@
-                       if (isset($dash)) {\r
-                               $dash_string = '';\r
-                               if ($dash) {\r
--                                      if (ereg('^.+,', $dash)) {\r
-+                                      if (preg_match('/^.+,/', $dash)) {\r
-                                               $tab = explode(',', $dash);\r
-                                       } else {\r
-                                               $tab = array($dash);\r
diff --git a/lib/tcpdf/tcpdf.crt b/lib/tcpdf/tcpdf.crt
new file mode 100644 (file)
index 0000000..f049139
--- /dev/null
@@ -0,0 +1,40 @@
+Bag Attributes
+    localKeyID: 7B AB 1B 7A BE 4C 85 C0 1A A6 DC 59 3F 79 48 C3 93 38 68 9C 
+subject=/CN=TCPDF DEMO/O=TCPDF/OU=DEMO/emailAddress=you@example.com/C=IT
+issuer=/CN=TCPDF DEMO/O=TCPDF/OU=DEMO/emailAddress=you@example.com/C=IT
+-----BEGIN CERTIFICATE-----
+MIIC1TCCAj6gAwIBAgIKkehOL/XGkB5cjjANBgkqhkiG9w0BAQUFADBhMRMwEQYD
+VQQDEwpUQ1BERiBERU1PMQ4wDAYDVQQKEwVUQ1BERjENMAsGA1UECxMEREVNTzEe
+MBwGCSqGSIb3DQEJARYPeW91QGV4YW1wbGUuY29tMQswCQYDVQQGEwJJVDAeFw0w
+OTA4MjExMjU0NDhaFw0xNDA4MjExMjU0NDhaMGExEzARBgNVBAMTClRDUERGIERF
+TU8xDjAMBgNVBAoTBVRDUERGMQ0wCwYDVQQLEwRERU1PMR4wHAYJKoZIhvcNAQkB
+Fg95b3VAZXhhbXBsZS5jb20xCzAJBgNVBAYTAklUMIGfMA0GCSqGSIb3DQEBAQUA
+A4GNADCBiQKBgQDAqIL0uGKmTR98Lxx2vEEE1OGKkMXFo0JViitALe7Onhxxqx0H
+XMUDKF5mvEVu1rcvh7/oAnAfrCuEpL/up3u1mQCgBE7WXBnFFE/AE3jCksh9OkS0
+Z0Xj9woN5bzxRDsGoPiOu/4xzk5qSEXt8jf2Ep90QuNkqLIRT4swAzpDbwIDAQAB
+o4GTMIGQMDcGA1UdEgQwMC6gEQYDVQQDDApUQ1BERiBERU1PoAwGA1UECgwFVENQ
+REagCwYDVQQLDARERU1PMDcGA1UdEQQwMC6gEQYDVQQDDApUQ1BERiBERU1PoAwG
+A1UECgwFVENQREagCwYDVQQLDARERU1PMA8GCSqGSIb3LwEBCgQCBQAwCwYDVR0P
+BAQDAgSQMA0GCSqGSIb3DQEBBQUAA4GBAEhTQfqX3ZNdHmpTLDbIj22RHXii2roE
+OavCbu9WsHoWpva0qSd+yIoD594VHvYAd29sfzDfiN+7W0aiZfDhq5jpaSQMVlN8
+RGYMupbHY/+a9Gz1wqxnR84mlTtIkZVRYAhsfPwy6M1BEjdMqfdh9h40JIdkdjtb
+8faTCfXPePWQ
+-----END CERTIFICATE-----
+Bag Attributes
+    localKeyID: 7B AB 1B 7A BE 4C 85 C0 1A A6 DC 59 3F 79 48 C3 93 38 68 9C 
+Key Attributes: <No Attributes>
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDAqIL0uGKmTR98Lxx2vEEE1OGKkMXFo0JViitALe7Onhxxqx0H
+XMUDKF5mvEVu1rcvh7/oAnAfrCuEpL/up3u1mQCgBE7WXBnFFE/AE3jCksh9OkS0
+Z0Xj9woN5bzxRDsGoPiOu/4xzk5qSEXt8jf2Ep90QuNkqLIRT4swAzpDbwIDAQAB
+AoGAXc+wNMmz/5Z+RlIKYia44klmqbplEx+0JULqXI4BQsrqvs67i+I4bJkznoL+
+rEIRYSuQ3sCRKFsFtckjTGpxadnxkB+uwGKc6pZChv99BFX6HFR4hgBlT/BBRAQA
+hMDlM2JIRr4S4SMVXR7MHwGMUf9mUeanGLR3ZWtU3aXJrIECQQD7OaYUVYNEEnM9
+uXyjm22CuHyqyEf5gb13sK0uQty67547yJTMUQZd/sQc9KGwhzBbhrob2LO2jAhh
+S+f+NSRnAkEAxFHm3fMI5RgXmswxlGm4QW07a/Ueo7ZJG6xjTkFXluJhd+XHswRD
+dQIO3zG9nGjNUoeMrPhXhPvKqFc2F9RDuQJAQBEGin74N77gxqfr4ik79y8nE8J5
+oGZ2s/RJZdfFRKLg3mwbjjNHhWb4Ck5UgZkoOt8TzRApXG8/n9hktE5HFwJBALur
+M5AueO1Pl5kB489lNJ9OxUQRYUXMxpxuscuoCQwSwmv0O2+0/qtG2WKhUQnI4aYo
+L+FV0YwtivBb1jj3T/kCQQDIWOxq8eRowdaMzvJpRUHFgMcf1AVZExKyrugwYOWd
+KNsDxC4KaQOsPt8iT/Ulo4g/MJC0HolCOhWibKmR9Ayl
+-----END RSA PRIVATE KEY-----
diff --git a/lib/tcpdf/tcpdf.fdf b/lib/tcpdf/tcpdf.fdf
new file mode 100644 (file)
index 0000000..a8f7c35
Binary files /dev/null and b/lib/tcpdf/tcpdf.fdf differ
diff --git a/lib/tcpdf/tcpdf.pem b/lib/tcpdf/tcpdf.pem
deleted file mode 100644 (file)
index 0727730..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQDCYF2R29GgR2rQ8sMpzopD3JKS5WRXntRV2pRq3tz3ae6nMjEb
-7iay/9YtzXanyistJ9T4tLpzyBmh70AX9EDJz5P0reJc2jHwVYYYQR42SUTR+Myl
-s1PQJ+Sw12D9/SflfS+9LBCOyFPNYpdl1evYPPQzzbinpg9deVVUhbl5pQIDAQAB
-AoGBALWpXontSXNki74QxLmT4MEfqpVDco45UPWUPVXMR/Oru3HjhOY3o09zr3ZL
-KnQSjFu9eFugfQmsn9gqRFqe2tSfvBw6p1ENK8yQyswlBf8P6FD3mPwCp1pUQAe2
-5bKXvPEJw+2uFkH08zygu7+n9UPlPOerA4v/xN222w1PTN1ZAkEA8VnT3pRY0J6A
-isizyvkV4CWMrSNsukBnHeefS3AMsvno8Tfwa0oCMXxP89Ko6AmtbQAgDaTsfqra
-e1PQ/BkFZwJBAM4soveqL3P1rusEbMNO3RgzEedVlQriL/SwFsaO6H1qPp+GQEB2
-XiHXdVMMQe71PDKDYhnsw8IiW/kDJKaqdRMCQQDEdn7FHLT/fUbdsmrIuuJXx7kv
-5zpGks5dxYIiAmAUAOLiGMsYSvJmHe9nZwAfgmEt7YAqGyp4IdQfuCbST/vZAkBm
-P7DazuYVxkRnfZxLCDOSKtG4PrNZ4G8UFLhW5MzcVfKUvsnirlFkyyv+cdfJIIoo
-Kwxd+xPilZOzXSGyHltNAkBq3bhxYu3hj354n/VxMrUnL6KWwvYXFVow/KOLmX8v
-MndvSovNX0V5UL+851xKqBPyYcfjWia5WSwbVtgmTDsi
------END RSA PRIVATE KEY-----
------BEGIN CERTIFICATE-----
-MIIDYjCCAsugAwIBAgIJANd0jxvex4IPMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNV
-BAYTAklUMQ4wDAYDVQQIEwVUQ1BERjEOMAwGA1UEBxMFVENQREYxDjAMBgNVBAoT
-BVRDUERGMQ4wDAYDVQQLEwVUQ1BERjEOMAwGA1UEAxMFVENQREYxHzAdBgkqhkiG
-9w0BCQEWEGluZm9AdGVjbmljay5jb20wIBcNMDkwNDI1MDgzNTQ5WhgPMTkxOTEx
-MDIwNDQ5NDFaMH4xCzAJBgNVBAYTAklUMQ4wDAYDVQQIEwVUQ1BERjEOMAwGA1UE
-BxMFVENQREYxDjAMBgNVBAoTBVRDUERGMQ4wDAYDVQQLEwVUQ1BERjEOMAwGA1UE
-AxMFVENQREYxHzAdBgkqhkiG9w0BCQEWEGluZm9AdGVjbmljay5jb20wgZ8wDQYJ
-KoZIhvcNAQEBBQADgY0AMIGJAoGBAMJgXZHb0aBHatDywynOikPckpLlZFee1FXa
-lGre3Pdp7qcyMRvuJrL/1i3NdqfKKy0n1Pi0unPIGaHvQBf0QMnPk/St4lzaMfBV
-hhhBHjZJRNH4zKWzU9An5LDXYP39J+V9L70sEI7IU81il2XV69g89DPNuKemD115
-VVSFuXmlAgMBAAGjgeUwgeIwHQYDVR0OBBYEFK02kBpw12Co/GkW9AjG71dmpMkj
-MIGyBgNVHSMEgaowgaeAFK02kBpw12Co/GkW9AjG71dmpMkjoYGDpIGAMH4xCzAJ
-BgNVBAYTAklUMQ4wDAYDVQQIEwVUQ1BERjEOMAwGA1UEBxMFVENQREYxDjAMBgNV
-BAoTBVRDUERGMQ4wDAYDVQQLEwVUQ1BERjEOMAwGA1UEAxMFVENQREYxHzAdBgkq
-hkiG9w0BCQEWEGluZm9AdGVjbmljay5jb22CCQDXdI8b3seCDzAMBgNVHRMEBTAD
-AQH/MA0GCSqGSIb3DQEBBQUAA4GBABntFkyJVLt0HID8LZ5f+NHDmZx1UKo8Q6z0
-RCX3oYyRENLgAhZ9ep7Iz3bu0Pxg7H7tJROuATSHgMvbiRy9gGORWOhoEYOZ3Tau
-fbs69oQqs5m/GehmmiB8gehMZxUbY8ORPZJzvgr/HsXrsVcctSjXzziLgsrqvy7g
-bdkZ7dhT
------END CERTIFICATE-----
index 995ebdfd245a2e1bdd0f3e9c743da27314c78519..cbed80c1a8f90a9a96f4fb33c4b9a55c85504ff7 100755 (executable)
-<?php\r
-//============================================================+\r
-// File name   : tcpdf.php\r
-// Begin       : 2002-08-03\r
-// Last Update : 2009-07-16\r
-// Author      : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org\r
-// Version     : 4.6.020\r
-// License     : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)\r
-//     ----------------------------------------------------------------------------\r
-//  Copyright (C) 2002-2009  Nicola Asuni - Tecnick.com S.r.l.\r
-//     \r
-//     This program is free software: you can redistribute it and/or modify\r
-//     it under the terms of the GNU Lesser General Public License as published by\r
-//     the Free Software Foundation, either version 2.1 of the License, or\r
-//     (at your option) any later version.\r
-//     \r
-//     This program is distributed in the hope that it will be useful,\r
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-//     GNU Lesser General Public License for more details.\r
-//     \r
-//     You should have received a copy of the GNU Lesser General Public License\r
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
-//     \r
-//     See LICENSE.TXT file for more information.\r
-//  ----------------------------------------------------------------------------\r
-//\r
-// Description : This is a PHP class for generating PDF documents without \r
-//               requiring external extensions.\r
-//\r
-// NOTE:\r
-// This class was originally derived in 2002 from the Public \r
-// Domain FPDF class by Olivier Plathey (http://www.fpdf.org), \r
-// but now is almost entirely rewritten.\r
-//\r
-// Main features:\r
-//  * no external libraries are required for the basic functions;\r
+<?php
+//============================================================+
+// File name   : tcpdf.php
+// Begin       : 2002-08-03
+// Last Update : 2009-11-04
+// Author      : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org
+// Version     : 4.8.014
+// License     : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
+//     ----------------------------------------------------------------------------
+//  Copyright (C) 2002-2009  Nicola Asuni - Tecnick.com S.r.l.
+//     
+//     This program is free software: you can redistribute it and/or modify
+//     it under the terms of the GNU Lesser General Public License as published by
+//     the Free Software Foundation, either version 2.1 of the License, or
+//     (at your option) any later version.
+//     
+//     This program is distributed in the hope that it will be useful,
+//     but WITHOUT ANY WARRANTY; without even the implied warranty of
+//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//     GNU Lesser General Public License for more details.
+//     
+//     You should have received a copy of the GNU Lesser General Public License
+//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//     
+//     See LICENSE.TXT file for more information.
+//  ----------------------------------------------------------------------------
+//
+// Description : This is a PHP class for generating PDF documents without 
+//               requiring external extensions.
+//
+// NOTE:
+// This class was originally derived in 2002 from the Public 
+// Domain FPDF class by Olivier Plathey (http://www.fpdf.org), 
+// but now is almost entirely rewritten.
+//
+// Main features:
+//  * no external libraries are required for the basic functions;
 //     * supports all ISO page formats;
-//     * supports custom page formats, margins and units of measure;\r
+//     * supports custom page formats, margins and units of measure;
 //     * supports UTF-8 Unicode and Right-To-Left languages;
-//     * supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;\r
-//     * supports document encryption;\r
-//     * includes methods to publish some XHTML code;\r
-//     * includes graphic (geometric) and transformation methods;\r
-//     * includes Javascript and forms support;\r
+//     * supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
+//     * supports document encryption;
+//     * includes methods to publish some XHTML code, including forms;
+//     * includes graphic (geometric) and transformation methods;
+//     * includes Javascript and Forms support;
 //     * includes a method to print various barcode formats: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS;
 //     * includes methods to set Bookmarks and print a Table of Content;
-//     * includes methods to move and delete pages;\r
-//     * includes methods for automatic page header and footer management;\r
-//     * supports automatic page break;\r
-//     * supports automatic page numbering and page groups;\r
-//     * supports automatic line break and text justification;\r
-//     * supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)\r
-//     * supports stroke and clipping mode for text;\r
-//     * supports clipping masks;\r
-//     * supports Grayscale, RGB, CMYK, Spot Colors and Transparencies;\r
-//     * supports several annotations, including links, text and file attachments;\r
+//     * includes methods to move and delete pages;
+//     * includes methods for automatic page header and footer management;
+//     * supports automatic page break;
+//     * supports automatic page numbering and page groups;
+//     * supports automatic line break and text justification;
+//     * supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)
+//     * supports stroke and clipping mode for text;
+//     * supports clipping masks;
+//     * supports Grayscale, RGB, CMYK, Spot Colors and Transparencies;
+//     * supports several annotations, including links, text and file attachments;
 //     * supports page compression (requires zlib extension);
 //  * supports text hyphenation.
-//  * supports transactions to UNDO commands.\r
-//\r
-// -----------------------------------------------------------\r
-// THANKS TO:\r
-// \r
-// Olivier Plathey (http://www.fpdf.org) for original FPDF.\r
-// Efthimios Mavrogeorgiadis (emavro@yahoo.com) for suggestions on RTL language support.\r
-// Klemen Vodopivec (http://www.fpdf.de/downloads/addons/37/) for Encryption algorithm.\r
-// Warren Sherliker (wsherliker@gmail.com) for better image handling.\r
-// dullus for text Justification.\r
-// Bob Vincent (pillarsdotnet@users.sourceforge.net) for <li> value attribute.\r
-// Patrick Benny for text stretch suggestion on Cell().\r
-// Johannes Güntert for JavaScript support.\r
-// Denis Van Nuffelen for Dynamic Form.\r
-// Jacek Czekaj for multibyte justification\r
-// Anthony Ferrara for the reintroduction of legacy image methods.\r
-// Sourceforge user 1707880 (hucste) for line-trough mode.\r
-// Larry Stanbery for page groups.\r
-// Martin Hall-May for transparency.\r
-// Aaron C. Spike for Polycurve method.\r
-// Mohamad Ali Golkar, Saleh AlMatrafe, Charles Abbott for Arabic and Persian support.\r
-// Moritz Wagner and Andreas Wurmser for graphic functions.\r
-// Andrew Whitehead for core fonts support.\r
-// Esteban Joël Marín for OpenType font conversion.\r
+//  * supports transactions to UNDO commands.
+//  * supports signature certifications.
+//
+// -----------------------------------------------------------
+// THANKS TO:
+// 
+// Olivier Plathey (http://www.fpdf.org) for original FPDF.
+// Efthimios Mavrogeorgiadis (emavro@yahoo.com) for suggestions on RTL language support.
+// Klemen Vodopivec (http://www.fpdf.de/downloads/addons/37/) for Encryption algorithm.
+// Warren Sherliker (wsherliker@gmail.com) for better image handling.
+// dullus for text Justification.
+// Bob Vincent (pillarsdotnet@users.sourceforge.net) for <li> value attribute.
+// Patrick Benny for text stretch suggestion on Cell().
+// Johannes Güntert for JavaScript support.
+// Denis Van Nuffelen for Dynamic Form.
+// Jacek Czekaj for multibyte justification
+// Anthony Ferrara for the reintroduction of legacy image methods.
+// Sourceforge user 1707880 (hucste) for line-trough mode.
+// Larry Stanbery for page groups.
+// Martin Hall-May for transparency.
+// Aaron C. Spike for Polycurve method.
+// Mohamad Ali Golkar, Saleh AlMatrafe, Charles Abbott for Arabic and Persian support.
+// Moritz Wagner and Andreas Wurmser for graphic functions.
+// Andrew Whitehead for core fonts support.
+// Esteban Joël Marín for OpenType font conversion.
 // Teus Hagen for several suggestions and fixes.
 // Yukihiro Nakadaira for CID-0 CJK fonts fixes.
 // Kosmas Papachristos for some CSS improvements.
 // Marcel Partap for some fixes.
-// Won Kyu Park for several suggestions, fixes and patches.\r
-// Anyone that has reported a bug or sent a suggestion.\r
-//============================================================+\r
-\r
-/**\r
- * This is a PHP class for generating PDF documents without requiring external extensions.<br>\r
- * TCPDF project (http://www.tcpdf.org) was originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br>\r
- * <h3>TCPDF main features are:</h3>\r
- * <ul>\r
+// Won Kyu Park for several suggestions, fixes and patches.
+// Anyone that has reported a bug or sent a suggestion.
+//============================================================+
+
+/**
+ * This is a PHP class for generating PDF documents without requiring external extensions.<br>
+ * TCPDF project (http://www.tcpdf.org) was originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br>
+ * <h3>TCPDF main features are:</h3>
+ * <ul>
 * <li>no external libraries are required for the basic functions;</li>
 * <li>supports all ISO page formats;</li>
 * <li>supports custom page formats, margins and units of measure;</li>
 * <li>supports UTF-8 Unicode and Right-To-Left languages;</li>
 * <li>supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;</li>
 * <li>supports document encryption;</li>
-* <li>includes methods to publish some XHTML code;</li>
+* <li>includes methods to publish some XHTML code, including forms;</li>
 * <li>includes graphic (geometric) and transformation methods;</li>
-* <li>includes Javascript and forms support;</li>
+* <li>includes Javascript and Forms support;</li>
 * <li>includes a method to print various barcode formats: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS;</li>
 * <li>includes methods to set Bookmarks and print a Table of Content;</li>
 * <li>includes methods to move and delete pages;</li>
 * <li>supports several annotations, including links, text and file attachments;</li>
 * <li>supports page compression (requires zlib extension);</li>
 * <li>supports text hyphenation.</li>
-* <li>supports transactions to UNDO commands.</li>\r
- * </ul>\r
- * Tools to encode your unicode fonts are on fonts/utils directory.</p>\r
- * @package com.tecnick.tcpdf\r
- * @abstract Class for generating PDF files on-the-fly without requiring external extensions.\r
- * @author Nicola Asuni\r
- * @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\r
- * @link http://www.tcpdf.org\r
- * @license http://www.gnu.org/copyleft/lesser.html LGPL\r
- * @version 4.6.020\r
- */\r
-\r
-/**\r
- * main configuration file\r
- */\r
-require_once(dirname(__FILE__).'/config/tcpdf_config.php');\r
-
-// includes some support files\r
-\r
-/**\r
- * unicode data\r
- */\r
+* <li>supports transactions to UNDO commands.</li>
+* <li>supports signature certifications.</li>
+ * </ul>
+ * Tools to encode your unicode fonts are on fonts/utils directory.</p>
+ * @package com.tecnick.tcpdf
+ * @abstract Class for generating PDF files on-the-fly without requiring external extensions.
+ * @author Nicola Asuni
+ * @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.8.014
+ */
+
+/**
+ * main configuration file
+ */
+require_once(dirname(__FILE__).'/config/tcpdf_config.php');
+
+// includes some support files
+
+/**
+ * unicode data
+ */
 require_once(dirname(__FILE__).'/unicode_data.php');
-\r
-/**\r
- * html colors table\r
- */\r
+
+/**
+ * html colors table
+ */
 require_once(dirname(__FILE__).'/htmlcolors.php');
-\r
-if (!class_exists('TCPDF', false)) {\r
-       /**\r
-        * define default PDF document producer\r
-        */ \r
-       define('PDF_PRODUCER', 'TCPDF 4.6.020 (http://www.tcpdf.org)');\r
-       \r
-       /**\r
-       * This is a PHP class for generating PDF documents without requiring external extensions.<br>\r
-       * 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.<br>\r
-       * @name TCPDF\r
-       * @package com.tecnick.tcpdf\r
-       * @version 4.6.020\r
-       * @author Nicola Asuni - info@tecnick.com\r
-       * @link http://www.tcpdf.org\r
-       * @license http://www.gnu.org/copyleft/lesser.html LGPL\r
-       */\r
-       class TCPDF {\r
-               \r
-               // protected or Protected properties\r
-\r
-               /**\r
-               * @var current page number\r
-               * @access protected\r
-               */\r
-               protected $page;\r
-               \r
-               /**\r
-               * @var current object number\r
-               * @access protected\r
-               */\r
-               protected $n;\r
-\r
-               /**\r
-               * @var array of object offsets\r
-               * @access protected\r
-               */\r
-               protected $offsets;\r
-\r
-               /**\r
-               * @var buffer holding in-memory PDF\r
-               * @access protected\r
-               */\r
-               protected $buffer;\r
-\r
-               /**\r
-               * @var array containing pages\r
-               * @access protected\r
-               */\r
-               protected $pages = array();\r
-\r
-               /**\r
-               * @var current document state\r
-               * @access protected\r
-               */\r
-               protected $state;\r
-\r
-               /**\r
-               * @var compression flag\r
-               * @access protected\r
-               */\r
-               protected $compress;\r
-               \r
-               /**\r
-               * @var current page orientation (P = Portrait, L = Landscape)\r
-               * @access protected\r
-               */\r
-               protected $CurOrientation;\r
-\r
-               /**\r
-               * @var array that stores page dimensions and graphic status.<ul><li>$this->pagedim[$this->page]['w'] => page_width_in_points</li><li>$this->pagedim[$this->page]['h'] => height in points</li><li>$this->pagedim[$this->page]['wk'] => page_width_in_points</li><li>$this->pagedim[$this->page]['hk'] => height</li><li>$this->pagedim[$this->page]['tm'] => top_margin</li><li>$this->pagedim[$this->page]['bm'] => bottom_margin</li><li>$this->pagedim[$this->page]['lm'] => left_margin</li><li>$this->pagedim[$this->page]['rm'] => right_margin</li><li>$this->pagedim[$this->page]['pb'] => auto_page_break</li><li>$this->pagedim[$this->page]['or'] => page_orientation</li><li>$this->pagedim[$this->page]['olm'] => original_left_margin</li><li>$this->pagedim[$this->page]['orm'] => original_right_margin</li></ul>\r
-               * @access protected\r
-               */\r
-               protected $pagedim = array();\r
-\r
-               /**\r
-               * @var scale factor (number of points in user unit)\r
-               * @access protected\r
-               */\r
-               protected $k;\r
-\r
-               /**\r
-               * @var width of page format in points\r
-               * @access protected\r
-               */\r
-               protected $fwPt;\r
-\r
-               /**\r
-               * @var height of page format in points\r
-               * @access protected\r
-               */\r
-               protected $fhPt;\r
-\r
-               /**\r
-               * @var current width of page in points\r
-               * @access protected\r
-               */\r
-               protected $wPt;\r
-\r
-               /**\r
-               * @var current height of page in points\r
-               * @access protected\r
-               */\r
-               protected $hPt;\r
-\r
-               /**\r
-               * @var current width of page in user unit\r
-               * @access protected\r
-               */\r
-               protected $w;\r
-\r
-               /**\r
-               * @var current height of page in user unit\r
-               * @access protected\r
-               */\r
-               protected $h;\r
-\r
-               /**\r
-               * @var left margin\r
-               * @access protected\r
-               */\r
-               protected $lMargin;\r
-\r
-               /**\r
-               * @var top margin\r
-               * @access protected\r
-               */\r
-               protected $tMargin;\r
-\r
-               /**\r
-               * @var right margin\r
-               * @access protected\r
-               */\r
-               protected $rMargin;\r
-\r
-               /**\r
-               * @var page break margin\r
-               * @access protected\r
-               */\r
-               protected $bMargin;\r
-\r
-               /**\r
-               * @var cell internal padding\r
-               * @access protected\r
-               */\r
-               //protected
-               public $cMargin;\r
-               \r
-               /**\r
-               * @var cell internal padding (previous value)\r
-               * @access protected\r
-               */\r
-               protected $oldcMargin;\r
-\r
-               /**\r
-               * @var current horizontal position in user unit for cell positioning\r
-               * @access protected\r
-               */\r
-               protected $x;\r
-\r
-               /**\r
-               * @var current vertical position in user unit for cell positioning\r
-               * @access protected\r
-               */\r
-               protected $y;\r
-\r
-               /**\r
-               * @var height of last cell printed\r
-               * @access protected\r
-               */\r
-               protected $lasth;\r
-\r
-               /**\r
-               * @var line width in user unit\r
-               * @access protected\r
-               */\r
-               protected $LineWidth;\r
-\r
-               /**\r
-               * @var array of standard font names\r
-               * @access protected\r
-               */\r
-               protected $CoreFonts;\r
-\r
-               /**\r
-               * @var array of used fonts\r
-               * @access protected\r
-               */\r
-               protected $fonts = array();\r
-\r
-               /**\r
-               * @var array of font files\r
-               * @access protected\r
-               */\r
-               protected $FontFiles = array();\r
-\r
-               /**\r
-               * @var array of encoding differences\r
-               * @access protected\r
-               */\r
-               protected $diffs = array();\r
-\r
-               /**\r
-               * @var array of used images\r
-               * @access protected\r
-               */\r
-               protected $images = array();\r
-\r
-               /**\r
-               * @var array of Annotations in pages\r
-               * @access protected\r
-               */\r
-               protected $PageAnnots = array();\r
-\r
-               /**\r
-               * @var array of internal links\r
-               * @access protected\r
-               */\r
-               protected $links = array();\r
-\r
-               /**\r
-               * @var current font family\r
-               * @access protected\r
-               */\r
-               protected $FontFamily;\r
-\r
-               /**\r
-               * @var current font style\r
-               * @access protected\r
-               */\r
-               protected $FontStyle;\r
-               \r
-               /**\r
-               * @var current font ascent (distance between font top and baseline)\r
-               * @access protected\r
-               * @since 2.8.000 (2007-03-29)\r
-               */\r
-               protected $FontAscent;\r
-               \r
-               /**\r
-               * @var current font descent (distance between font bottom and baseline)\r
-               * @access protected\r
-               * @since 2.8.000 (2007-03-29)\r
-               */\r
-               protected $FontDescent;\r
-\r
-               /**\r
-               * @var underlining flag\r
-               * @access protected\r
-               */\r
-               protected $underline;\r
-\r
-               /**\r
-               * @var current font info\r
-               * @access protected\r
-               */\r
-               protected $CurrentFont;\r
-\r
-               /**\r
-               * @var current font size in points\r
-               * @access protected\r
-               */\r
-               protected $FontSizePt;\r
-\r
-               /**\r
-               * @var current font size in user unit\r
-               * @access protected\r
-               */\r
-               protected $FontSize;\r
-\r
-               /**\r
-               * @var commands for drawing color\r
-               * @access protected\r
-               */\r
-               protected $DrawColor;\r
-\r
-               /**\r
-               * @var commands for filling color\r
-               * @access protected\r
-               */\r
-               protected $FillColor;\r
-\r
-               /**\r
-               * @var commands for text color\r
-               * @access protected\r
-               */\r
-               protected $TextColor;\r
-\r
-               /**\r
-               * @var indicates whether fill and text colors are different\r
-               * @access protected\r
-               */\r
-               protected $ColorFlag;\r
-\r
-               /**\r
-               * @var automatic page breaking\r
-               * @access protected\r
-               */\r
-               protected $AutoPageBreak;\r
-\r
-               /**\r
-               * @var threshold used to trigger page breaks\r
-               * @access protected\r
-               */\r
-               protected $PageBreakTrigger;\r
-\r
-               /**\r
-               * @var flag set when processing footer\r
-               * @access protected\r
-               */\r
-               protected $InFooter = false;\r
-\r
-               /**\r
-               * @var zoom display mode\r
-               * @access protected\r
-               */\r
-               protected $ZoomMode;\r
-\r
-               /**\r
-               * @var layout display mode\r
-               * @access protected\r
-               */\r
-               protected $LayoutMode;\r
-\r
-               /**\r
-               * @var title\r
-               * @access protected\r
-               */\r
-               protected $title = '';\r
-\r
-               /**\r
-               * @var subject\r
-               * @access protected\r
-               */\r
-               protected $subject = '';\r
-\r
-               /**\r
-               * @var author\r
-               * @access protected\r
-               */\r
-               protected $author = '';\r
-\r
-               /**\r
-               * @var keywords\r
-               * @access protected\r
-               */\r
-               protected $keywords = '';\r
-\r
-               /**\r
-               * @var creator\r
-               * @access protected\r
-               */\r
-               protected $creator = '';\r
-\r
-               /**\r
-               * @var alias for total number of pages\r
-               * @access protected\r
-               */\r
-               protected $AliasNbPages = '{nb}';
-               \r
-               /**\r
-               * @var alias for page number\r
-               * @access protected\r
-               */\r
-               protected $AliasNumPage = '{pnb}';
-               \r
-               /**\r
-               * @var right-bottom corner X coordinate of inserted image\r
-               * @since 2002-07-31\r
-               * @author Nicola Asuni\r
-               * @access protected\r
-               */\r
-               protected $img_rb_x;\r
-\r
-               /**\r
-               * @var right-bottom corner Y coordinate of inserted image\r
-               * @since 2002-07-31\r
-               * @author Nicola Asuni\r
-               * @access protected\r
-               */\r
-               protected $img_rb_y;\r
-\r
-               /**\r
-               * @var adjusting factor to convert pixels to user units.\r
-               * @since 2004-06-14\r
-               * @author Nicola Asuni\r
-               * @access protected\r
-               */\r
-               protected $imgscale = 1;\r
-\r
-               /**\r
-               * @var boolean set to true when the input text is unicode (require unicode fonts)\r
-               * @since 2005-01-02\r
-               * @author Nicola Asuni\r
-               * @access protected\r
-               */\r
-               protected $isunicode = false;\r
-\r
-               /**\r
-               * @var PDF version\r
-               * @since 1.5.3\r
-               * @access protected\r
-               */\r
-               protected $PDFVersion = '1.7';\r
-               \r
-               \r
-               // ----------------------\r
-               \r
-               /**\r
-                * @var Minimum distance between header and top page margin.\r
-                * @access protected\r
-                */\r
-               protected $header_margin;\r
-               \r
-               /**\r
-                * @var Minimum distance between footer and bottom page margin.\r
-                * @access protected\r
-                */\r
-               protected $footer_margin;\r
-               \r
-               /**\r
-                * @var original left margin value\r
-                * @access protected\r
-                * @since 1.53.0.TC013\r
-                */\r
-               protected $original_lMargin;\r
-               \r
-               /**\r
-                * @var original right margin value\r
-                * @access protected\r
-                * @since 1.53.0.TC013\r
-                */\r
-               protected $original_rMargin;\r
-                       \r
-               /**\r
-                * @var Header font.\r
-                * @access protected\r
-                */\r
-               protected $header_font;\r
-               \r
-               /**\r
-                * @var Footer font.\r
-                * @access protected\r
-                */\r
-               protected $footer_font;\r
-               \r
-               /**\r
-                * @var Language templates.\r
-                * @access protected\r
-                */\r
-               protected $l;\r
-               \r
-               /**\r
-                * @var Barcode to print on page footer (only if set).\r
-                * @access protected\r
-                */\r
-               protected $barcode = false;\r
-               \r
-               /**\r
-                * @var If true prints header\r
-                * @access protected\r
-                */\r
-               protected $print_header = true;\r
-               \r
-               /**\r
-                * @var If true prints footer.\r
-                * @access protected\r
-                */\r
-               protected $print_footer = true;\r
-                       \r
-               /**\r
-                * @var Header image logo.\r
-                * @access protected\r
-                */\r
-               protected $header_logo = '';\r
-               \r
-               /**\r
-                * @var Header image logo width in mm.\r
-                * @access protected\r
-                */\r
-               protected $header_logo_width = 30;\r
-               \r
-               /**\r
-                * @var String to print as title on document header.\r
-                * @access protected\r
-                */\r
-               protected $header_title = '';\r
-               \r
-               /**\r
-                * @var String to print on document header.\r
-                * @access protected\r
-                */\r
-               protected $header_string = '';\r
-               \r
-               /**\r
-                * @var Default number of columns for html table.\r
-                * @access protected\r
-                */\r
-               protected $default_table_columns = 4;\r
-               \r
-               \r
-               // variables for html parser\r
-               \r
-               /**\r
-                * @var HTML PARSER: array to store current link and rendering styles.\r
-                * @access protected\r
-                */\r
-               protected $HREF = array();\r
-               \r
-               /**\r
-                * @var store a list of available fonts on filesystem.\r
-                * @access protected\r
-                */\r
-               protected $fontlist = array();\r
-               \r
-               /**\r
-                * @var current foreground color\r
-                * @access protected\r
-                */\r
-               protected $fgcolor;\r
-                                               \r
-               /**\r
-                * @var HTML PARSER: array of boolean values, true in case of ordered list (OL), false otherwise.\r
-                * @access protected\r
-                */\r
-               protected $listordered = array();\r
-               \r
-               /**\r
-                * @var HTML PARSER: array count list items on nested lists.\r
-                * @access protected\r
-                */\r
-               protected $listcount = array();\r
-               \r
-               /**\r
-                * @var HTML PARSER: current list nesting level.\r
-                * @access protected\r
-                */\r
-               protected $listnum = 0;\r
-               \r
-               /**\r
-                * @var HTML PARSER: indent amount for lists.\r
-                * @access protected\r
-                */\r
-               protected $listindent;\r
-               \r
-               /**\r
-                * @var current background color\r
-                * @access protected\r
-                */\r
-               protected $bgcolor;\r
-               \r
-               /**\r
-                * @var Store temporary font size in points.\r
-                * @access protected\r
-                */\r
-               protected $tempfontsize = 10;\r
-               \r
-               /**\r
-                * @var spacer for LI tags.\r
-                * @access protected\r
-                */\r
-               protected $lispacer = '';\r
-               \r
-               /**\r
-                * @var default encoding\r
-                * @access protected\r
-                * @since 1.53.0.TC010\r
-                */\r
-               protected $encoding = 'UTF-8';\r
-               \r
-               /**\r
-                * @var PHP internal encoding\r
-                * @access protected\r
-                * @since 1.53.0.TC016\r
-                */\r
-               protected $internal_encoding;\r
-               \r
-               /**\r
-                * @var indicates if the document language is Right-To-Left\r
-                * @access protected\r
-                * @since 2.0.000\r
-                */\r
-               protected $rtl = false;\r
-               \r
-               /**\r
-                * @var used to force RTL or LTR string inversion\r
-                * @access protected\r
-                * @since 2.0.000\r
-                */\r
-               protected $tmprtl = false;\r
-               \r
-               // --- Variables used for document encryption:\r
-               \r
-               /**\r
-                * Indicates whether document is protected\r
-                * @access protected\r
-                * @since 2.0.000 (2008-01-02)\r
-                */\r
-               protected $encrypted;\r
-               \r
-               /**\r
-                * U entry in pdf document\r
-                * @access protected\r
-                * @since 2.0.000 (2008-01-02)\r
-                */\r
-               protected $Uvalue;\r
-               \r
-               /**\r
-                * O entry in pdf document\r
-                * @access protected\r
-                * @since 2.0.000 (2008-01-02)\r
-                */\r
-               protected $Ovalue;\r
-               \r
-               /**\r
-                * P entry in pdf document\r
-                * @access protected\r
-                * @since 2.0.000 (2008-01-02)\r
-                */\r
-               protected $Pvalue;\r
-               \r
-               /**\r
-                * encryption object id\r
-                * @access protected\r
-                * @since 2.0.000 (2008-01-02)\r
-                */\r
-               protected $enc_obj_id;\r
-               \r
-               /**\r
-                * last RC4 key encrypted (cached for optimisation)\r
-                * @access protected\r
-                * @since 2.0.000 (2008-01-02)\r
-                */\r
-               protected $last_rc4_key;\r
-               \r
-               /**\r
-                * last RC4 computed key\r
-                * @access protected\r
-                * @since 2.0.000 (2008-01-02)\r
-                */\r
-               protected $last_rc4_key_c;
-               \r
-               /**\r
-                * RC4 padding\r
-                * @access protected\r
-                */\r
-               protected $padding = "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A";
-               \r
-               /**\r
-                * RC4 encryption key\r
-                * @access protected\r
-                */\r
-               protected $encryption_key;\r
-               \r
-               // --- bookmark ---\r
-               \r
-               /**\r
-                * Outlines for bookmark\r
-                * @access protected\r
-                * @since 2.1.002 (2008-02-12)\r
-                */\r
-               protected $outlines = array();\r
-               \r
-               /**\r
-                * Outline root for bookmark\r
-                * @access protected\r
-                * @since 2.1.002 (2008-02-12)\r
-                */\r
-               protected $OutlineRoot;\r
-               \r
-               \r
-               // --- javascript and form ---\r
-               \r
-               /**\r
-                * javascript code\r
-                * @access protected\r
-                * @since 2.1.002 (2008-02-12)\r
-                */\r
-               protected $javascript = '';\r
-               \r
-               /**\r
-                * javascript counter\r
-                * @access protected\r
-                * @since 2.1.002 (2008-02-12)\r
-                */\r
-               protected $n_js;\r
-\r
-               /**\r
-                * line trough state\r
-                * @access protected\r
-                * @since 2.8.000 (2008-03-19)\r
-                */\r
-               protected $linethrough;\r
-\r
-               // --- Variables used for User's Rights ---\r
-               // See PDF reference chapter 8.7 Digital Signatures\r
-\r
-               /**\r
-                * If true enables user's rights on PDF reader\r
-                * @access protected\r
-                * @since 2.9.000 (2008-03-26)\r
-                */\r
-               protected $ur;\r
-\r
-               /**\r
-                * Names specifying additional document-wide usage rights for the document.\r
-                * @access protected\r
-                * @since 2.9.000 (2008-03-26)\r
-                */\r
-               protected $ur_document;\r
-\r
-               /**\r
-                * Names specifying additional annotation-related usage rights for the document.\r
-                * @access protected\r
-                * @since 2.9.000 (2008-03-26)\r
-                */\r
-               protected $ur_annots;\r
-\r
-               /**\r
-                * Names specifying additional form-field-related usage rights for the document.\r
-                * @access protected\r
-                * @since 2.9.000 (2008-03-26)\r
-                */\r
-               protected $ur_form;\r
-\r
-               /**\r
-                * Names specifying additional signature-related usage rights for the document.\r
-                * @access protected\r
-                * @since 2.9.000 (2008-03-26)\r
-                */\r
-               protected $ur_signature;\r
-\r
-               /**\r
-                * Dot Per Inch Document Resolution (do not change)\r
-                * @access protected\r
-                * @since 3.0.000 (2008-03-27)\r
-                */\r
-               protected $dpi = 72;\r
-               \r
-               /**\r
-                * Array of page numbers were a new page group was started\r
-                * @access protected\r
-                * @since 3.0.000 (2008-03-27)\r
-                */\r
-               protected $newpagegroup = array();\r
-               \r
-               /**\r
-                * Contains the number of pages of the groups\r
-                * @access protected\r
-                * @since 3.0.000 (2008-03-27)\r
-                */\r
-               protected $pagegroups;\r
-               \r
-               /**\r
-                * Contains the alias of the current page group\r
-                * @access protected\r
-                * @since 3.0.000 (2008-03-27)\r
-                */\r
-               protected $currpagegroup; \r
-               \r
-               /**\r
-                * Restrict the rendering of some elements to screen or printout.\r
-                * @access protected\r
-                * @since 3.0.000 (2008-03-27)\r
-                */\r
-               protected $visibility = 'all';\r
-               \r
-               /**\r
-                * Print visibility.\r
-                * @access protected\r
-                * @since 3.0.000 (2008-03-27)\r
-                */\r
-               protected $n_ocg_print;\r
-               \r
-               /**\r
-                * View visibility.\r
-                * @access protected\r
-                * @since 3.0.000 (2008-03-27)\r
-                */\r
-               protected $n_ocg_view;\r
-               \r
-               /**\r
-                * Array of transparency objects and parameters.\r
-                * @access protected\r
-                * @since 3.0.000 (2008-03-27)\r
-                */\r
-               protected $extgstates;\r
-               \r
-               /**\r
-                * Set the default JPEG compression quality (1-100)\r
-                * @access protected\r
-                * @since 3.0.000 (2008-03-27)\r
-                */\r
-               protected $jpeg_quality;\r
-               \r
-               /**\r
-                * Default cell height ratio.\r
-                * @access protected\r
-                * @since 3.0.014 (2008-05-23)\r
-                */\r
-               protected $cell_height_ratio = K_CELL_HEIGHT_RATIO;\r
-               \r
-               /**\r
-                * PDF viewer preferences.\r
-                * @access protected\r
-                * @since 3.1.000 (2008-06-09)\r
-                */\r
-               protected $viewer_preferences;\r
-               \r
-               /**\r
-                * A name object specifying how the document should be displayed when opened.\r
-                * @access protected\r
-                * @since 3.1.000 (2008-06-09)\r
-                */\r
-               protected $PageMode;\r
-               \r
-               /**\r
-                * Array for storing gradient information.\r
-                * @access protected\r
-                * @since 3.1.000 (2008-06-09)\r
-                */\r
-               protected $gradients = array();\r
-               \r
-               /**\r
-                * Array used to store positions inside the pages buffer.\r
-                * keys are the page numbers\r
-                * @access protected\r
-                * @since 3.2.000 (2008-06-26)\r
-                */\r
-               protected $intmrk = array();\r
-               \r
-               /**\r
-                * Array used to store footer positions of each page.\r
-                * @access protected\r
-                * @since 3.2.000 (2008-07-01)\r
-                */\r
-               protected $footerpos = array();\r
-               \r
-               \r
-               /**\r
-                * Array used to store footer lenght of each page.\r
-                * @access protected\r
-                * @since 4.0.014 (2008-07-29)\r
-                */\r
-               protected $footerlen = array();\r
-               \r
-               /**\r
-                * True if a newline is created.\r
-                * @access protected\r
-                * @since 3.2.000 (2008-07-01)\r
-                */\r
-               protected $newline = true;\r
-               \r
-               /**\r
-                * End position of the latest inserted line\r
-                * @access protected\r
-                * @since 3.2.000 (2008-07-01)\r
-                */\r
-               protected $endlinex = 0;\r
-               \r
-               /**\r
-                * PDF string for last line width\r
-                * @access protected\r
-                * @since 4.0.006 (2008-07-16)\r
-                */\r
-               protected $linestyleWidth = '';\r
-               \r
-               /**\r
-                * PDF string for last line width\r
-                * @access protected\r
-                * @since 4.0.006 (2008-07-16)\r
-                */\r
-               protected $linestyleCap = '0 J';\r
-               \r
-               /**\r
-                * PDF string for last line width\r
-                * @access protected\r
-                * @since 4.0.006 (2008-07-16)\r
-                */\r
-               protected $linestyleJoin = '0 j';\r
-               \r
-               /**\r
-                * PDF string for last line width\r
-                * @access protected\r
-                * @since 4.0.006 (2008-07-16)\r
-                */\r
-               protected $linestyleDash = '[] 0 d';\r
-               \r
-               /**\r
-                * True if marked-content sequence is open\r
-                * @access protected\r
-                * @since 4.0.013 (2008-07-28)\r
-                */\r
-               protected $openMarkedContent = false;\r
-               \r
-               /**\r
-                * Count the latest inserted vertical spaces on HTML\r
-                * @access protected\r
-                * @since 4.0.021 (2008-08-24)\r
-                */\r
-               protected $htmlvspace = 0;
-               \r
-               /**\r
-                * Array of Spot colors\r
-                * @access protected\r
-                * @since 4.0.024 (2008-09-12)\r
-                */\r
-               protected $spot_colors = array();
-               \r
-               /**\r
-                * Symbol used for HTML unordered list items\r
-                * @access protected
-                * @since 4.0.028 (2008-09-26)\r
-                */
-               protected $lisymbol = '';
-               \r
-               /**\r
-                * String used to mark the beginning and end of EPS image blocks\r
-                * @access protected
-                * @since 4.1.000 (2008-10-18)\r
-                */
-               protected $epsmarker = 'x#!#EPS#!#x';
-               \r
-               /**\r
-                * Array of transformation matrix\r
-                * @access protected
-                * @since 4.2.000 (2008-10-29)\r
-                */
-               protected $transfmatrix = array();
-               \r
-               /**\r
-                * Booklet mode for double-sided pages\r
-                * @access protected
-                * @since 4.2.000 (2008-10-29)\r
-                */
-               protected $booklet = false;
-               \r
-               /**\r
-                * Epsilon value used for float calculations\r
-                * @access protected
-                * @since 4.2.000 (2008-10-29)\r
-                */
-               protected $feps = 0.001;
-               \r
-               /**\r
-                * Array used for custom vertical spaces for HTML tags\r
-                * @access protected
-                * @since 4.2.001 (2008-10-30)\r
-                */
-               protected $tagvspaces = array();
-               \r
-               /**\r
-                * @var HTML PARSER: custom indent amount for lists.
-                * Negative value means disabled.\r
-                * @access protected
-                * @since 4.2.007 (2008-11-12)\r
-                */\r
-               protected $customlistindent = -1;
-               \r
-               /**\r
-                * @var if true keeps the border open for the cell sides that cross the page.\r
-                * @access protected
-                * @since 4.2.010 (2008-11-14)\r
-                */\r
-               protected $opencell = true;
 
-               /**\r
-                * @var array of files to embedd\r
-                * @access protected
-                * @since 4.4.000 (2008-12-07)\r
-                */\r
-               protected $embeddedfiles = array();
+if (!class_exists('TCPDF', false)) {
+       /**
+        * define default PDF document producer
+        */ 
+       define('PDF_PRODUCER', 'TCPDF 4.8.014 (http://www.tcpdf.org)');
+       
+       /**
+       * This is a PHP class for generating PDF documents without requiring external extensions.<br>
+       * 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.<br>
+       * @name TCPDF
+       * @package com.tecnick.tcpdf
+       * @version 4.8.014
+       * @author Nicola Asuni - info@tecnick.com
+       * @link http://www.tcpdf.org
+       * @license http://www.gnu.org/copyleft/lesser.html LGPL
+       */
+       class TCPDF {
+               
+               // protected or Protected properties
 
-               /**\r
-                * @var boolean true when inside html pre tag\r
-                * @access protected
-                * @since 4.4.001 (2008-12-08)\r
-                */\r
-               protected $premode = false;
+               /**
+               * @var current page number
+               * @access protected
+               */
+               protected $page;
+               
+               /**
+               * @var current object number
+               * @access protected
+               */
+               protected $n;
 
-               /**\r
-                * Array used to store positions of graphics transformation blocks inside the page buffer.
-                * keys are the page numbers\r
-                * @access protected\r
-                * @since 4.4.002 (2008-12-09)\r
-                */\r
-               protected $transfmrk = array();
+               /**
+               * @var array of object offsets
+               * @access protected
+               */
+               protected $offsets;
 
-               /**\r
-                * Default color for html links\r
-                * @access protected\r
-                * @since 4.4.003 (2008-12-09)\r
-                */\r
-               protected $htmlLinkColorArray = array(0, 0, 255);
+               /**
+               * @var buffer holding in-memory PDF
+               * @access protected
+               */
+               protected $buffer;
 
-               /**\r
-                * Default font style to add to html links\r
-                * @access protected\r
-                * @since 4.4.003 (2008-12-09)\r
-                */\r
-               protected $htmlLinkFontStyle = 'U';
+               /**
+               * @var array containing pages
+               * @access protected
+               */
+               protected $pages = array();
 
-               /**\r
-                * Counts the number of pages.\r
-                * @access protected\r
-                * @since 4.5.000 (2008-12-31)\r
-                */\r
-               protected $numpages = 0;
+               /**
+               * @var current document state
+               * @access protected
+               */
+               protected $state;
 
-               /**\r
-                * Array containing page lenghts in bytes.\r
-                * @access protected\r
-                * @since 4.5.000 (2008-12-31)\r
-                */\r
-               protected $pagelen = array();
+               /**
+               * @var compression flag
+               * @access protected
+               */
+               protected $compress;
+               
+               /**
+               * @var current page orientation (P = Portrait, L = Landscape)
+               * @access protected
+               */
+               protected $CurOrientation;
 
-               /**\r
-                * Counts the number of pages.\r
-                * @access protected\r
-                * @since 4.5.000 (2008-12-31)\r
-                */\r
-               protected $numimages = 0;
+               /**
+               * @var array that stores page dimensions and graphic status.<ul><li>$this->pagedim[$this->page]['w'] => page_width_in_points</li><li>$this->pagedim[$this->page]['h'] => height in points</li><li>$this->pagedim[$this->page]['wk'] => page_width_in_points</li><li>$this->pagedim[$this->page]['hk'] => height</li><li>$this->pagedim[$this->page]['tm'] => top_margin</li><li>$this->pagedim[$this->page]['bm'] => bottom_margin</li><li>$this->pagedim[$this->page]['lm'] => left_margin</li><li>$this->pagedim[$this->page]['rm'] => right_margin</li><li>$this->pagedim[$this->page]['pb'] => auto_page_break</li><li>$this->pagedim[$this->page]['or'] => page_orientation</li><li>$this->pagedim[$this->page]['olm'] => original_left_margin</li><li>$this->pagedim[$this->page]['orm'] => original_right_margin</li></ul>
+               * @access protected
+               */
+               protected $pagedim = array();
 
-               /**\r
-                * Store the image keys.\r
-                * @access protected\r
-                * @since 4.5.000 (2008-12-31)\r
-                */\r
-               protected $imagekeys = array();
+               /**
+               * @var scale factor (number of points in user unit)
+               * @access protected
+               */
+               protected $k;
 
-               /**\r
-                * Lenght of the buffer in bytes.\r
-                * @access protected\r
-                * @since 4.5.000 (2008-12-31)\r
-                */\r
-               protected $bufferlen = 0;
+               /**
+               * @var width of page format in points
+               * @access protected
+               */
+               protected $fwPt;
 
-               /**\r
-                * If true enables disk caching.\r
-                * @access protected\r
-                * @since 4.5.000 (2008-12-31)\r
-                */\r
-               protected $diskcache = false;
+               /**
+               * @var height of page format in points
+               * @access protected
+               */
+               protected $fhPt;
 
-               /**\r
-                * Counts the number of fonts.\r
-                * @access protected\r
-                * @since 4.5.000 (2009-01-02)\r
-                */\r
-               protected $numfonts = 0;
+               /**
+               * @var current width of page in points
+               * @access protected
+               */
+               protected $wPt;
 
-               /**\r
-                * Store the font keys.\r
-                * @access protected\r
-                * @since 4.5.000 (2009-01-02)\r
-                */\r
-               protected $fontkeys = array();
+               /**
+               * @var current height of page in points
+               * @access protected
+               */
+               protected $hPt;
 
-               /**\r
-                * Store the fage status (true when opened, false when closed).\r
-                * @access protected\r
-                * @since 4.5.000 (2009-01-02)\r
-                */\r
-               protected $pageopen = array();
-               \r
-               /**\r
-                * Default monospaced font\r
-                * @access protected\r
-                * @since 4.5.025 (2009-03-10)\r
-                */\r
-               protected $default_monospaced_font = 'courier';
+               /**
+               * @var current width of page in user unit
+               * @access protected
+               */
+               protected $w;
 
-               /**\r
-                * Used to store a cloned copy of the current class object\r
-                * @access protected\r
-                * @since 4.5.029 (2009-03-19)\r
-                */
-               protected $objcopy;
+               /**
+               * @var current height of page in user unit
+               * @access protected
+               */
+               protected $h;
 
                /**
-                * Array used to store the lenghts of cache files\r
-                * @access protected\r
-                * @since 4.5.029 (2009-03-19)\r
-                */
-               protected $cache_file_lenght = array();
+               * @var left margin
+               * @access protected
+               */
+               protected $lMargin;
 
                /**
-                * Table header content to be repeated on each new page\r
-                * @access protected\r
-                * @since 4.5.030 (2009-03-20)\r
-                */
-               protected $thead = '';
+               * @var top margin
+               * @access protected
+               */
+               protected $tMargin;
 
                /**
-                * Margins used for table header.\r
-                * @access protected\r
-                * @since 4.5.030 (2009-03-20)\r
-                */
-               protected $theadMargins = array();
+               * @var right margin
+               * @access protected
+               */
+               protected $rMargin;
 
                /**
-                * Cache array for UTF8StringToArray() method.\r
-                * @access protected\r
-                * @since 4.5.037 (2009-04-07)\r
-                */
-               protected $cache_UTF8StringToArray = array();
+               * @var page break margin
+               * @access protected
+               */
+               protected $bMargin;
 
                /**
-                * Maximum size of cache array used for UTF8StringToArray() method.\r
-                * @access protected\r
-                * @since 4.5.037 (2009-04-07)\r
-                */
-               protected $cache_maxsize_UTF8StringToArray = 8;
+               * @var cell internal padding
+               * @access protected
+               */
+               //protected
+               public $cMargin;
+               
+               /**
+               * @var cell internal padding (previous value)
+               * @access protected
+               */
+               protected $oldcMargin;
 
                /**
-                * Current size of cache array used for UTF8StringToArray() method.\r
-                * @access protected\r
-                * @since 4.5.037 (2009-04-07)\r
-                */
-               protected $cache_size_UTF8StringToArray = 0;
-\r
-               /**\r
-                * If true enables document signing\r
-                * @access protected\r
-                * @since 4.6.005 (2009-04-24)\r
-                */\r
-               protected $sign = false;\r
-\r
-               /**\r
-                * Signature data\r
-                * @access protected\r
-                * @since 4.6.005 (2009-04-24)\r
-                */\r
-               protected $signature_data = array();
-\r
-               /**\r
-                * Signature max lenght\r
-                * @access protected\r
-                * @since 4.6.005 (2009-04-24)\r
-                */\r
-               protected $signature_max_lenght = 5120;
-\r
-               /**\r
-                * Regular expression used to find blank characters used for word-wrapping.\r
-                * @access protected\r
-                * @since 4.6.006 (2009-04-28)\r
-                */\r
-               protected $re_spaces = '/[\s]/';
-\r
-               //------------------------------------------------------------\r
-               // METHODS\r
-               //------------------------------------------------------------\r
-\r
-               /**\r
-                * This is the class constructor. \r
-                * It allows to set up the page format, the orientation and \r
-                * the measure unit used in all the methods (except for the font sizes).\r
-                * @since 1.0\r
-                * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or Portrait (default)</li><li>L or Landscape</li></ul>\r
-                * @param string $unit User measure unit. Possible values are:<ul><li>pt: point</li><li>mm: millimeter (default)</li><li>cm: centimeter</li><li>in: inch</li></ul><br />A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit.\r
-                * @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).<ul><li>4A0</li><li>2A0</li><li>A0</li><li>A1</li><li>A2</li><li>A3</li><li>A4 (default)</li><li>A5</li><li>A6</li><li>A7</li><li>A8</li><li>A9</li><li>A10</li><li>B0</li><li>B1</li><li>B2</li><li>B3</li><li>B4</li><li>B5</li><li>B6</li><li>B7</li><li>B8</li><li>B9</li><li>B10</li><li>C0</li><li>C1</li><li>C2</li><li>C3</li><li>C4</li><li>C5</li><li>C6</li><li>C7</li><li>C8</li><li>C9</li><li>C10</li><li>RA0</li><li>RA1</li><li>RA2</li><li>RA3</li><li>RA4</li><li>SRA0</li><li>SRA1</li><li>SRA2</li><li>SRA3</li><li>SRA4</li><li>LETTER</li><li>LEGAL</li><li>EXECUTIVE</li><li>FOLIO</li></ul>\r
-                * @param boolean $unicode TRUE means that the input text is unicode (default = true)
-                * @param boolean $diskcache if TRUE reduce the RAM memory usage by caching temporary data on filesystem (slower).\r
-                * @param String $encoding charset encoding; default is UTF-8\r
-                * @access public\r
-                */\r
-               public function __construct($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8', $diskcache=false) {\r
-                       /* Set internal character encoding to ASCII */\r
-                       if (function_exists('mb_internal_encoding') AND mb_internal_encoding()) {\r
-                               $this->internal_encoding = mb_internal_encoding();\r
-                               mb_internal_encoding('ASCII');\r
-                       }
-                       // set disk caching
-                       $this->diskcache = $diskcache ? true : false;\r
-                       // set language direction\r
-                       $this->rtl = $this->l['a_meta_dir']=='rtl' ? true : false;\r
-                       $this->tmprtl = false;\r
-                       //Some checks\r
-                       $this->_dochecks();\r
-                       //Initialization of properties\r
-                       $this->isunicode = $unicode;\r
-                       $this->page = 0;
-                       $this->transfmrk[0] = array();\r
-                       $this->pagedim = array();\r
-                       $this->n = 2;\r
-                       $this->buffer = '';\r
-                       $this->pages = array();\r
-                       $this->state = 0;\r
-                       $this->fonts = array();\r
-                       $this->FontFiles = array();\r
-                       $this->diffs = array();\r
-                       $this->images = array();\r
-                       $this->links = array();\r
-                       $this->gradients = array();\r
-                       $this->InFooter = false;\r
-                       $this->lasth = 0;\r
-                       $this->FontFamily = 'helvetica';\r
-                       $this->FontStyle = '';\r
-                       $this->FontSizePt = 12;\r
-                       $this->underline = false;\r
-                       $this->linethrough = false;\r
-                       $this->DrawColor = '0 G';\r
-                       $this->FillColor = '0 g';\r
-                       $this->TextColor = '0 g';\r
-                       $this->ColorFlag = false;\r
-                       // encryption values\r
-                       $this->encrypted = false;\r
-                       $this->last_rc4_key = '';\r
-                       $this->padding = "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A";\r
-                       //Standard Unicode fonts\r
-                       $this->CoreFonts = array(\r
-                               'courier'=>'Courier',\r
-                               'courierB'=>'Courier-Bold',\r
-                               'courierI'=>'Courier-Oblique',\r
-                               'courierBI'=>'Courier-BoldOblique',\r
-                               'helvetica'=>'Helvetica',\r
-                               'helveticaB'=>'Helvetica-Bold',\r
-                               'helveticaI'=>'Helvetica-Oblique',\r
-                               'helveticaBI'=>'Helvetica-BoldOblique',\r
-                               'times'=>'Times-Roman',\r
-                               'timesB'=>'Times-Bold',\r
-                               'timesI'=>'Times-Italic',\r
-                               'timesBI'=>'Times-BoldItalic',\r
-                               'symbol'=>'Symbol',\r
-                               'zapfdingbats'=>'ZapfDingbats'\r
-                       );\r
-                       //Set scale factor\r
-                       $this->setPageUnit($unit);\r
-                       // set page format and orientation\r
-                       $this->setPageFormat($format, $orientation);\r
-                       //Page margins (1 cm)\r
-                       $margin = 28.35 / $this->k;\r
-                       $this->SetMargins($margin, $margin);\r
-                       //Interior cell margin\r
-                       $this->cMargin = $margin / 10;\r
-                       //Line width (0.2 mm)\r
-                       $this->LineWidth = 0.57 / $this->k;\r
-                       $this->linestyleWidth = sprintf('%.2F w', ($this->LineWidth * $this->k));\r
-                       $this->linestyleCap = '0 J';\r
-                       $this->linestyleJoin = '0 j';\r
-                       $this->linestyleDash = '[] 0 d';\r
-                       //Automatic page break\r
-                       $this->SetAutoPageBreak(true, (2 * $margin));\r
-                       //Full width display mode\r
-                       $this->SetDisplayMode('fullwidth');\r
-                       //Compression\r
-                       $this->SetCompression(true);\r
-                       //Set default PDF version number\r
-                       $this->PDFVersion = '1.7';\r
-                       $this->encoding = $encoding;\r
-                       $this->HREF = array();\r
-                       $this->getFontsList();\r
-                       $this->fgcolor = array('R' => 0, 'G' => 0, 'B' => 0);\r
-                       $this->bgcolor = array('R' => 255, 'G' => 255, 'B' => 255);\r
-                       $this->extgstates = array();\r
-                       // user's rights
-                       $this->sign = false;\r
-                       $this->ur = false;\r
-                       $this->ur_document = '/FullSave';\r
-                       $this->ur_annots = '/Create/Delete/Modify/Copy/Import/Export';\r
-                       $this->ur_form = '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate';\r
-                       $this->ur_signature = '/Modify';                        \r
-                       // set default JPEG quality\r
-                       $this->jpeg_quality = 75;\r
-                       // initialize some settings\r
-                       $this->utf8Bidi(array(''), '');
-                       // set default font
-                       $this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt);
-                       // check if PCRE Unicode support is enabled
-                       if ($this->isunicode AND (@preg_match('/\pL/u', 'a') == 1)) {
-                               // PCRE unicode support is turned ON
-                               // \p{Z} or \p{Separator}: any kind of Unicode whitespace or invisible separator.
-                               // \p{Lo} or \p{Other_Letter}: a Unicode letter or ideograph that does not have lowercase and uppercase variants.
-                               // \p{Lo} is needed because Chinese characters are packed next to each other without spaces in between.
-                               //$this->re_spaces = '/[\s\p{Z}\p{Lo}]/';
-                               $this->re_spaces = '/[\s\p{Z}]/';
-                       } else {
-                               // PCRE unicode support is turned OFF
-                               $this->re_spaces = '/[\s]/';
-                       }\r
-               }\r
-               \r
-               /**\r
-                * Default destructor.\r
-                * @access public\r
-                * @since 1.53.0.TC016\r
-                */\r
-               public function __destruct() {\r
-                       // restore internal encoding\r
-                       if (isset($this->internal_encoding) AND !empty($this->internal_encoding)) {\r
-                               mb_internal_encoding($this->internal_encoding);\r
-                       }
-                       // unset all class variables
-                       $this->_destroy(true);\r
-               }\r
-               \r
-               /**\r
-                * Set the units of measure for the document.\r
-                * @param string $unit User measure unit. Possible values are:<ul><li>pt: point</li><li>mm: millimeter (default)</li><li>cm: centimeter</li><li>in: inch</li></ul><br />A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit.\r
-                * @access public\r
-                * @since 3.0.015 (2008-06-06)\r
-                */\r
-               public function setPageUnit($unit) {\r
-               //Set scale factor\r
-                       switch (strtolower($unit)) {\r
-                               // points
-                               case 'px':\r
-                               case 'pt': {\r
-                                       $this->k = 1;\r
-                                       break;\r
-                               }\r
-                               // millimeters\r
-                               case 'mm': {\r
-                                       $this->k = $this->dpi / 25.4;\r
-                                       break;\r
-                               }\r
-                               // centimeters\r
-                               case 'cm': {\r
-                                       $this->k = $this->dpi / 2.54;\r
-                                       break;\r
-                               }\r
-                               // inches\r
-                               case 'in': {\r
-                                       $this->k = $this->dpi;\r
-                                       break;\r
-                               }\r
-                               // unsupported unit\r
-                               default : {\r
-                                       $this->Error('Incorrect unit: '.$unit);\r
-                                       break;\r
-                               }\r
-                       }\r
-                       if (isset($this->CurOrientation)) {\r
-                                       $this->setPageOrientation($this->CurOrientation);\r
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Set the page format\r
-               * @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).<ul><li>4A0</li><li>2A0</li><li>A0</li><li>A1</li><li>A2</li><li>A3</li><li>A4 (default)</li><li>A5</li><li>A6</li><li>A7</li><li>A8</li><li>A9</li><li>A10</li><li>B0</li><li>B1</li><li>B2</li><li>B3</li><li>B4</li><li>B5</li><li>B6</li><li>B7</li><li>B8</li><li>B9</li><li>B10</li><li>C0</li><li>C1</li><li>C2</li><li>C3</li><li>C4</li><li>C5</li><li>C6</li><li>C7</li><li>C8</li><li>C9</li><li>C10</li><li>RA0</li><li>RA1</li><li>RA2</li><li>RA3</li><li>RA4</li><li>SRA0</li><li>SRA1</li><li>SRA2</li><li>SRA3</li><li>SRA4</li><li>LETTER</li><li>LEGAL</li><li>EXECUTIVE</li><li>FOLIO</li></ul>\r
-               * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or PORTRAIT (default)</li><li>L or LANDSCAPE</li></ul>\r
-               * @access public\r
-               * @since 3.0.015 (2008-06-06)\r
-               */\r
-               public function setPageFormat($format, $orientation='P') {\r
-                       //Page format\r
-                       if (is_string($format)) {\r
-                               // Page formats (45 standard ISO paper formats and 4 american common formats).\r
-                               // Paper cordinates are calculated in this way: (inches * 72) where (1 inch = 2.54 cm)\r
-                               switch (strtoupper($format)) {\r
-                                       case '4A0': {$format = array(4767.87,6740.79); break;}\r
-                                       case '2A0': {$format = array(3370.39,4767.87); break;}\r
-                                       case 'A0': {$format = array(2383.94,3370.39); break;}\r
-                                       case 'A1': {$format = array(1683.78,2383.94); break;}\r
-                                       case 'A2': {$format = array(1190.55,1683.78); break;}\r
-                                       case 'A3': {$format = array(841.89,1190.55); break;}\r
-                                       case 'A4': default: {$format = array(595.28,841.89); break;}\r
-                                       case 'A5': {$format = array(419.53,595.28); break;}\r
-                                       case 'A6': {$format = array(297.64,419.53); break;}\r
-                                       case 'A7': {$format = array(209.76,297.64); break;}\r
-                                       case 'A8': {$format = array(147.40,209.76); break;}\r
-                                       case 'A9': {$format = array(104.88,147.40); break;}\r
-                                       case 'A10': {$format = array(73.70,104.88); break;}\r
-                                       case 'B0': {$format = array(2834.65,4008.19); break;}\r
-                                       case 'B1': {$format = array(2004.09,2834.65); break;}\r
-                                       case 'B2': {$format = array(1417.32,2004.09); break;}\r
-                                       case 'B3': {$format = array(1000.63,1417.32); break;}\r
-                                       case 'B4': {$format = array(708.66,1000.63); break;}\r
-                                       case 'B5': {$format = array(498.90,708.66); break;}\r
-                                       case 'B6': {$format = array(354.33,498.90); break;}\r
-                                       case 'B7': {$format = array(249.45,354.33); break;}\r
-                                       case 'B8': {$format = array(175.75,249.45); break;}\r
-                                       case 'B9': {$format = array(124.72,175.75); break;}\r
-                                       case 'B10': {$format = array(87.87,124.72); break;}\r
-                                       case 'C0': {$format = array(2599.37,3676.54); break;}\r
-                                       case 'C1': {$format = array(1836.85,2599.37); break;}\r
-                                       case 'C2': {$format = array(1298.27,1836.85); break;}\r
-                                       case 'C3': {$format = array(918.43,1298.27); break;}\r
-                                       case 'C4': {$format = array(649.13,918.43); break;}\r
-                                       case 'C5': {$format = array(459.21,649.13); break;}\r
-                                       case 'C6': {$format = array(323.15,459.21); break;}\r
-                                       case 'C7': {$format = array(229.61,323.15); break;}\r
-                                       case 'C8': {$format = array(161.57,229.61); break;}\r
-                                       case 'C9': {$format = array(113.39,161.57); break;}\r
-                                       case 'C10': {$format = array(79.37,113.39); break;}\r
-                                       case 'RA0': {$format = array(2437.80,3458.27); break;}\r
-                                       case 'RA1': {$format = array(1729.13,2437.80); break;}\r
-                                       case 'RA2': {$format = array(1218.90,1729.13); break;}\r
-                                       case 'RA3': {$format = array(864.57,1218.90); break;}\r
-                                       case 'RA4': {$format = array(609.45,864.57); break;}\r
-                                       case 'SRA0': {$format = array(2551.18,3628.35); break;}\r
-                                       case 'SRA1': {$format = array(1814.17,2551.18); break;}\r
-                                       case 'SRA2': {$format = array(1275.59,1814.17); break;}\r
-                                       case 'SRA3': {$format = array(907.09,1275.59); break;}\r
-                                       case 'SRA4': {$format = array(637.80,907.09); break;}\r
-                                       case 'LETTER': {$format = array(612.00,792.00); break;}\r
-                                       case 'LEGAL': {$format = array(612.00,1008.00); break;}\r
-                                       case 'EXECUTIVE': {$format = array(521.86,756.00); break;}\r
-                                       case 'FOLIO': {$format = array(612.00,936.00); break;}\r
-                               }\r
-                               $this->fwPt = $format[0];\r
-                               $this->fhPt = $format[1];\r
-                       } else {\r
-                               $this->fwPt = $format[0] * $this->k;\r
-                               $this->fhPt = $format[1] * $this->k;\r
-                       }\r
-                       $this->setPageOrientation($orientation);\r
-               }\r
-               \r
-               /**\r
-               * Set page orientation.\r
-               * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or PORTRAIT (default)</li><li>L or LANDSCAPE</li></ul>\r
-               * @param boolean $autopagebreak Boolean indicating if auto-page-break mode should be on or off.\r
-               * @param float $bottommargin bottom margin of the page.\r
-               * @access public\r
-               * @since 3.0.015 (2008-06-06)\r
-               */\r
-               public function setPageOrientation($orientation, $autopagebreak='', $bottommargin='') {\r
-                       $orientation = strtoupper($orientation);\r
-                       if (($orientation == 'P') OR ($orientation == 'PORTRAIT')) {\r
-                               $this->CurOrientation = 'P';\r
-                               $this->wPt = $this->fwPt;\r
-                               $this->hPt = $this->fhPt;\r
-                       } elseif (($orientation == 'L') OR ($orientation == 'LANDSCAPE')) {\r
-                               $this->CurOrientation = 'L';\r
-                               $this->wPt = $this->fhPt;\r
-                               $this->hPt = $this->fwPt;\r
-                       } else {\r
-                               $this->Error('Incorrect orientation: '.$orientation);\r
-                       }\r
-                       $this->w = $this->wPt / $this->k;\r
-                       $this->h = $this->hPt / $this->k;\r
-                       if ($this->empty_string($autopagebreak)) {\r
-                               if (isset($this->AutoPageBreak)) {\r
-                                       $autopagebreak = $this->AutoPageBreak;\r
-                               } else {\r
-                                       $autopagebreak = true;\r
-                               }\r
-                       }\r
-                       if ($this->empty_string($bottommargin)) {\r
-                               if (isset($this->bMargin)) {\r
-                                       $bottommargin = $this->bMargin;\r
-                               } else {\r
-                                       // default value = 2 cm\r
-                                       $bottommargin = 2 * 28.35 / $this->k;\r
-                               }\r
-                       }\r
-                       $this->SetAutoPageBreak($autopagebreak, $bottommargin);\r
-                       // store page dimensions\r
-                       $this->pagedim[$this->page] = array('w' => $this->wPt, 'h' => $this->hPt, 'wk' => $this->w, 'hk' => $this->h, 'tm' => $this->tMargin, 'bm' => $bottommargin, 'lm' => $this->lMargin, 'rm' => $this->rMargin, 'pb' => $autopagebreak, 'or' => $this->CurOrientation, 'olm' => $this->original_lMargin, 'orm' => $this->original_rMargin);\r
-               }\r
-               
-               /**\r
-                * Set regular expression to detect withespaces or word separators.\r
-                * @param string $re regular expression (leave empty for default).\r
-                * @access public\r
-                * @since 4.6.016 (2009-06-15)\r
-                */\r
-               public function setSpacesRE($re='/[\s]/') {
-                       // if PCRE unicode support is turned ON:
-                       //      \p{Z} or \p{Separator}: any kind of Unicode whitespace or invisible separator.
-                       //      \p{Lo} or \p{Other_Letter}: a Unicode letter or ideograph that does not have lowercase and uppercase variants.
-                       //      \p{Lo} is needed because Chinese characters are packed next to each other without spaces in between.
-                       $this->re_spaces = $re;
-               }
-                       \r
-               /**\r
-                * Enable or disable Right-To-Left language mode\r
-                * @param Boolean $enable if true enable Right-To-Left language mode.
-                * @param Boolean $resetx if true reset the X position on direction change.\r
-                * @access public\r
-               * @since 2.0.000 (2008-01-03)\r
-                */\r
-               public function setRTL($enable, $resetx=true) {
-                       $enable = $enable ? true : false;
-                       $resetx = ($resetx AND ($enable != $this->rtl));
-                       $this->rtl = $enable;\r
-                       $this->tmprtl = false;
-                       if ($resetx) {
-                               $this->Ln(0);
-                       }\r
-               }\r
-               \r
-               /**\r
-                * Return the RTL status\r
-                * @return boolean\r
-                * @access public\r
-                * @since 4.0.012 (2008-07-24)\r
-                */\r
-               public function getRTL() {\r
-                       return $this->rtl;\r
-               }\r
-               \r
-               /**\r
-               * Force temporary RTL language direction\r
-               * @param mixed $mode can be false, 'L' for LTR or 'R' for RTL\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-09)\r
-               */\r
-               public function setTempRTL($mode) {\r
-                       switch ($mode) {\r
-                               case false:\r
-                               case 'L':\r
-                               case 'R': {\r
-                                       $this->tmprtl = $mode;\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Set the last cell height.\r
-               * @param float $h cell height.\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 1.53.0.TC034\r
-               */\r
-               public function setLastH($h) {\r
-                       $this->lasth = $h;\r
-               }\r
-               \r
-               /**\r
-               * Get the last cell height.\r
-               * @return last cell height\r
-               * @access public\r
-               * @since 4.0.017 (2008-08-05)\r
-               */\r
-               public function getLastH() {\r
-                       return $this->lasth;\r
-               }\r
-               \r
-               /**\r
-               * Set the adjusting factor to convert pixels to user units.\r
-               * @param float $scale adjusting factor to convert pixels to user units.\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 1.5.2\r
-               */\r
-               public function setImageScale($scale) {\r
-                       $this->imgscale = $scale;\r
-               }\r
-\r
-               /**\r
-               * Returns the adjusting factor to convert pixels to user units.\r
-               * @return float adjusting factor to convert pixels to user units.\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 1.5.2\r
-               */\r
-               public function getImageScale() {\r
-                       return $this->imgscale;\r
-               }
-                               \r
-               /**\r
-               * Returns an array of page dimensions:
-               * <ul><li>$this->pagedim[$this->page]['w'] => page_width_in_points</li><li>$this->pagedim[$this->page]['h'] => height in points</li><li>$this->pagedim[$this->page]['wk'] => page_width_in_points</li><li>$this->pagedim[$this->page]['hk'] => height</li><li>$this->pagedim[$this->page]['tm'] => top_margin</li><li>$this->pagedim[$this->page]['bm'] => bottom_margin</li><li>$this->pagedim[$this->page]['lm'] => left_margin</li><li>$this->pagedim[$this->page]['rm'] => right_margin</li><li>$this->pagedim[$this->page]['pb'] => auto_page_break</li><li>$this->pagedim[$this->page]['or'] => page_orientation</li><li>$this->pagedim[$this->page]['olm'] => original_left_margin</li><li>$this->pagedim[$this->page]['orm'] => original_right_margin</li></ul>
-               * @param int $pagenum page number (empty = current page)\r
-               * @return array of page dimensions.\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 4.5.027 (2009-03-16)\r
-               */\r
-               public function getPageDimensions($pagenum='') {
-                       if (empty($pagenum)) {
-                               $pagenum = $this->page;
-                       }
-                       return $this->pagedim[$pagenum];
-               }
-               \r
-               /**\r
-               * Returns the page width in units.
-               * @param int $pagenum page number (empty = current page)\r
-               * @return int page width.\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 1.5.2
-               * @see getPageDimensions()\r
-               */\r
-               public function getPageWidth($pagenum='') {
-                       if (empty($pagenum)) {
-                               return $this->w;
-                       }\r
-                       return $this->pagedim[$pagenum]['w'];\r
-               }\r
-\r
-               /**\r
-               * Returns the page height in units.
-               * @param int $pagenum page number (empty = current page)\r
-               * @return int page height.\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 1.5.2
-               * @see getPageDimensions()\r
-               */\r
-               public function getPageHeight($pagenum='') {
-                       if (empty($pagenum)) {
-                               return $this->h;
-                       }\r
-                       return $this->pagedim[$pagenum]['h'];\r
-               }\r
-\r
-               /**\r
-               * Returns the page break margin.
-               * @param int $pagenum page number (empty = current page)\r
-               * @return int page break margin.\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 1.5.2
-               * @see getPageDimensions()\r
-               */\r
-               public function getBreakMargin($pagenum='') {
-                       if (empty($pagenum)) {
-                               return $this->bMargin;
-                       }\r
-                       return $this->pagedim[$pagenum]['bm'];\r
-               }\r
-\r
-               /**\r
-               * Returns the scale factor (number of points in user unit).\r
-               * @return int scale factor.\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 1.5.2\r
-               */\r
-               public function getScaleFactor() {\r
-                       return $this->k;\r
-               }\r
-\r
-               /**\r
-               * Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change them.\r
-               * @param float $left Left margin.\r
-               * @param float $top Top margin.\r
-               * @param float $right Right margin. Default value is the left one.\r
-               * @access public\r
-               * @since 1.0\r
-               * @see SetLeftMargin(), SetTopMargin(), SetRightMargin(), SetAutoPageBreak()\r
-               */\r
-               public function SetMargins($left, $top, $right=-1) {\r
-                       //Set left, top and right margins\r
-                       $this->lMargin = $left;\r
-                       $this->tMargin = $top;\r
-                       if ($right == -1) {\r
-                               $right = $left;\r
-                       }\r
-                       $this->rMargin = $right;\r
-               }\r
-\r
-               /**\r
-               * Defines the left margin. The method can be called before creating the first page. If the current abscissa gets out of page, it is brought back to the margin.\r
-               * @param float $margin The margin.\r
-               * @access public\r
-               * @since 1.4\r
-               * @see SetTopMargin(), SetRightMargin(), SetAutoPageBreak(), SetMargins()\r
-               */\r
-               public function SetLeftMargin($margin) {\r
-                       //Set left margin\r
-                       $this->lMargin=$margin;\r
-                       if (($this->page > 0) AND ($this->x < $margin)) {\r
-                               $this->x = $margin;\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Defines the top margin. The method can be called before creating the first page.\r
-               * @param float $margin The margin.\r
-               * @access public\r
-               * @since 1.5\r
-               * @see SetLeftMargin(), SetRightMargin(), SetAutoPageBreak(), SetMargins()\r
-               */\r
-               public function SetTopMargin($margin) {\r
-                       //Set top margin\r
-                       $this->tMargin=$margin;\r
-                       if (($this->page > 0) AND ($this->y < $margin)) {\r
-                               $this->y = $margin;\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Defines the right margin. The method can be called before creating the first page.\r
-               * @param float $margin The margin.\r
-               * @access public\r
-               * @since 1.5\r
-               * @see SetLeftMargin(), SetTopMargin(), SetAutoPageBreak(), SetMargins()\r
-               */\r
-               public function SetRightMargin($margin) {\r
-                       $this->rMargin=$margin;\r
-                       if (($this->page > 0) AND ($this->x > ($this->w - $margin))) {\r
-                               $this->x = $this->w - $margin;\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Set the internal Cell padding.\r
-               * @param float $pad internal padding.\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-09)\r
-               * @see Cell(), SetLeftMargin(), SetTopMargin(), SetAutoPageBreak(), SetMargins()\r
-               */\r
-               public function SetCellPadding($pad) {\r
-                       $this->cMargin = $pad;\r
-               }\r
-\r
-               /**\r
-               * Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm.\r
-               * @param boolean $auto Boolean indicating if mode should be on or off.\r
-               * @param float $margin Distance from the bottom of the page.\r
-               * @access public\r
-               * @since 1.0\r
-               * @see Cell(), MultiCell(), AcceptPageBreak()\r
-               */\r
-               public function SetAutoPageBreak($auto, $margin=0) {\r
-                       //Set auto page break mode and triggering margin\r
-                       $this->AutoPageBreak = $auto;\r
-                       $this->bMargin = $margin;\r
-                       $this->PageBreakTrigger = $this->h - $margin;\r
-               }\r
-\r
-               /**\r
-               * Defines the way the document is to be displayed by the viewer.\r
-               * @param mixed $zoom The zoom to use. It can be one of the following string values or a number indicating the zooming factor to use. <ul><li>fullpage: displays the entire page on screen </li><li>fullwidth: uses maximum width of window</li><li>real: uses real size (equivalent to 100% zoom)</li><li>default: uses viewer default mode</li></ul>\r
-               * @param string $layout The page layout. Possible values are:<ul><li>SinglePage Display one page at a time</li><li>OneColumn Display the pages in one column</li><li>TwoColumnLeft Display the pages in two columns, with odd-numbered pages on the left</li><li>TwoColumnRight Display the pages in two columns, with odd-numbered pages on the right</li><li>TwoPageLeft (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the left</li><li>TwoPageRight (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the right</li></ul>\r
-               * @param string $mode A name object specifying how the document should be displayed when opened:<ul><li>UseNone Neither document outline nor thumbnail images visible</li><li>UseOutlines Document outline visible</li><li>UseThumbs Thumbnail images visible</li><li>FullScreen Full-screen mode, with no menu bar, window controls, or any other window visible</li><li>UseOC (PDF 1.5) Optional content group panel visible</li><li>UseAttachments (PDF 1.6) Attachments panel visible</li></ul>\r
-               * @access public\r
-               * @since 1.2\r
-               */\r
-               public function SetDisplayMode($zoom, $layout='SinglePage', $mode='UseNone') {\r
-                       //Set display mode in viewer\r
-                       if (($zoom == 'fullpage') OR ($zoom == 'fullwidth') OR ($zoom == 'real') OR ($zoom == 'default') OR (!is_string($zoom))) {\r
-                               $this->ZoomMode = $zoom;\r
-                       } else {\r
-                               $this->Error('Incorrect zoom display mode: '.$zoom);\r
-                       }\r
-                       switch ($layout) {\r
-                               case 'default':\r
-                               case 'single':\r
-                               case 'SinglePage': {\r
-                                       $this->LayoutMode = 'SinglePage';\r
-                                       break;\r
-                               }\r
-                               case 'continuous':\r
-                               case 'OneColumn': {\r
-                                       $this->LayoutMode = 'OneColumn';\r
-                                       break;\r
-                               }\r
-                               case 'two':\r
-                               case 'TwoColumnLeft': {\r
-                                       $this->LayoutMode = 'TwoColumnLeft';\r
-                                       break;\r
-                               }\r
-                               case 'TwoColumnRight': {\r
-                                       $this->LayoutMode = 'TwoColumnRight';\r
-                                       break;\r
-                               }\r
-                               case 'TwoPageLeft': {\r
-                                       $this->LayoutMode = 'TwoPageLeft';\r
-                                       break;\r
-                               }\r
-                               case 'TwoPageRight': {\r
-                                       $this->LayoutMode = 'TwoPageRight';\r
-                                       break;\r
-                               }\r
-                               default: {\r
-                                       $this->LayoutMode = 'SinglePage';\r
-                               }\r
-                       }\r
-                       switch ($mode) {\r
-                               case 'UseNone': {\r
-                                       $this->PageMode = 'UseNone';\r
-                                       break;\r
-                               }\r
-                               case 'UseOutlines': {\r
-                                       $this->PageMode = 'UseOutlines';\r
-                                       break;\r
-                               }\r
-                               case 'UseThumbs': {\r
-                                       $this->PageMode = 'UseThumbs';\r
-                                       break;\r
-                               }\r
-                               case 'FullScreen': {\r
-                                       $this->PageMode = 'FullScreen';\r
-                                       break;\r
-                               }\r
-                               case 'UseOC': {\r
-                                       $this->PageMode = 'UseOC';\r
-                                       break;\r
-                               }\r
-                               case '': {\r
-                                       $this->PageMode = 'UseAttachments';\r
-                                       break;\r
-                               }\r
-                               default: {\r
-                                       $this->PageMode = 'UseNone';\r
-                               }\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Activates or deactivates page compression. When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document. Compression is on by default.\r
-               * Note: the Zlib extension is required for this feature. If not present, compression will be turned off.\r
-               * @param boolean $compress Boolean indicating if compression must be enabled.\r
-               * @access public\r
-               * @since 1.4\r
-               */\r
-               public function SetCompression($compress) {\r
-                       //Set page compression\r
-                       if (function_exists('gzcompress')) {\r
-                               $this->compress = $compress;\r
-                       } else {\r
-                               $this->compress = false;\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Defines the title of the document.\r
-               * @param string $title The title.\r
-               * @access public\r
-               * @since 1.2\r
-               * @see SetAuthor(), SetCreator(), SetKeywords(), SetSubject()\r
-               */\r
-               public function SetTitle($title) {\r
-                       //Title of document\r
-                       $this->title = $title;\r
-               }\r
-\r
-               /**\r
-               * Defines the subject of the document.\r
-               * @param string $subject The subject.\r
-               * @access public\r
-               * @since 1.2\r
-               * @see SetAuthor(), SetCreator(), SetKeywords(), SetTitle()\r
-               */\r
-               public function SetSubject($subject) {\r
-                       //Subject of document\r
-                       $this->subject = $subject;\r
-               }\r
-\r
-               /**\r
-               * Defines the author of the document.\r
-               * @param string $author The name of the author.\r
-               * @access public\r
-               * @since 1.2\r
-               * @see SetCreator(), SetKeywords(), SetSubject(), SetTitle()\r
-               */\r
-               public function SetAuthor($author) {\r
-                       //Author of document\r
-                       $this->author = $author;\r
-               }\r
-\r
-               /**\r
-               * Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'.\r
-               * @param string $keywords The list of keywords.\r
-               * @access public\r
-               * @since 1.2\r
-               * @see SetAuthor(), SetCreator(), SetSubject(), SetTitle()\r
-               */\r
-               public function SetKeywords($keywords) {\r
-                       //Keywords of document\r
-                       $this->keywords = $keywords;\r
-               }\r
-\r
-               /**\r
-               * Defines the creator of the document. This is typically the name of the application that generates the PDF.\r
-               * @param string $creator The name of the creator.\r
-               * @access public\r
-               * @since 1.2\r
-               * @see SetAuthor(), SetKeywords(), SetSubject(), SetTitle()\r
-               */\r
-               public function SetCreator($creator) {\r
-                       //Creator of document\r
-                       $this->creator = $creator;\r
-               }\r
-               \r
-               /**\r
-               * This method is automatically called in case of fatal error; it simply outputs the message and halts the execution. An inherited class may override it to customize the error handling but should always halt the script, or the resulting document would probably be invalid.\r
-               * 2004-06-11 :: Nicola Asuni : changed bold tag with strong\r
-               * @param string $msg The error message\r
-               * @access public\r
-               * @since 1.0\r
-               */\r
-               public function Error($msg) {\r
-                       // unset all class variables
-                       $this->_destroy(true);
-                       // exit program and print error\r
-                       die('<strong>TCPDF ERROR: </strong>'.$msg);\r
-               }\r
-\r
-               /**\r
-               * This method begins the generation of the PDF document.
-               * It is not necessary to call it explicitly because AddPage() does it automatically.\r
-               * Note: no page is created by this method\r
-               * @access public\r
-               * @since 1.0\r
-               * @see AddPage(), Close()\r
-               */\r
-               public function Open() {\r
-                       //Begin document\r
-                       $this->state = 1;\r
-               }\r
-\r
-               /**\r
-               * Terminates the PDF document.
-               * It is not necessary to call this method explicitly because Output() does it automatically.
-               * If the document contains no page, AddPage() is called to prevent from getting an invalid document.\r
-               * @access public\r
-               * @since 1.0\r
-               * @see Open(), Output()\r
-               */\r
-               public function Close() {\r
-                       if ($this->state == 3) {\r
-                               return;\r
-                       }\r
-                       if ($this->page == 0) {\r
-                               $this->AddPage();\r
-                       }\r
-                       // close page\r
-                       $this->endPage();\r
-                       // close document\r
-                       $this->_enddoc();
-                       // unset all class variables (except critical ones)
-                       $this->_destroy(false);\r
-               }\r
-               \r
-               /**\r
-               * Move pointer at the specified document page and update page dimensions.\r
-               * @param int $pnum page number\r
-               * @param boolean $resetmargins if true reset left, right, top margins and Y position.\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see getPage(), lastpage(), getNumPages()\r
-               */\r
-               public function setPage($pnum, $resetmargins=false) {\r
-                       if ($pnum == $this->page) {
-                               return;
-                       }
-                       if (($pnum > 0) AND ($pnum <= $this->numpages)) {
-                               $this->state = 2;
-                               // save current graphic settings
-                               //$gvars = $this->getGraphicVars();
-                               $oldpage = $this->page;\r
-                               $this->page = $pnum;\r
-                               $this->wPt = $this->pagedim[$this->page]['w'];\r
-                               $this->hPt = $this->pagedim[$this->page]['h'];\r
-                               $this->w = $this->wPt / $this->k;\r
-                               $this->h = $this->hPt / $this->k;\r
-                               $this->tMargin = $this->pagedim[$this->page]['tm'];\r
-                               $this->bMargin = $this->pagedim[$this->page]['bm'];
-                               $this->original_lMargin = $this->pagedim[$this->page]['olm'];\r
-                               $this->original_rMargin = $this->pagedim[$this->page]['orm'];\r
-                               $this->AutoPageBreak = $this->pagedim[$this->page]['pb'];\r
-                               $this->CurOrientation = $this->pagedim[$this->page]['or'];\r
-                               $this->SetAutoPageBreak($this->AutoPageBreak, $this->bMargin);
-                               // restore graphic settings
-                               //$this->setGraphicVars($gvars);\r
-                               if ($resetmargins) {\r
-                                       $this->lMargin = $this->pagedim[$this->page]['olm'];\r
-                                       $this->rMargin = $this->pagedim[$this->page]['orm'];\r
-                                       $this->SetY($this->tMargin);\r
-                               } else {
-                                       // account for booklet mode
-                                       if ($this->pagedim[$this->page]['olm'] != $this->pagedim[$oldpage]['olm']) {
-                                               $deltam = $this->pagedim[$this->page]['olm'] - $this->pagedim[$this->page]['orm'];
-                                               $this->lMargin += $deltam;
-                                               $this->rMargin -= $deltam;
-                                       }
-                               }\r
-                       } else {\r
-                               $this->Error('Wrong page number on setPage() function.');\r
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Reset pointer to the last document page.
-               * @param boolean $resetmargins if true reset left, right, top margins and Y position.\r
-               * @access public\r
-               * @since 2.0.000 (2008-01-04)\r
-               * @see setPage(), getPage(), getNumPages()\r
-               */\r
-               public function lastPage($resetmargins=false) {\r
-                       $this->setPage($this->getNumPages(), $resetmargins);\r
-               }\r
-               \r
-               /**\r
-               * Get current document page number.\r
-               * @return int page number\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see setPage(), lastpage(), getNumPages()\r
-               */\r
-               public function getPage() {\r
-                       return $this->page;\r
-               }\r
-               \r
-               \r
-               /**\r
-               * Get the total number of insered pages.\r
-               * @return int number of pages\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see setPage(), getPage(), lastpage()\r
-               */\r
-               public function getNumPages() {\r
-                       return $this->numpages;\r
-               }\r
-\r
-               /**\r
-               * Adds a new page to the document. If a page is already present, the Footer() method is called first to output the footer (if enabled). Then the page is added, the current position set to the top-left corner according to the left and top margins (or top-right if in RTL mode), and Header() is called to display the header (if enabled).\r
-               * The origin of the coordinate system is at the top-left corner (or top-right for RTL) and increasing ordinates go downwards.\r
-               * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or PORTRAIT (default)</li><li>L or LANDSCAPE</li></ul>\r
-               * @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).<ul><li>4A0</li><li>2A0</li><li>A0</li><li>A1</li><li>A2</li><li>A3</li><li>A4 (default)</li><li>A5</li><li>A6</li><li>A7</li><li>A8</li><li>A9</li><li>A10</li><li>B0</li><li>B1</li><li>B2</li><li>B3</li><li>B4</li><li>B5</li><li>B6</li><li>B7</li><li>B8</li><li>B9</li><li>B10</li><li>C0</li><li>C1</li><li>C2</li><li>C3</li><li>C4</li><li>C5</li><li>C6</li><li>C7</li><li>C8</li><li>C9</li><li>C10</li><li>RA0</li><li>RA1</li><li>RA2</li><li>RA3</li><li>RA4</li><li>SRA0</li><li>SRA1</li><li>SRA2</li><li>SRA3</li><li>SRA4</li><li>LETTER</li><li>LEGAL</li><li>EXECUTIVE</li><li>FOLIO</li></ul>\r
-               * @access public
-               * @since 1.0\r
-               * @see startPage(), endPage()\r
-               */\r
-               public function AddPage($orientation='', $format='') {
-                       if (!isset($this->original_lMargin)) {\r
-                               $this->original_lMargin = $this->lMargin;\r
-                       }\r
-                       if (!isset($this->original_rMargin)) {\r
-                               $this->original_rMargin = $this->rMargin;\r
-                       }
-                       // terminate previous page
-                       $this->endPage();
-                       // start new page
-                       $this->startPage($orientation, $format);\r
-               }
+               * @var current horizontal position in user unit for cell positioning
+               * @access protected
+               */
+               protected $x;
 
-               /**\r
-               * Terminate the current page
-               * @access protected\r
-               * @since 4.2.010 (2008-11-14)
-               * @see startPage(), AddPage()\r
-               */\r
-               protected function endPage() {
-                       // check if page is already closed\r
-                       if (($this->page == 0) OR ($this->numpages > $this->page) OR (!$this->pageopen[$this->page])) {\r
-                               return;\r
-                       }
-                       $this->InFooter = true;
-                       // print page footer\r
-                       $this->setFooter();\r
-                       // close page\r
-                       $this->_endpage();
-                       // mark page as closed
-                       $this->pageopen[$this->page] = false;
-                       $this->InFooter = false;\r
-               }
+               /**
+               * @var current vertical position in user unit for cell positioning
+               * @access protected
+               */
+               protected $y;
 
-               /**\r
-               * Starts a new page to the document. The page must be closed using the endPage() function.\r
-               * The origin of the coordinate system is at the top-left corner and increasing ordinates go downwards.\r
-               * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or PORTRAIT (default)</li><li>L or LANDSCAPE</li></ul>\r
-               * @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).<ul><li>4A0</li><li>2A0</li><li>A0</li><li>A1</li><li>A2</li><li>A3</li><li>A4 (default)</li><li>A5</li><li>A6</li><li>A7</li><li>A8</li><li>A9</li><li>A10</li><li>B0</li><li>B1</li><li>B2</li><li>B3</li><li>B4</li><li>B5</li><li>B6</li><li>B7</li><li>B8</li><li>B9</li><li>B10</li><li>C0</li><li>C1</li><li>C2</li><li>C3</li><li>C4</li><li>C5</li><li>C6</li><li>C7</li><li>C8</li><li>C9</li><li>C10</li><li>RA0</li><li>RA1</li><li>RA2</li><li>RA3</li><li>RA4</li><li>SRA0</li><li>SRA1</li><li>SRA2</li><li>SRA3</li><li>SRA4</li><li>LETTER</li><li>LEGAL</li><li>EXECUTIVE</li><li>FOLIO</li></ul>
+               /**
+               * @var height of last cell printed
                * @access protected
-               * @since 4.2.010 (2008-11-14)\r
-               * @see endPage(), AddPage()\r
-               */\r
-               protected function startPage($orientation='', $format='') {
-                       if ($this->numpages > $this->page) {\r
-                               // this page has been already added\r
-                               $this->setPage($this->page + 1);
-                               $this->SetY($this->tMargin);\r
-                               return;\r
-                       }
-                       // start a new page\r
-                       if ($this->state == 0) {\r
-                               $this->Open();\r
-                       }
-                       ++$this->numpages;
-                       $this->swapMargins($this->booklet);\r
-                       // save current graphic settings
-                       $gvars = $this->getGraphicVars();\r
-                       // start new page\r
-                       $this->_beginpage($orientation, $format);
-                       // mark page as open
-                       $this->pageopen[$this->page] = true;\r
-                       // restore graphic settings\r
-                       $this->setGraphicVars($gvars);
-                       // mark this point
-                       $this->setPageMark();\r
-                       // print page header\r
-                       $this->setHeader();\r
-                       // restore graphic settings
-                       $this->setGraphicVars($gvars);\r
-                       // mark this point\r
-                       $this->setPageMark();
-                       // print table header (if any)
-                       $this->setTableHeader();\r
-               }
-                       \r
-               /**\r
-                * Set start-writing mark on current page for multicell borders and fills.\r
-                * This function must be called after calling Image() function for a background image.\r
-                * Background images must be always inserted before calling Multicell() or WriteHTMLCell() or WriteHTML() functions.\r
-                * @access public\r
-                * @since 4.0.016 (2008-07-30)\r
-                */\r
-               public function setPageMark() {\r
-                       $this->intmrk[$this->page] = $this->pagelen[$this->page];\r
-               }\r
-               \r
-               /**\r
-                * Set header data.\r
-                * @param string $ln header image logo\r
-                * @param string $lw header image logo width in mm\r
-                * @param string $ht string to print as title on document header\r
-                * @param string $hs string to print on document header\r
-                * @access public\r
-                */\r
-               public function setHeaderData($ln='', $lw=0, $ht='', $hs='') {\r
-                       $this->header_logo = $ln;\r
-                       $this->header_logo_width = $lw;\r
-                       $this->header_title = $ht;\r
-                       $this->header_string = $hs;\r
-               }\r
-               \r
-               /**\r
-                * Returns header data:\r
-                * <ul><li>$ret['logo'] = logo image</li><li>$ret['logo_width'] = width of the image logo in user units</li><li>$ret['title'] = header title</li><li>$ret['string'] = header description string</li></ul>\r
-                * @return array()\r
-                * @access public\r
-                * @since 4.0.012 (2008-07-24)\r
-                */\r
-               public function getHeaderData() {\r
-                       $ret = array();\r
-                       $ret['logo'] = $this->header_logo;\r
-                       $ret['logo_width'] = $this->header_logo_width;\r
-                       $ret['title'] = $this->header_title;\r
-                       $ret['string'] = $this->header_string;\r
-                       return $ret;\r
-               }\r
-               \r
-               /**\r
-                * Set header margin.\r
-                * (minimum distance between header and top page margin)\r
-                * @param int $hm distance in user units\r
-                * @access public\r
-                */\r
-               public function setHeaderMargin($hm=10) {\r
-                       $this->header_margin = $hm;\r
-               }\r
-               \r
-               /**\r
-                * Returns header margin in user units.\r
-                * @return float\r
-                * @since 4.0.012 (2008-07-24)\r
-                * @access public\r
-                */\r
-               public function getHeaderMargin() {\r
-                       return $this->header_margin;\r
-               }\r
-               \r
-               /**\r
-                * Set footer margin.\r
-                * (minimum distance between footer and bottom page margin)\r
-                * @param int $fm distance in user units\r
-                * @access public\r
-                */\r
-               public function setFooterMargin($fm=10) {\r
-                       $this->footer_margin = $fm;\r
-               }\r
-               \r
-               /**\r
-                * Returns footer margin in user units.\r
-                * @return float\r
-                * @since 4.0.012 (2008-07-24)\r
-                * @access public\r
-                */\r
-               public function getFooterMargin() {\r
-                       return $this->footer_margin;\r
-               }\r
-               /**\r
-                * Set a flag to print page header.\r
-                * @param boolean $val set to true to print the page header (default), false otherwise. \r
-                * @access public\r
-                */\r
-               public function setPrintHeader($val=true) {\r
-                       $this->print_header = $val;\r
-               }\r
-               \r
-               /**\r
-                * Set a flag to print page footer.\r
-                * @param boolean $value set to true to print the page footer (default), false otherwise. \r
-                * @access public\r
-                */\r
-               public function setPrintFooter($val=true) {\r
-                       $this->print_footer = $val;\r
-               }\r
-               \r
-               /**\r
-                * Return the right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image\r
-                * @return float \r
-                * @access public\r
-                */\r
-               public function getImageRBX() {\r
-                       return $this->img_rb_x;\r
-               }\r
-               \r
-               /**\r
-                * Return the right-bottom (or left-bottom for RTL) corner Y coordinate of last inserted image\r
-                * @return float \r
-                * @access public\r
-                */\r
-               public function getImageRBY() {\r
-                       return $this->img_rb_y;\r
-               }\r
-               \r
-               /**\r
-                * This method is used to render the page header.\r
-                * It is automatically called by AddPage() and could be overwritten in your own inherited class.\r
-                * @access public\r
-                */\r
-               public function Header() {\r
-                       $ormargins = $this->getOriginalMargins();\r
-                       $headerfont = $this->getHeaderFont();\r
-                       $headerdata = $this->getHeaderData();\r
-                       if (($headerdata['logo']) AND ($headerdata['logo'] != K_BLANK_IMAGE)) {\r
-                               $this->Image(K_PATH_IMAGES.$headerdata['logo'], $this->GetX(), $this->getHeaderMargin(), $headerdata['logo_width']);\r
-                               $imgy = $this->getImageRBY();\r
-                       } else {\r
-                               $imgy = $this->GetY();\r
-                       }\r
-                       $cell_height = round(($this->getCellHeightRatio() * $headerfont[2]) / $this->getScaleFactor(), 2);\r
-                       // set starting margin for text data cell\r
-                       if ($this->getRTL()) {\r
-                               $header_x = $ormargins['right'] + ($headerdata['logo_width'] * 1.1);\r
-                       } else {\r
-                               $header_x = $ormargins['left'] + ($headerdata['logo_width'] * 1.1);\r
-                       }\r
-                       $this->SetTextColor(0, 0, 0);\r
-                       // header title\r
-                       $this->SetFont($headerfont[0], 'B', $headerfont[2] + 1);\r
-                       $this->SetX($header_x);                 \r
-                       $this->Cell(0, $cell_height, $headerdata['title'], 0, 1, '', 0, '', 0);\r
-                       // header string\r
-                       $this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]);\r
-                       $this->SetX($header_x);\r
-                       $this->MultiCell(0, $cell_height, $headerdata['string'], 0, '', 0, 1, '', '', true, 0, false);\r
-                       // print an ending header line\r
-                       $this->SetLineStyle(array('width' => 0.85 / $this->getScaleFactor(), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));\r
-                       $this->SetY((2.835 / $this->getScaleFactor()) + max($imgy, $this->GetY()));\r
-                       if ($this->getRTL()) {\r
-                               $this->SetX($ormargins['right']);\r
-                       } else {\r
-                               $this->SetX($ormargins['left']);\r
-                       }\r
-                       $this->Cell(0, 0, '', 'T', 0, 'C');\r
-               }\r
-               \r
-               /**\r
-                * This method is used to render the page footer. \r
-                * It is automatically called by AddPage() and could be overwritten in your own inherited class.\r
-                * @access public\r
-                */\r
-               public function Footer() {                              \r
-                       $cur_y = $this->GetY();\r
-                       $ormargins = $this->getOriginalMargins();\r
-                       $this->SetTextColor(0, 0, 0);                   \r
-                       //set style for cell border\r
-                       $line_width = 0.85 / $this->getScaleFactor();\r
-                       $this->SetLineStyle(array('width' => $line_width, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));\r
-                       //print document barcode\r
-                       $barcode = $this->getBarcode();\r
-                       if (!empty($barcode)) {\r
-                               $this->Ln($line_width);\r
-                               $barcode_width = round(($this->getPageWidth() - $ormargins['left'] - $ormargins['right'])/3);\r
-                               $this->write1DBarcode($barcode, 'C128B', $this->GetX(), $cur_y + $line_width, $barcode_width, (($this->getFooterMargin() / 3) - $line_width), 0.3, '', '');     \r
-                       }
-                       if (empty($this->pagegroups)) {
-                               $pagenumtxt = $this->l['w_page'].' '.$this->getAliasNumPage().' / '.$this->getAliasNbPages();
-                       } else {\r
-                               $pagenumtxt = $this->l['w_page'].' '.$this->getPageNumGroupAlias().' / '.$this->getPageGroupAlias();
-                       }               \r
-                       $this->SetY($cur_y);\r
-                       //Print page number\r
-                       if ($this->getRTL()) {\r
-                               $this->SetX($ormargins['right']);\r
-                               $this->Cell(0, 0, $pagenumtxt, 'T', 0, 'L');\r
-                       } else {\r
-                               $this->SetX($ormargins['left']);\r
-                               $this->Cell(0, 0, $pagenumtxt, 'T', 0, 'R');\r
-                       }\r
-               }\r
-               \r
-               /**\r
-                * This method is used to render the page header. \r
-                * @access protected\r
-                * @since 4.0.012 (2008-07-24)\r
-                */\r
-               protected function setHeader() {\r
-                       if ($this->print_header) {
-                               $lasth = $this->lasth;\r
-                               $this->_out('q');\r
-                               $this->rMargin = $this->original_rMargin;\r
+               */
+               protected $lasth;
+
+               /**
+               * @var line width in user unit
+               * @access protected
+               */
+               protected $LineWidth;
+
+               /**
+               * @var array of standard font names
+               * @access protected
+               */
+               protected $CoreFonts;
+
+               /**
+               * @var array of used fonts
+               * @access protected
+               */
+               protected $fonts = array();
+
+               /**
+               * @var array of font files
+               * @access protected
+               */
+               protected $FontFiles = array();
+
+               /**
+               * @var array of encoding differences
+               * @access protected
+               */
+               protected $diffs = array();
+
+               /**
+               * @var array of used images
+               * @access protected
+               */
+               protected $images = array();
+
+               /**
+               * @var array of Annotations in pages
+               * @access protected
+               */
+               protected $PageAnnots = array();
+
+               /**
+               * @var array of internal links
+               * @access protected
+               */
+               protected $links = array();
+
+               /**
+               * @var current font family
+               * @access protected
+               */
+               protected $FontFamily;
+
+               /**
+               * @var current font style
+               * @access protected
+               */
+               protected $FontStyle;
+               
+               /**
+               * @var current font ascent (distance between font top and baseline)
+               * @access protected
+               * @since 2.8.000 (2007-03-29)
+               */
+               protected $FontAscent;
+               
+               /**
+               * @var current font descent (distance between font bottom and baseline)
+               * @access protected
+               * @since 2.8.000 (2007-03-29)
+               */
+               protected $FontDescent;
+
+               /**
+               * @var underlining flag
+               * @access protected
+               */
+               protected $underline;
+
+               /**
+               * @var current font info
+               * @access protected
+               */
+               protected $CurrentFont;
+
+               /**
+               * @var current font size in points
+               * @access protected
+               */
+               protected $FontSizePt;
+
+               /**
+               * @var current font size in user unit
+               * @access protected
+               */
+               protected $FontSize;
+
+               /**
+               * @var commands for drawing color
+               * @access protected
+               */
+               protected $DrawColor;
+
+               /**
+               * @var commands for filling color
+               * @access protected
+               */
+               protected $FillColor;
+
+               /**
+               * @var commands for text color
+               * @access protected
+               */
+               protected $TextColor;
+
+               /**
+               * @var indicates whether fill and text colors are different
+               * @access protected
+               */
+               protected $ColorFlag;
+
+               /**
+               * @var automatic page breaking
+               * @access protected
+               */
+               protected $AutoPageBreak;
+
+               /**
+               * @var threshold used to trigger page breaks
+               * @access protected
+               */
+               protected $PageBreakTrigger;
+
+               /**
+               * @var flag set when processing footer
+               * @access protected
+               */
+               protected $InFooter = false;
+
+               /**
+               * @var zoom display mode
+               * @access protected
+               */
+               protected $ZoomMode;
+
+               /**
+               * @var layout display mode
+               * @access protected
+               */
+               protected $LayoutMode;
+
+               /**
+               * @var title
+               * @access protected
+               */
+               protected $title = '';
+
+               /**
+               * @var subject
+               * @access protected
+               */
+               protected $subject = '';
+
+               /**
+               * @var author
+               * @access protected
+               */
+               protected $author = '';
+
+               /**
+               * @var keywords
+               * @access protected
+               */
+               protected $keywords = '';
+
+               /**
+               * @var creator
+               * @access protected
+               */
+               protected $creator = '';
+
+               /**
+               * @var alias for total number of pages
+               * @access protected
+               */
+               protected $AliasNbPages = '{nb}';
+               
+               /**
+               * @var alias for page number
+               * @access protected
+               */
+               protected $AliasNumPage = '{pnb}';
+               
+               /**
+               * @var right-bottom corner X coordinate of inserted image
+               * @since 2002-07-31
+               * @author Nicola Asuni
+               * @access protected
+               */
+               protected $img_rb_x;
+
+               /**
+               * @var right-bottom corner Y coordinate of inserted image
+               * @since 2002-07-31
+               * @author Nicola Asuni
+               * @access protected
+               */
+               protected $img_rb_y;
+
+               /**
+               * @var adjusting factor to convert pixels to user units.
+               * @since 2004-06-14
+               * @author Nicola Asuni
+               * @access protected
+               */
+               protected $imgscale = 1;
+
+               /**
+               * @var boolean set to true when the input text is unicode (require unicode fonts)
+               * @since 2005-01-02
+               * @author Nicola Asuni
+               * @access protected
+               */
+               protected $isunicode = false;
+
+               /**
+               * @var PDF version
+               * @since 1.5.3
+               * @access protected
+               */
+               protected $PDFVersion = '1.7';
+               
+               
+               // ----------------------
+               
+               /**
+                * @var Minimum distance between header and top page margin.
+                * @access protected
+                */
+               protected $header_margin;
+               
+               /**
+                * @var Minimum distance between footer and bottom page margin.
+                * @access protected
+                */
+               protected $footer_margin;
+               
+               /**
+                * @var original left margin value
+                * @access protected
+                * @since 1.53.0.TC013
+                */
+               protected $original_lMargin;
+               
+               /**
+                * @var original right margin value
+                * @access protected
+                * @since 1.53.0.TC013
+                */
+               protected $original_rMargin;
+                       
+               /**
+                * @var Header font.
+                * @access protected
+                */
+               protected $header_font;
+               
+               /**
+                * @var Footer font.
+                * @access protected
+                */
+               protected $footer_font;
+               
+               /**
+                * @var Language templates.
+                * @access protected
+                */
+               protected $l;
+               
+               /**
+                * @var Barcode to print on page footer (only if set).
+                * @access protected
+                */
+               protected $barcode = false;
+               
+               /**
+                * @var If true prints header
+                * @access protected
+                */
+               protected $print_header = true;
+               
+               /**
+                * @var If true prints footer.
+                * @access protected
+                */
+               protected $print_footer = true;
+                       
+               /**
+                * @var Header image logo.
+                * @access protected
+                */
+               protected $header_logo = '';
+               
+               /**
+                * @var Header image logo width in mm.
+                * @access protected
+                */
+               protected $header_logo_width = 30;
+               
+               /**
+                * @var String to print as title on document header.
+                * @access protected
+                */
+               protected $header_title = '';
+               
+               /**
+                * @var String to print on document header.
+                * @access protected
+                */
+               protected $header_string = '';
+               
+               /**
+                * @var Default number of columns for html table.
+                * @access protected
+                */
+               protected $default_table_columns = 4;
+               
+               
+               // variables for html parser
+               
+               /**
+                * @var HTML PARSER: array to store current link and rendering styles.
+                * @access protected
+                */
+               protected $HREF = array();
+               
+               /**
+                * @var store a list of available fonts on filesystem.
+                * @access protected
+                */
+               protected $fontlist = array();
+               
+               /**
+                * @var current foreground color
+                * @access protected
+                */
+               protected $fgcolor;
+                                               
+               /**
+                * @var HTML PARSER: array of boolean values, true in case of ordered list (OL), false otherwise.
+                * @access protected
+                */
+               protected $listordered = array();
+               
+               /**
+                * @var HTML PARSER: array count list items on nested lists.
+                * @access protected
+                */
+               protected $listcount = array();
+               
+               /**
+                * @var HTML PARSER: current list nesting level.
+                * @access protected
+                */
+               protected $listnum = 0;
+               
+               /**
+                * @var HTML PARSER: indent amount for lists.
+                * @access protected
+                */
+               protected $listindent;
+               
+               /**
+                * @var current background color
+                * @access protected
+                */
+               protected $bgcolor;
+               
+               /**
+                * @var Store temporary font size in points.
+                * @access protected
+                */
+               protected $tempfontsize = 10;
+               
+               /**
+                * @var spacer for LI tags.
+                * @access protected
+                */
+               protected $lispacer = '';
+               
+               /**
+                * @var default encoding
+                * @access protected
+                * @since 1.53.0.TC010
+                */
+               protected $encoding = 'UTF-8';
+               
+               /**
+                * @var PHP internal encoding
+                * @access protected
+                * @since 1.53.0.TC016
+                */
+               protected $internal_encoding;
+               
+               /**
+                * @var indicates if the document language is Right-To-Left
+                * @access protected
+                * @since 2.0.000
+                */
+               protected $rtl = false;
+               
+               /**
+                * @var used to force RTL or LTR string inversion
+                * @access protected
+                * @since 2.0.000
+                */
+               protected $tmprtl = false;
+               
+               // --- Variables used for document encryption:
+               
+               /**
+                * Indicates whether document is protected
+                * @access protected
+                * @since 2.0.000 (2008-01-02)
+                */
+               protected $encrypted;
+               
+               /**
+                * U entry in pdf document
+                * @access protected
+                * @since 2.0.000 (2008-01-02)
+                */
+               protected $Uvalue;
+               
+               /**
+                * O entry in pdf document
+                * @access protected
+                * @since 2.0.000 (2008-01-02)
+                */
+               protected $Ovalue;
+               
+               /**
+                * P entry in pdf document
+                * @access protected
+                * @since 2.0.000 (2008-01-02)
+                */
+               protected $Pvalue;
+               
+               /**
+                * encryption object id
+                * @access protected
+                * @since 2.0.000 (2008-01-02)
+                */
+               protected $enc_obj_id;
+               
+               /**
+                * last RC4 key encrypted (cached for optimisation)
+                * @access protected
+                * @since 2.0.000 (2008-01-02)
+                */
+               protected $last_rc4_key;
+               
+               /**
+                * last RC4 computed key
+                * @access protected
+                * @since 2.0.000 (2008-01-02)
+                */
+               protected $last_rc4_key_c;
+               
+               /**
+                * RC4 padding
+                * @access protected
+                */
+               protected $padding = "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A";
+               
+               /**
+                * RC4 encryption key
+                * @access protected
+                */
+               protected $encryption_key;
+               
+               // --- bookmark ---
+               
+               /**
+                * Outlines for bookmark
+                * @access protected
+                * @since 2.1.002 (2008-02-12)
+                */
+               protected $outlines = array();
+               
+               /**
+                * Outline root for bookmark
+                * @access protected
+                * @since 2.1.002 (2008-02-12)
+                */
+               protected $OutlineRoot;
+               
+               
+               // --- javascript and form ---
+               
+               /**
+                * javascript code
+                * @access protected
+                * @since 2.1.002 (2008-02-12)
+                */
+               protected $javascript = '';
+               
+               /**
+                * javascript counter
+                * @access protected
+                * @since 2.1.002 (2008-02-12)
+                */
+               protected $n_js;
+
+               /**
+                * line trough state
+                * @access protected
+                * @since 2.8.000 (2008-03-19)
+                */
+               protected $linethrough;
+
+               // --- Variables used for User's Rights ---
+               // See PDF reference chapter 8.7 Digital Signatures
+
+               /**
+                * If true enables user's rights on PDF reader
+                * @access protected
+                * @since 2.9.000 (2008-03-26)
+                */
+               protected $ur;
+
+               /**
+                * Names specifying additional document-wide usage rights for the document.
+                * @access protected
+                * @since 2.9.000 (2008-03-26)
+                */
+               protected $ur_document;
+
+               /**
+                * Names specifying additional annotation-related usage rights for the document.
+                * @access protected
+                * @since 2.9.000 (2008-03-26)
+                */
+               protected $ur_annots;
+
+               /**
+                * Names specifying additional form-field-related usage rights for the document.
+                * @access protected
+                * @since 2.9.000 (2008-03-26)
+                */
+               protected $ur_form;
+
+               /**
+                * Names specifying additional signature-related usage rights for the document.
+                * @access protected
+                * @since 2.9.000 (2008-03-26)
+                */
+               protected $ur_signature;
+
+               /**
+                * Dot Per Inch Document Resolution (do not change)
+                * @access protected
+                * @since 3.0.000 (2008-03-27)
+                */
+               protected $dpi = 72;
+               
+               /**
+                * Array of page numbers were a new page group was started
+                * @access protected
+                * @since 3.0.000 (2008-03-27)
+                */
+               protected $newpagegroup = array();
+               
+               /**
+                * Contains the number of pages of the groups
+                * @access protected
+                * @since 3.0.000 (2008-03-27)
+                */
+               protected $pagegroups;
+               
+               /**
+                * Contains the alias of the current page group
+                * @access protected
+                * @since 3.0.000 (2008-03-27)
+                */
+               protected $currpagegroup; 
+               
+               /**
+                * Restrict the rendering of some elements to screen or printout.
+                * @access protected
+                * @since 3.0.000 (2008-03-27)
+                */
+               protected $visibility = 'all';
+               
+               /**
+                * Print visibility.
+                * @access protected
+                * @since 3.0.000 (2008-03-27)
+                */
+               protected $n_ocg_print;
+               
+               /**
+                * View visibility.
+                * @access protected
+                * @since 3.0.000 (2008-03-27)
+                */
+               protected $n_ocg_view;
+               
+               /**
+                * Array of transparency objects and parameters.
+                * @access protected
+                * @since 3.0.000 (2008-03-27)
+                */
+               protected $extgstates;
+               
+               /**
+                * Set the default JPEG compression quality (1-100)
+                * @access protected
+                * @since 3.0.000 (2008-03-27)
+                */
+               protected $jpeg_quality;
+               
+               /**
+                * Default cell height ratio.
+                * @access protected
+                * @since 3.0.014 (2008-05-23)
+                */
+               protected $cell_height_ratio = K_CELL_HEIGHT_RATIO;
+               
+               /**
+                * PDF viewer preferences.
+                * @access protected
+                * @since 3.1.000 (2008-06-09)
+                */
+               protected $viewer_preferences;
+               
+               /**
+                * A name object specifying how the document should be displayed when opened.
+                * @access protected
+                * @since 3.1.000 (2008-06-09)
+                */
+               protected $PageMode;
+               
+               /**
+                * Array for storing gradient information.
+                * @access protected
+                * @since 3.1.000 (2008-06-09)
+                */
+               protected $gradients = array();
+               
+               /**
+                * Array used to store positions inside the pages buffer.
+                * keys are the page numbers
+                * @access protected
+                * @since 3.2.000 (2008-06-26)
+                */
+               protected $intmrk = array();
+               
+               /**
+                * Array used to store content positions inside the pages buffer.
+                * keys are the page numbers
+                * @access protected
+                * @since 4.6.021 (2009-07-20)
+                */
+               protected $cntmrk = array();
+               
+               /**
+                * Array used to store footer positions of each page.
+                * @access protected
+                * @since 3.2.000 (2008-07-01)
+                */
+               protected $footerpos = array();
+               
+               
+               /**
+                * Array used to store footer lenght of each page.
+                * @access protected
+                * @since 4.0.014 (2008-07-29)
+                */
+               protected $footerlen = array();
+               
+               /**
+                * True if a newline is created.
+                * @access protected
+                * @since 3.2.000 (2008-07-01)
+                */
+               protected $newline = true;
+               
+               /**
+                * End position of the latest inserted line
+                * @access protected
+                * @since 3.2.000 (2008-07-01)
+                */
+               protected $endlinex = 0;
+               
+               /**
+                * PDF string for last line width
+                * @access protected
+                * @since 4.0.006 (2008-07-16)
+                */
+               protected $linestyleWidth = '';
+               
+               /**
+                * PDF string for last line width
+                * @access protected
+                * @since 4.0.006 (2008-07-16)
+                */
+               protected $linestyleCap = '0 J';
+               
+               /**
+                * PDF string for last line width
+                * @access protected
+                * @since 4.0.006 (2008-07-16)
+                */
+               protected $linestyleJoin = '0 j';
+               
+               /**
+                * PDF string for last line width
+                * @access protected
+                * @since 4.0.006 (2008-07-16)
+                */
+               protected $linestyleDash = '[] 0 d';
+               
+               /**
+                * True if marked-content sequence is open
+                * @access protected
+                * @since 4.0.013 (2008-07-28)
+                */
+               protected $openMarkedContent = false;
+               
+               /**
+                * Count the latest inserted vertical spaces on HTML
+                * @access protected
+                * @since 4.0.021 (2008-08-24)
+                */
+               protected $htmlvspace = 0;
+               
+               /**
+                * Array of Spot colors
+                * @access protected
+                * @since 4.0.024 (2008-09-12)
+                */
+               protected $spot_colors = array();
+               
+               /**
+                * Symbol used for HTML unordered list items
+                * @access protected
+                * @since 4.0.028 (2008-09-26)
+                */
+               protected $lisymbol = '';
+               
+               /**
+                * String used to mark the beginning and end of EPS image blocks
+                * @access protected
+                * @since 4.1.000 (2008-10-18)
+                */
+               protected $epsmarker = 'x#!#EPS#!#x';
+               
+               /**
+                * Array of transformation matrix
+                * @access protected
+                * @since 4.2.000 (2008-10-29)
+                */
+               protected $transfmatrix = array();
+
+               /**
+                * Current key for transformation matrix
+                * @access protected
+                * @since 4.8.005 (2009-09-17)
+                */
+               protected $transfmatrix_key = 0;
+
+               /**
+                * Booklet mode for double-sided pages
+                * @access protected
+                * @since 4.2.000 (2008-10-29)
+                */
+               protected $booklet = false;
+               
+               /**
+                * Epsilon value used for float calculations
+                * @access protected
+                * @since 4.2.000 (2008-10-29)
+                */
+               protected $feps = 0.005;
+               
+               /**
+                * Array used for custom vertical spaces for HTML tags
+                * @access protected
+                * @since 4.2.001 (2008-10-30)
+                */
+               protected $tagvspaces = array();
+               
+               /**
+                * @var HTML PARSER: custom indent amount for lists.
+                * Negative value means disabled.
+                * @access protected
+                * @since 4.2.007 (2008-11-12)
+                */
+               protected $customlistindent = -1;
+               
+               /**
+                * @var if true keeps the border open for the cell sides that cross the page.
+                * @access protected
+                * @since 4.2.010 (2008-11-14)
+                */
+               protected $opencell = true;
+
+               /**
+                * @var array of files to embedd
+                * @access protected
+                * @since 4.4.000 (2008-12-07)
+                */
+               protected $embeddedfiles = array();
+
+               /**
+                * @var boolean true when inside html pre tag
+                * @access protected
+                * @since 4.4.001 (2008-12-08)
+                */
+               protected $premode = false;
+
+               /**
+                * Array used to store positions of graphics transformation blocks inside the page buffer.
+                * keys are the page numbers
+                * @access protected
+                * @since 4.4.002 (2008-12-09)
+                */
+               protected $transfmrk = array();
+
+               /**
+                * Default color for html links
+                * @access protected
+                * @since 4.4.003 (2008-12-09)
+                */
+               protected $htmlLinkColorArray = array(0, 0, 255);
+
+               /**
+                * Default font style to add to html links
+                * @access protected
+                * @since 4.4.003 (2008-12-09)
+                */
+               protected $htmlLinkFontStyle = 'U';
+
+               /**
+                * Counts the number of pages.
+                * @access protected
+                * @since 4.5.000 (2008-12-31)
+                */
+               protected $numpages = 0;
+
+               /**
+                * Array containing page lenghts in bytes.
+                * @access protected
+                * @since 4.5.000 (2008-12-31)
+                */
+               protected $pagelen = array();
+
+               /**
+                * Counts the number of pages.
+                * @access protected
+                * @since 4.5.000 (2008-12-31)
+                */
+               protected $numimages = 0;
+
+               /**
+                * Store the image keys.
+                * @access protected
+                * @since 4.5.000 (2008-12-31)
+                */
+               protected $imagekeys = array();
+
+               /**
+                * Lenght of the buffer in bytes.
+                * @access protected
+                * @since 4.5.000 (2008-12-31)
+                */
+               protected $bufferlen = 0;
+
+               /**
+                * If true enables disk caching.
+                * @access protected
+                * @since 4.5.000 (2008-12-31)
+                */
+               protected $diskcache = false;
+
+               /**
+                * Counts the number of fonts.
+                * @access protected
+                * @since 4.5.000 (2009-01-02)
+                */
+               protected $numfonts = 0;
+
+               /**
+                * Store the font keys.
+                * @access protected
+                * @since 4.5.000 (2009-01-02)
+                */
+               protected $fontkeys = array();
+               
+               /**
+                * Store the font object IDs.
+                * @access protected
+                * @since 4.8.001 (2009-09-09)
+                */
+               protected $font_obj_ids = array();
+
+               /**
+                * Store the fage status (true when opened, false when closed).
+                * @access protected
+                * @since 4.5.000 (2009-01-02)
+                */
+               protected $pageopen = array();
+               
+               /**
+                * Default monospaced font
+                * @access protected
+                * @since 4.5.025 (2009-03-10)
+                */
+               protected $default_monospaced_font = 'courier';
+
+               /**
+                * Used to store a cloned copy of the current class object
+                * @access protected
+                * @since 4.5.029 (2009-03-19)
+                */
+               protected $objcopy;
+
+               /**
+                * Array used to store the lenghts of cache files
+                * @access protected
+                * @since 4.5.029 (2009-03-19)
+                */
+               protected $cache_file_lenght = array();
+
+               /**
+                * Table header content to be repeated on each new page
+                * @access protected
+                * @since 4.5.030 (2009-03-20)
+                */
+               protected $thead = '';
+
+               /**
+                * Margins used for table header.
+                * @access protected
+                * @since 4.5.030 (2009-03-20)
+                */
+               protected $theadMargins = array();
+
+               /**
+                * Cache array for UTF8StringToArray() method.
+                * @access protected
+                * @since 4.5.037 (2009-04-07)
+                */
+               protected $cache_UTF8StringToArray = array();
+
+               /**
+                * Maximum size of cache array used for UTF8StringToArray() method.
+                * @access protected
+                * @since 4.5.037 (2009-04-07)
+                */
+               protected $cache_maxsize_UTF8StringToArray = 8;
+
+               /**
+                * Current size of cache array used for UTF8StringToArray() method.
+                * @access protected
+                * @since 4.5.037 (2009-04-07)
+                */
+               protected $cache_size_UTF8StringToArray = 0;
+
+               /**
+                * If true enables document signing
+                * @access protected
+                * @since 4.6.005 (2009-04-24)
+                */
+               protected $sign = false;
+
+               /**
+                * Signature data
+                * @access protected
+                * @since 4.6.005 (2009-04-24)
+                */
+               protected $signature_data = array();
+
+               /**
+                * Signature max lenght
+                * @access protected
+                * @since 4.6.005 (2009-04-24)
+                */
+               protected $signature_max_lenght = 11742;
+
+               /**
+                * Regular expression used to find blank characters used for word-wrapping.
+                * @access protected
+                * @since 4.6.006 (2009-04-28)
+                */
+               protected $re_spaces = '/[\s]/';
+
+               /**
+                * Signature object ID
+                * @access protected
+                * @since 4.6.022 (2009-06-23)
+                */
+               protected $sig_obj_id = 0;
+
+               /**
+                * ByteRange placemark used during signature process.
+                * @access protected
+                * @since 4.6.028 (2009-08-25)
+                */
+               protected $byterange_string = '/ByteRange[0 ********** ********** **********]';
+
+               /**
+                * Placemark used during signature process.
+                * @access protected
+                * @since 4.6.028 (2009-08-25)
+                */
+               protected $sig_annot_ref = '***SIGANNREF*** 0 R';
+
+               /**
+                * ID of page objects
+                * @access protected
+                * @since 4.7.000 (2009-08-29)
+                */
+               protected $page_obj_id = array();
+
+               /**
+                * Start ID for embedded file objects
+                * @access protected
+                * @since 4.7.000 (2009-08-29)
+                */
+               protected $embedded_start_obj_id = 100000;
+
+               /**
+                * Start ID for annotation objects
+                * @access protected
+                * @since 4.7.000 (2009-08-29)
+                */
+               protected $annots_start_obj_id = 200000;
+               
+               /**
+                * Max ID of annotation object
+                * @access protected
+                * @since 4.7.000 (2009-08-29)
+                */
+               protected $annot_obj_id = 200000;
+               
+               /**
+                * Current ID of annotation object
+                * @access protected
+                * @since 4.8.003 (2009-09-15)
+                */
+               protected $curr_annot_obj_id = 200000;
+               
+               /**
+                * List of form annotations IDs
+                * @access protected
+                * @since 4.8.000 (2009-09-07)
+                */
+               protected $form_obj_id = array();
+               
+               /*
+                * Deafult Javascript field properties. Possible values are described on official Javascript for Acrobat API reference. Annotation options can be directly specified using the 'aopt' entry.
+                * @access protected
+                * @since 4.8.000 (2009-09-07)
+                */
+               protected $default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128));
+
+               /**
+                * Javascript objects array
+                * @access protected
+                * @since 4.8.000 (2009-09-07)
+                */
+               protected $js_objects = array();
+
+               /**
+                * Start ID for javascript objects
+                * @access protected
+                * @since 4.8.000 (2009-09-07)
+                */
+               protected $js_start_obj_id = 300000;
+               
+               /**
+                * Current ID of javascript object
+                * @access protected
+                * @since 4.8.000 (2009-09-07)
+                */
+               protected $js_obj_id = 300000;
+               
+               /**
+                * Current form action (used during XHTML rendering)
+                * @access protected
+                * @since 4.8.000 (2009-09-07)
+                */
+               protected $form_action = '';
+
+               /**
+                * Current form encryption type (used during XHTML rendering)
+                * @access protected
+                * @since 4.8.000 (2009-09-07)
+                */
+               protected $form_enctype = 'application/x-www-form-urlencoded';
+
+               /**
+                * Current method to submit forms.
+                * @access protected
+                * @since 4.8.000 (2009-09-07)
+                */
+               protected $form_mode = 'post';
+
+               /**
+                * Start ID for appearance streams XObjects
+                * @access protected
+                * @since 4.8.001 (2009-09-09)
+                */
+               protected $apxo_start_obj_id = 400000;
+               
+               /**
+                * Current ID of appearance streams XObjects
+                * @access protected
+                * @since 4.8.001 (2009-09-09)
+                */
+               protected $apxo_obj_id = 400000;
+               
+               /**
+                * List of fonts used on form fields (fontname => fontkey).
+                * @access protected
+                * @since 4.8.001 (2009-09-09)
+                */
+               protected $annotation_fonts = array();
+               
+               /**
+                * List of radio buttons parent objects.
+                * @access protected
+                * @since 4.8.001 (2009-09-09)
+                */
+               protected $radiobutton_groups = array();
+               
+               /**
+                * List of radio group objects IDs
+                * @access protected
+                * @since 4.8.001 (2009-09-09)
+                */
+               protected $radio_groups = array();
+               
+               /**
+                * Text indentation value (used for text-indent CSS attribute) 
+                * @access protected
+                * @since 4.8.006 (2009-09-23)
+                */
+               protected $textindent = 0;
+               
+               /**
+                * Store page number when startTransaction() is called.
+                * @access protected
+                * @since 4.8.006 (2009-09-23)
+                */
+               protected $start_transaction_page = 0;
+               
+               //------------------------------------------------------------
+               // METHODS
+               //------------------------------------------------------------
+
+               /**
+                * This is the class constructor. 
+                * It allows to set up the page format, the orientation and 
+                * the measure unit used in all the methods (except for the font sizes).
+                * @since 1.0
+                * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or Portrait (default)</li><li>L or Landscape</li></ul>
+                * @param string $unit User measure unit. Possible values are:<ul><li>pt: point</li><li>mm: millimeter (default)</li><li>cm: centimeter</li><li>in: inch</li></ul><br />A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit.
+                * @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).<ul><li>4A0</li><li>2A0</li><li>A0</li><li>A1</li><li>A2</li><li>A3</li><li>A4 (default)</li><li>A5</li><li>A6</li><li>A7</li><li>A8</li><li>A9</li><li>A10</li><li>B0</li><li>B1</li><li>B2</li><li>B3</li><li>B4</li><li>B5</li><li>B6</li><li>B7</li><li>B8</li><li>B9</li><li>B10</li><li>C0</li><li>C1</li><li>C2</li><li>C3</li><li>C4</li><li>C5</li><li>C6</li><li>C7</li><li>C8</li><li>C9</li><li>C10</li><li>RA0</li><li>RA1</li><li>RA2</li><li>RA3</li><li>RA4</li><li>SRA0</li><li>SRA1</li><li>SRA2</li><li>SRA3</li><li>SRA4</li><li>LETTER</li><li>LEGAL</li><li>EXECUTIVE</li><li>FOLIO</li></ul>
+                * @param boolean $unicode TRUE means that the input text is unicode (default = true)
+                * @param boolean $diskcache if TRUE reduce the RAM memory usage by caching temporary data on filesystem (slower).
+                * @param String $encoding charset encoding; default is UTF-8
+                * @access public
+                */
+               public function __construct($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8', $diskcache=false) {
+                       /* Set internal character encoding to ASCII */
+                       if (function_exists('mb_internal_encoding') AND mb_internal_encoding()) {
+                               $this->internal_encoding = mb_internal_encoding();
+                               mb_internal_encoding('ASCII');
+                       }
+                       // set disk caching
+                       $this->diskcache = $diskcache ? true : false;
+                       // set language direction
+                       $this->rtl = false;
+                       $this->tmprtl = false;
+                       //Some checks
+                       $this->_dochecks();
+                       //Initialization of properties
+                       $this->isunicode = $unicode;
+                       $this->page = 0;
+                       $this->transfmrk[0] = array();
+                       $this->pagedim = array();
+                       $this->n = 2;
+                       $this->buffer = '';
+                       $this->pages = array();
+                       $this->state = 0;
+                       $this->fonts = array();
+                       $this->FontFiles = array();
+                       $this->diffs = array();
+                       $this->images = array();
+                       $this->links = array();
+                       $this->gradients = array();
+                       $this->InFooter = false;
+                       $this->lasth = 0;
+                       $this->FontFamily = 'helvetica';
+                       $this->FontStyle = '';
+                       $this->FontSizePt = 12;
+                       $this->underline = false;
+                       $this->linethrough = false;
+                       $this->DrawColor = '0 G';
+                       $this->FillColor = '0 g';
+                       $this->TextColor = '0 g';
+                       $this->ColorFlag = false;
+                       // encryption values
+                       $this->encrypted = false;
+                       $this->last_rc4_key = '';
+                       $this->padding = "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A";
+                       //Standard Unicode fonts
+                       $this->CoreFonts = array(
+                               'courier'=>'Courier',
+                               'courierB'=>'Courier-Bold',
+                               'courierI'=>'Courier-Oblique',
+                               'courierBI'=>'Courier-BoldOblique',
+                               'helvetica'=>'Helvetica',
+                               'helveticaB'=>'Helvetica-Bold',
+                               'helveticaI'=>'Helvetica-Oblique',
+                               'helveticaBI'=>'Helvetica-BoldOblique',
+                               'times'=>'Times-Roman',
+                               'timesB'=>'Times-Bold',
+                               'timesI'=>'Times-Italic',
+                               'timesBI'=>'Times-BoldItalic',
+                               'symbol'=>'Symbol',
+                               'zapfdingbats'=>'ZapfDingbats'
+                       );
+                       //Set scale factor
+                       $this->setPageUnit($unit);
+                       // set page format and orientation
+                       $this->setPageFormat($format, $orientation);
+                       //Page margins (1 cm)
+                       $margin = 28.35 / $this->k;
+                       $this->SetMargins($margin, $margin);
+                       //Interior cell margin
+                       $this->cMargin = $margin / 10;
+                       //Line width (0.2 mm)
+                       $this->LineWidth = 0.57 / $this->k;
+                       $this->linestyleWidth = sprintf('%.2F w', ($this->LineWidth * $this->k));
+                       $this->linestyleCap = '0 J';
+                       $this->linestyleJoin = '0 j';
+                       $this->linestyleDash = '[] 0 d';
+                       //Automatic page break
+                       $this->SetAutoPageBreak(true, (2 * $margin));
+                       //Full width display mode
+                       $this->SetDisplayMode('fullwidth');
+                       //Compression
+                       $this->SetCompression(true);
+                       //Set default PDF version number
+                       $this->PDFVersion = '1.7';
+                       $this->encoding = $encoding;
+                       $this->HREF = array();
+                       $this->getFontsList();
+                       $this->fgcolor = array('R' => 0, 'G' => 0, 'B' => 0);
+                       $this->bgcolor = array('R' => 255, 'G' => 255, 'B' => 255);
+                       $this->extgstates = array();
+                       // user's rights
+                       $this->sign = false;
+                       $this->ur = false;
+                       $this->ur_document = '/FullSave';
+                       $this->ur_annots = '/Create/Delete/Modify/Copy/Import/Export';
+                       $this->ur_form = '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate';
+                       $this->ur_signature = '/Modify';                        
+                       // set default JPEG quality
+                       $this->jpeg_quality = 75;
+                       // initialize some settings
+                       $this->utf8Bidi(array(''), '');
+                       // set default font
+                       $this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt);
+                       // check if PCRE Unicode support is enabled
+                       if ($this->isunicode AND (@preg_match('/\pL/u', 'a') == 1)) {
+                               // PCRE unicode support is turned ON
+                               // \p{Z} or \p{Separator}: any kind of Unicode whitespace or invisible separator.
+                               // \p{Lo} or \p{Other_Letter}: a Unicode letter or ideograph that does not have lowercase and uppercase variants.
+                               // \p{Lo} is needed because Chinese characters are packed next to each other without spaces in between.
+                               //$this->re_spaces = '/[\s\p{Z}\p{Lo}]/u';
+                               $this->re_spaces = '/[\s\p{Z}]/u';
+                       } else {
+                               // PCRE unicode support is turned OFF
+                               $this->re_spaces = '/[\s]/';
+                       }
+                       $this->annot_obj_id = $this->annots_start_obj_id;
+                       $this->curr_annot_obj_id = $this->annots_start_obj_id;
+                       $this->apxo_obj_id = $this->apxo_start_obj_id;
+                       $this->js_obj_id = $this->js_start_obj_id;
+                       $this->default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128));
+               }
+               
+               /**
+                * Default destructor.
+                * @access public
+                * @since 1.53.0.TC016
+                */
+               public function __destruct() {
+                       // restore internal encoding
+                       if (isset($this->internal_encoding) AND !empty($this->internal_encoding)) {
+                               mb_internal_encoding($this->internal_encoding);
+                       }
+                       // unset all class variables
+                       $this->_destroy(true);
+               }
+               
+               /**
+                * Set the units of measure for the document.
+                * @param string $unit User measure unit. Possible values are:<ul><li>pt: point</li><li>mm: millimeter (default)</li><li>cm: centimeter</li><li>in: inch</li></ul><br />A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit.
+                * @access public
+                * @since 3.0.015 (2008-06-06)
+                */
+               public function setPageUnit($unit) {
+               //Set scale factor
+                       switch (strtolower($unit)) {
+                               // points
+                               case 'px':
+                               case 'pt': {
+                                       $this->k = 1;
+                                       break;
+                               }
+                               // millimeters
+                               case 'mm': {
+                                       $this->k = $this->dpi / 25.4;
+                                       break;
+                               }
+                               // centimeters
+                               case 'cm': {
+                                       $this->k = $this->dpi / 2.54;
+                                       break;
+                               }
+                               // inches
+                               case 'in': {
+                                       $this->k = $this->dpi;
+                                       break;
+                               }
+                               // unsupported unit
+                               default : {
+                                       $this->Error('Incorrect unit: '.$unit);
+                                       break;
+                               }
+                       }
+                       if (isset($this->CurOrientation)) {
+                                       $this->setPageOrientation($this->CurOrientation);
+                       }
+               }
+               
+               /**
+               * Set the page format
+               * @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).<ul><li>4A0</li><li>2A0</li><li>A0</li><li>A1</li><li>A2</li><li>A3</li><li>A4 (default)</li><li>A5</li><li>A6</li><li>A7</li><li>A8</li><li>A9</li><li>A10</li><li>B0</li><li>B1</li><li>B2</li><li>B3</li><li>B4</li><li>B5</li><li>B6</li><li>B7</li><li>B8</li><li>B9</li><li>B10</li><li>C0</li><li>C1</li><li>C2</li><li>C3</li><li>C4</li><li>C5</li><li>C6</li><li>C7</li><li>C8</li><li>C9</li><li>C10</li><li>RA0</li><li>RA1</li><li>RA2</li><li>RA3</li><li>RA4</li><li>SRA0</li><li>SRA1</li><li>SRA2</li><li>SRA3</li><li>SRA4</li><li>LETTER</li><li>LEGAL</li><li>EXECUTIVE</li><li>FOLIO</li></ul>
+               * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or PORTRAIT (default)</li><li>L or LANDSCAPE</li></ul>
+               * @access public
+               * @since 3.0.015 (2008-06-06)
+               */
+               public function setPageFormat($format, $orientation='P') {
+                       //Page format
+                       if (is_string($format)) {
+                               // Page formats (45 standard ISO paper formats and 4 american common formats).
+                               // Paper cordinates are calculated in this way: (inches * 72) where (1 inch = 2.54 cm)
+                               switch (strtoupper($format)) {
+                                       case '4A0': {$format = array(4767.87,6740.79); break;}
+                                       case '2A0': {$format = array(3370.39,4767.87); break;}
+                                       case 'A0': {$format = array(2383.94,3370.39); break;}
+                                       case 'A1': {$format = array(1683.78,2383.94); break;}
+                                       case 'A2': {$format = array(1190.55,1683.78); break;}
+                                       case 'A3': {$format = array(841.89,1190.55); break;}
+                                       case 'A4': default: {$format = array(595.28,841.89); break;}
+                                       case 'A5': {$format = array(419.53,595.28); break;}
+                                       case 'A6': {$format = array(297.64,419.53); break;}
+                                       case 'A7': {$format = array(209.76,297.64); break;}
+                                       case 'A8': {$format = array(147.40,209.76); break;}
+                                       case 'A9': {$format = array(104.88,147.40); break;}
+                                       case 'A10': {$format = array(73.70,104.88); break;}
+                                       case 'B0': {$format = array(2834.65,4008.19); break;}
+                                       case 'B1': {$format = array(2004.09,2834.65); break;}
+                                       case 'B2': {$format = array(1417.32,2004.09); break;}
+                                       case 'B3': {$format = array(1000.63,1417.32); break;}
+                                       case 'B4': {$format = array(708.66,1000.63); break;}
+                                       case 'B5': {$format = array(498.90,708.66); break;}
+                                       case 'B6': {$format = array(354.33,498.90); break;}
+                                       case 'B7': {$format = array(249.45,354.33); break;}
+                                       case 'B8': {$format = array(175.75,249.45); break;}
+                                       case 'B9': {$format = array(124.72,175.75); break;}
+                                       case 'B10': {$format = array(87.87,124.72); break;}
+                                       case 'C0': {$format = array(2599.37,3676.54); break;}
+                                       case 'C1': {$format = array(1836.85,2599.37); break;}
+                                       case 'C2': {$format = array(1298.27,1836.85); break;}
+                                       case 'C3': {$format = array(918.43,1298.27); break;}
+                                       case 'C4': {$format = array(649.13,918.43); break;}
+                                       case 'C5': {$format = array(459.21,649.13); break;}
+                                       case 'C6': {$format = array(323.15,459.21); break;}
+                                       case 'C7': {$format = array(229.61,323.15); break;}
+                                       case 'C8': {$format = array(161.57,229.61); break;}
+                                       case 'C9': {$format = array(113.39,161.57); break;}
+                                       case 'C10': {$format = array(79.37,113.39); break;}
+                                       case 'RA0': {$format = array(2437.80,3458.27); break;}
+                                       case 'RA1': {$format = array(1729.13,2437.80); break;}
+                                       case 'RA2': {$format = array(1218.90,1729.13); break;}
+                                       case 'RA3': {$format = array(864.57,1218.90); break;}
+                                       case 'RA4': {$format = array(609.45,864.57); break;}
+                                       case 'SRA0': {$format = array(2551.18,3628.35); break;}
+                                       case 'SRA1': {$format = array(1814.17,2551.18); break;}
+                                       case 'SRA2': {$format = array(1275.59,1814.17); break;}
+                                       case 'SRA3': {$format = array(907.09,1275.59); break;}
+                                       case 'SRA4': {$format = array(637.80,907.09); break;}
+                                       case 'LETTER': {$format = array(612.00,792.00); break;}
+                                       case 'LEGAL': {$format = array(612.00,1008.00); break;}
+                                       case 'EXECUTIVE': {$format = array(521.86,756.00); break;}
+                                       case 'FOLIO': {$format = array(612.00,936.00); break;}
+                               }
+                               $this->fwPt = $format[0];
+                               $this->fhPt = $format[1];
+                       } else {
+                               $this->fwPt = $format[0] * $this->k;
+                               $this->fhPt = $format[1] * $this->k;
+                       }
+                       $this->setPageOrientation($orientation);
+               }
+               
+               /**
+               * Set page orientation.
+               * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or PORTRAIT (default)</li><li>L or LANDSCAPE</li></ul>
+               * @param boolean $autopagebreak Boolean indicating if auto-page-break mode should be on or off.
+               * @param float $bottommargin bottom margin of the page.
+               * @access public
+               * @since 3.0.015 (2008-06-06)
+               */
+               public function setPageOrientation($orientation, $autopagebreak='', $bottommargin='') {
+                       $orientation = strtoupper($orientation);
+                       if (($orientation == 'P') OR ($orientation == 'PORTRAIT')) {
+                               $this->CurOrientation = 'P';
+                               $this->wPt = $this->fwPt;
+                               $this->hPt = $this->fhPt;
+                       } elseif (($orientation == 'L') OR ($orientation == 'LANDSCAPE')) {
+                               $this->CurOrientation = 'L';
+                               $this->wPt = $this->fhPt;
+                               $this->hPt = $this->fwPt;
+                       } else {
+                               $this->Error('Incorrect orientation: '.$orientation);
+                       }
+                       $this->w = $this->wPt / $this->k;
+                       $this->h = $this->hPt / $this->k;
+                       if ($this->empty_string($autopagebreak)) {
+                               if (isset($this->AutoPageBreak)) {
+                                       $autopagebreak = $this->AutoPageBreak;
+                               } else {
+                                       $autopagebreak = true;
+                               }
+                       }
+                       if ($this->empty_string($bottommargin)) {
+                               if (isset($this->bMargin)) {
+                                       $bottommargin = $this->bMargin;
+                               } else {
+                                       // default value = 2 cm
+                                       $bottommargin = 2 * 28.35 / $this->k;
+                               }
+                       }
+                       $this->SetAutoPageBreak($autopagebreak, $bottommargin);
+                       // store page dimensions
+                       $this->pagedim[$this->page] = array('w' => $this->wPt, 'h' => $this->hPt, 'wk' => $this->w, 'hk' => $this->h, 'tm' => $this->tMargin, 'bm' => $bottommargin, 'lm' => $this->lMargin, 'rm' => $this->rMargin, 'pb' => $autopagebreak, 'or' => $this->CurOrientation, 'olm' => $this->original_lMargin, 'orm' => $this->original_rMargin);
+               }
+               
+               /**
+                * Set regular expression to detect withespaces or word separators.
+                * @param string $re regular expression (leave empty for default).
+                * @access public
+                * @since 4.6.016 (2009-06-15)
+                */
+               public function setSpacesRE($re='/[\s]/') {
+                       // if PCRE unicode support is turned ON:
+                       //      \p{Z} or \p{Separator}: any kind of Unicode whitespace or invisible separator.
+                       //      \p{Lo} or \p{Other_Letter}: a Unicode letter or ideograph that does not have lowercase and uppercase variants.
+                       //      \p{Lo} is needed because Chinese characters are packed next to each other without spaces in between.
+                       $this->re_spaces = $re;
+               }
+                       
+               /**
+                * Enable or disable Right-To-Left language mode
+                * @param Boolean $enable if true enable Right-To-Left language mode.
+                * @param Boolean $resetx if true reset the X position on direction change.
+                * @access public
+               * @since 2.0.000 (2008-01-03)
+                */
+               public function setRTL($enable, $resetx=true) {
+                       $enable = $enable ? true : false;
+                       $resetx = ($resetx AND ($enable != $this->rtl));
+                       $this->rtl = $enable;
+                       $this->tmprtl = false;
+                       if ($resetx) {
+                               $this->Ln(0);
+                       }
+               }
+               
+               /**
+                * Return the RTL status
+                * @return boolean
+                * @access public
+                * @since 4.0.012 (2008-07-24)
+                */
+               public function getRTL() {
+                       return $this->rtl;
+               }
+               
+               /**
+               * Force temporary RTL language direction
+               * @param mixed $mode can be false, 'L' for LTR or 'R' for RTL
+               * @access public
+               * @since 2.1.000 (2008-01-09)
+               */
+               public function setTempRTL($mode) {
+                       $newmode = false;
+                       switch ($mode) {
+                               case 'ltr':
+                               case 'LTR':
+                               case 'L': {
+                                       if ($this->rtl) {
+                                               $newmode = 'L';
+                                       }
+                                       break;
+                               }
+                               case 'rtl':
+                               case 'RTL':
+                               case 'R': {
+                                       if (!$this->rtl) {
+                                               $newmode = 'R';
+                                       }
+                                       break;
+                               }
+                               case false:
+                               default: {
+                                       $newmode = false;
+                                       break;
+                               }
+                       }
+                       $this->tmprtl = $newmode;
+               }
+               
+               /**
+                * Return the current temporary RTL status
+                * @return boolean
+                * @access public
+                * @since 4.8.014 (2009-11-04)
+                */
+               public function isRTLTextDir() {
+                       return ($this->rtl OR ($this->tmprtl == 'R'));
+               }
+                               
+               /**
+               * Set the last cell height.
+               * @param float $h cell height.
+               * @author Nicola Asuni
+               * @access public
+               * @since 1.53.0.TC034
+               */
+               public function setLastH($h) {
+                       $this->lasth = $h;
+               }
+               
+               /**
+               * Get the last cell height.
+               * @return last cell height
+               * @access public
+               * @since 4.0.017 (2008-08-05)
+               */
+               public function getLastH() {
+                       return $this->lasth;
+               }
+               
+               /**
+               * Set the adjusting factor to convert pixels to user units.
+               * @param float $scale adjusting factor to convert pixels to user units.
+               * @author Nicola Asuni
+               * @access public
+               * @since 1.5.2
+               */
+               public function setImageScale($scale) {
+                       $this->imgscale = $scale;
+               }
+
+               /**
+               * Returns the adjusting factor to convert pixels to user units.
+               * @return float adjusting factor to convert pixels to user units.
+               * @author Nicola Asuni
+               * @access public
+               * @since 1.5.2
+               */
+               public function getImageScale() {
+                       return $this->imgscale;
+               }
+                               
+               /**
+               * Returns an array of page dimensions:
+               * <ul><li>$this->pagedim[$this->page]['w'] => page_width_in_points</li><li>$this->pagedim[$this->page]['h'] => height in points</li><li>$this->pagedim[$this->page]['wk'] => page_width_in_points</li><li>$this->pagedim[$this->page]['hk'] => height</li><li>$this->pagedim[$this->page]['tm'] => top_margin</li><li>$this->pagedim[$this->page]['bm'] => bottom_margin</li><li>$this->pagedim[$this->page]['lm'] => left_margin</li><li>$this->pagedim[$this->page]['rm'] => right_margin</li><li>$this->pagedim[$this->page]['pb'] => auto_page_break</li><li>$this->pagedim[$this->page]['or'] => page_orientation</li><li>$this->pagedim[$this->page]['olm'] => original_left_margin</li><li>$this->pagedim[$this->page]['orm'] => original_right_margin</li></ul>
+               * @param int $pagenum page number (empty = current page)
+               * @return array of page dimensions.
+               * @author Nicola Asuni
+               * @access public
+               * @since 4.5.027 (2009-03-16)
+               */
+               public function getPageDimensions($pagenum='') {
+                       if (empty($pagenum)) {
+                               $pagenum = $this->page;
+                       }
+                       return $this->pagedim[$pagenum];
+               }
+               
+               /**
+               * Returns the page width in units.
+               * @param int $pagenum page number (empty = current page)
+               * @return int page width.
+               * @author Nicola Asuni
+               * @access public
+               * @since 1.5.2
+               * @see getPageDimensions()
+               */
+               public function getPageWidth($pagenum='') {
+                       if (empty($pagenum)) {
+                               return $this->w;
+                       }
+                       return $this->pagedim[$pagenum]['w'];
+               }
+
+               /**
+               * Returns the page height in units.
+               * @param int $pagenum page number (empty = current page)
+               * @return int page height.
+               * @author Nicola Asuni
+               * @access public
+               * @since 1.5.2
+               * @see getPageDimensions()
+               */
+               public function getPageHeight($pagenum='') {
+                       if (empty($pagenum)) {
+                               return $this->h;
+                       }
+                       return $this->pagedim[$pagenum]['h'];
+               }
+
+               /**
+               * Returns the page break margin.
+               * @param int $pagenum page number (empty = current page)
+               * @return int page break margin.
+               * @author Nicola Asuni
+               * @access public
+               * @since 1.5.2
+               * @see getPageDimensions()
+               */
+               public function getBreakMargin($pagenum='') {
+                       if (empty($pagenum)) {
+                               return $this->bMargin;
+                       }
+                       return $this->pagedim[$pagenum]['bm'];
+               }
+
+               /**
+               * Returns the scale factor (number of points in user unit).
+               * @return int scale factor.
+               * @author Nicola Asuni
+               * @access public
+               * @since 1.5.2
+               */
+               public function getScaleFactor() {
+                       return $this->k;
+               }
+
+               /**
+               * Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change them.
+               * @param float $left Left margin.
+               * @param float $top Top margin.
+               * @param float $right Right margin. Default value is the left one.
+               * @access public
+               * @since 1.0
+               * @see SetLeftMargin(), SetTopMargin(), SetRightMargin(), SetAutoPageBreak()
+               */
+               public function SetMargins($left, $top, $right=-1) {
+                       //Set left, top and right margins
+                       $this->lMargin = $left;
+                       $this->tMargin = $top;
+                       if ($right == -1) {
+                               $right = $left;
+                       }
+                       $this->rMargin = $right;
+               }
+
+               /**
+               * Defines the left margin. The method can be called before creating the first page. If the current abscissa gets out of page, it is brought back to the margin.
+               * @param float $margin The margin.
+               * @access public
+               * @since 1.4
+               * @see SetTopMargin(), SetRightMargin(), SetAutoPageBreak(), SetMargins()
+               */
+               public function SetLeftMargin($margin) {
+                       //Set left margin
+                       $this->lMargin=$margin;
+                       if (($this->page > 0) AND ($this->x < $margin)) {
+                               $this->x = $margin;
+                       }
+               }
+
+               /**
+               * Defines the top margin. The method can be called before creating the first page.
+               * @param float $margin The margin.
+               * @access public
+               * @since 1.5
+               * @see SetLeftMargin(), SetRightMargin(), SetAutoPageBreak(), SetMargins()
+               */
+               public function SetTopMargin($margin) {
+                       //Set top margin
+                       $this->tMargin=$margin;
+                       if (($this->page > 0) AND ($this->y < $margin)) {
+                               $this->y = $margin;
+                       }
+               }
+
+               /**
+               * Defines the right margin. The method can be called before creating the first page.
+               * @param float $margin The margin.
+               * @access public
+               * @since 1.5
+               * @see SetLeftMargin(), SetTopMargin(), SetAutoPageBreak(), SetMargins()
+               */
+               public function SetRightMargin($margin) {
+                       $this->rMargin=$margin;
+                       if (($this->page > 0) AND ($this->x > ($this->w - $margin))) {
+                               $this->x = $this->w - $margin;
+                       }
+               }
+
+               /**
+               * Set the internal Cell padding.
+               * @param float $pad internal padding.
+               * @access public
+               * @since 2.1.000 (2008-01-09)
+               * @see Cell(), SetLeftMargin(), SetTopMargin(), SetAutoPageBreak(), SetMargins()
+               */
+               public function SetCellPadding($pad) {
+                       $this->cMargin = $pad;
+               }
+
+               /**
+               * Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm.
+               * @param boolean $auto Boolean indicating if mode should be on or off.
+               * @param float $margin Distance from the bottom of the page.
+               * @access public
+               * @since 1.0
+               * @see Cell(), MultiCell(), AcceptPageBreak()
+               */
+               public function SetAutoPageBreak($auto, $margin=0) {
+                       //Set auto page break mode and triggering margin
+                       $this->AutoPageBreak = $auto;
+                       $this->bMargin = $margin;
+                       $this->PageBreakTrigger = $this->h - $margin;
+               }
+
+               /**
+               * Defines the way the document is to be displayed by the viewer.
+               * @param mixed $zoom The zoom to use. It can be one of the following string values or a number indicating the zooming factor to use. <ul><li>fullpage: displays the entire page on screen </li><li>fullwidth: uses maximum width of window</li><li>real: uses real size (equivalent to 100% zoom)</li><li>default: uses viewer default mode</li></ul>
+               * @param string $layout The page layout. Possible values are:<ul><li>SinglePage Display one page at a time</li><li>OneColumn Display the pages in one column</li><li>TwoColumnLeft Display the pages in two columns, with odd-numbered pages on the left</li><li>TwoColumnRight Display the pages in two columns, with odd-numbered pages on the right</li><li>TwoPageLeft (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the left</li><li>TwoPageRight (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the right</li></ul>
+               * @param string $mode A name object specifying how the document should be displayed when opened:<ul><li>UseNone Neither document outline nor thumbnail images visible</li><li>UseOutlines Document outline visible</li><li>UseThumbs Thumbnail images visible</li><li>FullScreen Full-screen mode, with no menu bar, window controls, or any other window visible</li><li>UseOC (PDF 1.5) Optional content group panel visible</li><li>UseAttachments (PDF 1.6) Attachments panel visible</li></ul>
+               * @access public
+               * @since 1.2
+               */
+               public function SetDisplayMode($zoom, $layout='SinglePage', $mode='UseNone') {
+                       //Set display mode in viewer
+                       if (($zoom == 'fullpage') OR ($zoom == 'fullwidth') OR ($zoom == 'real') OR ($zoom == 'default') OR (!is_string($zoom))) {
+                               $this->ZoomMode = $zoom;
+                       } else {
+                               $this->Error('Incorrect zoom display mode: '.$zoom);
+                       }
+                       switch ($layout) {
+                               case 'default':
+                               case 'single':
+                               case 'SinglePage': {
+                                       $this->LayoutMode = 'SinglePage';
+                                       break;
+                               }
+                               case 'continuous':
+                               case 'OneColumn': {
+                                       $this->LayoutMode = 'OneColumn';
+                                       break;
+                               }
+                               case 'two':
+                               case 'TwoColumnLeft': {
+                                       $this->LayoutMode = 'TwoColumnLeft';
+                                       break;
+                               }
+                               case 'TwoColumnRight': {
+                                       $this->LayoutMode = 'TwoColumnRight';
+                                       break;
+                               }
+                               case 'TwoPageLeft': {
+                                       $this->LayoutMode = 'TwoPageLeft';
+                                       break;
+                               }
+                               case 'TwoPageRight': {
+                                       $this->LayoutMode = 'TwoPageRight';
+                                       break;
+                               }
+                               default: {
+                                       $this->LayoutMode = 'SinglePage';
+                               }
+                       }
+                       switch ($mode) {
+                               case 'UseNone': {
+                                       $this->PageMode = 'UseNone';
+                                       break;
+                               }
+                               case 'UseOutlines': {
+                                       $this->PageMode = 'UseOutlines';
+                                       break;
+                               }
+                               case 'UseThumbs': {
+                                       $this->PageMode = 'UseThumbs';
+                                       break;
+                               }
+                               case 'FullScreen': {
+                                       $this->PageMode = 'FullScreen';
+                                       break;
+                               }
+                               case 'UseOC': {
+                                       $this->PageMode = 'UseOC';
+                                       break;
+                               }
+                               case '': {
+                                       $this->PageMode = 'UseAttachments';
+                                       break;
+                               }
+                               default: {
+                                       $this->PageMode = 'UseNone';
+                               }
+                       }
+               }
+
+               /**
+               * Activates or deactivates page compression. When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document. Compression is on by default.
+               * Note: the Zlib extension is required for this feature. If not present, compression will be turned off.
+               * @param boolean $compress Boolean indicating if compression must be enabled.
+               * @access public
+               * @since 1.4
+               */
+               public function SetCompression($compress) {
+                       //Set page compression
+                       if (function_exists('gzcompress')) {
+                               $this->compress = $compress;
+                       } else {
+                               $this->compress = false;
+                       }
+               }
+
+               /**
+               * Defines the title of the document.
+               * @param string $title The title.
+               * @access public
+               * @since 1.2
+               * @see SetAuthor(), SetCreator(), SetKeywords(), SetSubject()
+               */
+               public function SetTitle($title) {
+                       //Title of document
+                       $this->title = $title;
+               }
+
+               /**
+               * Defines the subject of the document.
+               * @param string $subject The subject.
+               * @access public
+               * @since 1.2
+               * @see SetAuthor(), SetCreator(), SetKeywords(), SetTitle()
+               */
+               public function SetSubject($subject) {
+                       //Subject of document
+                       $this->subject = $subject;
+               }
+
+               /**
+               * Defines the author of the document.
+               * @param string $author The name of the author.
+               * @access public
+               * @since 1.2
+               * @see SetCreator(), SetKeywords(), SetSubject(), SetTitle()
+               */
+               public function SetAuthor($author) {
+                       //Author of document
+                       $this->author = $author;
+               }
+
+               /**
+               * Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'.
+               * @param string $keywords The list of keywords.
+               * @access public
+               * @since 1.2
+               * @see SetAuthor(), SetCreator(), SetSubject(), SetTitle()
+               */
+               public function SetKeywords($keywords) {
+                       //Keywords of document
+                       $this->keywords = $keywords;
+               }
+
+               /**
+               * Defines the creator of the document. This is typically the name of the application that generates the PDF.
+               * @param string $creator The name of the creator.
+               * @access public
+               * @since 1.2
+               * @see SetAuthor(), SetKeywords(), SetSubject(), SetTitle()
+               */
+               public function SetCreator($creator) {
+                       //Creator of document
+                       $this->creator = $creator;
+               }
+               
+               /**
+               * This method is automatically called in case of fatal error; it simply outputs the message and halts the execution. An inherited class may override it to customize the error handling but should always halt the script, or the resulting document would probably be invalid.
+               * 2004-06-11 :: Nicola Asuni : changed bold tag with strong
+               * @param string $msg The error message
+               * @access public
+               * @since 1.0
+               */
+               public function Error($msg) {
+                       // unset all class variables
+                       $this->_destroy(true);
+                       // exit program and print error
+                       die('<strong>TCPDF ERROR: </strong>'.$msg);
+               }
+
+               /**
+               * This method begins the generation of the PDF document.
+               * It is not necessary to call it explicitly because AddPage() does it automatically.
+               * Note: no page is created by this method
+               * @access public
+               * @since 1.0
+               * @see AddPage(), Close()
+               */
+               public function Open() {
+                       //Begin document
+                       $this->state = 1;
+               }
+
+               /**
+               * Terminates the PDF document.
+               * It is not necessary to call this method explicitly because Output() does it automatically.
+               * If the document contains no page, AddPage() is called to prevent from getting an invalid document.
+               * @access public
+               * @since 1.0
+               * @see Open(), Output()
+               */
+               public function Close() {
+                       if ($this->state == 3) {
+                               return;
+                       }
+                       if ($this->page == 0) {
+                               $this->AddPage();
+                       }
+                       // close page
+                       $this->endPage();
+                       // close document
+                       $this->_enddoc();
+                       // unset all class variables (except critical ones)
+                       $this->_destroy(false);
+               }
+               
+               /**
+               * Move pointer at the specified document page and update page dimensions.
+               * @param int $pnum page number
+               * @param boolean $resetmargins if true reset left, right, top margins and Y position.
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see getPage(), lastpage(), getNumPages()
+               */
+               public function setPage($pnum, $resetmargins=false) {
+                       if ($pnum == $this->page) {
+                               return;
+                       }
+                       if (($pnum > 0) AND ($pnum <= $this->numpages)) {
+                               $this->state = 2;
+                               // save current graphic settings
+                               //$gvars = $this->getGraphicVars();
+                               $oldpage = $this->page;
+                               $this->page = $pnum;
+                               $this->wPt = $this->pagedim[$this->page]['w'];
+                               $this->hPt = $this->pagedim[$this->page]['h'];
+                               $this->w = $this->wPt / $this->k;
+                               $this->h = $this->hPt / $this->k;
+                               $this->tMargin = $this->pagedim[$this->page]['tm'];
+                               $this->bMargin = $this->pagedim[$this->page]['bm'];
+                               $this->original_lMargin = $this->pagedim[$this->page]['olm'];
+                               $this->original_rMargin = $this->pagedim[$this->page]['orm'];
+                               $this->AutoPageBreak = $this->pagedim[$this->page]['pb'];
+                               $this->CurOrientation = $this->pagedim[$this->page]['or'];
+                               $this->SetAutoPageBreak($this->AutoPageBreak, $this->bMargin);
+                               // restore graphic settings
+                               //$this->setGraphicVars($gvars);
+                               if ($resetmargins) {
+                                       $this->lMargin = $this->pagedim[$this->page]['olm'];
+                                       $this->rMargin = $this->pagedim[$this->page]['orm'];
+                                       $this->SetY($this->tMargin);
+                               } else {
+                                       // account for booklet mode
+                                       if ($this->pagedim[$this->page]['olm'] != $this->pagedim[$oldpage]['olm']) {
+                                               $deltam = $this->pagedim[$this->page]['olm'] - $this->pagedim[$this->page]['orm'];
+                                               $this->lMargin += $deltam;
+                                               $this->rMargin -= $deltam;
+                                       }
+                               }
+                       } else {
+                               $this->Error('Wrong page number on setPage() function.');
+                       }
+               }
+               
+               /**
+               * Reset pointer to the last document page.
+               * @param boolean $resetmargins if true reset left, right, top margins and Y position.
+               * @access public
+               * @since 2.0.000 (2008-01-04)
+               * @see setPage(), getPage(), getNumPages()
+               */
+               public function lastPage($resetmargins=false) {
+                       $this->setPage($this->getNumPages(), $resetmargins);
+               }
+               
+               /**
+               * Get current document page number.
+               * @return int page number
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see setPage(), lastpage(), getNumPages()
+               */
+               public function getPage() {
+                       return $this->page;
+               }
+               
+               
+               /**
+               * Get the total number of insered pages.
+               * @return int number of pages
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see setPage(), getPage(), lastpage()
+               */
+               public function getNumPages() {
+                       return $this->numpages;
+               }
+
+               /**
+               * Adds a new page to the document. If a page is already present, the Footer() method is called first to output the footer (if enabled). Then the page is added, the current position set to the top-left corner according to the left and top margins (or top-right if in RTL mode), and Header() is called to display the header (if enabled).
+               * The origin of the coordinate system is at the top-left corner (or top-right for RTL) and increasing ordinates go downwards.
+               * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or PORTRAIT (default)</li><li>L or LANDSCAPE</li></ul>
+               * @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).<ul><li>4A0</li><li>2A0</li><li>A0</li><li>A1</li><li>A2</li><li>A3</li><li>A4 (default)</li><li>A5</li><li>A6</li><li>A7</li><li>A8</li><li>A9</li><li>A10</li><li>B0</li><li>B1</li><li>B2</li><li>B3</li><li>B4</li><li>B5</li><li>B6</li><li>B7</li><li>B8</li><li>B9</li><li>B10</li><li>C0</li><li>C1</li><li>C2</li><li>C3</li><li>C4</li><li>C5</li><li>C6</li><li>C7</li><li>C8</li><li>C9</li><li>C10</li><li>RA0</li><li>RA1</li><li>RA2</li><li>RA3</li><li>RA4</li><li>SRA0</li><li>SRA1</li><li>SRA2</li><li>SRA3</li><li>SRA4</li><li>LETTER</li><li>LEGAL</li><li>EXECUTIVE</li><li>FOLIO</li></ul>
+               * @access public
+               * @since 1.0
+               * @see startPage(), endPage()
+               */
+               public function AddPage($orientation='', $format='') {
+                       if (!isset($this->original_lMargin)) {
+                               $this->original_lMargin = $this->lMargin;
+                       }
+                       if (!isset($this->original_rMargin)) {
+                               $this->original_rMargin = $this->rMargin;
+                       }
+                       // terminate previous page
+                       $this->endPage();
+                       // start new page
+                       $this->startPage($orientation, $format);
+               }
+
+               /**
+               * Terminate the current page
+               * @access protected
+               * @since 4.2.010 (2008-11-14)
+               * @see startPage(), AddPage()
+               */
+               protected function endPage() {
+                       // check if page is already closed
+                       if (($this->page == 0) OR ($this->numpages > $this->page) OR (!$this->pageopen[$this->page])) {
+                               return;
+                       }
+                       $this->InFooter = true;
+                       // print page footer
+                       $this->setFooter();
+                       // close page
+                       $this->_endpage();
+                       // mark page as closed
+                       $this->pageopen[$this->page] = false;
+                       $this->InFooter = false;
+               }
+
+               /**
+               * Starts a new page to the document. The page must be closed using the endPage() function.
+               * The origin of the coordinate system is at the top-left corner and increasing ordinates go downwards.
+               * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or PORTRAIT (default)</li><li>L or LANDSCAPE</li></ul>
+               * @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).<ul><li>4A0</li><li>2A0</li><li>A0</li><li>A1</li><li>A2</li><li>A3</li><li>A4 (default)</li><li>A5</li><li>A6</li><li>A7</li><li>A8</li><li>A9</li><li>A10</li><li>B0</li><li>B1</li><li>B2</li><li>B3</li><li>B4</li><li>B5</li><li>B6</li><li>B7</li><li>B8</li><li>B9</li><li>B10</li><li>C0</li><li>C1</li><li>C2</li><li>C3</li><li>C4</li><li>C5</li><li>C6</li><li>C7</li><li>C8</li><li>C9</li><li>C10</li><li>RA0</li><li>RA1</li><li>RA2</li><li>RA3</li><li>RA4</li><li>SRA0</li><li>SRA1</li><li>SRA2</li><li>SRA3</li><li>SRA4</li><li>LETTER</li><li>LEGAL</li><li>EXECUTIVE</li><li>FOLIO</li></ul>
+               * @access protected
+               * @since 4.2.010 (2008-11-14)
+               * @see endPage(), AddPage()
+               */
+               protected function startPage($orientation='', $format='') {
+                       if ($this->numpages > $this->page) {
+                               // this page has been already added
+                               $this->setPage($this->page + 1);
+                               $this->SetY($this->tMargin);
+                               return;
+                       }
+                       // start a new page
+                       if ($this->state == 0) {
+                               $this->Open();
+                       }
+                       ++$this->numpages;
+                       $this->swapMargins($this->booklet);
+                       // save current graphic settings
+                       $gvars = $this->getGraphicVars();
+                       // start new page
+                       $this->_beginpage($orientation, $format);
+                       // mark page as open
+                       $this->pageopen[$this->page] = true;
+                       // restore graphic settings
+                       $this->setGraphicVars($gvars);
+                       // mark this point
+                       $this->setPageMark();
+                       // print page header
+                       $this->setHeader();
+                       // restore graphic settings
+                       $this->setGraphicVars($gvars);
+                       // mark this point
+                       $this->setPageMark();
+                       // print table header (if any)
+                       $this->setTableHeader();
+               }
+                       
+               /**
+                * Set start-writing mark on current page for multicell borders and fills.
+                * This function must be called after calling Image() function for a background image.
+                * Background images must be always inserted before calling Multicell() or WriteHTMLCell() or WriteHTML() functions.
+                * @access public
+                * @since 4.0.016 (2008-07-30)
+                */
+               public function setPageMark() {
+                       $this->intmrk[$this->page] = $this->pagelen[$this->page];
+                       $this->setContentMark();
+               }
+               
+               /**
+                * Set start-writing mark on selected page.
+                * @param int $page page number (default is the current page)
+                * @access protected
+                * @since 4.6.021 (2009-07-20)
+                */
+               protected function setContentMark($page=0) {
+                       if ($page <= 0) {
+                               $page = $this->page;
+                       }
+                       if (isset($this->footerlen[$page])) {
+                               $this->cntmrk[$page] = $this->pagelen[$page] - $this->footerlen[$page];
+                       } else {
+                               $this->cntmrk[$page] = $this->pagelen[$page];
+                       }
+               }
+               
+               /**
+                * Set header data.
+                * @param string $ln header image logo
+                * @param string $lw header image logo width in mm
+                * @param string $ht string to print as title on document header
+                * @param string $hs string to print on document header
+                * @access public
+                */
+               public function setHeaderData($ln='', $lw=0, $ht='', $hs='') {
+                       $this->header_logo = $ln;
+                       $this->header_logo_width = $lw;
+                       $this->header_title = $ht;
+                       $this->header_string = $hs;
+               }
+               
+               /**
+                * Returns header data:
+                * <ul><li>$ret['logo'] = logo image</li><li>$ret['logo_width'] = width of the image logo in user units</li><li>$ret['title'] = header title</li><li>$ret['string'] = header description string</li></ul>
+                * @return array()
+                * @access public
+                * @since 4.0.012 (2008-07-24)
+                */
+               public function getHeaderData() {
+                       $ret = array();
+                       $ret['logo'] = $this->header_logo;
+                       $ret['logo_width'] = $this->header_logo_width;
+                       $ret['title'] = $this->header_title;
+                       $ret['string'] = $this->header_string;
+                       return $ret;
+               }
+               
+               /**
+                * Set header margin.
+                * (minimum distance between header and top page margin)
+                * @param int $hm distance in user units
+                * @access public
+                */
+               public function setHeaderMargin($hm=10) {
+                       $this->header_margin = $hm;
+               }
+               
+               /**
+                * Returns header margin in user units.
+                * @return float
+                * @since 4.0.012 (2008-07-24)
+                * @access public
+                */
+               public function getHeaderMargin() {
+                       return $this->header_margin;
+               }
+               
+               /**
+                * Set footer margin.
+                * (minimum distance between footer and bottom page margin)
+                * @param int $fm distance in user units
+                * @access public
+                */
+               public function setFooterMargin($fm=10) {
+                       $this->footer_margin = $fm;
+               }
+               
+               /**
+                * Returns footer margin in user units.
+                * @return float
+                * @since 4.0.012 (2008-07-24)
+                * @access public
+                */
+               public function getFooterMargin() {
+                       return $this->footer_margin;
+               }
+               /**
+                * Set a flag to print page header.
+                * @param boolean $val set to true to print the page header (default), false otherwise. 
+                * @access public
+                */
+               public function setPrintHeader($val=true) {
+                       $this->print_header = $val;
+               }
+               
+               /**
+                * Set a flag to print page footer.
+                * @param boolean $value set to true to print the page footer (default), false otherwise. 
+                * @access public
+                */
+               public function setPrintFooter($val=true) {
+                       $this->print_footer = $val;
+               }
+               
+               /**
+                * Return the right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image
+                * @return float 
+                * @access public
+                */
+               public function getImageRBX() {
+                       return $this->img_rb_x;
+               }
+               
+               /**
+                * Return the right-bottom (or left-bottom for RTL) corner Y coordinate of last inserted image
+                * @return float 
+                * @access public
+                */
+               public function getImageRBY() {
+                       return $this->img_rb_y;
+               }
+               
+               /**
+                * This method is used to render the page header.
+                * It is automatically called by AddPage() and could be overwritten in your own inherited class.
+                * @access public
+                */
+               public function Header() {
+                       $ormargins = $this->getOriginalMargins();
+                       $headerfont = $this->getHeaderFont();
+                       $headerdata = $this->getHeaderData();
+                       if (($headerdata['logo']) AND ($headerdata['logo'] != K_BLANK_IMAGE)) {
+                               $this->Image(K_PATH_IMAGES.$headerdata['logo'], $this->GetX(), $this->getHeaderMargin(), $headerdata['logo_width']);
+                               $imgy = $this->getImageRBY();
+                       } else {
+                               $imgy = $this->GetY();
+                       }
+                       $cell_height = round(($this->getCellHeightRatio() * $headerfont[2]) / $this->getScaleFactor(), 2);
+                       // set starting margin for text data cell
+                       if ($this->getRTL()) {
+                               $header_x = $ormargins['right'] + ($headerdata['logo_width'] * 1.1);
+                       } else {
+                               $header_x = $ormargins['left'] + ($headerdata['logo_width'] * 1.1);
+                       }
+                       $this->SetTextColor(0, 0, 0);
+                       // header title
+                       $this->SetFont($headerfont[0], 'B', $headerfont[2] + 1);
+                       $this->SetX($header_x);                 
+                       $this->Cell(0, $cell_height, $headerdata['title'], 0, 1, '', 0, '', 0);
+                       // header string
+                       $this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]);
+                       $this->SetX($header_x);
+                       $this->MultiCell(0, $cell_height, $headerdata['string'], 0, '', 0, 1, '', '', true, 0, false);
+                       // print an ending header line
+                       $this->SetLineStyle(array('width' => 0.85 / $this->getScaleFactor(), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
+                       $this->SetY((2.835 / $this->getScaleFactor()) + max($imgy, $this->GetY()));
+                       if ($this->getRTL()) {
+                               $this->SetX($ormargins['right']);
+                       } else {
+                               $this->SetX($ormargins['left']);
+                       }
+                       $this->Cell(0, 0, '', 'T', 0, 'C');
+               }
+               
+               /**
+                * This method is used to render the page footer. 
+                * It is automatically called by AddPage() and could be overwritten in your own inherited class.
+                * @access public
+                */
+               public function Footer() {                              
+                       $cur_y = $this->GetY();
+                       $ormargins = $this->getOriginalMargins();
+                       $this->SetTextColor(0, 0, 0);                   
+                       //set style for cell border
+                       $line_width = 0.85 / $this->getScaleFactor();
+                       $this->SetLineStyle(array('width' => $line_width, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
+                       //print document barcode
+                       $barcode = $this->getBarcode();
+                       if (!empty($barcode)) {
+                               $this->Ln($line_width);
+                               $barcode_width = round(($this->getPageWidth() - $ormargins['left'] - $ormargins['right'])/3);
+                               $this->write1DBarcode($barcode, 'C128B', $this->GetX(), $cur_y + $line_width, $barcode_width, (($this->getFooterMargin() / 3) - $line_width), 0.3, '', '');     
+                       }
+                       if (empty($this->pagegroups)) {
+                               $pagenumtxt = $this->l['w_page'].' '.$this->getAliasNumPage().' / '.$this->getAliasNbPages();
+                       } else {
+                               $pagenumtxt = $this->l['w_page'].' '.$this->getPageNumGroupAlias().' / '.$this->getPageGroupAlias();
+                       }               
+                       $this->SetY($cur_y);
+                       //Print page number
+                       if ($this->getRTL()) {
+                               $this->SetX($ormargins['right']);
+                               $this->Cell(0, 0, $pagenumtxt, 'T', 0, 'L');
+                       } else {
+                               $this->SetX($ormargins['left']);
+                               $this->Cell(0, 0, $pagenumtxt, 'T', 0, 'R');
+                       }
+               }
+               
+               /**
+                * This method is used to render the page header. 
+                * @access protected
+                * @since 4.0.012 (2008-07-24)
+                */
+               protected function setHeader() {
+                       if ($this->print_header) {
+                               $lasth = $this->lasth;
+                               $this->_out('q');
+                               $this->rMargin = $this->original_rMargin;
                                $this->lMargin = $this->original_lMargin;
-                               $this->cMargin = 0;\r
-                               //set current position\r
-                               if ($this->rtl) {\r
-                                       $this->SetXY($this->original_rMargin, $this->header_margin);\r
-                               } else {\r
-                                       $this->SetXY($this->original_lMargin, $this->header_margin);\r
-                               }\r
-                               $this->SetFont($this->header_font[0], $this->header_font[1], $this->header_font[2]);\r
-                               $this->Header();\r
-                               //restore position\r
-                               if ($this->rtl) {\r
-                                       $this->SetXY($this->original_rMargin, $this->tMargin);\r
-                               } else {\r
-                                       $this->SetXY($this->original_lMargin, $this->tMargin);\r
-                               }\r
+                               $this->cMargin = 0;
+                               //set current position
+                               if ($this->rtl) {
+                                       $this->SetXY($this->original_rMargin, $this->header_margin);
+                               } else {
+                                       $this->SetXY($this->original_lMargin, $this->header_margin);
+                               }
+                               $this->SetFont($this->header_font[0], $this->header_font[1], $this->header_font[2]);
+                               $this->Header();
+                               //restore position
+                               if ($this->rtl) {
+                                       $this->SetXY($this->original_rMargin, $this->tMargin);
+                               } else {
+                                       $this->SetXY($this->original_lMargin, $this->tMargin);
+                               }
                                $this->_out('Q');
-                               $this->lasth = $lasth;\r
-                       }\r
-               }\r
-               \r
-               /**\r
-                * This method is used to render the page footer. \r
-                * @access protected\r
-                * @since 4.0.012 (2008-07-24)\r
-                */\r
+                               $this->lasth = $lasth;
+                       }
+               }
+               
+               /**
+                * This method is used to render the page footer. 
+                * @access protected
+                * @since 4.0.012 (2008-07-24)
+                */
                protected function setFooter() {
                        //Page footer
                        // save current graphic settings
-                       $gvars = $this->getGraphicVars();\r
-                       // mark this point\r
+                       $gvars = $this->getGraphicVars();
+                       // mark this point
                        $this->footerpos[$this->page] = $this->pagelen[$this->page];
-                       $this->_out("\n");\r
-                       if ($this->print_footer) {\r
+                       $this->_out("\n");
+                       if ($this->print_footer) {
                                $lasth = $this->lasth;
-                               $this->_out('q');\r
-                               $this->rMargin = $this->original_rMargin;\r
+                               $this->_out('q');
+                               $this->rMargin = $this->original_rMargin;
                                $this->lMargin = $this->original_lMargin;
-                               $this->cMargin = 0;\r
-                               //set current position\r
-                               $footer_y = $this->h - $this->footer_margin;\r
-                               if ($this->rtl) {\r
-                                       $this->SetXY($this->original_rMargin, $footer_y);\r
-                               } else {\r
-                                       $this->SetXY($this->original_lMargin, $footer_y);\r
-                               }\r
-                               $this->SetFont($this->footer_font[0], $this->footer_font[1], $this->footer_font[2]);\r
-                               $this->Footer();\r
-                               //restore position\r
-                               if ($this->rtl) {\r
-                                       $this->SetXY($this->original_rMargin, $this->tMargin);\r
-                               } else {\r
-                                       $this->SetXY($this->original_lMargin, $this->tMargin);\r
-                               }\r
+                               $this->cMargin = 0;
+                               //set current position
+                               $footer_y = $this->h - $this->footer_margin;
+                               if ($this->rtl) {
+                                       $this->SetXY($this->original_rMargin, $footer_y);
+                               } else {
+                                       $this->SetXY($this->original_lMargin, $footer_y);
+                               }
+                               $this->SetFont($this->footer_font[0], $this->footer_font[1], $this->footer_font[2]);
+                               $this->Footer();
+                               //restore position
+                               if ($this->rtl) {
+                                       $this->SetXY($this->original_rMargin, $this->tMargin);
+                               } else {
+                                       $this->SetXY($this->original_lMargin, $this->tMargin);
+                               }
                                $this->_out('Q');
-                               $this->lasth = $lasth;\r
+                               $this->lasth = $lasth;
+                       }
+                       // restore graphic settings
+                       $this->setGraphicVars($gvars);
+                       // calculate footer lenght
+                       $this->footerlen[$this->page] = $this->pagelen[$this->page] - $this->footerpos[$this->page] + 1;
+               }
+
+               /**
+                * This method is used to render the table header on new page (if any). 
+                * @access protected
+                * @since 4.5.030 (2009-03-25)
+                */
+               protected function setTableHeader() {
+                       if (isset($this->theadMargins['top'])) {
+                               // restore the original top-margin
+                               $this->tMargin = $this->theadMargins['top'];
+                               $this->pagedim[$this->page]['tm'] = $this->tMargin;
+                               $this->y = $this->tMargin;
+                       }
+                       if (!$this->empty_string($this->thead)) {
+                               // set margins
+                               $prev_lMargin = $this->lMargin;
+                               $prev_rMargin = $this->rMargin;
+                               $this->lMargin = $this->pagedim[$this->page]['olm'];
+                               $this->rMargin = $this->pagedim[$this->page]['orm'];
+                               $this->cMargin = $this->theadMargins['cmargin'];
+                               // print table header
+                               $this->writeHTML($this->thead, false, false, false, false, '');
+                               // set new top margin to skip the table headers
+                               if (!isset($this->theadMargins['top'])) {
+                                       $this->theadMargins['top'] = $this->tMargin;
+                               }
+                               $this->tMargin = $this->y;
+                               $this->pagedim[$this->page]['tm'] = $this->tMargin;
+                               $this->lasth = 0;
+                               $this->lMargin = $prev_lMargin;
+                               $this->rMargin = $prev_rMargin;
+                       }
+               }
+               
+               /**
+               * Returns the current page number.
+               * @return int page number
+               * @access public
+               * @since 1.0
+               * @see AliasNbPages(), getAliasNbPages()
+               */
+               public function PageNo() {
+                       return $this->page;
+               }
+
+               /**
+               * Defines a new spot color. 
+               * It can be expressed in RGB components or gray scale. 
+               * The method can be called before the first page is created and the value is retained from page to page.
+               * @param int $c Cyan color for CMYK. Value between 0 and 255
+               * @param int $m Magenta color for CMYK. Value between 0 and 255
+               * @param int $y Yellow color for CMYK. Value between 0 and 255
+               * @param int $k Key (Black) color for CMYK. Value between 0 and 255
+               * @access public
+               * @since 4.0.024 (2008-09-12)
+               * @see SetDrawSpotColor(), SetFillSpotColor(), SetTextSpotColor()
+               */
+               public function AddSpotColor($name, $c, $m, $y, $k) {
+                       if (!isset($this->spot_colors[$name])) {
+                               $i = 1 + count($this->spot_colors);
+                               $this->spot_colors[$name] = array('i' => $i, 'c' => $c, 'm' => $m, 'y' => $y, 'k' => $k);
+                       }
+               }
+
+               /**
+               * Defines the color used for all drawing operations (lines, rectangles and cell borders). 
+               * It can be expressed in RGB components or gray scale. 
+               * The method can be called before the first page is created and the value is retained from page to page.
+               * @param array $color array of colors
+               * @access public
+               * @since 3.1.000 (2008-06-11)
+               * @see SetDrawColor()
+               */
+               public function SetDrawColorArray($color) {
+                       if (isset($color)) {
+                               $color = array_values($color);
+                               $r = isset($color[0]) ? $color[0] : -1;
+                               $g = isset($color[1]) ? $color[1] : -1;
+                               $b = isset($color[2]) ? $color[2] : -1;
+                               $k = isset($color[3]) ? $color[3] : -1;
+                               if ($r >= 0) {
+                                       $this->SetDrawColor($r, $g, $b, $k);
+                               }
+                       }
+               }
+
+               /**
+               * Defines the color used for all drawing operations (lines, rectangles and cell borders). It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
+               * @param int $col1 Gray level for single color, or Red color for RGB, or Cyan color for CMYK. Value between 0 and 255
+               * @param int $col2 Green color for RGB, or Magenta color for CMYK. Value between 0 and 255
+               * @param int $col3 Blue color for RGB, or Yellow color for CMYK. Value between 0 and 255
+               * @param int $col4 Key (Black) color for CMYK. Value between 0 and 255
+               * @access public
+               * @since 1.3
+               * @see SetDrawColorArray(), SetFillColor(), SetTextColor(), Line(), Rect(), Cell(), MultiCell()
+               */
+               public function SetDrawColor($col1=0, $col2=-1, $col3=-1, $col4=-1) {
+                       // set default values
+                       if (!is_numeric($col1)) {
+                               $col1 = 0;
+                       }
+                       if (!is_numeric($col2)) {
+                               $col2 = -1;
+                       }
+                       if (!is_numeric($col3)) {
+                               $col3 = -1;
+                       }
+                       if (!is_numeric($col4)) {
+                               $col4 = -1;
+                       }
+                       //Set color for all stroking operations
+                       if (($col2 == -1) AND ($col3 == -1) AND ($col4 == -1)) {
+                               // Grey scale
+                               $this->DrawColor = sprintf('%.3F G', $col1/255);
+                       } elseif ($col4 == -1) {
+                               // RGB
+                               $this->DrawColor = sprintf('%.3F %.3F %.3F RG', $col1/255, $col2/255, $col3/255);
+                       } else {
+                               // CMYK
+                               $this->DrawColor = sprintf('%.3F %.3F %.3F %.3F K', $col1/100, $col2/100, $col3/100, $col4/100);
+                       }
+                       if ($this->page > 0) {
+                               $this->_out($this->DrawColor);
+                       }
+               }
+               
+               /**
+               * Defines the spot color used for all drawing operations (lines, rectangles and cell borders).
+               * @param string $name name of the spot color
+               * @param int $tint the intensity of the color (from 0 to 100 ; 100 = full intensity by default).
+               * @access public
+               * @since 4.0.024 (2008-09-12)
+               * @see AddSpotColor(), SetFillSpotColor(), SetTextSpotColor()
+               */
+               public function SetDrawSpotColor($name, $tint=100) {
+                       if (!isset($this->spot_colors[$name])) {
+                               $this->Error('Undefined spot color: '.$name);
+                       }
+                       $this->DrawColor = sprintf('/CS%d CS %.3F SCN', $this->spot_colors[$name]['i'], $tint/100);
+                       if ($this->page > 0) {
+                               $this->_out($this->DrawColor);
+                       }
+               }
+               
+               /**
+               * Defines the color used for all filling operations (filled rectangles and cell backgrounds). 
+               * It can be expressed in RGB components or gray scale. 
+               * The method can be called before the first page is created and the value is retained from page to page.
+               * @param array $color array of colors
+               * @access public
+               * @since 3.1.000 (2008-6-11)
+               * @see SetFillColor()
+               */
+               public function SetFillColorArray($color) {
+                       if (isset($color)) {
+                               $color = array_values($color);
+                               $r = isset($color[0]) ? $color[0] : -1;
+                               $g = isset($color[1]) ? $color[1] : -1;
+                               $b = isset($color[2]) ? $color[2] : -1;
+                               $k = isset($color[3]) ? $color[3] : -1;
+                               if ($r >= 0) {
+                                       $this->SetFillColor($r, $g, $b, $k);
+                               }
+                       }
+               }
+               
+               /**
+               * Defines the color used for all filling operations (filled rectangles and cell backgrounds). It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
+               * @param int $col1 Gray level for single color, or Red color for RGB, or Cyan color for CMYK. Value between 0 and 255
+               * @param int $col2 Green color for RGB, or Magenta color for CMYK. Value between 0 and 255
+               * @param int $col3 Blue color for RGB, or Yellow color for CMYK. Value between 0 and 255
+               * @param int $col4 Key (Black) color for CMYK. Value between 0 and 255
+               * @access public
+               * @since 1.3
+               * @see SetFillColorArray(), SetDrawColor(), SetTextColor(), Rect(), Cell(), MultiCell()
+               */
+               public function SetFillColor($col1=0, $col2=-1, $col3=-1, $col4=-1) {
+                       // set default values
+                       if (!is_numeric($col1)) {
+                               $col1 = 0;
+                       }
+                       if (!is_numeric($col2)) {
+                               $col2 = -1;
+                       }
+                       if (!is_numeric($col3)) {
+                               $col3 = -1;
+                       }
+                       if (!is_numeric($col4)) {
+                               $col4 = -1;
+                       }
+                       //Set color for all filling operations
+                       if (($col2 == -1) AND ($col3 == -1) AND ($col4 == -1)) {
+                               // Grey scale
+                               $this->FillColor = sprintf('%.3F g', $col1/255);
+                               $this->bgcolor = array('G' => $col1);
+                       } elseif ($col4 == -1) {
+                               // RGB
+                               $this->FillColor = sprintf('%.3F %.3F %.3F rg', $col1/255, $col2/255, $col3/255);
+                               $this->bgcolor = array('R' => $col1, 'G' => $col2, 'B' => $col3);
+                       } else {
+                               // CMYK
+                               $this->FillColor = sprintf('%.3F %.3F %.3F %.3F k', $col1/100, $col2/100, $col3/100, $col4/100);
+                               $this->bgcolor = array('C' => $col1, 'M' => $col2, 'Y' => $col3, 'K' => $col4);
+                       }
+                       $this->ColorFlag = ($this->FillColor != $this->TextColor);
+                       if ($this->page > 0) {
+                               $this->_out($this->FillColor);
+                       }
+               }
+               
+               /**
+               * Defines the spot color used for all filling operations (filled rectangles and cell backgrounds).
+               * @param string $name name of the spot color
+               * @param int $tint the intensity of the color (from 0 to 100 ; 100 = full intensity by default).
+               * @access public
+               * @since 4.0.024 (2008-09-12)
+               * @see AddSpotColor(), SetDrawSpotColor(), SetTextSpotColor()
+               */
+               public function SetFillSpotColor($name, $tint=100) {
+                       if (!isset($this->spot_colors[$name])) {
+                               $this->Error('Undefined spot color: '.$name);
+                       }
+                       $this->FillColor = sprintf('/CS%d cs %.3F scn', $this->spot_colors[$name]['i'], $tint/100);
+                       $this->ColorFlag = ($this->FillColor != $this->TextColor);
+                       if ($this->page > 0) {
+                               $this->_out($this->FillColor);
+                       }
+               }
+               
+               /**
+               * Defines the color used for text. It can be expressed in RGB components or gray scale. 
+               * The method can be called before the first page is created and the value is retained from page to page.
+               * @param array $color array of colors
+               * @access public
+               * @since 3.1.000 (2008-6-11)
+               * @see SetFillColor()
+               */
+               public function SetTextColorArray($color) {
+                       if (isset($color)) {
+                               $color = array_values($color);
+                               $r = isset($color[0]) ? $color[0] : -1;
+                               $g = isset($color[1]) ? $color[1] : -1;
+                               $b = isset($color[2]) ? $color[2] : -1;
+                               $k = isset($color[3]) ? $color[3] : -1;
+                               if ($r >= 0) {
+                                       $this->SetTextColor($r, $g, $b, $k);
+                               }
+                       }
+               }
+
+               /**
+               * Defines the color used for text. It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
+               * @param int $col1 Gray level for single color, or Red color for RGB, or Cyan color for CMYK. Value between 0 and 255
+               * @param int $col2 Green color for RGB, or Magenta color for CMYK. Value between 0 and 255
+               * @param int $col3 Blue color for RGB, or Yellow color for CMYK. Value between 0 and 255
+               * @param int $col4 Key (Black) color for CMYK. Value between 0 and 255
+               * @access public
+               * @since 1.3
+               * @see SetTextColorArray(), SetDrawColor(), SetFillColor(), Text(), Cell(), MultiCell()
+               */
+               public function SetTextColor($col1=0, $col2=-1, $col3=-1, $col4=-1) {
+                       // set default values
+                       if (!is_numeric($col1)) {
+                               $col1 = 0;
+                       }
+                       if (!is_numeric($col2)) {
+                               $col2 = -1;
+                       }
+                       if (!is_numeric($col3)) {
+                               $col3 = -1;
+                       }
+                       if (!is_numeric($col4)) {
+                               $col4 = -1;
+                       }
+                       //Set color for text
+                       if (($col2 == -1) AND ($col3 == -1) AND ($col4 == -1)) {
+                               // Grey scale
+                               $this->TextColor = sprintf('%.3F g', $col1/255);
+                               $this->fgcolor = array('G' => $col1);
+                       } elseif ($col4 == -1) {
+                               // RGB
+                               $this->TextColor = sprintf('%.3F %.3F %.3F rg', $col1/255, $col2/255, $col3/255);
+                               $this->fgcolor = array('R' => $col1, 'G' => $col2, 'B' => $col3);
+                       } else {
+                               // CMYK
+                               $this->TextColor = sprintf('%.3F %.3F %.3F %.3F k', $col1/100, $col2/100, $col3/100, $col4/100);
+                               $this->fgcolor = array('C' => $col1, 'M' => $col2, 'Y' => $col3, 'K' => $col4);
+                       }
+                       $this->ColorFlag = ($this->FillColor != $this->TextColor);
+               }
+               
+               /**
+               * Defines the spot color used for text.
+               * @param string $name name of the spot color
+               * @param int $tint the intensity of the color (from 0 to 100 ; 100 = full intensity by default).
+               * @access public
+               * @since 4.0.024 (2008-09-12)
+               * @see AddSpotColor(), SetDrawSpotColor(), SetFillSpotColor()
+               */
+               public function SetTextSpotColor($name, $tint=100) {
+                       if (!isset($this->spot_colors[$name])) {
+                               $this->Error('Undefined spot color: '.$name);
+                       }
+                       $this->TextColor = sprintf('/CS%d cs %.3F scn', $this->spot_colors[$name]['i'], $tint/100);
+                       $this->ColorFlag = ($this->FillColor != $this->TextColor);
+                       if ($this->page > 0) {
+                               $this->_out($this->TextColor);
+                       }
+               }
+
+               /**
+               * Returns the length of a string in user unit. A font must be selected.<br>
+               * @param string $s The string whose length is to be computed
+               * @param string $fontname Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained.
+               * @param string $fontstyle Font style. Possible values are (case insensitive):<ul><li>empty string: regular</li><li>B: bold</li><li>I: italic</li><li>U: underline</li><li>D: line trough</li></ul> or any combination. The default value is regular.
+               * @param float $fontsize Font size in points. The default value is the current size.
+               * @return int string length
+               * @author Nicola Asuni
+               * @access public
+               * @since 1.2
+               */
+               public function GetStringWidth($s, $fontname='', $fontstyle='', $fontsize=0) {
+                       return $this->GetArrStringWidth($this->utf8Bidi($this->UTF8StringToArray($s), $s, $this->tmprtl), $fontname, $fontstyle, $fontsize);
+               }
+               
+               /**
+               * Returns the string length of an array of chars in user unit. A font must be selected.<br>
+               * @param string $sa The array of chars whose total length is to be computed
+               * @param string $fontname Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained.
+               * @param string $fontstyle Font style. Possible values are (case insensitive):<ul><li>empty string: regular</li><li>B: bold</li><li>I: italic</li><li>U: underline</li><li>D: line trough</li></ul> or any combination. The default value is regular.
+               * @param float $fontsize Font size in points. The default value is the current size.
+               * @return int string length
+               * @author Nicola Asuni
+               * @access public
+               * @since 2.4.000 (2008-03-06)
+               */
+               public function GetArrStringWidth($sa, $fontname='', $fontstyle='', $fontsize=0) {
+                       // store current values
+                       if (!$this->empty_string($fontname)) {
+                               $prev_FontFamily = $this->FontFamily;
+                               $prev_FontStyle = $this->FontStyle;
+                               $prev_FontSizePt = $this->FontSizePt;
+                               $this->SetFont($fontname, $fontstyle, $fontsize);
+                       }
+                       $w = 0;
+                       foreach ($sa as $char) {
+                               $w += $this->GetCharWidth($char);
+                       }
+                       // restore previous values
+                       if (!$this->empty_string($fontname)) {
+                               $this->SetFont($prev_FontFamily, $prev_FontStyle, $prev_FontSizePt);
+                       }
+                       return $w;
+               }
+               
+               /**
+               * Returns the length of the char in user unit for the current font.
+               * @param int $char The char code whose length is to be returned
+               * @return int char width
+               * @author Nicola Asuni
+               * @access public
+               * @since 2.4.000 (2008-03-06)
+               */
+               public function GetCharWidth($char) {
+                       if ($char == 173) {
+                               // SHY character will not be printed
+                               return (0);
+                       }
+                       $cw = &$this->CurrentFont['cw'];
+                       if (isset($cw[$char])) {
+                               $w = $cw[$char];
+                       } elseif (isset($this->CurrentFont['dw'])) {
+                               // default width
+                               $w = $this->CurrentFont['dw'];
+                       } elseif (isset($cw[32])) {
+                               // default width
+                               $dw = $cw[32];
+                       } else {
+                               $w = 600;
+                       }
+                       return ($w * $this->FontSize / 1000);
+               }
+               
+               /**
+               * Returns the numbero of characters in a string.
+               * @param string $s The input string.
+               * @return int number of characters
+               * @access public
+               * @since 2.0.0001 (2008-01-07)
+               */
+               public function GetNumChars($s) {
+                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {
+                               return count($this->UTF8StringToArray($s));
+                       } 
+                       return strlen($s);
+               }
+                       
+               /**
+               * Fill the list of available fonts ($this->fontlist).
+               * @access protected
+               * @since 4.0.013 (2008-07-28)
+               */
+               protected function getFontsList() {
+                       $fontsdir = opendir($this->_getfontpath());
+                       while (($file = readdir($fontsdir)) !== false) {
+                               if (substr($file, -4) == '.php') {
+                                       array_push($this->fontlist, strtolower(basename($file, '.php')));
+                               }
+                       }
+                       closedir($fontsdir);
+               }
+               
+               /**
+               * Imports a TrueType, Type1, core, or CID0 font and makes it available.
+               * It is necessary to generate a font definition file first (read /fonts/utils/README.TXT). 
+               * The definition file (and the font file itself when embedding) must be present either in the current directory or in the one indicated by K_PATH_FONTS if the constant is defined. If it could not be found, the error "Could not include font definition file" is generated.
+               * @param string $family Font family. The name can be chosen arbitrarily. If it is a standard family name, it will override the corresponding font.
+               * @param string $style Font style. Possible values are (case insensitive):<ul><li>empty string: regular (default)</li><li>B: bold</li><li>I: italic</li><li>BI or IB: bold italic</li></ul>
+               * @param string $fontfile The font definition file. By default, the name is built from the family and style, in lower case with no spaces.
+               * @return array containing the font data, or false in case of error.
+               * @access public
+               * @since 1.5
+               * @see SetFont()
+               */
+               public function AddFont($family, $style='', $fontfile='') {
+                       if ($this->empty_string($family)) {
+                               if (!$this->empty_string($this->FontFamily)) {
+                                       $family = $this->FontFamily;
+                               } else {
+                                       $this->Error('Empty font family');
+                               }
+                       }
+                       $family = strtolower($family);
+                       if ((!$this->isunicode) AND ($family == 'arial')) {
+                               $family = 'helvetica';
+                       }
+                       if (($family == 'symbol') OR ($family == 'zapfdingbats')) {
+                               $style = '';
+                       }
+                       $tempstyle = strtoupper($style);
+                       $style = '';
+                       // underline
+                       if (strpos($tempstyle, 'U') !== false) {
+                               $this->underline = true;
+                       } else {
+                               $this->underline = false;
+                       }
+                       // line through (deleted)
+                       if (strpos($tempstyle, 'D') !== false) {
+                               $this->linethrough = true;
+                       } else {
+                               $this->linethrough = false;
+                       }
+                       // bold
+                       if (strpos($tempstyle, 'B') !== false) {
+                               $style .= 'B';
+                       }
+                       // oblique
+                       if (strpos($tempstyle, 'I') !== false) {
+                               $style .= 'I';
+                       }
+                       $bistyle = $style;
+                       $fontkey = $family.$style;
+                       $font_style = $style.($this->underline ? 'U' : '').($this->linethrough ? 'D' : '');
+                       $fontdata = array('fontkey' => $fontkey, 'family' => $family, 'style' => $font_style);
+                       // check if the font has been already added
+                       if ($this->getFontBuffer($fontkey) !== false) {
+                               return $fontdata;
+                       }
+                       if (isset($type)) {
+                               unset($type); 
+                       }
+                       if (isset($cw)) {
+                               unset($cw); 
+                       }
+                       // get specified font directory (if any)
+                       $fontdir = '';
+                       if (!$this->empty_string($fontfile)) {
+                               $fontdir = dirname($fontfile);
+                               if ($this->empty_string($fontdir) OR ($fontdir == '.')) {
+                                       $fontdir = '';
+                               } else {
+                                       $fontdir .= '/';
+                               }
+                       }
+                       // search and include font file
+                       if ($this->empty_string($fontfile) OR (!file_exists($fontfile))) {
+                               // build a standard filenames for specified font
+                               $fontfile1 = str_replace(' ', '', $family).strtolower($style).'.php';
+                               $fontfile2 = str_replace(' ', '', $family).'.php';
+                               // search files on various directories
+                               if (file_exists($fontdir.$fontfile1)) {
+                                       $fontfile = $fontdir.$fontfile1;
+                               } elseif (file_exists($this->_getfontpath().$fontfile1)) {
+                                       $fontfile = $this->_getfontpath().$fontfile1;
+                               } elseif (file_exists($fontfile1)) {
+                                       $fontfile = $fontfile1;
+                               } elseif (file_exists($fontdir.$fontfile2)) {
+                                       $fontfile = $fontdir.$fontfile2;
+                               } elseif (file_exists($this->_getfontpath().$fontfile2)) {
+                                       $fontfile = $this->_getfontpath().$fontfile2;
+                               } else {
+                                       $fontfile = $fontfile2;
+                               }
+                       }
+                       // include font file
+                       if (file_exists($fontfile)) {
+                               include($fontfile);
+                       } else {
+                               $this->Error('Could not include font definition file: '.$family.'');
+                       }
+                       // check font parameters
+                       if ((!isset($type)) OR (!isset($cw))) {
+                               $this->Error('The font definition file has a bad format: '.$fontfile.'');
+                       }
+                       // SET default parameters
+                       if (!isset($file) OR $this->empty_string($file)) {
+                               $file = '';
+                       }
+                       if (!isset($enc) OR $this->empty_string($enc)) {
+                               $enc = '';
+                       }
+                       if (!isset($cidinfo) OR $this->empty_string($cidinfo)) {
+                               $cidinfo = array('Registry'=>'Adobe','Ordering'=>'Identity','Supplement'=>0);
+                               $cidinfo['uni2cid'] = array();
+                       }
+                       if (!isset($ctg) OR $this->empty_string($ctg)) {
+                               $ctg = '';
+                       }
+                       if (!isset($desc) OR $this->empty_string($desc)) {
+                               $desc = array();
+                       }
+                       if (!isset($up) OR $this->empty_string($up)) {
+                               $up = -100;
+                       }
+                       if (!isset($ut) OR $this->empty_string($ut)) {
+                               $ut = 50;
+                       }
+                       if (!isset($cw) OR $this->empty_string($cw)) {
+                               $cw = array();
+                       }
+                       if (!isset($dw) OR $this->empty_string($dw)) {
+                               // set default width
+                               if (isset($desc['MissingWidth']) AND ($desc['MissingWidth'] > 0)) {
+                                       $dw = $desc['MissingWidth'];
+                               } elseif (isset($cw[32])) {
+                                       $dw = $cw[32];
+                               } else {
+                                       $dw = 600;
+                               }
+                       }
+                       ++$this->numfonts;                      
+                       if ($type == 'cidfont0') {
+                               // register CID font (all styles at once)
+                               $styles = array('' => '', 'B' => ',Bold', 'I' => ',Italic', 'BI' => ',BoldItalic');
+                               $sname = $name.$styles[$bistyle];
+                               if ((strpos($bistyle, 'B') !== false) AND (isset($desc['StemV'])) AND ($desc['StemV'] == 70)) {
+                                       $desc['StemV'] = 120;
+                               }
+                       } elseif ($type == 'core') {
+                               $name = $this->CoreFonts[$fontkey];
+                       } elseif (($type == 'TrueType') OR ($type == 'Type1')) {
+                               // ...
+                       } elseif ($type == 'TrueTypeUnicode') {
+                               $enc = 'Identity-H';
+                       } else {
+                               $this->Error('Unknow font type: '.$type.'');
+                       }
+                       $this->setFontBuffer($fontkey, array('i' => $this->numfonts, 'type' => $type, 'name' => $name, 'desc' => $desc, 'up' => $up, 'ut' => $ut, 'cw' => $cw, 'dw' => $dw, 'enc' => $enc, 'cidinfo' => $cidinfo, 'file' => $file, 'ctg' => $ctg));
+                       if (isset($diff) AND (!empty($diff))) {
+                               //Search existing encodings
+                               $d = 0;
+                               $nb = count($this->diffs);
+                               for ($i=1; $i <= $nb; ++$i) {
+                                       if ($this->diffs[$i] == $diff) {
+                                               $d = $i;
+                                               break;
+                                       }
+                               }
+                               if ($d == 0) {
+                                       $d = $nb + 1;
+                                       $this->diffs[$d] = $diff;
+                               }
+                               $this->setFontSubBuffer($fontkey, 'diff', $d);
+                       }
+                       if (!$this->empty_string($file)) {
+                               if ((strcasecmp($type,'TrueType') == 0) OR (strcasecmp($type, 'TrueTypeUnicode') == 0)) {
+                                       $this->FontFiles[$file] = array('length1' => $originalsize, 'fontdir' => $fontdir);
+                               } elseif ($type != 'core') {
+                                       $this->FontFiles[$file] = array('length1' => $size1, 'length2' => $size2, 'fontdir' => $fontdir);
+                               }
+                       }
+                       return $fontdata;
+               }
+
+               /**
+               * Sets the font used to print character strings. 
+               * The font can be either a standard one or a font added via the AddFont() method. Standard fonts use Windows encoding cp1252 (Western Europe).
+               * The method can be called before the first page is created and the font is retained from page to page. 
+               * If you just wish to change the current font size, it is simpler to call SetFontSize().
+               * Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:<ul><li>They are in the current directory (the one where the running script lies)</li><li>They are in one of the directories defined by the include_path parameter</li><li>They are in the directory defined by the K_PATH_FONTS constant</li></ul><br />
+               * @param string $family Family font. It can be either a name defined by AddFont() or one of the standard Type1 families (case insensitive):<ul><li>times (Times-Roman)</li><li>timesb (Times-Bold)</li><li>timesi (Times-Italic)</li><li>timesbi (Times-BoldItalic)</li><li>helvetica (Helvetica)</li><li>helveticab (Helvetica-Bold)</li><li>helveticai (Helvetica-Oblique)</li><li>helveticabi (Helvetica-BoldOblique)</li><li>courier (Courier)</li><li>courierb (Courier-Bold)</li><li>courieri (Courier-Oblique)</li><li>courierbi (Courier-BoldOblique)</li><li>symbol (Symbol)</li><li>zapfdingbats (ZapfDingbats)</li></ul> It is also possible to pass an empty string. In that case, the current family is retained.
+               * @param string $style Font style. Possible values are (case insensitive):<ul><li>empty string: regular</li><li>B: bold</li><li>I: italic</li><li>U: underline</li><li>D: line trough</li></ul> or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats basic fonts or other fonts when not defined.
+               * @param float $size Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12
+               * @param string $fontfile The font definition file. By default, the name is built from the family and style, in lower case with no spaces.
+               * @access public
+               * @since 1.0
+               * @see AddFont(), SetFontSize()
+               */
+               public function SetFont($family, $style='', $size=0, $fontfile='') {
+                       //Select a font; size given in points
+                       if ($size == 0) {
+                               $size = $this->FontSizePt;
+                       }
+                       // try to add font (if not already added)
+                       $fontdata = $this->AddFont($family, $style, $fontfile);
+                       $this->FontFamily = $fontdata['family'];
+                       $this->FontStyle = $fontdata['style'];
+                       $this->CurrentFont = $this->getFontBuffer($fontdata['fontkey']);
+                       $this->SetFontSize($size);
+               }
+
+               /**
+               * Defines the size of the current font.
+               * @param float $size The size (in points)
+               * @access public
+               * @since 1.0
+               * @see SetFont()
+               */
+               public function SetFontSize($size) {
+                       //Set font size in points
+                       $this->FontSizePt = $size;
+                       $this->FontSize = $size / $this->k;
+                       if (isset($this->CurrentFont['desc']['Ascent']) AND ($this->CurrentFont['desc']['Ascent'] > 0)) {
+                               $this->FontAscent = $this->CurrentFont['desc']['Ascent'] * $this->FontSize / 1000;
+                       } else {
+                               $this->FontAscent = 0.8 * $this->FontSize;
+                       }
+                       if (isset($this->CurrentFont['desc']['Descent']) AND ($this->CurrentFont['desc']['Descent'] > 0)) {
+                               $this->FontDescent = - $this->CurrentFont['desc']['Descent'] * $this->FontSize / 1000;
+                       } else {
+                               $this->FontDescent = 0.2 * $this->FontSize;
+                       }
+                       if (($this->page > 0) AND (isset($this->CurrentFont['i']))) {
+                               $this->_out(sprintf('BT /F%d %.2F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
+                       }
+               }
+
+               /**
+               * Defines the default monospaced font.
+               * @param string $font Font name.
+               * @access public
+               * @since 4.5.025
+               */
+               public function SetDefaultMonospacedFont($font) {
+                       $this->default_monospaced_font = $font;
+               }
+               
+               /**
+               * Creates a new internal link and returns its identifier. An internal link is a clickable area which directs to another place within the document.<br />
+               * The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is defined with SetLink().
+               * @access public
+               * @since 1.5
+               * @see Cell(), Write(), Image(), Link(), SetLink()
+               */
+               public function AddLink() {
+                       //Create a new internal link
+                       $n = count($this->links) + 1;
+                       $this->links[$n] = array(0, 0);
+                       return $n;
+               }
+
+               /**
+               * Defines the page and position a link points to.
+               * @param int $link The link identifier returned by AddLink()
+               * @param float $y Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page)
+               * @param int $page Number of target page; -1 indicates the current page. This is the default value
+               * @access public
+               * @since 1.5
+               * @see AddLink()
+               */
+               public function SetLink($link, $y=0, $page=-1) {
+                       if ($y == -1) {
+                               $y = $this->y;
+                       }
+                       if ($page == -1) {
+                               $page = $this->page;
+                       }
+                       $this->links[$link] = array($page, $y);
+               }
+
+               /**
+               * Puts a link on a rectangular area of the page.
+               * Text or image links are generally put via Cell(), Write() or Image(), but this method can be useful for instance to define a clickable area inside an image.
+               * @param float $x Abscissa of the upper-left corner of the rectangle
+               * @param float $y Ordinate of the upper-left corner of the rectangle
+               * @param float $w Width of the rectangle
+               * @param float $h Height of the rectangle
+               * @param mixed $link URL or identifier returned by AddLink()
+               * @param int $spaces number of spaces on the text to link
+               * @access public
+               * @since 1.5
+               * @see AddLink(), Annotation(), Cell(), Write(), Image()
+               */
+               public function Link($x, $y, $w, $h, $link, $spaces=0) {
+                       $this->Annotation($x, $y, $w, $h, $link, array('Subtype'=>'Link'), $spaces);
+               }
+               
+               /**
+               * Puts a markup annotation on a rectangular area of the page.
+               * !!!!THE ANNOTATION SUPPORT IS NOT YET FULLY IMPLEMENTED !!!!
+               * @param float $x Abscissa of the upper-left corner of the rectangle
+               * @param float $y Ordinate of the upper-left corner of the rectangle
+               * @param float $w Width of the rectangle
+               * @param float $h Height of the rectangle
+               * @param string $text annotation text or alternate content
+               * @param array $opt array of options (see section 8.4 of PDF reference 1.7).
+               * @param int $spaces number of spaces on the text to link
+               * @access public
+               * @since 4.0.018 (2008-08-06)
+               */
+               public function Annotation($x='', $y='', $w, $h, $text, $opt=array('Subtype'=>'Text'), $spaces=0) {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       // recalculate coordinates to account for graphic transformations
+                       if (isset($this->transfmatrix)) {
+                               for ($i=$this->transfmatrix_key; $i > 0; --$i) {
+                                       $maxid = count($this->transfmatrix[$i]) - 1;
+                                       for ($j=$maxid; $j >= 0; --$j) {
+                                               $ctm = $this->transfmatrix[$i][$j];
+                                               if (isset($ctm['a'])) {
+                                                       $x = $x * $this->k;
+                                                       $y = ($this->h - $y) * $this->k;
+                                                       $w = $w * $this->k;
+                                                       $h = $h * $this->k;
+                                                       // top left
+                                                       $xt = $x;
+                                                       $yt = $y;
+                                                       $x1 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e'];
+                                                       $y1 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f'];
+                                                       // top right
+                                                       $xt = $x + $w;
+                                                       $yt = $y;
+                                                       $x2 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e'];
+                                                       $y2 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f'];
+                                                       // bottom left
+                                                       $xt = $x;
+                                                       $yt = $y - $h;
+                                                       $x3 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e'];
+                                                       $y3 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f'];
+                                                       // bottom right
+                                                       $xt = $x + $w;
+                                                       $yt = $y - $h;
+                                                       $x4 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e'];
+                                                       $y4 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f'];
+                                                       // new coordinates (rectangle area)
+                                                       $x = min($x1, $x2, $x3, $x4);
+                                                       $y = max($y1, $y2, $y3, $y4);
+                                                       $w = (max($x1, $x2, $x3, $x4) - $x) / $this->k;
+                                                       $h = ($y - min($y1, $y2, $y3, $y4)) / $this->k;
+                                                       $x = $x / $this->k;
+                                                       $y = $this->h - ($y / $this->k);
+                                               }
+                                       }
+                               }
+                       }
+                       if ($this->page <= 0) {
+                               $page = 1;
+                       } else {
+                               $page = $this->page;
+                       }
+                       if (!isset($this->PageAnnots[$page])) {
+                               $this->PageAnnots[$page] = array();
+                       }
+                       $this->PageAnnots[$page][] = array('x' => $x, 'y' => $y, 'w' => $w, 'h' => $h, 'txt' => $text, 'opt' => $opt, 'numspaces' => $spaces);
+                       if (($opt['Subtype'] == 'FileAttachment') AND (!$this->empty_string($opt['FS'])) AND file_exists($opt['FS']) AND (!isset($this->embeddedfiles[basename($opt['FS'])]))) {
+                               $this->embeddedfiles[basename($opt['FS'])] = array('file' => $opt['FS'], 'n' => (count($this->embeddedfiles) + $this->embedded_start_obj_id));
+                       }
+                       // Add widgets annotation's icons
+                       if (isset($opt['mk']['i']) AND file_exists($opt['mk']['i'])) {
+                               $this->Image($opt['mk']['i'], '', '', 10, 10, '', '', '', false, 300, '', false, false, 0, false, true);
+                       }
+                       if (isset($opt['mk']['ri']) AND file_exists($opt['mk']['ri'])) {
+                               $this->Image($opt['mk']['ri'], '', '', 0, 0, '', '', '', false, 300, '', false, false, 0, false, true);
+                       }
+                       if (isset($opt['mk']['ix']) AND file_exists($opt['mk']['ix'])) {
+                               $this->Image($opt['mk']['ix'], '', '', 0, 0, '', '', '', false, 300, '', false, false, 0, false, true);
+                       }
+                       ++$this->annot_obj_id;
+               }
+
+               /**
+               * Embedd the attached files.
+               * @since 4.4.000 (2008-12-07)
+               * @access protected
+               * @see Annotation()
+               */
+               protected function _putEmbeddedFiles() {
+                       reset($this->embeddedfiles);
+                       foreach ($this->embeddedfiles as $filename => $filedata) {
+                               $data = file_get_contents($filedata['file']);
+                               $filter = '';
+                               if ($this->compress) {
+                                       $data = gzcompress($data);
+                                       $filter = ' /Filter /FlateDecode';
+                               }
+                               $this->offsets[$filedata['n']] = $this->bufferlen;
+                               $this->_out($filedata['n'].' 0 obj');
+                               $this->_out('<</Type /EmbeddedFile'.$filter.' /Length '.strlen($data).' >>');
+                               $this->_putstream($data);
+                               $this->_out('endobj');
+                       }
+               }
+               
+               /**
+               * Prints a character string.
+               * The origin is on the left of the first charcter, on the baseline.
+               * This method allows to place a string precisely on the page.
+               * @param float $x Abscissa of the origin
+               * @param float $y Ordinate of the origin
+               * @param string $txt String to print
+               * @param int $stroke outline size in points (0 = disable)
+               * @param boolean $clip if true activate clipping mode (you must call StartTransform() before this function and StopTransform() to stop the clipping tranformation).
+               * @access public
+               * @since 1.0
+               * @deprecated deprecated since version 4.3.005 (2008-11-25)
+               * @see Cell(), Write(), MultiCell(), WriteHTML(), WriteHTMLCell()
+               */
+               public function Text($x, $y, $txt, $stroke=0, $clip=false) {
+                       //Output a string
+                       if ($this->rtl) {
+                               // bidirectional algorithm (some chars may be changed affecting the line length)
+                               $s = $this->utf8Bidi($this->UTF8StringToArray($txt), $txt, $this->tmprtl);
+                               $l = $this->GetArrStringWidth($s);
+                               $xr = $this->w - $x - $l;
+                       } else {
+                               $xr = $x;
+                       }
+                       $opt = '';
+                       if (($stroke > 0) AND (!$clip)) {
+                               $opt .= '1 Tr '.intval($stroke).' w ';
+                       } elseif (($stroke > 0) AND $clip) {
+                               $opt .= '5 Tr '.intval($stroke).' w ';
+                       } elseif ($clip) {
+                               $opt .= '7 Tr ';
+                       }
+                       $s = sprintf('BT %.2F %.2F Td %s(%s) Tj ET 0 Tr', $xr * $this->k, ($this->h-$y) * $this->k, $opt, $this->_escapetext($txt));
+                       if ($this->underline AND ($txt!='')) {
+                               $s .= ' '.$this->_dounderline($xr, $y, $txt);
+                       }
+                       if ($this->linethrough AND ($txt!='')) { 
+                               $s .= ' '.$this->_dolinethrough($xr, $y, $txt); 
+                       }
+                       if ($this->ColorFlag AND (!$clip)) {
+                               $s='q '.$this->TextColor.' '.$s.' Q';
+                       }
+                       $this->_out($s);
+               }
+
+               /**
+               * Whenever a page break condition is met, the method is called, and the break is issued or not depending on the returned value. 
+               * The default implementation returns a value according to the mode selected by SetAutoPageBreak().<br />
+               * This method is called automatically and should not be called directly by the application.
+               * @return boolean
+               * @access public
+               * @since 1.4
+               * @see SetAutoPageBreak()
+               */
+               public function AcceptPageBreak() {
+                       return $this->AutoPageBreak;
+               }
+               
+               /**
+               * Add page if needed.
+               * @param float $h Cell height. Default value: 0.
+               * @param mixed $y starting y position, leave empty for current position.
+               * @param boolean $addpage if true add a page, otherwise only return the true/false state
+               * @return boolean true in case of page break, false otherwise.
+               * @since 3.2.000 (2008-07-01)
+               * @access protected
+               */
+               protected function checkPageBreak($h=0, $y='', $addpage=true) {
+                       if ($this->empty_string($y)) {
+                               $y = $this->y;
+                       }
+                       if ((($y + $h) > $this->PageBreakTrigger) AND (!$this->InFooter) AND ($this->AcceptPageBreak())) {
+                               if ($addpage) {
+                                       //Automatic page break
+                                       $x = $this->x;
+                                       $this->AddPage($this->CurOrientation);
+                                       $this->y = $this->tMargin;
+                                       $oldpage = $this->page - 1;
+                                       if ($this->rtl) {
+                                               if ($this->pagedim[$this->page]['orm'] != $this->pagedim[$oldpage]['orm']) {
+                                                       $this->x = $x - ($this->pagedim[$this->page]['orm'] - $this->pagedim[$oldpage]['orm']);
+                                               } else {
+                                                       $this->x = $x;
+                                               }
+                                       } else {
+                                               if ($this->pagedim[$this->page]['olm'] != $this->pagedim[$oldpage]['olm']) {
+                                                       $this->x = $x + ($this->pagedim[$this->page]['olm'] - $this->pagedim[$oldpage]['olm']);
+                                               } else {
+                                                       $this->x = $x;
+                                               }
+                                       }
+                               }
+                               return true;
+                       }
+                       return false;
+               }
+
+               /**
+               * Prints a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.<br />
+               * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
+               * @param float $w Cell width. If 0, the cell extends up to the right margin.
+               * @param float $h Cell height. Default value: 0.
+               * @param string $txt String to print. Default value: empty string.
+               * @param mixed $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
+               * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right (or left for RTL languages)</li><li>1: to the beginning of the next line</li><li>2: below</li></ul>
+               Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0.
+               * @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul>
+               * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
+               * @param mixed $link URL or identifier returned by AddLink().
+               * @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
+               * @param boolean $ignore_min_height if true ignore automatic minimum height value.
+               * @access public
+               * @since 1.0
+               * @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), AddLink(), Ln(), MultiCell(), Write(), SetAutoPageBreak()
+               */
+               public function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false) {
+                       //$min_cell_height = $this->FontAscent + $this->FontDescent;
+                       $min_cell_height = $this->FontSize * $this->cell_height_ratio;
+                       if ($h < $min_cell_height) {
+                               $h = $min_cell_height;
+                       }
+                       $this->checkPageBreak($h);
+                       $this->_out($this->getCellCode($w, $h, $txt, $border, $ln, $align, $fill, $link, $stretch, $ignore_min_height));
+               }
+
+               /**
+               * Removes SHY characters from text.
+               * @param string $txt input string
+               * @return string without SHY characters.
+               * @access public
+               * @since (4.5.019) 2009-02-28
+               */
+               public function removeSHY($txt='') {
+                       /*
+                       * Unicode Data
+                       * Name : SOFT HYPHEN, commonly abbreviated as SHY
+                       * HTML Entity (decimal): &#173;
+                       * HTML Entity (hex): &#xad;
+                       * HTML Entity (named): &shy;
+                       * How to type in Microsoft Windows: [Alt +00AD] or [Alt 0173]
+                       * UTF-8 (hex): 0xC2 0xAD (c2ad)
+                       * UTF-8 character: chr(194).chr(173)
+                       */
+                       $txt = preg_replace('/([\\xc2]{1}[\\xad]{1})/', '', $txt);
+                       if (!$this->isunicode) {
+                               $txt = preg_replace('/([\\xad]{1})/', '', $txt);
+                       }
+                       return $txt;
+               }
+               
+               /**
+               * Returns the PDF string code to print a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.<br />
+               * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
+               * @param float $w Cell width. If 0, the cell extends up to the right margin.
+               * @param float $h Cell height. Default value: 0.
+               * @param string $txt String to print. Default value: empty string.
+               * @param mixed $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
+               * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right (or left for RTL languages)</li><li>1: to the beginning of the next line</li><li>2: below</li></ul>Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0.
+               * @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul>
+               * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
+               * @param mixed $link URL or identifier returned by AddLink().
+               * @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
+               * @param boolean $ignore_min_height if true ignore automatic minimum height value.
+               * @access protected
+               * @since 1.0
+               * @see Cell()
+               */
+               protected function getCellCode($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false) {
+                       $txt = $this->removeSHY($txt);
+                       $rs = ''; //string to be returned
+                       if (!$ignore_min_height) {
+                               $min_cell_height = $this->FontSize * $this->cell_height_ratio;
+                               if ($h < $min_cell_height) {
+                                       $h = $min_cell_height;
+                               }
+                       }
+                       $k = $this->k;
+                       if ($this->empty_string($w) OR ($w <= 0)) {
+                               if ($this->rtl) {
+                                       $w = $this->x - $this->lMargin;
+                               } else {
+                                       $w = $this->w - $this->rMargin - $this->x;
+                               }
+                       }
+                       $s = '';                        
+                       if (($fill == 1) OR ($border == 1)) {
+                               if ($fill == 1) {
+                                       $op = ($border == 1) ? 'B' : 'f';
+                               } else {
+                                       $op = 'S';
+                               }
+                               if ($this->rtl) {
+                                       $xk = (($this->x  - $w) * $k);
+                               } else {
+                                       $xk = ($this->x * $k);
+                               }
+                               $s .= sprintf('%.2F %.2F %.2F %.2F re %s ', $xk, (($this->h - $this->y) * $k), ($w * $k), (-$h * $k), $op);
+                       }
+                       if (is_string($border)) {
+                               $lm = ($this->LineWidth / 2);
+                               $x = $this->x;
+                               $y = $this->y;
+                               if (strpos($border,'L') !== false) {
+                                       if ($this->rtl) {
+                                               $xk = ($x - $w) * $k;
+                                       } else {
+                                               $xk = $x * $k;
+                                       }
+                                       $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y + $lm) * $k), $xk, (($this->h - ($y + $h + $lm)) * $k));
+                               }
+                               if (strpos($border,'T') !== false) {
+                                       if ($this->rtl) {
+                                               $xk = ($x - $w + $lm) * $k;
+                                               $xwk = ($x - $lm) * $k;
+                                       } else {
+                                               $xk = ($x - $lm) * $k;
+                                               $xwk = ($x + $w + $lm) * $k;
+                                       }
+                                       $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y) * $k), $xwk, (($this->h - $y) * $k));
+                               }
+                               if (strpos($border,'R') !== false) {
+                                       if ($this->rtl) {
+                                               $xk = $x * $k;
+                                       } else {
+                                               $xk = ($x + $w) * $k;
+                                       }
+                                       $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y + $lm) * $k), $xk, (($this->h - ($y + $h + $lm))* $k));
+                               }
+                               if (strpos($border,'B') !== false) {
+                                       if ($this->rtl) {
+                                               $xk = ($x - $w + $lm) * $k;
+                                               $xwk = ($x - $lm) * $k;
+                                       } else {
+                                               $xk = ($x - $lm) * $k;
+                                               $xwk = ($x + $w + $lm) * $k;
+                                       }
+                                       $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - ($y + $h)) * $k), $xwk, (($this->h - ($y + $h)) * $k));
+                               }
+                       }
+                       if ($txt != '') {
+                               // text lenght
+                               $width = $this->GetStringWidth($txt);
+                               // ratio between cell lenght and text lenght
+                               if ($width <= 0) {
+                                       $ratio = 1;
+                               } else {
+                                       $ratio = ($w - (2 * $this->cMargin)) / $width;
+                               }
+                               // stretch text if required
+                               if (($stretch > 0) AND (($ratio < 1) OR (($ratio > 1) AND (($stretch % 2) == 0)))) {
+                                       if ($stretch > 2) {
+                                               // spacing
+                                               //Calculate character spacing in points
+                                               $char_space = (($w - $width - (2 * $this->cMargin)) * $this->k) / max($this->GetNumChars($txt)-1,1);
+                                               //Set character spacing
+                                               $rs .= sprintf('BT %.2F Tc ET ', $char_space);
+                                       } else {
+                                               // scaling
+                                               //Calculate horizontal scaling
+                                               $horiz_scale = $ratio * 100.0;
+                                               //Set horizontal scaling
+                                               $rs .= sprintf('BT %.2F Tz ET ', $horiz_scale);
+                                       }
+                                       $align = '';
+                                       $width = $w - (2 * $this->cMargin);
+                               } else {
+                                       $stretch == 0;
+                               }
+                               if ($align == 'L') {
+                                       if ($this->rtl) {
+                                               $dx = $w - $width - $this->cMargin;
+                                       } else {
+                                               $dx = $this->cMargin;
+                                       }
+                               } elseif ($align == 'R') {
+                                       if ($this->rtl) {
+                                               $dx = $this->cMargin;
+                                       } else {
+                                               $dx = $w - $width - $this->cMargin;
+                                       }
+                               } elseif ($align == 'C') {
+                                       $dx = ($w - $width) / 2;
+                               } elseif ($align == 'J') {
+                                       if ($this->rtl) {
+                                               $dx = $w - $width - $this->cMargin;
+                                       } else {
+                                               $dx = $this->cMargin;
+                                       }
+                               } else {
+                                       $dx = $this->cMargin;
+                               }
+                               if ($this->ColorFlag) {
+                                       $s .= 'q '.$this->TextColor.' ';
+                               }
+                               $txt2 = $this->_escapetext($txt);
+                               if ($this->rtl) {
+                                       $xdk = ($this->x - $dx - $width) * $k;
+                               } else {
+                                       $xdk = ($this->x + $dx) * $k;
+                               }
+                               // Justification
+                               if ($align == 'J') {
+                                       // count number of spaces
+                                       $ns = substr_count($txt, ' ');
+                                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {
+                                               // get string width without spaces
+                                               $width = $this->GetStringWidth(str_replace(' ', '', $txt));
+                                               // calculate average space width
+                                               $spacewidth = -1000 * ($w - $width - (2 * $this->cMargin)) / ($ns?$ns:1) / $this->FontSize;
+                                               // set word position to be used with TJ operator
+                                               $txt2 = str_replace(chr(0).' ', ') '.($spacewidth).' (', $txt2);
+                                       } else {
+                                               // get string width
+                                               $width = $this->GetStringWidth($txt);
+                                               $spacewidth = (($w - $width - (2 * $this->cMargin)) / ($ns?$ns:1)) * $this->k;
+                                               $rs .= sprintf('BT %.3F Tw ET ', $spacewidth);
+                                       }
+                               }
+                               // calculate approximate position of the font base line
+                               //$basefonty = $this->y + (($h + $this->FontAscent - $this->FontDescent)/2);
+                               $basefonty = $this->y + ($h/2) + ($this->FontSize/3);
+                               // print text
+                               $s .= sprintf('BT %.2F %.2F Td [(%s)] TJ ET', $xdk, (($this->h - $basefonty) * $k), $txt2);
+                               if ($this->rtl) {
+                                       $xdx = $this->x - $dx - $width;
+                               } else {
+                                       $xdx = $this->x + $dx;
+                               }
+                               if ($this->underline)  {
+                                       $s .= ' '.$this->_dounderlinew($xdx, $basefonty, $width);
+                               }
+                               if ($this->linethrough) { 
+                                       $s .= ' '.$this->_dolinethroughw($xdx, $basefonty, $width);
+                               }
+                               if ($this->ColorFlag) {
+                                       $s .= ' Q';
+                               }
+                               if ($link) {
+                                       $this->Link($xdx, $this->y + (($h - $this->FontSize)/2), $width, $this->FontSize, $link, substr_count($txt, chr(32)));
+                               }
+                       }
+                       // output cell
+                       if ($s) {
+                               // output cell
+                               $rs .= $s;
+                               // reset text stretching
+                               if ($stretch > 2) {
+                                       //Reset character horizontal spacing
+                                       $rs .= ' BT 0 Tc ET';
+                               } elseif ($stretch > 0) {
+                                       //Reset character horizontal scaling
+                                       $rs .= ' BT 100 Tz ET';
+                               }
+                       }
+                       // reset word spacing
+                       if (!(($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) AND ($align == 'J')) {
+                               $rs .= ' BT 0 Tw ET';
+                       }
+                       $this->lasth = $h;
+                       if ($ln > 0) {
+                               //Go to the beginning of the next line
+                               $this->y += $h;
+                               if ($ln == 1) {
+                                       if ($this->rtl) {
+                                               $this->x = $this->w - $this->rMargin;
+                                       } else {
+                                               $this->x = $this->lMargin;
+                                       }
+                               }
+                       } else {
+                               // go left or right by case
+                               if ($this->rtl) {
+                                       $this->x -= $w;
+                               } else {
+                                       $this->x += $w;
+                               }
+                       }
+                       $gstyles = ''.$this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor.' '.$this->FillColor."\n";
+                       $rs = $gstyles.$rs;
+                       return $rs;
+               }
+
+               /**
+               * This method allows printing text with line breaks. 
+               * They can be automatic (as soon as the text reaches the right border of the cell) or explicit (via the \n character). As many cells as necessary are output, one below the other.<br />
+               * Text can be aligned, centered or justified. The cell block can be framed and the background painted.
+               * @param float $w Width of cells. If 0, they extend up to the right margin of the page.
+               * @param float $h Cell minimum height. The cell extends automatically if needed.
+               * @param string $txt String to print
+               * @param mixed $border Indicates if borders must be drawn around the cell block. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
+               * @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align</li><li>C: center</li><li>R: right align</li><li>J: justification (default value when $ishtml=false)</li></ul>
+               * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
+               * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right</li><li>1: to the beginning of the next line [DEFAULT]</li><li>2: below</li></ul>
+               * @param float $x x position in user units
+               * @param float $y y position in user units
+               * @param boolean $reseth if true reset the last cell height (default true).
+               * @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
+               * @param boolean $ishtml set to true if $txt is HTML content (default = false).
+               * @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width.
+               * @param float $maxh maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false.
+               * @return int Return the number of cells or 1 for html mode.
+               * @access public
+               * @since 1.3
+               * @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), Cell(), Write(), SetAutoPageBreak()
+               */
+               public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0) {     
+                       if ($this->empty_string($this->lasth) OR $reseth) {
+                               //set row height
+                               $this->lasth = $this->FontSize * $this->cell_height_ratio;
+                       }
+                       if (!$this->empty_string($y)) {
+                               $this->SetY($y);
+                       } else {
+                               $y = $this->GetY();
+                       }
+                       // check for page break
+                       $this->checkPageBreak($h);
+                       $y = $this->GetY();
+                       // get current page number
+                       $startpage = $this->page;
+                       if (!$this->empty_string($x)) {
+                               $this->SetX($x);
+                       } else {
+                               $x = $this->GetX();
+                       }
+                       if ($this->empty_string($w) OR ($w <= 0)) {
+                               if ($this->rtl) {
+                                       $w = $this->x - $this->lMargin;
+                               } else {
+                                       $w = $this->w - $this->rMargin - $this->x;
+                               }
+                       }
+                       // store original margin values
+                       $lMargin = $this->lMargin;
+                       $rMargin = $this->rMargin;
+                       if ($this->rtl) {
+                               $this->SetRightMargin($this->w - $this->x);
+                               $this->SetLeftMargin($this->x - $w);
+                       } else {
+                               $this->SetLeftMargin($this->x);
+                               $this->SetRightMargin($this->w - $this->x - $w);
+                       }
+                       $starty = $this->y;
+                       if ($autopadding) {
+                               // Adjust internal padding
+                               if ($this->cMargin < ($this->LineWidth / 2)) {
+                                       $this->cMargin = ($this->LineWidth / 2);
+                               }
+                               // Add top space if needed
+                               if (($this->lasth - $this->FontSize) < $this->LineWidth) {
+                                       $this->y += $this->LineWidth / 2;
+                               }
+                               // add top padding
+                               $this->y += $this->cMargin;
+                       }
+                       if ($ishtml) {
+                               // ******* Write HTML text
+                               $this->writeHTML($txt, true, 0, $reseth, true, $align);
+                               $nl = 1;
+                       } else {
+                               // ******* Write text
+                               $nl = $this->Write($this->lasth, $txt, '', 0, $align, true, $stretch, false, false, $maxh);
+                       }
+                       if ($autopadding) {
+                               // add bottom padding
+                               $this->y += $this->cMargin;
+                               // Add bottom space if needed
+                               if (($this->lasth - $this->FontSize) < $this->LineWidth) {
+                                       $this->y += $this->LineWidth / 2;
+                               }
+                       }
+                       // Get end-of-text Y position
+                       $currentY = $this->y;
+                       // get latest page number
+                       $endpage = $this->page;
+                       // check if a new page has been created
+                       if ($endpage > $startpage) {
+                               // design borders around HTML cells.
+                               for ($page=$startpage; $page <= $endpage; ++$page) {
+                                       $this->setPage($page);
+                                       if ($page == $startpage) {
+                                               $this->y = $starty; // put cursor at the beginning of cell on the first page
+                                               $h = $this->getPageHeight() - $starty - $this->getBreakMargin();
+                                               $cborder = $this->getBorderMode($border, $position='start');
+                                       } elseif ($page == $endpage) {
+                                               $this->y = $this->tMargin; // put cursor at the beginning of last page
+                                               $h = $currentY - $this->tMargin;
+                                               $cborder = $this->getBorderMode($border, $position='end');
+                                       } else {
+                                               $this->y = $this->tMargin; // put cursor at the beginning of the current page
+                                               $h = $this->getPageHeight() - $this->tMargin - $this->getBreakMargin();
+                                               $cborder = $this->getBorderMode($border, $position='middle');
+                                       }
+                                       $nx = $x;
+                                       // account for margin changes
+                                       if ($page > $startpage) {
+                                               if (($this->rtl) AND ($this->pagedim[$page]['orm'] != $this->pagedim[$startpage]['orm'])) {
+                                                       $nx = $x + ($this->pagedim[$page]['orm'] - $this->pagedim[$startpage]['orm']);
+                                               } elseif ((!$this->rtl) AND ($this->pagedim[$page]['olm'] != $this->pagedim[$startpage]['olm'])) {
+                                                       $nx = $x + ($this->pagedim[$page]['olm'] - $this->pagedim[$startpage]['olm']);
+                                               }
+                                       }
+                                       $this->SetX($nx);
+                                       $ccode = $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, false);
+                                       if ($cborder OR $fill) {
+                                               $pagebuff = $this->getPageBuffer($this->page);
+                                               $pstart = substr($pagebuff, 0, $this->intmrk[$this->page]);
+                                               $pend = substr($pagebuff, $this->intmrk[$this->page]);
+                                               $this->setPageBuffer($this->page, $pstart.$ccode."\n".$pend);
+                                               $this->intmrk[$this->page] += strlen($ccode."\n");
+                                       }
+                               }
+                       } else {
+                               $h = max($h, ($currentY - $y));
+                               // put cursor at the beginning of text
+                               $this->SetY($y); 
+                               $this->SetX($x);
+                               // design a cell around the text
+                               $ccode = $this->getCellCode($w, $h, '', $border, 1, '', $fill, '', 0, true);
+                               if ($border OR $fill) {
+                                       if (end($this->transfmrk[$this->page]) !== false) {
+                                               $pagemarkkey = key($this->transfmrk[$this->page]);
+                                               $pagemark = &$this->transfmrk[$this->page][$pagemarkkey];
+                                       } elseif ($this->InFooter) {
+                                               $pagemark = &$this->footerpos[$this->page];
+                                       } else {
+                                               $pagemark = &$this->intmrk[$this->page];
+                                       }
+                                       $pagebuff = $this->getPageBuffer($this->page);
+                                       $pstart = substr($pagebuff, 0, $pagemark);
+                                       $pend = substr($pagebuff, $pagemark);
+                                       $this->setPageBuffer($this->page, $pstart.$ccode."\n".$pend);
+                                       $pagemark += strlen($ccode."\n");
+                               }
+                       }
+                       // Get end-of-cell Y position
+                       $currentY = $this->GetY();
+                       // restore original margin values
+                       $this->SetLeftMargin($lMargin);
+                       $this->SetRightMargin($rMargin);
+                       if ($ln > 0) {
+                               //Go to the beginning of the next line
+                               $this->SetY($currentY);
+                               if ($ln == 2) {
+                                       $this->SetX($x + $w);
+                               }
+                       } else {
+                               // go left or right by case
+                               $this->setPage($startpage);
+                               $this->y = $y;
+                               $this->SetX($x + $w);
+                       }
+                       $this->setContentMark();
+                       return $nl;
+               }
+
+               /**
+               * Get the border mode accounting for multicell position (opens bottom side of multicell crossing pages)
+               * @param mixed $border Indicates if borders must be drawn around the cell block. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
+               * @param string multicell position: 'start', 'middle', 'end'
+               * @return border mode
+               * @access protected
+               * @since 4.4.002 (2008-12-09)
+               */
+               protected function getBorderMode($border, $position='start') {
+                       if ((!$this->opencell) AND ($border == 1)) {
+                               return 1;
+                       }
+                       $cborder = '';
+                       switch ($position) {
+                               case 'start': {
+                                       if ($border == 1) {
+                                               $cborder = 'LTR';
+                                       } else {
+                                               if (!(false === strpos($border, 'L'))) {
+                                                       $cborder .= 'L';
+                                               }
+                                               if (!(false === strpos($border, 'T'))) {
+                                                       $cborder .= 'T';
+                                               }
+                                               if (!(false === strpos($border, 'R'))) {
+                                                       $cborder .= 'R';
+                                               }
+                                               if ((!$this->opencell) AND (!(false === strpos($border, 'B')))) {
+                                                       $cborder .= 'B';
+                                               }
+                                       }
+                                       break;
+                               }
+                               case 'middle': {
+                                       if ($border == 1) {
+                                               $cborder = 'LR';
+                                       } else {
+                                               if (!(false === strpos($border, 'L'))) {
+                                                       $cborder .= 'L';
+                                               }
+                                               if ((!$this->opencell) AND (!(false === strpos($border, 'T')))) {
+                                                       $cborder .= 'T';
+                                               }
+                                               if (!(false === strpos($border, 'R'))) {
+                                                       $cborder .= 'R';
+                                               }
+                                               if ((!$this->opencell) AND (!(false === strpos($border, 'B')))) {
+                                                       $cborder .= 'B';
+                                               }
+                                       }
+                                       break;
+                               }
+                               case 'end': {
+                                       if ($border == 1) {
+                                               $cborder = 'LRB';
+                                       } else {
+                                               if (!(false === strpos($border, 'L'))) {
+                                                       $cborder .= 'L';
+                                               }
+                                               if ((!$this->opencell) AND (!(false === strpos($border, 'T')))) {
+                                                       $cborder .= 'T';
+                                               }
+                                               if (!(false === strpos($border, 'R'))) {
+                                                       $cborder .= 'R';
+                                               }
+                                               if (!(false === strpos($border, 'B'))) {
+                                                       $cborder .= 'B';
+                                               }
+                                       }
+                                       break;
+                               }
+                               default: {
+                                       $cborder = $border;
+                                       break;
+                               }
+                       }
+                       return $cborder;
+               }
+
+               /**
+               * This method returns the estimated number of lines required to print the text.
+               * @param string $txt text to print
+               * @param float $w width of cell. If 0, they extend up to the right margin of the page.
+               * @return int Return the estimated number of lines.
+               * @access public
+               * @since 4.5.011
+               */
+               public function getNumLines($txt, $w=0) {
+                       $lines = 0;
+                       if ($this->empty_string($w) OR ($w <= 0)) {
+                               if ($this->rtl) {
+                                       $w = $this->x - $this->lMargin;
+                               } else {
+                                       $w = $this->w - $this->rMargin - $this->x;
+                               }
+                       }
+                       // max column width
+                       $wmax = $w - (2 * $this->cMargin);
+                       // remove carriage returns
+                       $txt = str_replace("\r", '', $txt);
+                       // remove last newline (if any)
+                       if (substr($txt,-1) == "\n") {
+                               $txt = substr($txt, 0, -1);
+                       }
+                       // divide text in blocks
+                       $txtblocks = explode("\n", $txt);
+                       // for each block;
+                       foreach ($txtblocks as $block) {
+                               // estimate the number of lines
+                               $lines += $this->empty_string($block) ? 1 : (ceil($this->GetStringWidth($block) / $wmax));
+                       }
+                       return $lines;
+               }
+                       
+               /**
+               * This method prints text from the current position.<br />
+               * @param float $h Line height
+               * @param string $txt String to print
+               * @param mixed $link URL or identifier returned by AddLink()
+               * @param int $fill Indicates if the background must be painted (1) or transparent (0). Default value: 0.
+               * @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul>
+               * @param boolean $ln if true set cursor at the bottom of the line, otherwise set cursor at the top of the line.
+               * @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
+               * @param boolean $firstline if true prints only the first line and return the remaining string.
+               * @param boolean $firstblock if true the string is the starting of a line.
+               * @param float $maxh maximum height. The remaining unprinted text will be returned. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature.
+               * @return mixed Return the number of cells or the remaining string if $firstline = true.
+               * @access public
+               * @since 1.5
+               */
+               public function Write($h, $txt, $link='', $fill=0, $align='', $ln=false, $stretch=0, $firstline=false, $firstblock=false, $maxh=0) {
+                       if (strlen($txt) == 0) {
+                               $txt = ' ';
+                       }
+                       // remove carriage returns
+                       $s = str_replace("\r", '', $txt);
+                       // check if string contains arabic text
+                       if (preg_match(K_RE_PATTERN_ARABIC, $s)) {
+                               $arabic = true;
+                       } else {
+                               $arabic = false;
+                       }
+                       // check if string contains RTL text
+                       if ($arabic OR ($this->tmprtl == 'R') OR preg_match(K_RE_PATTERN_RTL, $txt)) {
+                               $rtlmode = true;
+                       } else {
+                               $rtlmode = false;
+                       }
+                       // get a char width
+                       $chrwidth = $this->GetCharWidth('.');
+                       // get array of unicode values
+                       $chars = $this->UTF8StringToArray($s);
+                       // get array of chars
+                       $uchars = $this->UTF8ArrayToUniArray($chars);
+                       // get the number of characters
+                       $nb = count($chars);
+                       // replacement for SHY character (minus symbol)
+                       $shy_replacement = 45;
+                       $shy_replacement_char = $this->unichr($shy_replacement);
+                       // widht for SHY replacement
+                       $shy_replacement_width = $this->GetCharWidth($shy_replacement);
+                       // store current position
+                       $prevx = $this->x;
+                       $prevy = $this->y;
+                       // max Y
+                       $maxy = $this->y + $maxh - $h - (2 * $this->cMargin);
+                       // calculate remaining line width ($w)
+                       if ($this->rtl) {
+                               $w = $this->x - $this->lMargin;
+                       } else {
+                               $w = $this->w - $this->rMargin - $this->x;
+                       }
+                       // max column width
+                       $wmax = $w - (2 * $this->cMargin);
+                       if ((!$firstline) AND (($chrwidth > $wmax) OR ($this->GetCharWidth($chars[0]) > $wmax))) {
+                               // a single character do not fit on column
+                               return '';
+                       }
+                       $i = 0; // character position
+                       $j = 0; // current starting position
+                       $sep = -1; // position of the last blank space
+                       $shy = false; // true if the last blank is a soft hypen (SHY)
+                       $l = 0; // current string lenght
+                       $nl = 0; //number of lines
+                       $linebreak = false;
+                       $pc = 0; // previous character
+                       // for each character
+                       while ($i < $nb) {
+                               if (($maxh > 0) AND ($this->y >= $maxy) ) {
+                                       $firstline = true;
+                               }
+                               //Get the current character
+                               $c = $chars[$i];
+                               if ($c == 10) { // 10 = "\n" = new line
+                                       //Explicit line break
+                                       if ($align == 'J') {
+                                               if ($this->rtl) {
+                                                       $talign = 'R';
+                                               } else {
+                                                       $talign = 'L';
+                                               }
+                                       } else {
+                                               $talign = $align;
+                                       }
+                                       $tmpstr = $this->UniArrSubString($uchars, $j, $i);
+                                       if ($firstline) {
+                                               $startx = $this->x;
+                                               $tmparr = array_slice($chars, $j, $i);
+                                               if ($rtlmode) {
+                                                       $tmparr = $this->utf8Bidi($tmparr, $tmpstr, $this->tmprtl);
+                                               }
+                                               $linew = $this->GetArrStringWidth($tmparr);
+                                               unset($tmparr);
+                                               if ($this->rtl) {
+                                                       $this->endlinex = $startx - $linew;
+                                               } else {
+                                                       $this->endlinex = $startx + $linew;
+                                               }
+                                               $w = $linew;
+                                               $tmpcmargin = $this->cMargin;
+                                               if ($maxh == 0) {
+                                                       $this->cMargin = 0;
+                                               }
+                                       }
+                                       $this->Cell($w, $h, $tmpstr, 0, 1, $talign, $fill, $link, $stretch);
+                                       unset($tmpstr);
+                                       if ($firstline) {
+                                               $this->cMargin = $tmpcmargin;
+                                               return ($this->UniArrSubString($uchars, $i));
+                                       }
+                                       ++$nl;
+                                       $j = $i + 1;
+                                       $l = 0;
+                                       $sep = -1;
+                                       $shy = false;
+                                       // account for margin changes
+                                       if ((($this->y + $this->lasth) > $this->PageBreakTrigger) AND (!$this->InFooter)) {
+                                               // AcceptPageBreak() may be overriden on extended classed to include margin changes
+                                               $this->AcceptPageBreak();
+                                       }
+                                       $w = $this->getRemainingWidth();
+                                       $wmax = $w - (2 * $this->cMargin);
+                               } else {
+                                       // 160 is the non-breaking space.
+                                       // 173 is SHY (Soft Hypen).
+                                       // \p{Z} or \p{Separator}: any kind of Unicode whitespace or invisible separator.
+                                       // \p{Lo} or \p{Other_Letter}: a Unicode letter or ideograph that does not have lowercase and uppercase variants.
+                                       // \p{Lo} is needed because Chinese characters are packed next to each other without spaces in between.
+                                       if (($c != 160) AND (($c == 173) OR preg_match($this->re_spaces, $this->unichr($c)))) {
+                                               // update last blank space position
+                                               $sep = $i;
+                                               // check if is a SHY
+                                               if ($c == 173) {
+                                                       $shy = true;
+                                                       if ($pc == 45) {
+                                                               $tmp_shy_replacement_width = 0;
+                                                               $tmp_shy_replacement_char = '';
+                                                       } else {
+                                                               $tmp_shy_replacement_width = $shy_replacement_width;
+                                                               $tmp_shy_replacement_char = $shy_replacement_char;
+                                                       }
+                                               } else {
+                                                       $shy = false;
+                                               }
+                                       }
+                                       // update string length
+                                       if ((($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) AND ($arabic)) {
+                                               // with bidirectional algorithm some chars may be changed affecting the line length
+                                               // *** very slow ***
+                                               $l = $this->GetArrStringWidth($this->utf8Bidi(array_slice($chars, $j, $i-$j+1), '', $this->tmprtl));
+                                       } else {
+                                               $l += $this->GetCharWidth($c);
+                                       }
+                                       if (($l > $wmax) OR ($shy AND (($l + $tmp_shy_replacement_width) > $wmax)) ) {
+                                               // we have reached the end of column
+                                               if ($sep == -1) {
+                                                       // check if the line was already started
+                                                       if (($this->rtl AND ($this->x <= ($this->w - $this->rMargin - $chrwidth)))
+                                                               OR ((!$this->rtl) AND ($this->x >= ($this->lMargin + $chrwidth)))) {
+                                                               // print a void cell and go to next line
+                                                               $this->Cell($w, $h, '', 0, 1);
+                                                               $linebreak = true;
+                                                               if ($firstline) {
+                                                                       return ($this->UniArrSubString($uchars, $j));
+                                                               }
+                                                       } else {
+                                                               // truncate the word because do not fit on column
+                                                               $tmpstr = $this->UniArrSubString($uchars, $j, $i);
+                                                               if ($firstline) {
+                                                                       $startx = $this->x;
+                                                                       $tmparr = array_slice($chars, $j, $i);
+                                                                       if ($rtlmode) {
+                                                                               $tmparr = $this->utf8Bidi($tmparr, $tmpstr, $this->tmprtl);
+                                                                       }
+                                                                       $linew = $this->GetArrStringWidth($tmparr);
+                                                                       unset($tmparr);
+                                                                       if ($this->rtl) {
+                                                                               $this->endlinex = $startx - $linew;
+                                                                       } else {
+                                                                               $this->endlinex = $startx + $linew;
+                                                                       }
+                                                                       $w = $linew;
+                                                                       $tmpcmargin = $this->cMargin;
+                                                                       if ($maxh == 0) {
+                                                                               $this->cMargin = 0;
+                                                                       }
+                                                               }
+                                                               $this->Cell($w, $h, $tmpstr, 0, 1, $align, $fill, $link, $stretch);
+                                                               unset($tmpstr);
+                                                               if ($firstline) {
+                                                                       $this->cMargin = $tmpcmargin;
+                                                                       return ($this->UniArrSubString($uchars, $i));
+                                                               }
+                                                               $j = $i;
+                                                               --$i;
+                                                       }       
+                                               } else {
+                                                       // word wrapping
+                                                       if ($this->rtl AND (!$firstblock)) {
+                                                               $endspace = 1;
+                                                       } else {
+                                                               $endspace = 0;
+                                                       }
+                                                       if ($shy) {
+                                                               // add hypen (minus symbol) at the end of the line
+                                                               $shy_width = $tmp_shy_replacement_width;
+                                                               if ($this->rtl) {
+                                                                       $shy_char_left = $tmp_shy_replacement_char;
+                                                                       $shy_char_right = '';
+                                                               } else {
+                                                                       $shy_char_left = '';
+                                                                       $shy_char_right = $tmp_shy_replacement_char;
+                                                               }
+                                                       } else {
+                                                               $shy_width = 0;
+                                                               $shy_char_left = '';
+                                                               $shy_char_right = '';
+                                                       }
+                                                       $tmpstr = $this->UniArrSubString($uchars, $j, ($sep + $endspace));
+                                                       if ($firstline) {
+                                                               $startx = $this->x;
+                                                               $tmparr = array_slice($chars, $j, ($sep + $endspace));
+                                                               if ($rtlmode) {
+                                                                       $tmparr = $this->utf8Bidi($tmparr, $tmpstr, $this->tmprtl);
+                                                               }
+                                                               $linew = $this->GetArrStringWidth($tmparr);
+                                                               unset($tmparr);
+                                                               if ($this->rtl) {
+                                                                       $this->endlinex = $startx - $linew - $shy_width;
+                                                               } else {
+                                                                       $this->endlinex = $startx + $linew + $shy_width;
+                                                               }
+                                                               $w = $linew;
+                                                               $tmpcmargin = $this->cMargin;
+                                                               if ($maxh == 0) {
+                                                                       $this->cMargin = 0;
+                                                               }
+                                                       }
+                                                       // print the line
+                                                       $this->Cell($w, $h, $shy_char_left.$tmpstr.$shy_char_right, 0, 1, $align, $fill, $link, $stretch);
+                                                       unset($tmpstr);
+                                                       if ($firstline) {
+                                                               // return the remaining text
+                                                               $this->cMargin = $tmpcmargin;
+                                                               return ($this->UniArrSubString($uchars, ($sep + $endspace)));
+                                                       }
+                                                       $i = $sep;
+                                                       $sep = -1;
+                                                       $shy = false;
+                                                       $j = ($i+1);
+                                               }
+                                               // account for margin changes
+                                               if ((($this->y + $this->lasth) > $this->PageBreakTrigger) AND (!$this->InFooter)) {
+                                                       // AcceptPageBreak() may be overriden on extended classed to include margin changes
+                                                       $this->AcceptPageBreak();
+                                               }
+                                               $w = $this->getRemainingWidth();
+                                               $wmax = $w - (2 * $this->cMargin);
+                                               if ($linebreak) {
+                                                       $linebreak = false;
+                                               } else {
+                                                       ++$nl;
+                                                       $l = 0;
+                                               }
+                                       }
+                               }
+                               // save last character
+                               $pc = $c;
+                               ++$i;
+                       } // end while i < nb
+                       // print last substring (if any)
+                       if ($l > 0) {
+                               switch ($align) {
+                                       case 'J':
+                                       case 'C': {
+                                               $w = $w;
+                                               break;
+                                       }
+                                       case 'L': {
+                                               if ($this->rtl) {
+                                                       $w = $w;
+                                               } else {
+                                                       $w = $l;
+                                               }
+                                               break;
+                                       }
+                                       case 'R': {
+                                               if ($this->rtl) {
+                                                       $w = $l;
+                                               } else {
+                                                       $w = $w;
+                                               }
+                                               break;
+                                       }
+                                       default: {
+                                               $w = $l;
+                                               break;
+                                       }
+                               }
+                               $tmpstr = $this->UniArrSubString($uchars, $j, $nb);
+                               if ($firstline) {
+                                       $startx = $this->x;
+                                       $tmparr = array_slice($chars, $j, $nb);
+                                       if ($rtlmode) {
+                                               $tmparr = $this->utf8Bidi($tmparr, $tmpstr, $this->tmprtl);
+                                       }
+                                       $linew = $this->GetArrStringWidth($tmparr);
+                                       unset($tmparr);
+                                       if ($this->rtl) {
+                                               $this->endlinex = $startx - $linew;
+                                       } else {
+                                               $this->endlinex = $startx + $linew;
+                                       }
+                                       $w = $linew;
+                                       $tmpcmargin = $this->cMargin;
+                                       if ($maxh == 0) {
+                                               $this->cMargin = 0;
+                                       }
+                               }
+                               $this->Cell($w, $h, $tmpstr, 0, $ln, $align, $fill, $link, $stretch);
+                               unset($tmpstr);
+                               if ($firstline) {
+                                       $this->cMargin = $tmpcmargin;
+                                       return ($this->UniArrSubString($uchars, $nb));
+                               }
+                               ++$nl;
+                       }
+                       if ($firstline) {
+                               return '';
+                       }
+                       return $nl;
+               }
+                               
+               /**
+               * Returns the remaining width between the current position and margins.
+               * @return int Return the remaining width
+               * @access protected
+               */
+               protected function getRemainingWidth() {
+                       if ($this->rtl) {
+                               return ($this->x - $this->lMargin);
+                       } else {
+                               return ($this->w - $this->rMargin - $this->x);
+                       }
+               }
+
+               /**
+               * Extract a slice of the $strarr array and return it as string.
+               * @param string $strarr The input array of characters.
+               * @param int $start the starting element of $strarr.
+               * @param int $end first element that will not be returned.
+               * @return Return part of a string
+               * @access public
+               */
+               public function UTF8ArrSubString($strarr, $start='', $end='') {
+                       if (strlen($start) == 0) {
+                               $start = 0;
+                       }
+                       if (strlen($end) == 0) {
+                               $end = count($strarr);
+                       }
+                       $string = '';
+                       for ($i=$start; $i < $end; ++$i) {
+                               $string .= $this->unichr($strarr[$i]);
+                       }
+                       return $string;
+               }
+
+               /**
+               * Extract a slice of the $uniarr array and return it as string.
+               * @param string $uniarr The input array of characters.
+               * @param int $start the starting element of $strarr.
+               * @param int $end first element that will not be returned.
+               * @return Return part of a string
+               * @access public
+               * @since 4.5.037 (2009-04-07)
+               */
+               public function UniArrSubString($uniarr, $start='', $end='') {
+                       if (strlen($start) == 0) {
+                               $start = 0;
+                       }
+                       if (strlen($end) == 0) {
+                               $end = count($uniarr);
+                       }
+                       $string = '';
+                       for ($i=$start; $i < $end; ++$i) {
+                               $string .= $uniarr[$i];
+                       }
+                       return $string;
+               }
+
+               /**
+               * Convert an array of UTF8 values to array of unicode characters
+               * @param string $ta The input array of UTF8 values.
+               * @return Return array of unicode characters
+               * @access public
+               * @since 4.5.037 (2009-04-07)
+               */
+               public function UTF8ArrayToUniArray($ta) {
+                       return array_map(array($this, 'unichr'), $ta);
+               }
+               
+               /**
+               * Returns the unicode caracter specified by UTF-8 code
+               * @param int $c UTF-8 code
+               * @return Returns the specified character.
+               * @author Miguel Perez, Nicola Asuni
+               * @access public
+               * @since 2.3.000 (2008-03-05)
+               */
+               public function unichr($c) {
+                       if (!$this->isunicode) {
+                               return chr($c);
+                       } elseif ($c <= 0x7F) {
+                               // one byte
+                               return chr($c);
+                       } elseif ($c <= 0x7FF) {
+                               // two bytes
+                               return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F);
+                       } elseif ($c <= 0xFFFF) {
+                               // three bytes
+                               return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F);
+                       } elseif ($c <= 0x10FFFF) {
+                               // four bytes
+                               return chr(0xF0 | $c >> 18).chr(0x80 | $c >> 12 & 0x3F).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F);
+                       } else {
+                               return '';
+                       }
+               }
+               
+               /**
+               * Puts an image in the page. 
+               * The upper-left corner must be given. 
+               * The dimensions can be specified in different ways:<ul>
+               * <li>explicit width and height (expressed in user unit)</li>
+               * <li>one explicit dimension, the other being calculated automatically in order to keep the original proportions</li>
+               * <li>no explicit dimension, in which case the image is put at 72 dpi</li></ul>
+               * Supported formats are JPEG and PNG images whitout GD library and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;
+               * The format can be specified explicitly or inferred from the file extension.<br />
+               * It is possible to put a link on the image.<br />
+               * Remark: if an image is used several times, only one copy will be embedded in the file.<br />
+               * @param string $file Name of the file containing the image.
+               * @param float $x Abscissa of the upper-left corner.
+               * @param float $y Ordinate of the upper-left corner.
+               * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
+               * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
+               * @param string $type Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension.
+               * @param mixed $link URL or identifier returned by AddLink().
+               * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>
+               * @param boolean $resize If true resize (reduce) the image to fit $w and $h (requires GD library).
+               * @param int $dpi dot-per-inch resolution used on resize
+               * @param string $palign Allows to center or align the image on the current line. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>
+               * @param boolean $ismask true if this image is a mask, false otherwise
+               * @param mixed $imgmask image object returned by this function or false
+               * @param mixed $border Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
+               * @param boolean $fitbox If true scale image dimensions proportionally to fit within the ($w, $h) box.
+               * @param boolean $hidden if true do not display the image.
+               * @return image information
+               * @access public
+               * @since 1.1
+               */
+               public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false) {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       // get image dimensions
+                       $imsize = @getimagesize($file);
+                       if ($imsize === FALSE) {
+                               // encode spaces on filename
+                               $file = str_replace(' ', '%20', $file);
+                               $imsize = @getimagesize($file);
+                               if ($imsize === FALSE) {
+                                       $this->Error('[Image] No such file or directory in '.$file);
+                               }
+                       }
+                       // get original image width and height in pixels
+                       list($pixw, $pixh) = $imsize;
+                       // calculate image width and height on document
+                       if (($w <= 0) AND ($h <= 0)) {
+                               // convert image size to document unit
+                               $w = $this->pixelsToUnits($pixw);
+                               $h = $this->pixelsToUnits($pixh);
+                       } elseif ($w <= 0) {
+                               $w = $h * $pixw / $pixh;
+                       } elseif ($h <= 0) {
+                               $h = $w * $pixh / $pixw;
+                       } elseif ($fitbox AND ($w > 0) AND ($h > 0)) {
+                               // scale image dimensions proportionally to fit within the ($w, $h) box
+                               if ((($w * $pixh) / ($h * $pixw)) < 1) {
+                                       $h = $w * $pixh / $pixw;
+                               } else {
+                                       $w = $h * $pixw / $pixh;
+                               }
+                       }
+                       // calculate new minimum dimensions in pixels
+                       $neww = round($w * $this->k * $dpi / $this->dpi);
+                       $newh = round($h * $this->k * $dpi / $this->dpi);
+                       // check if resize is necessary (resize is used only to reduce the image)
+                       if (($neww * $newh) >= ($pixw * $pixh)) {
+                               $resize = false;
+                       }
+                       // check if image has been already added on document
+                       if (!in_array($file, $this->imagekeys)) {
+                               //First use of image, get info
+                               if ($type == '') {
+                                       $fileinfo = pathinfo($file);
+                                       if (isset($fileinfo['extension']) AND (!$this->empty_string($fileinfo['extension']))) {
+                                               $type = $fileinfo['extension'];
+                                       } else {
+                                               $this->Error('Image file has no extension and no type was specified: '.$file);
+                                       }
+                               }
+                               $type = strtolower($type);
+                               if ($type == 'jpg') {
+                                       $type = 'jpeg';
+                               }
+                               $mqr = $this->get_mqr();
+                               $this->set_mqr(false);
+                               // Specific image handlers
+                               $mtd = '_parse'.$type;
+                               // GD image handler function
+                               $gdfunction = 'imagecreatefrom'.$type;
+                               $info = false;
+                               if ((method_exists($this, $mtd)) AND (!($resize AND function_exists($gdfunction)))) {
+                                       // TCPDF image functions
+                                       $info = $this->$mtd($file);
+                                       if ($info == 'pngalpha') {
+                                               return $this->ImagePngAlpha($file, $x, $y, $w, $h, 'PNG', $link, $align, $resize, $dpi, $palign);
+                                       }
+                               } 
+                               if (!$info) {
+                                       if (function_exists($gdfunction)) {
+                                               // GD library
+                                               $img = $gdfunction($file);
+                                               if ($resize) {
+                                                       $imgr = imagecreatetruecolor($neww, $newh);
+                                                       imagecopyresampled($imgr, $img, 0, 0, 0, 0, $neww, $newh, $pixw, $pixh); 
+                                                       $info = $this->_toJPEG($imgr);
+                                               } else {
+                                                       $info = $this->_toJPEG($img);
+                                               }
+                                       } elseif (extension_loaded('imagick')) {
+                                               // ImageMagick library
+                                               $img = new Imagick();
+                                               $img->readImage($file);
+                                               if ($resize) {
+                                                       $img->resizeImage($neww, $newh, 10, 1, false);
+                                               }
+                                               $img->setCompressionQuality($this->jpeg_quality);
+                                               $img->setImageFormat('jpeg');
+                                               $tempname = tempnam(K_PATH_CACHE, 'jpg_');
+                                               $img->writeImage($tempname);
+                                               $info = $this->_parsejpeg($tempname);
+                                               unlink($tempname);
+                                               $img->destroy();
+                                       } else {
+                                               return;
+                                       }
+                               }
+                               if ($info === false) {
+                                       //If false, we cannot process image
+                                       return;
+                               }
+                               $this->set_mqr($mqr);
+                               if ($ismask) {
+                                       // force grayscale
+                                       $info['cs'] = 'DeviceGray';
+                               }
+                               $info['i'] = $this->numimages + 1;
+                               if ($imgmask !== false) {
+                                       $info['masked'] = $imgmask;
+                               }
+                               // add image to document
+                               $this->setImageBuffer($file, $info);
+                       } else {
+                               $info = $this->getImageBuffer($file);
+                       }
+                       // Check whether we need a new page first as this does not fit
+                       $prev_x = $this->x;
+                       if ($this->checkPageBreak($h, $y)) {
+                               $y = $this->GetY() + $this->cMargin;
+                               if ($this->rtl) {
+                                       $x += ($prev_x - $this->x);
+                               } else {
+                                       $x += ($this->x - $prev_x);
+                               }
+                       }
+                       // set bottomcoordinates
+                       $this->img_rb_y = $y + $h;
+                       // set alignment
+                       if ($this->rtl) {
+                               if ($palign == 'L') {
+                                       $ximg = $this->lMargin;
+                                       // set right side coordinate
+                                       $this->img_rb_x = $ximg + $w;
+                               } elseif ($palign == 'C') {
+                                       $ximg = ($this->w - $x - $w) / 2;
+                                       // set right side coordinate
+                                       $this->img_rb_x = $ximg + $w;
+                               } else {
+                                       $ximg = $this->w - $x - $w;
+                                       // set left side coordinate
+                                       $this->img_rb_x = $ximg;
+                               }
+                       } else {
+                               if ($palign == 'R') {
+                                       $ximg = $this->w - $this->rMargin - $w;
+                                       // set left side coordinate
+                                       $this->img_rb_x = $ximg;
+                               } elseif ($palign == 'C') {
+                                       $ximg = ($this->w - $x - $w) / 2;
+                                       // set right side coordinate
+                                       $this->img_rb_x = $ximg + $w;
+                               } else {
+                                       $ximg = $x;
+                                       // set right side coordinate
+                                       $this->img_rb_x = $ximg + $w;
+                               }
+                       }
+                       if ($ismask OR $hidden) {
+                               // image is not displayed
+                               return $info['i'];
+                       }
+                       $xkimg = $ximg * $this->k;
+                       $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q', ($w * $this->k), ($h * $this->k), $xkimg, (($this->h - ($y + $h)) * $this->k), $info['i']));
+                       if (!empty($border)) {
+                               $bx = $x;
+                               $by = $y;
+                               $this->x = $ximg;
+                               $this->y = $y;
+                               $this->Cell($w, $h, '', $border, 0, '', 0, '', 0);
+                               $this->x = $bx;
+                               $this->y = $by;
+                       }
+                       if ($link) {
+                               $this->Link($ximg, $y, $w, $h, $link, 0);
+                       }
+                       // set pointer to align the successive text/objects
+                       switch($align) {
+                               case 'T': {
+                                       $this->y = $y;
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'M': {
+                                       $this->y = $y + round($h/2);
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'B': {
+                                       $this->y = $this->img_rb_y;
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'N': {
+                                       $this->SetY($this->img_rb_y);
+                                       break;
+                               }
+                               default:{
+                                       break;
+                               }
+                       }
+                       $this->endlinex = $this->img_rb_x;
+                       return $info['i'];
+               }
+               
+               /**
+                * Sets the current active configuration setting of magic_quotes_runtime (if the set_magic_quotes_runtime function exist)
+                * @param boolean $mqr FALSE for off, TRUE for on.
+                * @since 4.6.025 (2009-08-17)
+                */
+               public function set_mqr($mqr) {
+                       if(!defined('PHP_VERSION_ID')) {
+                               $version = PHP_VERSION;
+                               define('PHP_VERSION_ID', (($version{0} * 10000) + ($version{2} * 100) + $version{4}));
+                       }
+                       if (PHP_VERSION_ID < 50300) {
+                               @set_magic_quotes_runtime($mqr);
+                       }
+               }
+               
+               /**
+                * Gets the current active configuration setting of magic_quotes_runtime (if the get_magic_quotes_runtime function exist)
+                * @return Returns 0 if magic quotes runtime is off or get_magic_quotes_runtime doesn't exist, 1 otherwise. 
+                * @since 4.6.025 (2009-08-17)
+                */
+               public function get_mqr() {
+                       if(!defined('PHP_VERSION_ID')) {
+                               $version = PHP_VERSION;
+                               define('PHP_VERSION_ID', (($version{0} * 10000) + ($version{2} * 100) + $version{4}));
+                       }
+                       if (PHP_VERSION_ID < 50300) {
+                               return @get_magic_quotes_runtime();
+                       }
+                       return 0;
+               }
+                                               
+               /**
+               * Convert the loaded php image to a JPEG and then return a structure for the PDF creator.
+               * This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
+               * @param string $file Image file name.
+               * @param image $image Image object.
+               * return image JPEG image object.
+               * @access protected
+               */
+               protected function _toJPEG($image) {
+                       $tempname = tempnam(K_PATH_CACHE, 'jpg_');
+                       imagejpeg($image, $tempname, $this->jpeg_quality);
+                       imagedestroy($image);
+                       $retvars = $this->_parsejpeg($tempname);
+                       // tidy up by removing temporary image
+                       unlink($tempname);
+                       return $retvars;
+               }
+               
+               /**
+               * Extract info from a JPEG file without using the GD library.
+               * @param string $file image file to parse
+               * @return array structure containing the image data
+               * @access protected
+               */
+               protected function _parsejpeg($file) {
+                       $a = getimagesize($file);
+                       if (empty($a)) {
+                               $this->Error('Missing or incorrect image file: '.$file);
+                       }
+                       if ($a[2] != 2) {
+                               $this->Error('Not a JPEG file: '.$file);
+                       }
+                       if ((!isset($a['channels'])) OR ($a['channels'] == 3)) {
+                               $colspace = 'DeviceRGB';
+                       } elseif ($a['channels'] == 4) {
+                               $colspace = 'DeviceCMYK';
+                       } else {
+                               $colspace = 'DeviceGray';
+                       }
+                       $bpc = isset($a['bits']) ? $a['bits'] : 8;
+                       $data = file_get_contents($file);
+                       return array('w' => $a[0], 'h' => $a[1], 'cs' => $colspace, 'bpc' => $bpc, 'f' => 'DCTDecode', 'data' => $data);
+               }
+
+               /**
+               * Extract info from a PNG file without using the GD library.
+               * @param string $file image file to parse
+               * @return array structure containing the image data
+               * @access protected
+               */
+               protected function _parsepng($file) {
+                       $f = fopen($file, 'rb');
+                       if ($f === false) {
+                               $this->Error('Can\'t open image file: '.$file);
+                       }
+                       //Check signature
+                       if (fread($f, 8) != chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) {
+                               $this->Error('Not a PNG file: '.$file);
+                       }
+                       //Read header chunk
+                       fread($f, 4);
+                       if (fread($f, 4) != 'IHDR') {
+                               $this->Error('Incorrect PNG file: '.$file);
+                       }
+                       $w = $this->_freadint($f);
+                       $h = $this->_freadint($f);
+                       $bpc = ord(fread($f, 1));
+                       if ($bpc > 8) {
+                               //$this->Error('16-bit depth not supported: '.$file);
+                               fclose($f);
+                               return false;
+                       }
+                       $ct = ord(fread($f, 1));
+                       if ($ct == 0) {
+                               $colspace = 'DeviceGray';
+                       } elseif ($ct == 2) {
+                               $colspace = 'DeviceRGB';
+                       } elseif ($ct == 3) {
+                               $colspace = 'Indexed';
+                       } else {
+                               // alpha channel
+                               fclose($f);
+                               return 'pngalpha';
+                       }
+                       if (ord(fread($f, 1)) != 0) {
+                               //$this->Error('Unknown compression method: '.$file);
+                               fclose($f);
+                               return false;
+                       }
+                       if (ord(fread($f, 1)) != 0) {
+                               //$this->Error('Unknown filter method: '.$file);
+                               fclose($f);
+                               return false;
+                       }
+                       if (ord(fread($f, 1)) != 0) {
+                               //$this->Error('Interlacing not supported: '.$file);
+                               fclose($f);
+                               return false;
+                       }
+                       fread($f, 4);
+                       $parms = '/DecodeParms <</Predictor 15 /Colors '.($ct==2 ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w.'>>';
+                       //Scan chunks looking for palette, transparency and image data
+                       $pal = '';
+                       $trns = '';
+                       $data = '';
+                       do {
+                               $n = $this->_freadint($f);
+                               $type = fread($f, 4);
+                               if ($type == 'PLTE') {
+                                       //Read palette
+                                       $pal = $this->rfread($f, $n);
+                                       fread($f, 4);
+                               } elseif ($type == 'tRNS') {
+                                       //Read transparency info
+                                       $t = $this->rfread($f, $n);
+                                       if ($ct == 0) {
+                                               $trns = array(ord(substr($t, 1, 1)));
+                                       } elseif ($ct == 2) {
+                                               $trns = array(ord(substr($t, 1, 1)), ord(substr($t, 3, 1)), ord(substr($t, 5, 1)));
+                                       } else {
+                                               $pos = strpos($t, chr(0));
+                                               if ($pos !== false) {
+                                                       $trns = array($pos);
+                                               }
+                                       }
+                                       fread($f, 4);
+                               } elseif ($type == 'IDAT') {
+                                       //Read image data block
+                                       $data .= $this->rfread($f, $n);
+                                       fread($f, 4);
+                               } elseif ($type == 'IEND') {
+                                       break;
+                               } else {
+                                       $this->rfread($f, $n + 4);
+                               }
+                       } while ($n);
+                       if (($colspace == 'Indexed') AND (empty($pal))) {
+                               //$this->Error('Missing palette in '.$file);
+                               fclose($f);
+                               return false;
+                       }
+                       fclose($f);
+                       return array('w' => $w, 'h' => $h, 'cs' => $colspace, 'bpc' => $bpc, 'f' => 'FlateDecode', 'parms' => $parms, 'pal' => $pal, 'trns' => $trns, 'data' => $data);
+               }
+
+               /**
+               * Binary-safe and URL-safe file read.
+               * Reads up to length  bytes from the file pointer referenced by handle. Reading stops as soon as one of the following conditions is met: length bytes have been read; EOF (end of file) is reached.
+               * @param resource $handle
+               * @param int $length
+               * @return Returns the read string or FALSE in case of error.
+               * @author Nicola Asuni
+               * @access protected
+               * @since 4.5.027 (2009-03-16)
+               */
+               protected function rfread($handle, $length) {
+                       $data = fread($handle, $length);
+                       if ($data === false) {
+                               return false;
+                       }
+                       $rest = $length - strlen($data);
+                       if ($rest > 0) {
+                               $data .= $this->rfread($handle, $rest);
+                       }
+                       return $data;
+               }
+
+               /**
+               * Extract info from a PNG image with alpha channel using the GD library.
+               * @param string $file Name of the file containing the image.
+               * @param float $x Abscissa of the upper-left corner.
+               * @param float $y Ordinate of the upper-left corner.
+               * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
+               * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
+               * @param string $type Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension.
+               * @param mixed $link URL or identifier returned by AddLink().
+               * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>
+               * @param boolean $resize If true resize (reduce) the image to fit $w and $h (requires GD library).
+               * @param int $dpi dot-per-inch resolution used on resize
+               * @param string $palign Allows to center or align the image on the current line. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>
+               * @author Valentin Schmidt, Nicola Asuni
+               * @access protected
+               * @since 4.3.007 (2008-12-04)
+               * @see Image()
+               */
+               protected function ImagePngAlpha($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='') {
+                       // get image size
+                       list($wpx, $hpx) = getimagesize($file);
+                       // generate images
+                       $img = imagecreatefrompng($file);
+                       $imgalpha = imagecreate($wpx, $hpx);
+                       // generate gray scale pallete
+                       for ($c = 0; $c < 256; ++$c) {
+                               ImageColorAllocate($imgalpha, $c, $c, $c);
+                       }
+                       // extract alpha channel
+                       for ($xpx = 0; $xpx < $wpx; ++$xpx) {
+                               for ($ypx = 0; $ypx < $hpx; ++$ypx) {
+                                       $colorindex = imagecolorat($img, $xpx, $ypx);
+                                       $col = imagecolorsforindex($img, $colorindex);
+                                       imagesetpixel($imgalpha, $xpx, $ypx, $this->getGDgamma((127 - $col['alpha']) * 255 / 127));
+                               }
+                       }
+                       // create temp alpha file
+                       $tempfile_alpha = tempnam(K_PATH_CACHE, 'mska_');
+                       imagepng($imgalpha, $tempfile_alpha);
+                       imagedestroy($imgalpha);
+                       // extract image without alpha channel
+                       $imgplain = imagecreatetruecolor($wpx, $hpx);
+                       imagecopy($imgplain, $img, 0, 0, 0, 0, $wpx, $hpx);
+                       // create temp image file
+                       $tempfile_plain = tempnam(K_PATH_CACHE, 'mskp_');
+                       imagepng($imgplain, $tempfile_plain);
+                       imagedestroy($imgplain);
+                       // embed mask image
+                       $imgmask = $this->Image($tempfile_alpha, $x, $y, $w, $h, 'PNG', '', '', $resize, $dpi, '', true, false);
+                       // embed image, masked with previously embedded mask
+                       $this->Image($tempfile_plain, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, false, $imgmask);
+                       // remove temp files
+                       unlink($tempfile_alpha);
+                       unlink($tempfile_plain);
+               }
+
+               /**
+               * Correct the gamma value to be used with GD library
+               * @param float $v the gamma value to be corrected
+               * @access protected
+               * @since 4.3.007 (2008-12-04)
+               */
+               protected function getGDgamma($v) {
+                       return (pow(($v / 255), 2.2) * 255);
+               } 
+               
+               /**
+               * Performs a line break. 
+               * The current abscissa goes back to the left margin and the ordinate increases by the amount passed in parameter.
+               * @param float $h The height of the break. By default, the value equals the height of the last printed cell.
+               * @param boolean $cell if true add a cMargin to the x coordinate
+               * @access public
+               * @since 1.0
+               * @see Cell()
+               */
+               public function Ln($h='', $cell=false) {
+                       //Line feed; default value is last cell height
+                       if ($cell) {
+                               $cellmargin = $this->cMargin;
+                       } else {
+                               $cellmargin = 0;
+                       }
+                       if ($this->rtl) {
+                               $this->x = $this->w - $this->rMargin - $cellmargin;
+                       } else {
+                               $this->x = $this->lMargin + $cellmargin;
+                       }
+                       if (is_string($h)) {
+                               $this->y += $this->lasth;
+                       } else {
+                               $this->y += $h;
+                       }
+                       $this->newline = true;
+               }
+
+               /**
+               * Returns the relative X value of current position.
+               * The value is relative to the left border for LTR languages and to the right border for RTL languages.
+               * @return float
+               * @access public
+               * @since 1.2
+               * @see SetX(), GetY(), SetY()
+               */
+               public function GetX() {
+                       //Get x position
+                       if ($this->rtl) {
+                               return ($this->w - $this->x);
+                       } else {
+                               return $this->x;
+                       }
+               }
+               
+               /**
+               * Returns the absolute X value of current position.
+               * @return float
+               * @access public
+               * @since 1.2
+               * @see SetX(), GetY(), SetY()
+               */
+               public function GetAbsX() {
+                       return $this->x;
+               }
+               
+               /**
+               * Returns the ordinate of the current position.
+               * @return float
+               * @access public
+               * @since 1.0
+               * @see SetY(), GetX(), SetX()
+               */
+               public function GetY() {
+                       //Get y position
+                       return $this->y;
+               }
+               
+               /**
+               * Defines the abscissa of the current position. 
+               * If the passed value is negative, it is relative to the right of the page (or left if language is RTL).
+               * @param float $x The value of the abscissa.
+               * @access public
+               * @since 1.2
+               * @see GetX(), GetY(), SetY(), SetXY()
+               */
+               public function SetX($x) {
+                       //Set x position
+                       if ($this->rtl) {
+                               if ($x >= 0) {
+                                       $this->x = $this->w - $x;
+                               } else {
+                                       $this->x = abs($x);
+                               }
+                       } else {
+                               if ($x >= 0) {
+                                       $this->x = $x;
+                               } else {
+                                       $this->x = $this->w + $x;
+                               }
+                       }
+                       if ($this->x < 0) {
+                               $this->x = 0;
+                       }
+                       if ($this->x > $this->w) {
+                               $this->x = $this->w;
+                       }
+               }
+               
+               /**
+               * Moves the current abscissa back to the left margin and sets the ordinate.
+               * If the passed value is negative, it is relative to the bottom of the page.
+               * @param float $y The value of the ordinate.
+               * @param bool $resetx if true (default) reset the X position.
+               * @access public
+               * @since 1.0
+               * @see GetX(), GetY(), SetY(), SetXY()
+               */
+               public function SetY($y, $resetx=true) {
+                       if ($resetx) {
+                               //reset x
+                               if ($this->rtl) {
+                                       $this->x = $this->w - $this->rMargin;
+                               } else {
+                                       $this->x = $this->lMargin;
+                               }
+                       }
+                       if ($y >= 0) {
+                               $this->y = $y;
+                       } else {
+                               $this->y = $this->h + $y;
+                       }
+                       if ($this->y < 0) {
+                               $this->y = 0;
+                       }
+                       if ($this->y > $this->h) {
+                               $this->y = $this->h;
+                       }
+               }
+               
+               /**
+               * Defines the abscissa and ordinate of the current position. 
+               * If the passed values are negative, they are relative respectively to the right and bottom of the page.
+               * @param float $x The value of the abscissa
+               * @param float $y The value of the ordinate
+               * @access public
+               * @since 1.2
+               * @see SetX(), SetY()
+               */
+               public function SetXY($x, $y) {
+                       //Set x and y positions
+                       $this->SetY($y);
+                       $this->SetX($x);
+               }
+
+               /**
+               * Send the document to a given destination: string, local file or browser. 
+               * In the last case, the plug-in may be used (if present) or a download ("Save as" dialog box) may be forced.<br />
+               * The method first calls Close() if necessary to terminate the document.
+               * @param string $name The name of the file when saved. Note that special characters are removed and blanks characters are replaced with the underscore character.
+               * @param string $dest Destination where to send the document. It can take one of the following values:<ul><li>I: send the file inline to the browser (default). The plug-in is used if available. The name given by name is used when one selects the "Save as" option on the link generating the PDF.</li><li>D: send to the browser and force a file download with the name given by name.</li><li>F: save to a local file with the name given by name.</li><li>S: return the document as a string. name is ignored.</li></ul>
+               * @access public
+               * @since 1.0
+               * @see Close()
+               */
+               public function Output($name='doc.pdf', $dest='I') {
+                       //Output PDF to some destination
+                       //Finish document if necessary
+                       if ($this->state < 3) {
+                               $this->Close();
+                       }
+                       //Normalize parameters
+                       if (is_bool($dest)) {
+                               $dest = $dest ? 'D' : 'F';
+                       }
+                       $dest = strtoupper($dest);
+                       if ($dest != 'F') {
+                               $name = preg_replace('/[\s]+/', '_', $name);
+                               $name = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $name);
+                       }
+                       if ($this->sign) {
+                               // *** apply digital signature to the document ***
+                               // get the document content
+                               $pdfdoc = $this->getBuffer();
+                               // remove last newline
+                               $pdfdoc = substr($pdfdoc, 0, -1);
+                               // Remove the original buffer
+                               if (isset($this->diskcache) AND $this->diskcache) {
+                                       // remove buffer file from cache
+                                       unlink($this->buffer);
+                               }
+                               unset($this->buffer);
+                               // remove filler space
+                               $byterange_string_len = strlen($this->byterange_string);
+                               // define the ByteRange
+                               $byte_range = array();
+                               $byte_range[0] = 0;
+                               $byte_range[1] = strpos($pdfdoc, $this->byterange_string) + $byterange_string_len + 10;
+                               $byte_range[2] = $byte_range[1] + $this->signature_max_lenght + 2;
+                               $byte_range[3] = strlen($pdfdoc) - $byte_range[2];
+                               $pdfdoc = substr($pdfdoc, 0, $byte_range[1]).substr($pdfdoc, $byte_range[2]);
+                               // replace the ByteRange
+                               $byterange = sprintf('/ByteRange[0 %u %u %u]', $byte_range[1], $byte_range[2], $byte_range[3]);
+                               $byterange .= str_repeat(' ', ($byterange_string_len - strlen($byterange)));
+                               $pdfdoc = str_replace($this->byterange_string, $byterange, $pdfdoc);
+                               // write the document to a temporary folder
+                               $tempdoc = tempnam(K_PATH_CACHE, 'tmppdf_');
+                               $f = fopen($tempdoc, 'wb');
+                               if (!$f) {
+                                       $this->Error('Unable to create temporary file: '.$tempdoc);
+                               }
+                               $pdfdoc_lenght = strlen($pdfdoc);
+                               fwrite($f, $pdfdoc, $pdfdoc_lenght);
+                               fclose($f);
+                               // get digital signature via openssl library
+                               $tempsign = tempnam(K_PATH_CACHE, 'tmpsig_');
+                               if (empty($this->signature_data['extracerts'])) {
+                                       openssl_pkcs7_sign($tempdoc, $tempsign, $this->signature_data['signcert'], array($this->signature_data['privkey'], $this->signature_data['password']), array(), PKCS7_BINARY | PKCS7_DETACHED);
+                               } else {
+                                       openssl_pkcs7_sign($tempdoc, $tempsign, $this->signature_data['signcert'], array($this->signature_data['privkey'], $this->signature_data['password']), array(), PKCS7_BINARY | PKCS7_DETACHED, $this->signature_data['extracerts']);
+                               }       
+                               unlink($tempdoc);
+                               // read signature
+                               $signature = file_get_contents($tempsign, false, null, $pdfdoc_lenght);
+                               unlink($tempsign);
+                               // extract signature
+                               $signature = substr($signature, (strpos($signature, "%%EOF\n\n------") + 13));
+                               $tmparr = explode("\n\n", $signature);
+                               $signature = $tmparr[1];
+                               unset($tmparr);
+                               // decode signature
+                               $signature = base64_decode(trim($signature));
+                               // convert signature to hex
+                               $signature = current(unpack('H*', $signature));
+                               $signature = str_pad($signature, $this->signature_max_lenght, '0');
+                               // Add signature to the document
+                               $pdfdoc = substr($pdfdoc, 0, $byte_range[1]).'<'.$signature.'>'.substr($pdfdoc, ($byte_range[1]));
+                               $this->diskcache = false;
+                               $this->buffer = &$pdfdoc;
+                               $this->bufferlen = strlen($pdfdoc);
+                       }
+                       switch($dest) {
+                               case 'I': {
+                                       // Send PDF to the standard output
+                                       if (ob_get_contents()) {
+                                               $this->Error('Some data has already been output, can\'t send PDF file');
+                                       }
+                                       if (php_sapi_name() != 'cli') {
+                                               //We send to a browser
+                                               header('Content-Type: application/pdf');
+                                               if (headers_sent()) {
+                                                       $this->Error('Some data has already been output to browser, can\'t send PDF file');
+                                               }
+                                               header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
+                                               header('Pragma: public');
+                                               header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
+                                               header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');      
+                                               header('Content-Length: '.$this->bufferlen);
+                                               header('Content-Disposition: inline; filename="'.basename($name).'";');
+                                       }
+                                       echo $this->getBuffer();
+                                       break;
+                               }
+                               case 'D': {
+                                       // Download PDF as file
+                                       if (ob_get_contents()) {
+                                               $this->Error('Some data has already been output, can\'t send PDF file');
+                                       }
+                                       header('Content-Description: File Transfer');
+                                       if (headers_sent()) {
+                                               $this->Error('Some data has already been output to browser, can\'t send PDF file');
+                                       }
+                                       header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
+                                       header('Pragma: public');
+                                       header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
+                                       header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
+                                       // force download dialog
+                                       header('Content-Type: application/force-download');
+                                       header('Content-Type: application/octet-stream', false);
+                                       header('Content-Type: application/download', false);
+                                       header('Content-Type: application/pdf', false);
+                                       // use the Content-Disposition header to supply a recommended filename
+                                       header('Content-Disposition: attachment; filename="'.basename($name).'";');
+                                       header('Content-Transfer-Encoding: binary');
+                                       header('Content-Length: '.$this->bufferlen);
+                                       echo $this->getBuffer();
+                                       break;
+                               }
+                               case 'F': {
+                                       // Save PDF to a local file
+                                       if ($this->diskcache) {
+                                               copy($this->buffer, $name);
+                                       } else {
+                                               $f = fopen($name, 'wb');
+                                               if (!$f) {
+                                                       $this->Error('Unable to create output file: '.$name);
+                                               }
+                                               fwrite($f, $this->getBuffer(), $this->bufferlen);
+                                               fclose($f);
+                                       }
+                                       break;
+                               }
+                               case 'S': {
+                                       // Returns PDF as a string
+                                       return $this->getBuffer();
+                               }
+                               default: {
+                                       $this->Error('Incorrect output destination: '.$dest);
+                               }
+                       }
+                       return '';
+               }
+
+               /**
+                * Unset all class variables except the following critical variables: internal_encoding, state, bufferlen, buffer and diskcache.
+                * @param boolean $destroyall if true destroys all class variables, otherwise preserves critical variables.
+                * @param boolean $preserve_objcopy if true preserves the objcopy variable
+                * @access public
+                * @since 4.5.016 (2009-02-24)
+                */
+               public function _destroy($destroyall=false, $preserve_objcopy=false) {
+                       if ($destroyall AND isset($this->diskcache) AND $this->diskcache AND (!$preserve_objcopy) AND (!$this->empty_string($this->buffer))) {
+                               // remove buffer file from cache
+                               unlink($this->buffer);
+                       }
+                       foreach (array_keys(get_object_vars($this)) as $val) {
+                               if ($destroyall OR (
+                                       ($val != 'internal_encoding') 
+                                       AND ($val != 'state') 
+                                       AND ($val != 'bufferlen') 
+                                       AND ($val != 'buffer') 
+                                       AND ($val != 'diskcache')
+                                       AND ($val != 'sign')
+                                       AND ($val != 'signature_data')
+                                       AND ($val != 'signature_max_lenght')
+                                       AND ($val != 'byterange_string')
+                                       )) {
+                                       if (!$preserve_objcopy OR ($val != 'objcopy')) {
+                                               unset($this->$val);
+                                       }
+                               }
+                       }
+               }
+               
+               /**
+               * Check for locale-related bug
+               * @access protected
+               */
+               protected function _dochecks() {
+                       //Check for locale-related bug
+                       if (1.1 == 1) {
+                               $this->Error('Don\'t alter the locale before including class file');
+                       }
+                       //Check for decimal separator
+                       if (sprintf('%.1F', 1.0) != '1.0') {
+                               setlocale(LC_NUMERIC, 'C');
+                       }
+               }
+
+               /**
+               * Return fonts path
+               * @return string
+               * @access protected
+               */
+               protected function _getfontpath() {
+                       if (!defined('K_PATH_FONTS') AND is_dir(dirname(__FILE__).'/fonts')) {
+                               define('K_PATH_FONTS', dirname(__FILE__).'/fonts/');
+                       }
+                       return defined('K_PATH_FONTS') ? K_PATH_FONTS : '';
+               }
+               
+               /**
+               * Output pages.
+               * @access protected
+               */
+               protected function _putpages() {
+                       $nb = $this->numpages;
+                       if (!empty($this->AliasNbPages)) {
+                               $nbs = $this->formatPageNumber($nb);
+                               $nbu = $this->UTF8ToUTF16BE($nbs, false); // replacement for unicode font
+                               $alias_a = $this->_escape($this->AliasNbPages);
+                               $alias_au = $this->_escape('{'.$this->AliasNbPages.'}');
+                               if ($this->isunicode) {
+                                       $alias_b = $this->_escape($this->UTF8ToLatin1($this->AliasNbPages));
+                                       $alias_bu = $this->_escape($this->UTF8ToLatin1('{'.$this->AliasNbPages.'}'));
+                                       $alias_c = $this->_escape($this->utf8StrRev($this->AliasNbPages, false, $this->tmprtl));
+                                       $alias_cu = $this->_escape($this->utf8StrRev('{'.$this->AliasNbPages.'}', false, $this->tmprtl));
+                               }
+                       }
+                       if (!empty($this->AliasNumPage)) {
+                               $alias_pa = $this->_escape($this->AliasNumPage);
+                               $alias_pau = $this->_escape('{'.$this->AliasNumPage.'}');
+                               if ($this->isunicode) {
+                                       $alias_pb = $this->_escape($this->UTF8ToLatin1($this->AliasNumPage));
+                                       $alias_pbu = $this->_escape($this->UTF8ToLatin1('{'.$this->AliasNumPage.'}'));
+                                       $alias_pc = $this->_escape($this->utf8StrRev($this->AliasNumPage, false, $this->tmprtl));
+                                       $alias_pcu = $this->_escape($this->utf8StrRev('{'.$this->AliasNumPage.'}', false, $this->tmprtl));
+                               }
+                       }
+                       $pagegroupnum = 0;
+                       $filter = ($this->compress) ? '/Filter /FlateDecode ' : '';
+                       for ($n=1; $n <= $nb; ++$n) {
+                               $temppage = $this->getPageBuffer($n);
+                               if (!empty($this->pagegroups)) {
+                                       if(isset($this->newpagegroup[$n])) {
+                                               $pagegroupnum = 0;
+                                       }
+                                       ++$pagegroupnum;
+                                       foreach ($this->pagegroups as $k => $v) {
+                                               // replace total pages group numbers
+                                               $vs = $this->formatPageNumber($v);
+                                               $vu = $this->UTF8ToUTF16BE($vs, false);
+                                               $alias_ga = $this->_escape($k);
+                                               $alias_gau = $this->_escape('{'.$k.'}');
+                                               if ($this->isunicode) {
+                                                       $alias_gb = $this->_escape($this->UTF8ToLatin1($k));
+                                                       $alias_gbu = $this->_escape($this->UTF8ToLatin1('{'.$k.'}'));
+                                                       $alias_gc = $this->_escape($this->utf8StrRev($k, false, $this->tmprtl));
+                                                       $alias_gcu = $this->_escape($this->utf8StrRev('{'.$k.'}', false, $this->tmprtl));
+                                               }
+                                               $temppage = str_replace($alias_gau, $vu, $temppage);
+                                               if ($this->isunicode) {
+                                                       $temppage = str_replace($alias_gbu, $vu, $temppage);
+                                                       $temppage = str_replace($alias_gcu, $vu, $temppage);
+                                                       $temppage = str_replace($alias_gb, $vs, $temppage);
+                                                       $temppage = str_replace($alias_gc, $vs, $temppage);
+                                               }
+                                               $temppage = str_replace($alias_ga, $vs, $temppage);
+                                               // replace page group numbers
+                                               $pvs = $this->formatPageNumber($pagegroupnum);
+                                               $pvu = $this->UTF8ToUTF16BE($pvs, false);
+                                               $pk = str_replace('{nb', '{pnb', $k);
+                                               $alias_pga = $this->_escape($pk);
+                                               $alias_pgau = $this->_escape('{'.$pk.'}');
+                                               if ($this->isunicode) {
+                                                       $alias_pgb = $this->_escape($this->UTF8ToLatin1($pk));
+                                                       $alias_pgbu = $this->_escape($this->UTF8ToLatin1('{'.$pk.'}'));
+                                                       $alias_pgc = $this->_escape($this->utf8StrRev($pk, false, $this->tmprtl));
+                                                       $alias_pgcu = $this->_escape($this->utf8StrRev('{'.$pk.'}', false, $this->tmprtl));
+                                               }
+                                               $temppage = str_replace($alias_pgau, $pvu, $temppage);
+                                               if ($this->isunicode) {
+                                                       $temppage = str_replace($alias_pgbu, $pvu, $temppage);
+                                                       $temppage = str_replace($alias_pgcu, $pvu, $temppage);
+                                                       $temppage = str_replace($alias_pgb, $pvs, $temppage);
+                                                       $temppage = str_replace($alias_pgc, $pvs, $temppage);
+                                               }
+                                               $temppage = str_replace($alias_pga, $pvs, $temppage);
+                                       }
+                               }
+                               if (!empty($this->AliasNbPages)) {
+                                       // replace total pages number
+                                       $temppage = str_replace($alias_au, $nbu, $temppage);
+                                       if ($this->isunicode) {
+                                               $temppage = str_replace($alias_bu, $nbu, $temppage);
+                                               $temppage = str_replace($alias_cu, $nbu, $temppage);
+                                               $temppage = str_replace($alias_b, $nbs, $temppage);
+                                               $temppage = str_replace($alias_c, $nbs, $temppage);
+                                       }
+                                       $temppage = str_replace($alias_a, $nbs, $temppage);
+                               }
+                               if (!empty($this->AliasNumPage)) {
+                                       // replace page number
+                                       $pnbs = $this->formatPageNumber($n);
+                                       $pnbu = $this->UTF8ToUTF16BE($pnbs, false); // replacement for unicode font
+                                       $temppage = str_replace($alias_pau, $pnbu, $temppage);
+                                       if ($this->isunicode) {
+                                               $temppage = str_replace($alias_pbu, $pnbu, $temppage);
+                                               $temppage = str_replace($alias_pcu, $pnbu, $temppage);
+                                               $temppage = str_replace($alias_pb, $pnbs, $temppage);
+                                               $temppage = str_replace($alias_pc, $pnbs, $temppage);
+                                       }
+                                       $temppage = str_replace($alias_pa, $pnbs, $temppage);
+                               }
+                               $temppage = str_replace($this->epsmarker, '', $temppage);
+                               //Page
+                               $this->page_obj_id[$n] = $this->_newobj();
+                               $this->_out('<</Type /Page');
+                               $this->_out('/Parent 1 0 R');
+                               $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]', $this->pagedim[$n]['w'], $this->pagedim[$n]['h']));
+                               $this->_out('/Resources 2 0 R');
+                               $this->_putannotsrefs($n);
+                               $this->_out('/Contents '.($this->n + 1).' 0 R>>');
+                               $this->_out('endobj');
+                               //Page content
+                               $p = ($this->compress) ? gzcompress($temppage) : $temppage;
+                               $this->_newobj();
+                               $this->_out('<<'.$filter.'/Length '.strlen($p).'>>');
+                               $this->_putstream($p);
+                               $this->_out('endobj');
+                               if ($this->diskcache) {
+                                       // remove temporary files
+                                       unlink($this->pages[$n]);
+                               }
+                       }
+                       //Pages root
+                       $this->offsets[1] = $this->bufferlen;
+                       $this->_out('1 0 obj');
+                       $this->_out('<</Type /Pages');
+                       $this->_out('/Kids [');
+                       foreach($this->page_obj_id as $page_obj) {
+                               $this->_out($page_obj.' 0 R');
+                       }
+                       $this->_out(']');
+                       $this->_out('/Count '.$nb);
+                       $this->_out('>>');
+                       $this->_out('endobj');
+               }
+
+               /**
+               * Output referencees to page annotations
+               * @param int $n page number
+               * @access protected
+               * @author Nicola Asuni
+               * @since 4.7.000 (2008-08-29)
+               */
+               protected function _putannotsrefs($n) {
+                       if (!(isset($this->PageAnnots[$n]) OR ($this->sign AND isset($this->signature_data['cert_type'])))) {
+                               return;
+                       }
+                       $this->_out('/Annots [');
+                       if (isset($this->PageAnnots[$n])) {
+                               $num_annots = count($this->PageAnnots[$n]);
+                               for ($i = 0; $i < $num_annots; ++$i) {
+                                       ++$this->curr_annot_obj_id;
+                                       if (!in_array($this->curr_annot_obj_id, $this->radio_groups)) {
+                                               $this->_out($this->curr_annot_obj_id.' 0 R');
+                                       } else {
+                                               ++$num_annots;
+                                       }
+                               }
+                       }
+                       if (($n==1) AND $this->sign AND isset($this->signature_data['cert_type'])) {
+                               // set reference for signature object
+                               $this->_out($this->sig_annot_ref);
+                       }
+                       $this->_out(']');
+               }
+
+               /**
+               * Output annotations objects for all pages.
+               * !!! THIS FUNCTION IS NOT YET COMPLETED !!!
+               * See section 12.5 of PDF 32000_2008 reference.
+               * @access protected
+               * @author Nicola Asuni
+               * @since 4.0.018 (2008-08-06)
+               */
+               protected function _putannotsobjs() {
+                       // reset object counter
+                       $this->annot_obj_id = $this->annots_start_obj_id;
+                       for ($n=1; $n <= $this->numpages; ++$n) {
+                               if (isset($this->PageAnnots[$n])) {
+                                       // set page annotations
+                                       foreach ($this->PageAnnots[$n] as $key => $pl) {
+                                               // create annotation object for grouping radiobuttons
+                                               if (isset($this->radiobutton_groups[$n][$pl['txt']]) AND is_array($this->radiobutton_groups[$n][$pl['txt']])) {
+                                                       $annots = '<<';
+                                                       $annots .= ' /Type /Annot';
+                                                       $annots .= ' /Subtype /Widget';
+                                                       $annots .= ' /T '.$this->_datastring($pl['txt']);
+                                                       $annots .= ' /FT /Btn';
+                                                       $annots .= ' /Ff 49152';
+                                                       $annots .= ' /Kids [';
+                                                       foreach ($this->radiobutton_groups[$n][$pl['txt']] as $data) {
+                                                               $annots .= ' '.$data['kid'].' 0 R';
+                                                               if ($data['def'] !== 'Off') {
+                                                                       $defval = $data['def'];
+                                                               }
+                                                       }
+                                                       $annots .= ' ]';
+                                                       if (isset($defval)) {
+                                                               $annots .= ' /V /'.$defval;
+                                                       }
+                                                       $annots .= ' >>';
+                                                       ++$this->annot_obj_id;
+                                                       $this->offsets[$this->annot_obj_id] = $this->bufferlen;
+                                                       $this->_out($this->annot_obj_id.' 0 obj');
+                                                       $this->_out($annots);
+                                                       $this->_out('endobj');
+                                                       $this->form_obj_id[] = $this->annot_obj_id;
+                                                       // store object id to be used on Parent entry of Kids
+                                                       $this->radiobutton_groups[$n][$pl['txt']] = $this->annot_obj_id;
+                                               }
+                                               $formfield = false;
+                                               $pl['opt'] = array_change_key_case($pl['opt'], CASE_LOWER);
+                                               $a = $pl['x'] * $this->k;
+                                               $b = $this->pagedim[$n]['h'] - (($pl['y'] + $pl['h'])  * $this->k);
+                                               $c = $pl['w'] * $this->k;
+                                               $d = $pl['h'] * $this->k;
+                                               $rect = sprintf('%.2F %.2F %.2F %.2F', $a, $b, $a+$c, $b+$d);
+                                               // create new annotation object
+                                               $annots = '<</Type /Annot';
+                                               $annots .= ' /Subtype /'.$pl['opt']['subtype'];
+                                               $annots .= ' /Rect ['.$rect.']';
+                                               $ft = array('Btn', 'Tx', 'Ch', 'Sig');
+                                               if (isset($pl['opt']['ft']) AND in_array($pl['opt']['ft'], $ft)) {
+                                                       $annots .= ' /FT /'.$pl['opt']['ft'];
+                                                       $formfield = true;
+                                               }
+                                               $annots .= ' /Contents '.$this->_textstring($pl['txt']);
+                                               $annots .= ' /P '.$this->page_obj_id[$n].' 0 R';
+                                               $annots .= ' /NM '.$this->_datastring(sprintf('%04u-%04u', $n, $key));
+                                               $annots .= ' /M '.$this->_datestring();
+                                               if (isset($pl['opt']['f'])) {
+                                                       $val = 0;
+                                                       if (is_array($pl['opt']['f'])) {
+                                                               foreach ($pl['opt']['f'] as $f) {
+                                                                       switch (strtolower($f)) {
+                                                                               case 'invisible': {
+                                                                                       $val += 1 << 0;
+                                                                                       break;
+                                                                               }
+                                                                               case 'hidden': {
+                                                                                       $val += 1 << 1;
+                                                                                       break;
+                                                                               }
+                                                                               case 'print': {
+                                                                                       $val += 1 << 2;
+                                                                                       break;
+                                                                               }
+                                                                               case 'nozoom': {
+                                                                                       $val += 1 << 3;
+                                                                                       break;
+                                                                               }
+                                                                               case 'norotate': {
+                                                                                       $val += 1 << 4;
+                                                                                       break;
+                                                                               }
+                                                                               case 'noview': {
+                                                                                       $val += 1 << 5;
+                                                                                       break;
+                                                                               }
+                                                                               case 'readonly': {
+                                                                                       $val += 1 << 6;
+                                                                                       break;
+                                                                               }
+                                                                               case 'locked': {
+                                                                                       $val += 1 << 8;
+                                                                                       break;
+                                                                               }
+                                                                               case 'togglenoview': {
+                                                                                       $val += 1 << 9;
+                                                                                       break;
+                                                                               }
+                                                                               case 'lockedcontents': {
+                                                                                       $val += 1 << 10;
+                                                                                       break;
+                                                                               }
+                                                                               default: {
+                                                                                       break;
+                                                                               }
+                                                                       }
+                                                               }
+                                                       } else {
+                                                               $val = intval($pl['opt']['f']);
+                                                       }
+                                                       $annots .= ' /F '.intval($val);
+                                               }
+                                               if (isset($pl['opt']['as']) AND is_string($pl['opt']['as'])) {
+                                                       $annots .= ' /AS /'.$pl['opt']['as'];
+                                               }
+                                               if (isset($pl['opt']['ap'])) {
+                                                       // appearance stream
+                                                       $annots .= ' /AP <<';
+                                                       if (is_array($pl['opt']['ap'])) {
+                                                               foreach ($pl['opt']['ap'] as $apmode => $apdef) {
+                                                                       // $apmode can be: n = normal; r = rollover; d = down;
+                                                                       $annots .= ' /'.strtoupper($apmode);
+                                                                       if (is_array($apdef)) {
+                                                                               $annots .= ' <<';
+                                                                               foreach ($apdef as $apstate => $stream) {
+                                                                                       // reference to XObject that define the appearance for this mode-state
+                                                                                       $apsobjid = $this->_putAPXObject($c, $d, $stream);
+                                                                                       $annots .= ' /'.$apstate.' '.$apsobjid.' 0 R';
+                                                                               }
+                                                                               $annots .= ' >>';
+                                                                       } else {
+                                                                               // reference to XObject that define the appearance for this mode
+                                                                               $apsobjid = $this->_putAPXObject($c, $d, $apdef);
+                                                                               $annots .= ' '.$apsobjid.' 0 R';
+                                                                       }
+                                                               }
+                                                       } else {
+                                                               $annots .= $pl['opt']['ap'];
+                                                       }
+                                                       $annots .= ' >>';
+                                               }
+                                               if (isset($pl['opt']['bs']) AND (is_array($pl['opt']['bs']))) {
+                                                       $annots .= ' /BS <<';
+                                                       $annots .= ' /Type /Border';
+                                                       if (isset($pl['opt']['bs']['w'])) {
+                                                               $annots .= ' /W '.intval($pl['opt']['bs']['w']);
+                                                       }
+                                                       $bstyles = array('S', 'D', 'B', 'I', 'U');
+                                                       if (isset($pl['opt']['bs']['s']) AND in_array($pl['opt']['bs']['s'], $bstyles)) {
+                                                               $annots .= ' /S /'.$pl['opt']['bs']['s'];
+                                                       }
+                                                       if (isset($pl['opt']['bs']['d']) AND (is_array($pl['opt']['bs']['d']))) {
+                                                               $annots .= ' /D [';
+                                                               foreach ($pl['opt']['bs']['d'] as $cord) {
+                                                                       $annots .= ' '.intval($cord);
+                                                               }
+                                                               $annots .= ']';
+                                                       }
+                                                       $annots .= ' >>';
+                                               } else {
+                                                       $annots .= ' /Border [';
+                                                       if (isset($pl['opt']['border']) AND (count($pl['opt']['border']) >= 3)) {
+                                                               $annots .= intval($pl['opt']['border'][0]).' ';
+                                                               $annots .= intval($pl['opt']['border'][1]).' ';
+                                                               $annots .= intval($pl['opt']['border'][2]);
+                                                               if (isset($pl['opt']['border'][3]) AND is_array($pl['opt']['border'][3])) {
+                                                                       $annots .= ' [';
+                                                                       foreach ($pl['opt']['border'][3] as $dash) {
+                                                                               $annots .= intval($dash).' ';
+                                                                       }
+                                                                       $annots .= ']';
+                                                               }
+                                                       } else {
+                                                               $annots .= '0 0 0';
+                                                       }
+                                                       $annots .= ']';
+                                               }
+                                               if (isset($pl['opt']['be']) AND (is_array($pl['opt']['be']))) {
+                                                       $annots .= ' /BE <<';
+                                                       $bstyles = array('S', 'C');
+                                                       if (isset($pl['opt']['be']['s']) AND in_array($pl['opt']['be']['s'], $markups)) {
+                                                               $annots .= ' /S /'.$pl['opt']['bs']['s'];
+                                                       } else {
+                                                               $annots .= ' /S /S';
+                                                       }
+                                                       if (isset($pl['opt']['be']['i']) AND ($pl['opt']['be']['i'] >= 0) AND ($pl['opt']['be']['i'] <= 2)) {
+                                                               $annots .= ' /I '.sprintf(" %.4F", $pl['opt']['be']['i']);
+                                                       }
+                                                       $annots .= '>>';
+                                               }
+                                               if (isset($pl['opt']['c']) AND (is_array($pl['opt']['c'])) AND !empty($pl['opt']['c'])) {
+                                                       $annots .= ' /C [';
+                                                       foreach ($pl['opt']['c'] as $col) {
+                                                               $col = intval($col);
+                                                               $color = $col <= 0 ? 0 : ($col >= 255 ? 1 : $col / 255);
+                                                               $annots .= sprintf(" %.4F", $color);
+                                                       }
+                                                       $annots .= ']';
+                                               }
+                                               //$annots .= ' /StructParent ';
+                                               //$annots .= ' /OC ';
+                                               $markups = array('text', 'freetext', 'line', 'square', 'circle', 'polygon', 'polyline', 'highlight',  'underline', 'squiggly', 'strikeout', 'stamp', 'caret', 'ink', 'fileattachment', 'sound');
+                                               if (in_array(strtolower($pl['opt']['subtype']), $markups)) {
+                                                       // this is a markup type
+                                                       if (isset($pl['opt']['t']) AND is_string($pl['opt']['t'])) {
+                                                               $annots .= ' /T '.$this->_textstring($pl['opt']['t']);
+                                                       }
+                                                       //$annots .= ' /Popup ';
+                                                       if (isset($pl['opt']['ca'])) {
+                                                               $annots .= ' /CA '.sprintf("%.4F", floatval($pl['opt']['ca']));
+                                                       }
+                                                       if (isset($pl['opt']['rc'])) {
+                                                               $annots .= ' /RC '.$this->_textstring($pl['opt']['rc']);
+                                                       }
+                                                       $annots .= ' /CreationDate '.$this->_datestring();
+                                                       //$annots .= ' /IRT ';
+                                                       if (isset($pl['opt']['subj'])) {
+                                                               $annots .= ' /Subj '.$this->_textstring($pl['opt']['subj']);
+                                                       }
+                                                       //$annots .= ' /RT ';
+                                                       //$annots .= ' /IT ';
+                                                       //$annots .= ' /ExData ';
+                                               }
+                                               $lineendings = array('Square', 'Circle', 'Diamond', 'OpenArrow', 'ClosedArrow', 'None', 'Butt', 'ROpenArrow', 'RClosedArrow', 'Slash');
+                                               switch (strtolower($pl['opt']['subtype'])) {
+                                                       case 'text': {
+                                                               if (isset($pl['opt']['open'])) {
+                                                                       $annots .= ' /Open '. (strtolower($pl['opt']['open']) == 'true' ? 'true' : 'false');
+                                                               }
+                                                               $iconsapp = array('Comment', 'Help', 'Insert', 'Key', 'NewParagraph', 'Note', 'Paragraph');
+                                                               if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) {
+                                                                       $annots .= ' /Name /'.$pl['opt']['name'];
+                                                               } else {
+                                                                       $annots .= ' /Name /Note';
+                                                               }
+                                                               $statemodels = array('Marked', 'Review');
+                                                               if (isset($pl['opt']['statemodel']) AND in_array($pl['opt']['statemodel'], $statemodels)) {
+                                                                       $annots .= ' /StateModel /'.$pl['opt']['statemodel'];
+                                                               } else {
+                                                                       $pl['opt']['statemodel'] = 'Marked';
+                                                                       $annots .= ' /StateModel /'.$pl['opt']['statemodel'];
+                                                               }
+                                                               if ($pl['opt']['statemodel'] == 'Marked') {
+                                                                       $states = array('Accepted', 'Unmarked');
+                                                               } else {
+                                                                       $states = array('Accepted', 'Rejected', 'Cancelled', 'Completed', 'None');
+                                                               }
+                                                               if (isset($pl['opt']['state']) AND in_array($pl['opt']['state'], $states)) {
+                                                                       $annots .= ' /State /'.$pl['opt']['state'];
+                                                               } else {
+                                                                       if ($pl['opt']['statemodel'] == 'Marked') {
+                                                                               $annots .= ' /State /Unmarked';
+                                                                       } else {
+                                                                               $annots .= ' /State /None';
+                                                                       }
+                                                               }
+                                                               break;
+                                                       }
+                                                       case 'link': {
+                                                               if(is_string($pl['txt'])) {
+                                                                       // external URI link
+                                                                       $annots .= ' /A <</S /URI /URI '.$this->_datastring($this->unhtmlentities($pl['txt'])).'>>';
+                                                               } else {
+                                                                       // internal link
+                                                                       $l = $this->links[$pl['txt']];
+                                                                       $annots .= sprintf(' /Dest [%d 0 R /XYZ 0 %.2F null]', (1 + (2 * $l[0])), ($this->pagedim[$l[0]]['h'] - ($l[1] * $this->k)));
+                                                               }
+                                                               $hmodes = array('N', 'I', 'O', 'P');
+                                                               if (isset($pl['opt']['h']) AND in_array($pl['opt']['h'], $hmodes)) {
+                                                                       $annots .= ' /H /'.$pl['opt']['h'];
+                                                               } else {
+                                                                       $annots .= ' /H /I';
+                                                               }
+                                                               //$annots .= ' /PA ';
+                                                               //$annots .= ' /Quadpoints ';
+                                                               break;
+                                                       }
+                                                       case 'freetext': {
+                                                               if (isset($pl['opt']['da']) AND !empty($pl['opt']['da'])) {
+                                                                       $annots .= ' /DA ('.$pl['opt']['da'].')';
+                                                               }
+                                                               if (isset($pl['opt']['q']) AND ($pl['opt']['q'] >= 0) AND ($pl['opt']['q'] <= 2)) {
+                                                                       $annots .= ' /Q '.intval($pl['opt']['q']);
+                                                               }
+                                                               if (isset($pl['opt']['rc'])) {
+                                                                       $annots .= ' /RC '.$this->_textstring($pl['opt']['rc']);
+                                                               }
+                                                               if (isset($pl['opt']['ds'])) {
+                                                                       $annots .= ' /DS '.$this->_textstring($pl['opt']['ds']);
+                                                               }
+                                                               if (isset($pl['opt']['cl']) AND is_array($pl['opt']['cl'])) {
+                                                                       $annots .= ' /CL [';
+                                                                       foreach ($pl['opt']['cl'] as $cl) {
+                                                                               $annots .= sprintf("%.4F ", $cl * $this->k);
+                                                                       }
+                                                                       $annots .= ']';
+                                                               }
+                                                               $tfit = array('FreeText', 'FreeTextCallout', 'FreeTextTypeWriter');
+                                                               if (isset($pl['opt']['it']) AND in_array($pl['opt']['it'], $tfit)) {
+                                                                       $annots .= ' /IT '.$pl['opt']['it'];
+                                                               }
+                                                               if (isset($pl['opt']['rd']) AND is_array($pl['opt']['rd'])) {
+                                                                       $l = $pl['opt']['rd'][0] * $this->k;
+                                                                       $r = $pl['opt']['rd'][1] * $this->k;
+                                                                       $t = $pl['opt']['rd'][2] * $this->k;
+                                                                       $b = $pl['opt']['rd'][3] * $this->k;
+                                                                       $annots .= ' /RD ['.sprintf('%.2F %.2F %.2F %.2F', $l, $r, $t, $b).']';
+                                                               }
+                                                               if (isset($pl['opt']['le']) AND in_array($pl['opt']['le'], $lineendings)) {
+                                                                       $annots .= ' /LE /'.$pl['opt']['le'];
+                                                               }
+                                                               break;
+                                                       }
+                                                       case 'line': {
+                                                               break;
+                                                       }
+                                                       case 'square': {
+                                                               break;
+                                                       }
+                                                       case 'circle': {
+                                                               break;
+                                                       }
+                                                       case 'polygon': {
+                                                               break;
+                                                       }
+                                                       case 'polyline': {
+                                                               break;
+                                                       }
+                                                       case 'highlight': {
+                                                               break;
+                                                       }
+                                                       case 'underline': {
+                                                               break;
+                                                       }
+                                                       case 'squiggly': {
+                                                               break;
+                                                       }
+                                                       case 'strikeout': {
+                                                               break;
+                                                       }
+                                                       case 'stamp': {
+                                                               break;
+                                                       }
+                                                       case 'caret': {
+                                                               break;
+                                                       }
+                                                       case 'ink': {
+                                                               break;
+                                                       }
+                                                       case 'popup': {
+                                                               break;
+                                                       }
+                                                       case 'fileattachment': {
+                                                               if (!isset($pl['opt']['fs'])) {
+                                                                       break;
+                                                               }
+                                                               $filename = basename($pl['opt']['fs']);
+                                                               if (isset($this->embeddedfiles[$filename]['n'])) {
+                                                                       $annots .= ' /FS <</Type /Filespec /F '.$this->_datastring($filename).' /EF <</F '.$this->embeddedfiles[$filename]['n'].' 0 R>> >>';
+                                                                       $iconsapp = array('Graph', 'Paperclip', 'PushPin', 'Tag');
+                                                                       if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) {
+                                                                               $annots .= ' /Name /'.$pl['opt']['name'];
+                                                                       } else {
+                                                                               $annots .= ' /Name /PushPin';
+                                                                       }
+                                                               }
+                                                               break;
+                                                       }
+                                                       case 'sound': {
+                                                               if (!isset($pl['opt']['sound'])) {
+                                                                       break;
+                                                               }
+                                                               $filename = basename($pl['opt']['sound']);
+                                                               if (isset($this->embeddedfiles[$filename]['n'])) {
+                                                                       $annots .= ' /Sound <</Type /Sound';
+                                                                       // ... TO BE COMPLETED ...
+                                                                       // /R /C /B /E /CO /CP
+                                                                       // $annots .= ' /F '.$this->_datastring($filename).' /EF <</F '.$this->embeddedfiles[$filename]['n'].' 0 R>> >>';
+                                                                       $iconsapp = array('Speaker', 'Mic');
+                                                                       if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) {
+                                                                               $annots .= ' /Name /'.$pl['opt']['name'];
+                                                                       } else {
+                                                                               $annots .= ' /Name /Speaker';
+                                                                       }
+                                                               }
+                                                               break;
+                                                       }
+                                                       case 'movie': {
+                                                               break;
+                                                       }
+                                                       case 'widget': {
+                                                               $hmode = array('N', 'I', 'O', 'P', 'T');
+                                                               if (isset($pl['opt']['h']) AND in_array($pl['opt']['h'], $hmode)) {
+                                                                       $annots .= ' /H /'.$pl['opt']['h'];
+                                                               }
+                                                               if (isset($pl['opt']['mk']) AND (is_array($pl['opt']['mk'])) AND !empty($pl['opt']['mk'])) {
+                                                                       $annots .= ' /MK <<';
+                                                                       if (isset($pl['opt']['mk']['r'])) {
+                                                                               $annots .= ' /R '.$pl['opt']['mk']['r'];
+                                                                       }
+                                                                       if (isset($pl['opt']['mk']['bc']) AND (is_array($pl['opt']['mk']['bc']))) {
+                                                                               $annots .= ' /BC [';
+                                                                               foreach($pl['opt']['mk']['bc'] AS $col) {
+                                                                                       $col = intval($col);
+                                                                                       $color = $col <= 0 ? 0 : ($col >= 255 ? 1 : $col / 255);
+                                                                                       $annots .= ' '.$color;
+                                                                               }
+                                                                               $annots .= ']';
+                                                                       }
+                                                                       if (isset($pl['opt']['mk']['bg']) AND (is_array($pl['opt']['mk']['bg']))) {
+                                                                               $annots .= ' /BG [';
+                                                                               foreach($pl['opt']['mk']['bg'] AS $col) {
+                                                                                       $col = intval($col);
+                                                                                       $color = $col <= 0 ? 0 : ($col >= 255 ? 1 : $col / 255);
+                                                                                       $annots .= ' '.$color;
+                                                                               }
+                                                                               $annots .= ']';
+                                                                       }
+                                                                       if (isset($pl['opt']['mk']['ca'])) {
+                                                                               $annots .= ' /CA '.$pl['opt']['mk']['ca'].'';
+                                                                       }
+                                                                       if (isset($pl['opt']['mk']['rc'])) {
+                                                                               $annots .= ' /RC '.$pl['opt']['mk']['ca'].'';
+                                                                       }
+                                                                       if (isset($pl['opt']['mk']['ac'])) {
+                                                                               $annots .= ' /AC '.$pl['opt']['mk']['ca'].'';
+                                                                       }                                                                                                                                       
+                                                                       if (isset($pl['opt']['mk']['i'])) {
+                                                                               $info = $this->getImageBuffer($pl['opt']['mk']['i']);
+                                                                               if ($info !== false) {
+                                                                                       $annots .= ' /I '.$info['n'].' 0 R';
+                                                                               }
+                                                                       }
+                                                                       if (isset($pl['opt']['mk']['ri'])) {
+                                                                               $info = $this->getImageBuffer($pl['opt']['mk']['ri']);
+                                                                               if ($info !== false) {
+                                                                                       $annots .= ' /RI '.$info['n'].' 0 R';
+                                                                               }
+                                                                       }
+                                                                       if (isset($pl['opt']['mk']['ix'])) {
+                                                                               $info = $this->getImageBuffer($pl['opt']['mk']['ix']);
+                                                                               if ($info !== false) {
+                                                                                       $annots .= ' /IX '.$info['n'].' 0 R';
+                                                                               }
+                                                                       }                                                                       
+                                                                       if (isset($pl['opt']['mk']['if']) AND (is_array($pl['opt']['mk']['if'])) AND !empty($pl['opt']['mk']['if'])) {
+                                                                               $annots .= ' /IF <<';
+                                                                               $if_sw = array('A', 'B', 'S', 'N');
+                                                                               if (isset($pl['opt']['mk']['if']['sw']) AND in_array($pl['opt']['mk']['if']['sw'], $if_sw)) {
+                                                                                       $annots .= ' /SW /'.$pl['opt']['mk']['if']['sw'];
+                                                                               }
+                                                                               $if_s = array('A', 'P');
+                                                                               if (isset($pl['opt']['mk']['if']['s']) AND in_array($pl['opt']['mk']['if']['s'], $if_s)) {
+                                                                                       $annots .= ' /S /'.$pl['opt']['mk']['if']['s'];
+                                                                               }
+                                                                               if (isset($pl['opt']['mk']['if']['a']) AND (is_array($pl['opt']['mk']['if']['a'])) AND !empty($pl['opt']['mk']['if']['a'])) {
+                                                                                       $annots .= ' /A ['.$pl['opt']['mk']['if']['a'][0].' '.$pl['opt']['mk']['if']['a'][1].']';
+                                                                               }
+                                                                               if (isset($pl['opt']['mk']['if']['fb']) AND ($pl['opt']['mk']['if']['fb'])) {
+                                                                                       $annots .= ' /FB true';
+                                                                               }
+                                                                               $annots .= '>>';
+                                                                       }
+                                                                       if (isset($pl['opt']['mk']['tp']) AND ($pl['opt']['mk']['tp'] >= 0) AND ($pl['opt']['mk']['tp'] <= 6)) {
+                                                                               $annots .= ' /TP '.$pl['opt']['mk']['tp'];
+                                                                       } else {
+                                                                               $annots .= ' /TP 0';
+                                                                       }
+                                                                       $annots .= '>>';
+                                                               } // end MK
+                                                               // --- Entries for field dictionaries ---
+                                                               if (isset($this->radiobutton_groups[$n][$pl['txt']])) {
+                                                                       // set parent
+                                                                       $annots .= ' /Parent '.$this->radiobutton_groups[$n][$pl['txt']].' 0 R';
+                                                               }
+                                                               if (isset($pl['opt']['t']) AND is_string($pl['opt']['t'])) {
+                                                                       $annots .= ' /T '.$this->_datastring($pl['opt']['t']);
+                                                               }
+                                                               if (isset($pl['opt']['tu']) AND is_string($pl['opt']['tu'])) {
+                                                                       $annots .= ' /TU '.$this->_datastring($pl['opt']['tu']);
+                                                               }
+                                                               if (isset($pl['opt']['tm']) AND is_string($pl['opt']['tm'])) {
+                                                                       $annots .= ' /TM '.$this->_datastring($pl['opt']['tm']);
+                                                               }
+                                                               if (isset($pl['opt']['ff'])) {
+                                                                       if (is_array($pl['opt']['ff'])) {
+                                                                               // array of bit settings
+                                                                               $flag = 0;
+                                                                               foreach($pl['opt']['ff'] as $val) {
+                                                                                       $flag += 1 << ($val - 1);
+                                                                               }
+                                                                       } else {
+                                                                               $flag = intval($pl['opt']['ff']);
+                                                                       }
+                                                                       $annots .= ' /Ff '.$flag;
+                                                               }
+                                                               if (isset($pl['opt']['maxlen'])) {
+                                                                       $annots .= ' /MaxLen '.intval($pl['opt']['maxlen']);
+                                                               }
+                                                               if (isset($pl['opt']['v'])) {
+                                                                       $annots .= ' /V';
+                                                                       if (is_array($pl['opt']['v'])) {
+                                                                               foreach ($pl['opt']['v'] AS $optval) {
+                                                                                       $annots .= ' '.$optval;
+                                                                               }
+                                                                       } else {
+                                                                               $annots .= ' '.$this->_textstring($pl['opt']['v']);
+                                                                       }
+                                                               }
+                                                               if (isset($pl['opt']['dv']) AND is_string($pl['opt']['dv'])) {
+                                                                       $annots .= ' /DV';
+                                                                       if (is_array($pl['opt']['dv'])) {
+                                                                               foreach ($pl['opt']['dv'] AS $optval) {
+                                                                                       $annots .= ' '.$optval;
+                                                                               }
+                                                                       } else {
+                                                                               $annots .= ' '.$this->_textstring($pl['opt']['dv']);
+                                                                       }
+                                                               }
+                                                               if (isset($pl['opt']['rv']) AND is_string($pl['opt']['rv'])) {
+                                                                       $annots .= ' /RV';
+                                                                       if (is_array($pl['opt']['rv'])) {
+                                                                               foreach ($pl['opt']['rv'] AS $optval) {
+                                                                                       $annots .= ' '.$optval;
+                                                                               }
+                                                                       } else {
+                                                                               $annots .= ' '.$this->_textstring($pl['opt']['rv']);
+                                                                       }
+                                                               }
+                                                               if (isset($pl['opt']['a']) AND !empty($pl['opt']['a'])) {
+                                                                       $annots .= ' /A << '.$pl['opt']['a'].' >>';
+                                                               }
+                                                               if (isset($pl['opt']['aa']) AND !empty($pl['opt']['aa'])) {
+                                                                       $annots .= ' /AA << '.$pl['opt']['aa'].' >>';
+                                                               }
+                                                               if (isset($pl['opt']['da']) AND !empty($pl['opt']['da'])) {
+                                                                       $annots .= ' /DA ('.$pl['opt']['da'].')';
+                                                               }
+                                                               if (isset($pl['opt']['q']) AND ($pl['opt']['q'] >= 0) AND ($pl['opt']['q'] <= 2)) {
+                                                                       $annots .= ' /Q '.intval($pl['opt']['q']);
+                                                               }
+                                                               if (isset($pl['opt']['opt']) AND (is_array($pl['opt']['opt'])) AND !empty($pl['opt']['opt'])) {
+                                                                       $annots .= ' /Opt [';
+                                                                       foreach($pl['opt']['opt'] AS $copt) {
+                                                                               if (is_array($copt)) {
+                                                                                       $annots .= ' ['.$this->_textstring($copt[0]).' '.$this->_textstring($copt[1]).']';
+                                                                               } else {
+                                                                                       $annots .= ' '.$this->_textstring($copt);
+                                                                               }
+                                                                       }
+                                                                       $annots .= ']';
+                                                               }
+                                                               if (isset($pl['opt']['ti'])) {
+                                                                       $annots .= ' /TI '.intval($pl['opt']['ti']);
+                                                               }
+                                                               if (isset($pl['opt']['i']) AND (is_array($pl['opt']['i'])) AND !empty($pl['opt']['i'])) {
+                                                                       $annots .= ' /I [';
+                                                                       foreach($pl['opt']['i'] AS $copt) {
+                                                                               $annots .= intval($copt).' ';
+                                                                       }
+                                                                       $annots .= ']';
+                                                               }
+                                                               break;
+                                                       }
+                                                       case 'screen': {
+                                                               break;
+                                                       }
+                                                       case 'printermark': {
+                                                               break;
+                                                       }
+                                                       case 'trapnet': {
+                                                               break;
+                                                       }
+                                                       case 'watermark': {
+                                                               break;
+                                                       }
+                                                       case '3d': {
+                                                               break;
+                                                       }
+                                                       default: {
+                                                               break;
+                                                       }
+                                               }
+                                               $annots .= '>>';
+                                               // create new annotation object
+                                               ++$this->annot_obj_id;
+                                               $this->offsets[$this->annot_obj_id] = $this->bufferlen;
+                                               $this->_out($this->annot_obj_id.' 0 obj');
+                                               $this->_out($annots);
+                                               $this->_out('endobj');
+                                               if ($formfield AND ! isset($this->radiobutton_groups[$n][$pl['txt']])) {
+                                                       // store reference of form object
+                                                       $this->form_obj_id[] = $this->annot_obj_id;
+                                               }
+                                       }
+                               }
+                       } // end for each page
+               }
+
+               /**
+               * Put appearance streams XObject used to define annotation's appearance states
+               * @param int $w annotation width
+               * @param int $h annotation height
+               * @param string $stream appearance stream
+               * @return int object ID
+               * @access protected
+               * @since 4.8.001 (2009-09-09)
+               */
+               protected function _putAPXObject($w=0, $h=0, $stream='') {
+                       $stream = trim($stream);
+                       ++$this->apxo_obj_id;
+                       $this->offsets[$this->apxo_obj_id] = $this->bufferlen;
+                       $this->_out($this->apxo_obj_id.' 0 obj');
+                       $this->_out('<<');
+                       $this->_out('/Type /XObject');
+                       $this->_out('/Subtype /Form');
+                       $this->_out('/FormType 1');
+                       if ($this->compress) {
+                               $stream = gzcompress($stream);
+                               $this->_out('/Filter /FlateDecode');
+                       }
+                       $rect = sprintf('%.2F %.2F', $w, $h);
+                       $this->_out('/BBox [0 0 '.$rect.']');
+                       $this->_out('/Matrix [1 0 0 1 0 0]');
+                       $this->_out('/Resources <</ProcSet [/PDF]>>');
+                       $this->_out('/Length '.strlen($stream));
+                       $this->_out('>>');
+                       $this->_putstream($stream);
+                       $this->_out('endobj');
+                       return $this->apxo_obj_id;
+               }
+
+               /**
+               * Output fonts.
+               * @access protected
+               */
+               protected function _putfonts() {
+                       $nf = $this->n;
+                       foreach ($this->diffs as $diff) {
+                               //Encodings
+                               $this->_newobj();
+                               $this->_out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.']>>');
+                               $this->_out('endobj');
+                       }
+                       $mqr = $this->get_mqr();
+                       $this->set_mqr(false);
+                       foreach ($this->FontFiles as $file => $info) {
+                               // search and get font file to embedd
+                               $fontdir = $info['fontdir'];
+                               $file = strtolower($file);
+                               $fontfile = '';
+                               // search files on various directories
+                               if (file_exists($fontdir.$file)) {
+                                       $fontfile = $fontdir.$file;
+                               } elseif (file_exists($this->_getfontpath().$file)) {
+                                       $fontfile = $this->_getfontpath().$file;
+                               } elseif (file_exists($file)) {
+                                       $fontfile = $file;
+                               }
+                               if (!$this->empty_string($fontfile)) {
+                                       $font = file_get_contents($fontfile);
+                                       $compressed = (substr($file, -2) == '.z');
+                                       if ((!$compressed) AND (isset($info['length2']))) {
+                                               $header = (ord($font{0}) == 128);
+                                               if ($header) {
+                                                       //Strip first binary header
+                                                       $font = substr($font, 6);
+                                               }
+                                               if ($header AND (ord($font{$info['length1']}) == 128)) {
+                                                       //Strip second binary header
+                                                       $font = substr($font, 0, $info['length1']).substr($font, ($info['length1'] + 6));
+                                               }
+                                       }
+                                       $this->_newobj();
+                                       $this->FontFiles[$file]['n'] = $this->n;
+                                       $this->_out('<</Length '.strlen($font));
+                                       if ($compressed) {
+                                               $this->_out('/Filter /FlateDecode');
+                                       }
+                                       $this->_out('/Length1 '.$info['length1']);
+                                       if (isset($info['length2'])) {
+                                               $this->_out('/Length2 '.$info['length2'].' /Length3 0');
+                                       }
+                                       $this->_out('>>');
+                                       $this->_putstream($font);
+                                       $this->_out('endobj');
+                               }
+                       }
+                       $this->set_mqr($mqr);
+                       foreach ($this->fontkeys as $k) {
+                               //Font objects
+                               $this->setFontSubBuffer($k, 'n', $this->n + 1);
+                               $font = $this->getFontBuffer($k);
+                               $type = $font['type'];
+                               $name = $font['name'];
+                               if ($type == 'core') {
+                                       //Standard font
+                                       $obj_id = $this->_newobj();
+                                       $this->_out('<</Type /Font');
+                                       $this->_out('/Subtype /Type1');
+                                       $this->_out('/BaseFont /'.$name);
+                                       $this->_out('/Name /F'.$font['i']);
+                                       if ((strtolower($name) != 'symbol') AND (strtolower($name) != 'zapfdingbats')) {
+                                               $this->_out('/Encoding /WinAnsiEncoding');
+                                       }
+                                       if (strtolower($name) == 'helvetica') {
+                                               // add default font for annotations
+                                               $this->annotation_fonts['helvetica'] = $k;
+                                       }
+                                       $this->_out('>>');
+                                       $this->_out('endobj');
+                               } elseif (($type == 'Type1') OR ($type == 'TrueType')) {
+                                       //Additional Type1 or TrueType font
+                                       $obj_id = $this->_newobj();
+                                       $this->_out('<</Type /Font');
+                                       $this->_out('/Subtype /'.$type);
+                                       $this->_out('/BaseFont /'.$name);
+                                       $this->_out('/Name /F'.$font['i']);
+                                       $this->_out('/FirstChar 32 /LastChar 255');
+                                       $this->_out('/Widths '.($this->n + 1).' 0 R');
+                                       $this->_out('/FontDescriptor '.($this->n + 2).' 0 R');
+                                       if ($font['enc']) {
+                                               if (isset($font['diff'])) {
+                                                       $this->_out('/Encoding '.($nf + $font['diff']).' 0 R');
+                                               } else {
+                                                       $this->_out('/Encoding /WinAnsiEncoding');
+                                               }
+                                       }
+                                       $this->_out('>>');
+                                       $this->_out('endobj');
+                                       // Widths
+                                       $this->_newobj();
+                                       $cw = &$font['cw'];
+                                       $s = '[';
+                                       for ($i = 32; $i < 256; ++$i) {
+                                               $s .= $cw[$i].' ';
+                                       }
+                                       $this->_out($s.']');
+                                       $this->_out('endobj');
+                                       //Descriptor
+                                       $this->_newobj();
+                                       $s = '<</Type /FontDescriptor /FontName /'.$name;
+                                       foreach ($font['desc'] as $fdk => $fdv) {
+                                               $s .= ' /'.$fdk.' '.$fdv.'';
+                                       }
+                                       if (!$this->empty_string($font['file'])) {
+                                               $s .= ' /FontFile'.($type == 'Type1' ? '' : '2').' '.$this->FontFiles[$font['file']]['n'].' 0 R';
+                                       }
+                                       $this->_out($s.'>>');
+                                       $this->_out('endobj');
+                               } else {
+                                       //Allow for additional types
+                                       $mtd = '_put'.strtolower($type);
+                                       if (!method_exists($this, $mtd)) {
+                                               $this->Error('Unsupported font type: '.$type);
+                                       }
+                                       $obj_id = $this->$mtd($font);
+                               }
+                               // store object ID for current font
+                               $this->font_obj_ids[$k] = $obj_id;
+                       }
+               }
+               
+               /**
+               * Outputs font widths
+               * @parameter array $font font data
+               * @parameter int $cidoffset offset for CID values
+               * @author Nicola Asuni
+               * @access protected
+               * @since 4.4.000 (2008-12-07)
+               */
+               protected function _putfontwidths($font, $cidoffset=0) {
+                       ksort($font['cw']);
+                       $rangeid = 0;
+                       $range = array();
+                       $prevcid = -2;
+                       $prevwidth = -1;
+                       $interval = false;
+                       // for each character
+                       foreach ($font['cw'] as $cid => $width) {
+                               $cid -= $cidoffset;
+                               if ($width != $font['dw']) {
+                                       if ($cid == ($prevcid + 1)) {
+                                               // consecutive CID
+                                               if ($width == $prevwidth) {
+                                                       if ($width == $range[$rangeid][0]) {
+                                                               $range[$rangeid][] = $width;
+                                                       } else {
+                                                               array_pop($range[$rangeid]);
+                                                               // new range
+                                                               $rangeid = $prevcid;
+                                                               $range[$rangeid] = array();
+                                                               $range[$rangeid][] = $prevwidth;
+                                                               $range[$rangeid][] = $width;
+                                                       }
+                                                       $interval = true;
+                                                       $range[$rangeid]['interval'] = true;
+                                               } else {
+                                                       if ($interval) {
+                                                               // new range
+                                                               $rangeid = $cid;
+                                                               $range[$rangeid] = array();
+                                                               $range[$rangeid][] = $width;
+                                                       } else {
+                                                               $range[$rangeid][] = $width;
+                                                       }
+                                                       $interval = false;
+                                               }
+                                       } else {
+                                               // new range
+                                               $rangeid = $cid;
+                                               $range[$rangeid] = array();
+                                               $range[$rangeid][] = $width;
+                                               $interval = false;
+                                       }
+                                       $prevcid = $cid;
+                                       $prevwidth = $width;
+                               }
+                       }
+                       // optimize ranges
+                       $prevk = -1;
+                       $nextk = -1;
+                       $prevint = false;
+                       foreach ($range as $k => $ws) {
+                               $cws = count($ws);
+                               if (($k == $nextk) AND (!$prevint) AND ((!isset($ws['interval'])) OR ($cws < 4))) {
+                                       if (isset($range[$k]['interval'])) {
+                                               unset($range[$k]['interval']);
+                                       }
+                                       $range[$prevk] = array_merge($range[$prevk], $range[$k]);
+                                       unset($range[$k]);
+                               } else {
+                                       $prevk = $k;
+                               }
+                               $nextk = $k + $cws;
+                               if (isset($ws['interval'])) {
+                                       if ($cws > 3) {
+                                               $prevint = true;
+                                       } else {
+                                               $prevint = false;
+                                       }
+                                       unset($range[$k]['interval']);
+                                       --$nextk;
+                               } else {
+                                       $prevint = false;
+                               }
+                       }
+                       // output data
+                       $w = '';
+                       foreach ($range as $k => $ws) {
+                               if (count(array_count_values($ws)) == 1) {
+                                       // interval mode is more compact
+                                       $w .= ' '.$k.' '.($k + count($ws) - 1).' '.$ws[0];
+                               } else {
+                                       // range mode
+                                       $w .= ' '.$k.' [ '.implode(' ', $ws).' ]';
+                               }
+                       }
+                       $this->_out('/W ['.$w.' ]');
+               }
+               
+               /**
+               * Adds unicode fonts.<br>
+               * Based on PDF Reference 1.3 (section 5)
+               * @parameter array $font font data
+               * @return int font object ID
+               * @access protected
+               * @author Nicola Asuni
+               * @since 1.52.0.TC005 (2005-01-05)
+               */
+               protected function _puttruetypeunicode($font) {
+                       // Type0 Font
+                       // A composite font composed of other fonts, organized hierarchically
+                       $obj_id = $this->_newobj();
+                       $this->_out('<</Type /Font');
+                       $this->_out('/Subtype /Type0');
+                       $this->_out('/BaseFont /'.$font['name'].'');
+                       $this->_out('/Name /F'.$font['i']);
+                       $this->_out('/Encoding /'.$font['enc']);
+                       $this->_out('/ToUnicode /Identity-H');
+                       $this->_out('/DescendantFonts ['.($this->n + 1).' 0 R]');
+                       $this->_out('>>');
+                       $this->_out('endobj');
+                       // CIDFontType2
+                       // A CIDFont whose glyph descriptions are based on TrueType font technology
+                       $this->_newobj();
+                       $this->_out('<</Type /Font');
+                       $this->_out('/Subtype /CIDFontType2');
+                       $this->_out('/BaseFont /'.$font['name'].'');
+                       // A dictionary containing entries that define the character collection of the CIDFont.
+                       $cidinfo = '/Registry '.$this->_datastring($font['cidinfo']['Registry']);
+                       $cidinfo .= ' /Ordering '.$this->_datastring($font['cidinfo']['Ordering']);
+                       $cidinfo .= ' /Supplement '.$font['cidinfo']['Supplement'];
+                       $this->_out('/CIDSystemInfo <<'.$cidinfo.'>>');
+                       $this->_out('/FontDescriptor '.($this->n + 1).' 0 R');
+                       $this->_out('/DW '.$font['dw'].''); // default width
+                       $this->_putfontwidths($font, 0);
+                       $this->_out('/CIDToGIDMap '.($this->n + 2).' 0 R');
+                       $this->_out('>>');
+                       $this->_out('endobj');                  
+                       // Font descriptor
+                       // A font descriptor describing the CIDFont default metrics other than its glyph widths
+                       $this->_newobj();
+                       $this->_out('<</Type /FontDescriptor');
+                       $this->_out('/FontName /'.$font['name']);
+                       foreach ($font['desc'] as $key => $value) {
+                               $this->_out('/'.$key.' '.$value);
+                       }
+                       $fontdir = '';
+                       if (!$this->empty_string($font['file'])) {
+                               // A stream containing a TrueType font
+                               $this->_out('/FontFile2 '.$this->FontFiles[$font['file']]['n'].' 0 R');
+                               $fontdir = $this->FontFiles[$font['file']]['fontdir'];
+                       }
+                       $this->_out('>>');
+                       $this->_out('endobj');
+                       $this->_newobj();
+                       if (isset($font['ctg']) AND (!$this->empty_string($font['ctg']))) {
+                               // Embed CIDToGIDMap
+                               // A specification of the mapping from CIDs to glyph indices
+                               // search and get CTG font file to embedd
+                               $ctgfile = strtolower($font['ctg']);
+                               // search and get ctg font file to embedd
+                               $fontfile = '';
+                               // search files on various directories
+                               if (file_exists($fontdir.$ctgfile)) {
+                                       $fontfile = $fontdir.$ctgfile;
+                               } elseif (file_exists($this->_getfontpath().$ctgfile)) {
+                                       $fontfile = $this->_getfontpath().$ctgfile;
+                               } elseif (file_exists($ctgfile)) {
+                                       $fontfile = $ctgfile;
+                               }
+                               if ($this->empty_string($fontfile)) {
+                                       $this->Error('Font file not found: '.$ctgfile);
+                               }
+                               $size = filesize($fontfile);
+                               $this->_out('<</Length '.$size.'');
+                               if (substr($fontfile, -2) == '.z') { // check file extension
+                                       // Decompresses data encoded using the public-domain 
+                                       // zlib/deflate compression method, reproducing the 
+                                       // original text or binary data
+                                       $this->_out('/Filter /FlateDecode');
+                               }
+                               $this->_out('>>');
+                               $this->_putstream(file_get_contents($fontfile));
+                       }
+                       $this->_out('endobj');
+                       return $obj_id;
+               }
+               
+               /**
+                * Output CID-0 fonts.
+                * A Type 0 CIDFont contains glyph descriptions based on the Adobe Type 1 font format
+                * @param array $font font data
+                * @return int font object ID
+                * @access protected
+                * @author Andrew Whitehead, Nicola Asuni, Yukihiro Nakadaira
+                * @since 3.2.000 (2008-06-23)
+                */
+               protected function _putcidfont0($font) {
+                       $cidoffset = 0;
+                       if (!isset($font['cw'][1])) {
+                               $cidoffset = 31;
+                       }
+                       if (isset($font['cidinfo']['uni2cid'])) {
+                               // convert unicode to cid.
+                               $uni2cid = $font['cidinfo']['uni2cid'];
+                               $cw = array();
+                               foreach ($font['cw'] as $uni => $width) {
+                                       if (isset($uni2cid[$uni])) {
+                                               $cw[($uni2cid[$uni] + $cidoffset)] = $width;
+                                       } elseif ($uni < 256) {
+                                               $cw[$uni] = $width;
+                                       } // else unknown character
+                               }
+                               $font = array_merge($font, array('cw' => $cw));
+                       }
+                       $name = $font['name'];
+                       $enc = $font['enc'];
+                       if ($enc) {
+                               $longname = $name.'-'.$enc;
+                       } else {
+                               $longname = $name;
+                       }
+                       $obj_id = $this->_newobj();
+                       $this->_out('<</Type /Font');
+                       $this->_out('/Subtype /Type0');
+                       $this->_out('/BaseFont /'.$longname);
+                       $this->_out('/Name /F'.$font['i']);
+                       if ($enc) {
+                               $this->_out('/Encoding /'.$enc);
+                       }
+                       $this->_out('/DescendantFonts ['.($this->n + 1).' 0 R]');
+                       $this->_out('>>');
+                       $this->_out('endobj');
+                       $this->_newobj();
+                       $this->_out('<</Type /Font');
+                       $this->_out('/Subtype /CIDFontType0');
+                       $this->_out('/BaseFont /'.$name);
+                       $cidinfo = '/Registry '.$this->_datastring($font['cidinfo']['Registry']);
+                       $cidinfo .= ' /Ordering '.$this->_datastring($font['cidinfo']['Ordering']);
+                       $cidinfo .= ' /Supplement '.$font['cidinfo']['Supplement'];
+                       $this->_out('/CIDSystemInfo <<'.$cidinfo.'>>');
+                       $this->_out('/FontDescriptor '.($this->n + 1).' 0 R');
+                       $this->_out('/DW '.$font['dw']);
+                       $this->_putfontwidths($font, $cidoffset);
+                       $this->_out('>>');
+                       $this->_out('endobj');
+                       $this->_newobj();
+                       $s = '<</Type /FontDescriptor /FontName /'.$name;
+                       foreach ($font['desc'] as $k => $v) {
+                               if ($k != 'Style') {
+                                       $s .= ' /'.$k.' '.$v.'';
+                               }
+                       }
+                       $this->_out($s.'>>');
+                       $this->_out('endobj');
+                       return $obj_id;
+               }
+
+               /**
+                * Output images.
+                * @access protected
+                */
+               protected function _putimages() {
+                       $filter = ($this->compress) ? '/Filter /FlateDecode ' : '';
+                       foreach ($this->imagekeys as $file) {
+                               $info = $this->getImageBuffer($file);
+                               $this->_newobj();
+                               $this->setImageSubBuffer($file, 'n', $this->n);
+                               $this->_out('<</Type /XObject');
+                               $this->_out('/Subtype /Image');
+                               $this->_out('/Width '.$info['w']);
+                               $this->_out('/Height '.$info['h']);
+                               if (isset($info['masked'])) {
+                                       $this->_out('/SMask '.($this->n - 1).' 0 R');
+                               }
+                               if ($info['cs'] == 'Indexed') {
+                                       $this->_out('/ColorSpace [/Indexed /DeviceRGB '.((strlen($info['pal']) / 3) - 1).' '.($this->n + 1).' 0 R]');
+                               } else {
+                                       $this->_out('/ColorSpace /'.$info['cs']);
+                                       if ($info['cs'] == 'DeviceCMYK') {
+                                               $this->_out('/Decode [1 0 1 0 1 0 1 0]');
+                                       }
+                               }
+                               $this->_out('/BitsPerComponent '.$info['bpc']);
+                               if (isset($info['f'])) {
+                                       $this->_out('/Filter /'.$info['f']);
+                               }
+                               if (isset($info['parms'])) {
+                                       $this->_out($info['parms']);
+                               }
+                               if (isset($info['trns']) AND is_array($info['trns'])) {
+                                       $trns='';
+                                       $count_info = count($info['trns']);
+                                       for ($i=0; $i < $count_info; ++$i) {
+                                               $trns .= $info['trns'][$i].' '.$info['trns'][$i].' ';
+                                       }
+                                       $this->_out('/Mask ['.$trns.']');
+                               }
+                               $this->_out('/Length '.strlen($info['data']).'>>');
+                               $this->_putstream($info['data']);
+                               $this->_out('endobj');
+                               //Palette
+                               if ($info['cs'] == 'Indexed') {
+                                       $this->_newobj();
+                                       $pal = ($this->compress) ? gzcompress($info['pal']) : $info['pal'];
+                                       $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>');
+                                       $this->_putstream($pal);
+                                       $this->_out('endobj');
+                               }
+                       }
+               }
+
+               /**
+               * Output Spot Colors Resources.
+               * @access protected
+               * @since 4.0.024 (2008-09-12)
+               */
+               protected function _putspotcolors() {
+                       foreach ($this->spot_colors as $name => $color) {
+                               $this->_newobj();
+                               $this->spot_colors[$name]['n'] = $this->n;
+                               $this->_out('[/Separation /'.str_replace(' ', '#20', $name));
+                               $this->_out('/DeviceCMYK <<');
+                               $this->_out('/Range [0 1 0 1 0 1 0 1] /C0 [0 0 0 0] ');
+                               $this->_out(sprintf('/C1 [%.4F %.4F %.4F %.4F] ', $color['c']/100, $color['m']/100, $color['y']/100, $color['k']/100));
+                               $this->_out('/FunctionType 2 /Domain [0 1] /N 1>>]');
+                               $this->_out('endobj');
+                       }
+               }
+
+               /**
+               * Output object dictionary for images.
+               * @access protected
+               */
+               protected function _putxobjectdict() {
+                       foreach ($this->imagekeys as $file) {
+                               $info = $this->getImageBuffer($file);
+                               $this->_out('/I'.$info['i'].' '.$info['n'].' 0 R');
+                       }
+               }
+
+               /**
+               * Output Resources Dictionary.
+               * @access protected
+               */
+               protected function _putresourcedict() {
+                       $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
+                       $this->_out('/Font <<');
+                       foreach ($this->fontkeys as $fontkey) {
+                               $font = $this->getFontBuffer($fontkey);
+                               $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R');
+                       }
+                       $this->_out('>>');
+                       $this->_out('/XObject <<');
+                       $this->_putxobjectdict();
+                       $this->_out('>>');
+                       // visibility
+                       $this->_out('/Properties <</OC1 '.$this->n_ocg_print.' 0 R /OC2 '.$this->n_ocg_view.' 0 R>>');
+                       // transparency
+                       $this->_out('/ExtGState <<');
+                       foreach ($this->extgstates as $k => $extgstate) {
+                               $this->_out('/GS'.$k.' '.$extgstate['n'].' 0 R');
+                       }
+                       $this->_out('>>');
+                       // gradients
+                       if (isset($this->gradients) AND (count($this->gradients) > 0)) {
+                               $this->_out('/Shading <<');
+                               foreach ($this->gradients as $id => $grad) {
+                                       $this->_out('/Sh'.$id.' '.$grad['id'].' 0 R');
+                               }
+                               $this->_out('>>');
+                       }
+                       // spot colors
+                       if (isset($this->spot_colors) AND (count($this->spot_colors) > 0)) {
+                               $this->_out('/ColorSpace <<');
+                               foreach ($this->spot_colors as $color) {
+                                       $this->_out('/CS'.$color['i'].' '.$color['n'].' 0 R');
+                               }
+                               $this->_out('>>');
+                       }
+               }
+               
+               /**
+               * Output Resources.
+               * @access protected
+               */
+               protected function _putresources() {
+                       $this->_putextgstates();
+                       $this->_putocg();
+                       $this->_putfonts();
+                       $this->_putimages();
+                       $this->_putspotcolors();
+                       $this->_putshaders();
+                       //Resource dictionary
+                       $this->offsets[2] = $this->bufferlen;
+                       $this->_out('2 0 obj');
+                       $this->_out('<<');
+                       $this->_putresourcedict();
+                       $this->_out('>>');
+                       $this->_out('endobj');
+                       $this->_putbookmarks();
+                       $this->_putEmbeddedFiles();
+                       $this->_putannotsobjs();
+                       $this->_putjavascript();
+                       // encryption
+                       if ($this->encrypted) {
+                               $this->_newobj();
+                               $this->enc_obj_id = $this->n;
+                               $this->_out('<<');
+                               $this->_putencryption();
+                               $this->_out('>>');
+                               $this->_out('endobj');
+                       }
+               }
+               
+               /**
+               * Adds some Metadata information
+               * (see Chapter 10.2 of PDF Reference)
+               * @access protected
+               */
+               protected function _putinfo() {
+                       if ($this->empty_string($this->title)) {
+                               $this->title = '?';
+                       }
+                       $this->_out('/Title '.$this->_textstring($this->title));
+                       if ($this->empty_string($this->author)) {
+                               $this->author = '?';
+                       }
+                       $this->_out('/Author '.$this->_textstring($this->author));
+                       if ($this->empty_string($this->subject)) {
+                               $this->subject = '?';
+                       }
+                       $this->_out('/Subject '.$this->_textstring($this->subject));
+                       if ($this->empty_string($this->keywords)) {
+                               $this->keywords = '?';
+                       }
+                       $this->_out('/Keywords '.$this->_textstring($this->keywords));
+                       if ($this->empty_string($this->creator)) {
+                               $this->creator = '?';
+                       }
+                       $this->_out('/Creator '.$this->_textstring($this->creator));
+                       if (defined('PDF_PRODUCER')) {
+                               $this->_out('/Producer '.$this->_textstring(PDF_PRODUCER));
+                       } else {
+                               $this->_out('/Producer '.$this->_textstring('TCPDF'));
+                       }
+                       $this->_out('/CreationDate '.$this->_datestring());
+                       $this->_out('/ModDate '.$this->_datestring());  
+               }
+               
+               /**
+               * Output Catalog.
+               * @access protected
+               */
+               protected function _putcatalog() {
+                       $this->_out('/Type /Catalog');
+                       $this->_out('/Pages 1 0 R');
+                       if ($this->ZoomMode == 'fullpage') {
+                               $this->_out('/OpenAction [3 0 R /Fit]');
+                       } elseif ($this->ZoomMode == 'fullwidth') {
+                               $this->_out('/OpenAction [3 0 R /FitH null]');
+                       } elseif ($this->ZoomMode == 'real') {
+                               $this->_out('/OpenAction [3 0 R /XYZ null null 1]');
+                       } elseif (!is_string($this->ZoomMode)) {
+                               $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode / 100).']');
+                       }                       
+                       if (isset($this->LayoutMode) AND (!$this->empty_string($this->LayoutMode))) {
+                               $this->_out('/PageLayout /'.$this->LayoutMode.'');
+                       }
+                       if (isset($this->PageMode) AND (!$this->empty_string($this->PageMode))) {
+                               $this->_out('/PageMode /'.$this->PageMode);
+                       }
+                       if (isset($this->l['a_meta_language'])) {
+                               $this->_out('/Lang /'.$this->l['a_meta_language']);
+                       }
+                       $this->_out('/Names <<');
+                       if ((!empty($this->javascript)) OR (!empty($this->js_objects))) {
+                               $this->_out('/JavaScript '.($this->n_js).' 0 R');
+                       }
+                       $this->_out('>>');                      
+                       if (count($this->outlines) > 0) {
+                               $this->_out('/Outlines '.$this->OutlineRoot.' 0 R');
+                               $this->_out('/PageMode /UseOutlines');
+                       }
+                       $this->_putviewerpreferences();
+                       $p = $this->n_ocg_print.' 0 R';
+                       $v = $this->n_ocg_view.' 0 R';
+                       $as = '<</Event /Print /OCGs ['.$p.' '.$v.'] /Category [/Print]>> <</Event /View /OCGs ['.$p.' '.$v.'] /Category [/View]>>';
+                       $this->_out('/OCProperties <</OCGs ['.$p.' '.$v.'] /D <</ON ['.$p.'] /OFF ['.$v.'] /AS ['.$as.']>>>>');
+                       // AcroForm
+                       if (!empty($this->form_obj_id) OR ($this->sign AND isset($this->signature_data['cert_type']))) {
+                               $this->_out('/AcroForm<<');
+                               $objrefs = '';
+                               if ($this->sign AND isset($this->signature_data['cert_type'])) {
+                                       $objrefs .= $this->sig_obj_id.' 0 R';
+                               }
+                               if (!empty($this->form_obj_id)) {
+                                       foreach($this->form_obj_id as $objid) {
+                                               $objrefs .= ' '.$objid.' 0 R';
+                                       }
+                               }
+                               $this->_out('/Fields ['.$objrefs.']');
+                               $this->_out('/NeedAppearances '.(empty($this->form_obj_id)?'false':'true'));
+                               if ($this->sign AND isset($this->signature_data['cert_type'])) {
+                                       $this->_out('/SigFlags 3');
+                               }
+                               //$this->_out('/CO ');
+                               if (isset($this->annotation_fonts) AND !empty($this->annotation_fonts)) {
+                                       $this->_out('/DR <<');
+                                       $this->_out('/Font <<');
+                                       foreach ($this->annotation_fonts as $font => $fontkey) {
+                                               $this->_out('/F'.($fontkey + 1).' '.$this->font_obj_ids[$font].' 0 R');
+                                       }
+                                       $this->_out('>>');
+                                       $this->_out('>>');
+                               }
+                               $this->_out('/DA (/F'.(array_search('helvetica', $this->fontkeys) + 1).' 0 Tf 0 g)');
+                               $this->_out('/Q '.(($this->rtl)?'2':'0'));
+                               //$this->_out('/XFA ');
+                               $this->_out('>>');
+                               // signatures
+                               if ($this->sign AND isset($this->signature_data['cert_type'])) {
+                                       if ($this->signature_data['cert_type'] > 0) {
+                                               $this->_out('/Perms<</DocMDP '.($this->sig_obj_id + 1).' 0 R>>');
+                                       } else {
+                                               $this->_out('/Perms<</UR3 '.($this->sig_obj_id + 1).' 0 R>>');
+                                       }
+                               }
+                       }
+               }
+               
+               /**
+               * Output viewer preferences.
+               * @author Nicola asuni
+               * @since 3.1.000 (2008-06-09)
+               * @access protected
+               */
+               protected function _putviewerpreferences() {
+                       $this->_out('/ViewerPreferences<<');
+                       if ($this->rtl) {
+                               $this->_out('/Direction /R2L');
+                       } else {
+                               $this->_out('/Direction /L2R');
+                       }
+                       if (isset($this->viewer_preferences['HideToolbar']) AND ($this->viewer_preferences['HideToolbar'])) {
+                               $this->_out('/HideToolbar true');
+                       }
+                       if (isset($this->viewer_preferences['HideMenubar']) AND ($this->viewer_preferences['HideMenubar'])) {
+                               $this->_out('/HideMenubar true');
+                       }
+                       if (isset($this->viewer_preferences['HideWindowUI']) AND ($this->viewer_preferences['HideWindowUI'])) {
+                               $this->_out('/HideWindowUI true');
+                       }
+                       if (isset($this->viewer_preferences['FitWindow']) AND ($this->viewer_preferences['FitWindow'])) {
+                               $this->_out('/FitWindow true');
+                       }
+                       if (isset($this->viewer_preferences['CenterWindow']) AND ($this->viewer_preferences['CenterWindow'])) {
+                               $this->_out('/CenterWindow true');
+                       }
+                       if (isset($this->viewer_preferences['DisplayDocTitle']) AND ($this->viewer_preferences['DisplayDocTitle'])) {
+                               $this->_out('/DisplayDocTitle true');
+                       }
+                       if (isset($this->viewer_preferences['NonFullScreenPageMode'])) {
+                               $this->_out('/NonFullScreenPageMode /'.$this->viewer_preferences['NonFullScreenPageMode'].'');
+                       }
+                       if (isset($this->viewer_preferences['ViewArea'])) {
+                               $this->_out('/ViewArea /'.$this->viewer_preferences['ViewArea']);
+                       }
+                       if (isset($this->viewer_preferences['ViewClip'])) {
+                               $this->_out('/ViewClip /'.$this->viewer_preferences['ViewClip']);
+                       }
+                       if (isset($this->viewer_preferences['PrintArea'])) {
+                               $this->_out('/PrintArea /'.$this->viewer_preferences['PrintArea']);
+                       }
+                       if (isset($this->viewer_preferences['PrintClip'])) {
+                               $this->_out('/PrintClip /'.$this->viewer_preferences['PrintClip']);
+                       }
+                       if (isset($this->viewer_preferences['PrintScaling'])) {
+                               $this->_out('/PrintScaling /'.$this->viewer_preferences['PrintScaling']);
+                       }
+                       if (isset($this->viewer_preferences['Duplex']) AND (!$this->empty_string($this->viewer_preferences['Duplex']))) {
+                               $this->_out('/Duplex /'.$this->viewer_preferences['Duplex']);
+                       }
+                       if (isset($this->viewer_preferences['PickTrayByPDFSize'])) {
+                               if ($this->viewer_preferences['PickTrayByPDFSize']) {
+                                       $this->_out('/PickTrayByPDFSize true');
+                               } else {
+                                       $this->_out('/PickTrayByPDFSize false');
+                               }
+                       }
+                       if (isset($this->viewer_preferences['PrintPageRange'])) {
+                               $PrintPageRangeNum = '';
+                               foreach ($this->viewer_preferences['PrintPageRange'] as $k => $v) {
+                                       $PrintPageRangeNum .= ' '.($v - 1).'';
+                               }
+                               $this->_out('/PrintPageRange ['.substr($PrintPageRangeNum,1).']');
+                       }
+                       if (isset($this->viewer_preferences['NumCopies'])) {
+                               $this->_out('/NumCopies '.intval($this->viewer_preferences['NumCopies']));
+                       }
+                       $this->_out('>>');
+               }
+               
+               /**
+               * Output trailer.
+               * @access protected
+               */
+               protected function _puttrailer() {
+                       $this->_out('/Size '.($this->n + 1));
+                       $this->_out('/Root '.$this->n.' 0 R');
+                       $this->_out('/Info '.($this->n - 1).' 0 R');
+                       if ($this->encrypted) {
+                               $this->_out('/Encrypt '.$this->enc_obj_id.' 0 R');
+                               $this->_out('/ID [()()]');
+                       }
+               }
+
+               /**
+               * Output PDF header.
+               * @access protected
+               */
+               protected function _putheader() {
+                       $this->_out('%PDF-'.$this->PDFVersion);
+               }
+
+               /**
+               * Output end of document (EOF).
+               * @access protected
+               */
+               protected function _enddoc() {
+                       $this->state = 1;
+                       $this->_putheader();                    
+                       $this->_putpages();
+                       $this->_putresources();
+                       // Signature
+                       if ($this->sign AND isset($this->signature_data['cert_type'])) {
+                               // widget annotation for signature
+                               $this->sig_obj_id = $this->_newobj();
+                               // --- replace signature ID on the first page ---
+                               // get the document content
+                               $pdfdoc = $this->getBuffer();
+                               // Remove the original buffer
+                               if (isset($this->diskcache) AND $this->diskcache) {
+                                       // remove buffer file from cache
+                                       unlink($this->buffer);
+                               }
+                               unset($this->buffer);
+                               $signature_widget_ref = sprintf('%u 0 R', $this->sig_obj_id);
+                               $signature_widget_ref .= str_repeat(' ', (strlen($this->sig_annot_ref) - strlen($signature_widget_ref)));
+                               $pdfdoc = str_replace($this->sig_annot_ref, $signature_widget_ref, $pdfdoc);
+                               $this->diskcache = false;
+                               $this->buffer = &$pdfdoc;
+                               $this->bufferlen = strlen($pdfdoc);
+                               // ---
+                               $this->_out('<<');
+                               $this->_out('/Type /Annot /Subtype /Widget /Rect [0 0 0 0]');
+                               $this->_out('/P 3 0 R'); // link to first page object
+                               $this->_out('/FT /Sig');
+                               $this->_out('/T '.$this->_textstring('Signature'));
+                               $this->_out('/Ff 0');
+                               $this->_out('/V '.($this->sig_obj_id + 1).' 0 R');
+                               $this->_out('>>');
+                               $this->_out('endobj');
+                               // signature            
+                               $this->_newobj();
+                               $this->_out('<<');
+                               $this->_putsignature();
+                               $this->_out('>>');
+                               $this->_out('endobj');
+                       }
+                       // Info
+                       $this->_newobj();
+                       $this->_out('<<');
+                       $this->_putinfo();
+                       $this->_out('>>');
+                       $this->_out('endobj');
+                       // Catalog
+                       $this->_newobj();
+                       $this->_out('<<');
+                       $this->_putcatalog();
+                       $this->_out('>>');
+                       $this->_out('endobj');
+                       // Cross-ref
+                       $o = $this->bufferlen;
+                       $this->_out('xref');
+                       $this->_out('0 '.($this->n + 1));
+                       $this->_out('0000000000 65535 f ');
+                       for ($i=1; $i <= $this->n; ++$i) {
+                               $this->_out(sprintf('%010d 00000 n ', $this->offsets[$i]));
+                       }
+                       // Embedded Files
+                       if (isset($this->embeddedfiles) AND count($this->embeddedfiles) > 0) {
+                               $this->_out($this->embedded_start_obj_id.' '.count($this->embeddedfiles));
+                               foreach ($this->embeddedfiles as $filename => $filedata) {
+                                       $this->_out(sprintf('%010d 00000 n ', $this->offsets[$filedata['n']]));
+                               }
+                       }
+                       // Annotation Objects
+                       if ($this->annot_obj_id > $this->annots_start_obj_id) {
+                               $this->_out(($this->annots_start_obj_id + 1).' '.($this->annot_obj_id - $this->annots_start_obj_id));
+                               for ($i = ($this->annots_start_obj_id + 1); $i <= $this->annot_obj_id; ++$i) {
+                                       $this->_out(sprintf('%010d 00000 n ', $this->offsets[$i]));
+                               }
+                       }
+                       // Javascript Objects
+                       if ($this->js_obj_id > $this->js_start_obj_id) {
+                               $this->_out(($this->js_start_obj_id + 1).' '.($this->js_obj_id - $this->js_start_obj_id));
+                               for ($i = ($this->js_start_obj_id + 1); $i <= $this->js_obj_id; ++$i) {
+                                       $this->_out(sprintf('%010d 00000 n ', $this->offsets[$i]));
+                               }
+                       }
+                       // Appearance streams XObjects
+                       if ($this->apxo_obj_id > $this->apxo_start_obj_id) {
+                               $this->_out(($this->apxo_start_obj_id + 1).' '.($this->apxo_obj_id - $this->apxo_start_obj_id));
+                               for ($i = ($this->apxo_start_obj_id + 1); $i <= $this->apxo_obj_id; ++$i) {
+                                       $this->_out(sprintf('%010d 00000 n ', $this->offsets[$i]));
+                               }
+                       }
+                       //Trailer
+                       $this->_out('trailer');
+                       $this->_out('<<');
+                       $this->_puttrailer();
+                       $this->_out('>>');
+                       $this->_out('startxref');
+                       $this->_out($o);
+                       $this->_out('%%EOF');
+                       $this->state = 3; // end-of-doc
+                       if ($this->diskcache) {
+                               // remove temporary files used for images
+                               foreach ($this->imagekeys as $key) {
+                                       // remove temporary files
+                                       unlink($this->images[$key]);
+                               }
+                               foreach ($this->fontkeys as $key) {
+                                       // remove temporary files
+                                       unlink($this->fonts[$key]);
+                               }
+                       }
+               }
+
+               /**
+               * Initialize a new page.
+               * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or PORTRAIT (default)</li><li>L or LANDSCAPE</li></ul>
+               * @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).<ul><li>4A0</li><li>2A0</li><li>A0</li><li>A1</li><li>A2</li><li>A3</li><li>A4 (default)</li><li>A5</li><li>A6</li><li>A7</li><li>A8</li><li>A9</li><li>A10</li><li>B0</li><li>B1</li><li>B2</li><li>B3</li><li>B4</li><li>B5</li><li>B6</li><li>B7</li><li>B8</li><li>B9</li><li>B10</li><li>C0</li><li>C1</li><li>C2</li><li>C3</li><li>C4</li><li>C5</li><li>C6</li><li>C7</li><li>C8</li><li>C9</li><li>C10</li><li>RA0</li><li>RA1</li><li>RA2</li><li>RA3</li><li>RA4</li><li>SRA0</li><li>SRA1</li><li>SRA2</li><li>SRA3</li><li>SRA4</li><li>LETTER</li><li>LEGAL</li><li>EXECUTIVE</li><li>FOLIO</li></ul>
+               * @access protected
+               */
+               protected function _beginpage($orientation='', $format='') {
+                       ++$this->page;
+                       $this->setPageBuffer($this->page, '');
+                       // initialize array for graphics tranformation positions inside a page buffer
+                       $this->transfmrk[$this->page] = array();
+                       $this->state = 2;
+                       if ($this->empty_string($orientation)) {
+                               if (isset($this->CurOrientation)) {
+                                       $orientation = $this->CurOrientation;
+                               } else {
+                                       $orientation = 'P';
+                               }
+                       }
+                       if ($this->empty_string($format)) {
+                               $this->setPageOrientation($orientation);
+                       } else {
+                               $this->setPageFormat($format, $orientation);
+                       }
+                       if ($this->rtl) {
+                               $this->x = $this->w - $this->rMargin;
+                       } else {
+                               $this->x = $this->lMargin;
+                       }
+                       $this->y = $this->tMargin;
+                       if (isset($this->newpagegroup[$this->page])) {
+                               // start a new group
+                               $n = sizeof($this->pagegroups) + 1;
+                               $alias = '{nb'.$n.'}';
+                               $this->pagegroups[$alias] = 1;
+                               $this->currpagegroup = $alias;
+                       } elseif ($this->currpagegroup) {
+                               ++$this->pagegroups[$this->currpagegroup];
+                       }
+               }
+
+               /**
+               * Mark end of page.
+               * @access protected
+               */
+               protected function _endpage() {
+                       $this->setVisibility('all');
+                       $this->state = 1;
+               }
+
+               /**
+               * Begin a new object and return the object number.
+               * @return int object number
+               * @access protected
+               */
+               protected function _newobj() {
+                       ++$this->n;
+                       $this->offsets[$this->n] = $this->bufferlen;
+                       $this->_out($this->n.' 0 obj');
+                       return $this->n;
+               }
+
+               /**
+               * Underline text.
+               * @param int $x X coordinate
+               * @param int $y Y coordinate
+               * @param string $txt text to underline
+               * @access protected
+               */
+               protected function _dounderline($x, $y, $txt) {
+                       $w = $this->GetStringWidth($txt);
+                       return $this->_dounderlinew($x, $y, $w);
+               }
+               
+               /**
+               * Line through text.
+               * @param int $x X coordinate
+               * @param int $y Y coordinate
+               * @param string $txt text to linethrough
+               * @access protected
+               */
+               protected function _dolinethrough($x, $y, $txt) {
+                       $w = $this->GetStringWidth($txt);
+                       return $this->_dolinethroughw($x, $y, $w);
+               }
+
+               /**
+               * Underline for rectangular text area.
+               * @param int $x X coordinate
+               * @param int $y Y coordinate
+               * @param int $w width to underline
+               * @access protected
+               * @since 4.8.008 (2009-09-29)
+               */
+               protected function _dounderlinew($x, $y, $w) {
+                       $up = $this->CurrentFont['up'];
+                       $ut = $this->CurrentFont['ut'];
+                       return sprintf('%.2F %.2F %.2F %.2F re f', $x * $this->k, ($this->h - ($y - $up / 1000 * $this->FontSize)) * $this->k, $w * $this->k, -$ut / 1000 * $this->FontSizePt);
+               }
+               
+               /**
+               * Line through for rectangular text area.
+               * @param int $x X coordinate
+               * @param int $y Y coordinate
+               * @param string $txt text to linethrough
+               * @access protected
+               * @since 4.8.008 (2009-09-29)
+               */
+               protected function _dolinethroughw($x, $y, $w) {
+                       $up = $this->CurrentFont['up'];
+                       $ut = $this->CurrentFont['ut'];
+                       return sprintf('%.2F %.2F %.2F %.2F re f', $x * $this->k, ($this->h - ($y - ($this->FontSize/2) - $up / 1000 * $this->FontSize)) * $this->k, $w * $this->k, -$ut / 1000 * $this->FontSizePt);
+               }
+               
+               /**
+               * Read a 4-byte integer from file.
+               * @param string $f file name.
+               * @return 4-byte integer
+               * @access protected
+               */
+               protected function _freadint($f) {
+                       $a = unpack('Ni', fread($f, 4));
+                       return $a['i'];
+               }
+               
+               /**
+               * Add "\" before "\", "(" and ")"
+               * @param string $s string to escape.
+               * @return string escaped string.
+               * @access protected
+               */
+               protected function _escape($s) {
+                       // the chr(13) substitution fixes the Bugs item #1421290.
+                       return strtr($s, array(')' => '\\)', '(' => '\\(', '\\' => '\\\\', chr(13) => '\r'));
+               }
+               
+               /**
+               * Format a data string for meta information
+               * @param string $s date string to escape.
+               * @return string escaped string.
+               * @access protected
+               */
+               protected function _datastring($s) {
+                       if ($this->encrypted) {
+                               $s = $this->_RC4($this->_objectkey($this->n), $s);
+                       }
+                       return '('. $this->_escape($s).')';
+               }
+
+               /**
+               * Returns a formatted date for meta information
+               * @return string escaped date string.
+               * @access protected
+               * @since 4.6.028 (2009-08-25)
+               */
+               protected function _datestring() {
+                       $current_time = substr_replace(date('YmdHisO'), '\'', (0 - 2), 0).'\'';
+                       return $this->_datastring('D:'.$current_time);
+               }
+
+               /**
+               * Format a text string for meta information
+               * @param string $s string to escape.
+               * @return string escaped string.
+               * @access protected
+               */
+               protected function _textstring($s) {
+                       if ($this->isunicode) {
+                               //Convert string to UTF-16BE
+                               $s = $this->UTF8ToUTF16BE($s, true);
+                       }
+                       return $this->_datastring($s);
+               }
+                               
+               /**
+               * Format a text string
+               * @param string $s string to escape.
+               * @return string escaped string.
+               * @access protected
+               */
+               protected function _escapetext($s) {
+                       if ($this->isunicode) {
+                               if (($this->CurrentFont['type'] == 'core') OR ($this->CurrentFont['type'] == 'TrueType') OR ($this->CurrentFont['type'] == 'Type1')) {
+                                       $s = $this->UTF8ToLatin1($s);
+                               } else {
+                                       //Convert string to UTF-16BE and reverse RTL language
+                                       $s = $this->utf8StrRev($s, false, $this->tmprtl);
+                               }
+                       }
+                       return $this->_escape($s);
+               }
+               
+               /**
+               * Output a stream.
+               * @param string $s string to output.
+               * @access protected
+               */
+               protected function _putstream($s) {
+                       if ($this->encrypted) {
+                               $s = $this->_RC4($this->_objectkey($this->n), $s);
+                       }
+                       $this->_out('stream');
+                       $this->_out($s);
+                       $this->_out('endstream');
+               }
+               
+               /**
+               * Output a string to the document.
+               * @param string $s string to output.
+               * @access protected
+               */
+               protected function _out($s) {
+                       if ($this->state == 2) {
+                               if ((!$this->InFooter) AND isset($this->footerlen[$this->page]) AND ($this->footerlen[$this->page] > 0)) {
+                                       // puts data before page footer
+                                       $pagebuff = $this->getPageBuffer($this->page);
+                                       $page = substr($pagebuff, 0, -$this->footerlen[$this->page]);
+                                       $footer = substr($pagebuff, -$this->footerlen[$this->page]);
+                                       $this->setPageBuffer($this->page, $page.$s."\n".$footer);
+                                       // update footer position
+                                       $this->footerpos[$this->page] += strlen($s."\n");       
+                               } else {
+                                       $this->setPageBuffer($this->page, $s."\n", true);
+                               }
+                       } else {
+                               $this->setBuffer($s."\n");
+                       }
+               }
+               
+                /**
+                * Converts UTF-8 strings to codepoints array.<br>
+                * Invalid byte sequences will be replaced with 0xFFFD (replacement character)<br>
+                * Based on: http://www.faqs.org/rfcs/rfc3629.html
+                * <pre>
+                *        Char. number range  |        UTF-8 octet sequence
+                *       (hexadecimal)    |              (binary)
+                *    --------------------+-----------------------------------------------
+                *    0000 0000-0000 007F | 0xxxxxxx
+                *    0000 0080-0000 07FF | 110xxxxx 10xxxxxx
+                *    0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
+                *    0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+                *    ---------------------------------------------------------------------
+                *
+                *   ABFN notation:
+                *   ---------------------------------------------------------------------
+                *   UTF8-octets = *( UTF8-char )
+                *   UTF8-char   = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
+                *   UTF8-1      = %x00-7F
+                *   UTF8-2      = %xC2-DF UTF8-tail
+                *
+                *   UTF8-3      = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /
+                *                 %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
+                *   UTF8-4      = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /
+                *                 %xF4 %x80-8F 2( UTF8-tail )
+                *   UTF8-tail   = %x80-BF
+                *   ---------------------------------------------------------------------
+                * </pre>
+                * @param string $str string to process.
+                * @return array containing codepoints (UTF-8 characters values)
+                * @access protected
+                * @author Nicola Asuni
+                * @since 1.53.0.TC005 (2005-01-05)
+                */
+               protected function UTF8StringToArray($str) {
+                       if (isset($this->cache_UTF8StringToArray['_'.$str])) {
+                               // return cached value
+                               return($this->cache_UTF8StringToArray['_'.$str]);
+                       }
+                       // check cache size
+                       if ($this->cache_size_UTF8StringToArray >= $this->cache_maxsize_UTF8StringToArray) {
+                               // remove first element
+                               array_shift($this->cache_UTF8StringToArray);
+                       }
+                       ++$this->cache_size_UTF8StringToArray;
+                       if (!$this->isunicode) {
+                               // split string into array of equivalent codes
+                               $strarr = array();
+                               $strlen = strlen($str);
+                               for ($i=0; $i < $strlen; ++$i) {
+                                       $strarr[] = ord($str{$i});
+                               }
+                               // insert new value on cache
+                               $this->cache_UTF8StringToArray['_'.$str] = $strarr;
+                               return $strarr;
+                       }
+                       $unicode = array(); // array containing unicode values
+                       $bytes  = array(); // array containing single character byte sequences
+                       $numbytes  = 1; // number of octetc needed to represent the UTF-8 character
+                       $str .= ''; // force $str to be a string
+                       $length = strlen($str);
+                       for ($i = 0; $i < $length; ++$i) {
+                               $char = ord($str{$i}); // get one string character at time
+                               if (count($bytes) == 0) { // get starting octect
+                                       if ($char <= 0x7F) {
+                                               $unicode[] = $char; // use the character "as is" because is ASCII
+                                               $numbytes = 1;
+                                       } elseif (($char >> 0x05) == 0x06) { // 2 bytes character (0x06 = 110 BIN)
+                                               $bytes[] = ($char - 0xC0) << 0x06; 
+                                               $numbytes = 2;
+                                       } elseif (($char >> 0x04) == 0x0E) { // 3 bytes character (0x0E = 1110 BIN)
+                                               $bytes[] = ($char - 0xE0) << 0x0C; 
+                                               $numbytes = 3;
+                                       } elseif (($char >> 0x03) == 0x1E) { // 4 bytes character (0x1E = 11110 BIN)
+                                               $bytes[] = ($char - 0xF0) << 0x12; 
+                                               $numbytes = 4;
+                                       } else {
+                                               // use replacement character for other invalid sequences
+                                               $unicode[] = 0xFFFD;
+                                               $bytes = array();
+                                               $numbytes = 1;
+                                       }
+                               } elseif (($char >> 0x06) == 0x02) { // bytes 2, 3 and 4 must start with 0x02 = 10 BIN
+                                       $bytes[] = $char - 0x80;
+                                       if (count($bytes) == $numbytes) {
+                                               // compose UTF-8 bytes to a single unicode value
+                                               $char = $bytes[0];
+                                               for ($j = 1; $j < $numbytes; ++$j) {
+                                                       $char += ($bytes[$j] << (($numbytes - $j - 1) * 0x06));
+                                               }
+                                               if ((($char >= 0xD800) AND ($char <= 0xDFFF)) OR ($char >= 0x10FFFF)) {
+                                                       /* The definition of UTF-8 prohibits encoding character numbers between
+                                                       U+D800 and U+DFFF, which are reserved for use with the UTF-16
+                                                       encoding form (as surrogate pairs) and do not directly represent
+                                                       characters. */
+                                                       $unicode[] = 0xFFFD; // use replacement character
+                                               } else {
+                                                       $unicode[] = $char; // add char to array
+                                               }
+                                               // reset data for next char
+                                               $bytes = array(); 
+                                               $numbytes = 1;
+                                       }
+                               } else {
+                                       // use replacement character for other invalid sequences
+                                       $unicode[] = 0xFFFD;
+                                       $bytes = array();
+                                       $numbytes = 1;
+                               }
+                       }
+                       // insert new value on cache
+                       $this->cache_UTF8StringToArray['_'.$str] = $unicode;
+                       return $unicode;
+               }
+               
+               /**
+                * Converts UTF-8 strings to UTF16-BE.<br>
+                * @param string $str string to process.
+                * @param boolean $setbom if true set the Byte Order Mark (BOM = 0xFEFF)
+                * @return string
+                * @access protected
+                * @author Nicola Asuni
+                * @since 1.53.0.TC005 (2005-01-05)
+                * @uses UTF8StringToArray(), arrUTF8ToUTF16BE()
+                */
+               protected function UTF8ToUTF16BE($str, $setbom=true) {
+                       if (!$this->isunicode) {
+                               return $str; // string is not in unicode
+                       }
+                       $unicode = $this->UTF8StringToArray($str); // array containing UTF-8 unicode values
+                       return $this->arrUTF8ToUTF16BE($unicode, $setbom);
+               }
+               
+               /**
+                * Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.<br>
+                * @param string $str string to process.
+                * @return string
+                * @author Andrew Whitehead, Nicola Asuni
+                * @access protected
+                * @since 3.2.000 (2008-06-23)
+                */
+               protected function UTF8ToLatin1($str) {
+                       global $utf8tolatin;
+                       if (!$this->isunicode) {
+                               return $str; // string is not in unicode
+                       }
+                       $outstr = ''; // string to be returned
+                       $unicode = $this->UTF8StringToArray($str); // array containing UTF-8 unicode values
+                       foreach ($unicode as $char) {
+                               if ($char < 256) {
+                                       $outstr .= chr($char);
+                               } elseif (array_key_exists($char, $utf8tolatin)) {
+                                       // map from UTF-8
+                                       $outstr .= chr($utf8tolatin[$char]);
+                               } elseif ($char == 0xFFFD) {
+                                       // skip
+                               } else {
+                                       $outstr .= '?';
+                               }
+                       }
+                       return $outstr;
+               }
+
+               /**
+                * Converts array of UTF-8 characters to UTF16-BE string.<br>
+                * Based on: http://www.faqs.org/rfcs/rfc2781.html
+                * <pre>
+                *   Encoding UTF-16:
+                * 
+                *   Encoding of a single character from an ISO 10646 character value to
+                *    UTF-16 proceeds as follows. Let U be the character number, no greater
+                *    than 0x10FFFF.
+                * 
+                *    1) If U < 0x10000, encode U as a 16-bit unsigned integer and
+                *       terminate.
+                * 
+                *    2) Let U' = U - 0x10000. Because U is less than or equal to 0x10FFFF,
+                *       U' must be less than or equal to 0xFFFFF. That is, U' can be
+                *       represented in 20 bits.
+                * 
+                *    3) Initialize two 16-bit unsigned integers, W1 and W2, to 0xD800 and
+                *       0xDC00, respectively. These integers each have 10 bits free to
+                *       encode the character value, for a total of 20 bits.
+                * 
+                *    4) Assign the 10 high-order bits of the 20-bit U' to the 10 low-order
+                *       bits of W1 and the 10 low-order bits of U' to the 10 low-order
+                *       bits of W2. Terminate.
+                * 
+                *    Graphically, steps 2 through 4 look like:
+                *    U' = yyyyyyyyyyxxxxxxxxxx
+                *    W1 = 110110yyyyyyyyyy
+                *    W2 = 110111xxxxxxxxxx
+                * </pre>
+                * @param array $unicode array containing UTF-8 unicode values
+                * @param boolean $setbom if true set the Byte Order Mark (BOM = 0xFEFF)
+                * @return string
+                * @access protected
+                * @author Nicola Asuni
+                * @since 2.1.000 (2008-01-08)
+                * @see UTF8ToUTF16BE()
+                */
+               protected function arrUTF8ToUTF16BE($unicode, $setbom=true) {
+                       $outstr = ''; // string to be returned
+                       if ($setbom) {
+                               $outstr .= "\xFE\xFF"; // Byte Order Mark (BOM)
+                       }
+                       foreach ($unicode as $char) {
+                               if ($char == 0xFFFD) {
+                                       $outstr .= "\xFF\xFD"; // replacement character
+                               } elseif ($char < 0x10000) {
+                                       $outstr .= chr($char >> 0x08);
+                                       $outstr .= chr($char & 0xFF);
+                               } else {
+                                       $char -= 0x10000;
+                                       $w1 = 0xD800 | ($char >> 0x10);
+                                       $w2 = 0xDC00 | ($char & 0x3FF); 
+                                       $outstr .= chr($w1 >> 0x08);
+                                       $outstr .= chr($w1 & 0xFF);
+                                       $outstr .= chr($w2 >> 0x08);
+                                       $outstr .= chr($w2 & 0xFF);
+                               }
+                       }
+                       return $outstr;
+               }
+               // ====================================================
+               
+               /**
+                * Set header font.
+                * @param array $font font
+                * @access public
+                * @since 1.1
+                */
+               public function setHeaderFont($font) {
+                       $this->header_font = $font;
+               }
+               
+               /**
+                * Get header font.
+                * @return array()
+                * @access public
+                * @since 4.0.012 (2008-07-24)
+                */
+               public function getHeaderFont() {
+                       return $this->header_font;
+               }
+               
+               /**
+                * Set footer font.
+                * @param array $font font
+                * @access public
+                * @since 1.1
+                */
+               public function setFooterFont($font) {
+                       $this->footer_font = $font;
+               }
+               
+               /**
+                * Get Footer font.
+                * @return array()
+                * @access public
+                * @since 4.0.012 (2008-07-24)
+                */
+               public function getFooterFont() {
+                       return $this->footer_font;
+               }
+               
+               /**
+                * Set language array.
+                * @param array $language
+                * @access public
+                * @since 1.1
+                */
+               public function setLanguageArray($language) {
+                       $this->l = $language;
+                       if (isset($this->l['a_meta_dir'])) {
+                               $this->rtl = $this->l['a_meta_dir']=='rtl' ? true : false;
+                       } else {
+                               $this->rtl = false;
+                       }
+               }
+               
+               /**
+                * Returns the PDF data.
+                * @access public
+                */
+               public function getPDFData() {
+                       if ($this->state < 3) {
+                               $this->Close();
+                       }
+                       return $this->buffer;
+               }
+                               
+               /**
+                * Output anchor link.
+                * @param string $url link URL or internal link (i.e.: &lt;a href="#23"&gt;link to page 23&lt;/a&gt;)
+                * @param string $name link name
+                * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
+                * @param boolean $firstline if true prints only the first line and return the remaining string.
+                * @param array $color array of RGB text color
+                * @param string $style font style (U, D, B, I)
+                * @return the number of cells used or the remaining text if $firstline = true;
+                * @access public
+                */
+               public function addHtmlLink($url, $name, $fill=0, $firstline=false, $color='', $style=-1) {
+                       if (!$this->empty_string($url) AND ($url{0} == '#')) {
+                               // convert url to internal link
+                               $page = intval(substr($url, 1));
+                               $url = $this->AddLink();
+                               $this->SetLink($url, 0, $page);
+                       }
+                       // store current settings
+                       $prevcolor = $this->fgcolor;
+                       $prevstyle = $this->FontStyle;
+                       if (empty($color)) {
+                               $this->SetTextColorArray($this->htmlLinkColorArray);
+                       } else {
+                               $this->SetTextColorArray($color);
+                       }
+                       if ($style == -1) {
+                               $this->SetFont('', $this->FontStyle.$this->htmlLinkFontStyle);
+                       } else {
+                               $this->SetFont('', $this->FontStyle.$style);
+                       }
+                       $ret = $this->Write($this->lasth, $name, $url, $fill, '', false, 0, $firstline);
+                       // restore settings
+                       $this->SetFont('', $prevstyle);
+                       $this->SetTextColorArray($prevcolor);
+                       return $ret;
+               }
+               
+               /**
+                * Returns an associative array (keys: R,G,B) from an html color name or a six-digit or three-digit hexadecimal color representation (i.e. #3FE5AA or #7FF).
+                * @param string $color html color 
+                * @return array RGB color or false in case of error.
+                * @access public
+                */             
+               public function convertHTMLColorToDec($color='#FFFFFF') {
+                       global $webcolor;
+                       $returncolor = false;
+                       $color = preg_replace('/[\s]*/', '', $color); // remove extra spaces
+                       $color = strtolower($color);
+                       if (($dotpos = strpos($color, '.')) !== false) {
+                               // remove class parent (i.e.: color.red)
+                               $color = substr($color, ($dotpos + 1));
+                       }
+                       if (strlen($color) == 0) {
+                               return false;
+                       }
+                       if (substr($color, 0, 3) == 'rgb') {
+                               $codes = substr($color, 4);
+                               $codes = str_replace(')', '', $codes);
+                               $returncolor = explode(',', $codes, 3);
+                               return $returncolor;
+                       }
+                       if (substr($color, 0, 1) != '#') {
+                               // decode color name
+                               if (isset($webcolor[$color])) {
+                                       $color_code = $webcolor[$color];
+                               } else {
+                                       return false;
+                               }
+                       } else {
+                               $color_code = substr($color, 1);
+                       }
+                       switch (strlen($color_code)) {
+                               case 3: {
+                                       // three-digit hexadecimal representation
+                                       $r = substr($color_code, 0, 1);
+                                       $g = substr($color_code, 1, 1);
+                                       $b = substr($color_code, 2, 1);
+                                       $returncolor['R'] = hexdec($r.$r);
+                                       $returncolor['G'] = hexdec($g.$g);
+                                       $returncolor['B'] = hexdec($b.$b);
+                                       break;
+                               }
+                               case 6: {
+                                       // six-digit hexadecimal representation
+                                       $returncolor['R'] = hexdec(substr($color_code, 0, 2));
+                                       $returncolor['G'] = hexdec(substr($color_code, 2, 2));
+                                       $returncolor['B'] = hexdec(substr($color_code, 4, 2));
+                                       break;
+                               }
+                       }
+                       return $returncolor;
+               }
+               
+               /**
+                * Converts pixels to User's Units.
+                * @param int $px pixels
+                * @return float value in user's unit
+                * @access public
+                * @see setImageScale(), getImageScale()
+                */
+               public function pixelsToUnits($px) {
+                       return ($px / ($this->imgscale * $this->k));
+               }
+                       
+               /**
+                * Reverse function for htmlentities. 
+                * Convert entities in UTF-8.
+                * @param $text_to_convert Text to convert.
+                * @return string converted
+                * @access public
+               */
+               public function unhtmlentities($text_to_convert) {
+                       return html_entity_decode($text_to_convert, ENT_QUOTES, $this->encoding);
+               }
+               
+               // ENCRYPTION METHODS ----------------------------------
+               // SINCE 2.0.000 (2008-01-02)
+               
+               /**
+               * Compute encryption key depending on object number where the encrypted data is stored
+               * @param int $n object number
+               * @access protected
+               * @since 2.0.000 (2008-01-02)
+               */
+               protected function _objectkey($n) {
+                       return substr($this->_md5_16($this->encryption_key.pack('VXxx', $n)), 0, 10);
+               }
+               
+               /**
+                * Put encryption on PDF document.
+                * @access protected
+                * @since 2.0.000 (2008-01-02)
+                */
+               protected function _putencryption() {
+                       $this->_out('/Filter /Standard');
+                       $this->_out('/V 1');
+                       $this->_out('/R 2');
+                       $this->_out('/O ('.$this->_escape($this->Ovalue).')');
+                       $this->_out('/U ('.$this->_escape($this->Uvalue).')');
+                       $this->_out('/P '.$this->Pvalue);
+               }
+               
+               /**
+               * Returns the input text exrypted using RC4 algorithm and the specified key.
+               * RC4 is the standard encryption algorithm used in PDF format
+               * @param string $key encryption key
+               * @param String $text input text to be encrypted
+               * @return String encrypted text
+               * @access protected
+               * @since 2.0.000 (2008-01-02)
+               * @author Klemen Vodopivec
+               */
+               protected function _RC4($key, $text) {
+                       if ($this->last_rc4_key != $key) {
+                               $k = str_repeat($key, ((256 / strlen($key)) + 1));
+                               $rc4 = range(0, 255);
+                               $j = 0;
+                               for ($i = 0; $i < 256; ++$i) {
+                                       $t = $rc4[$i];
+                                       $j = ($j + $t + ord($k{$i})) % 256;
+                                       $rc4[$i] = $rc4[$j];
+                                       $rc4[$j] = $t;
+                               }
+                               $this->last_rc4_key = $key;
+                               $this->last_rc4_key_c = $rc4;
+                       } else {
+                               $rc4 = $this->last_rc4_key_c;
+                       }
+                       $len = strlen($text);
+                       $a = 0;
+                       $b = 0;
+                       $out = '';
+                       for ($i = 0; $i < $len; ++$i) {
+                               $a = ($a + 1) % 256;
+                               $t = $rc4[$a];
+                               $b = ($b + $t) % 256;
+                               $rc4[$a] = $rc4[$b];
+                               $rc4[$b] = $t;
+                               $k = $rc4[($rc4[$a] + $rc4[$b]) % 256];
+                               $out .= chr(ord($text{$i}) ^ $k);
+                       }
+                       return $out;
+               }
+               
+               /**
+               * Encrypts a string using MD5 and returns it's value as a binary string.
+               * @param string $str input string
+               * @return String MD5 encrypted binary string
+               * @access protected
+               * @since 2.0.000 (2008-01-02)
+               * @author Klemen Vodopivec
+               */
+               protected function _md5_16($str) {
+                       return pack('H*', md5($str));
+               }
+               
+               /**
+               * Compute O value (used for RC4 encryption)
+               * @param String $user_pass user password
+               * @param String $owner_pass user password
+               * @return String O value
+               * @access protected
+               * @since 2.0.000 (2008-01-02)
+               * @author Klemen Vodopivec
+               */
+               protected function _Ovalue($user_pass, $owner_pass) {
+                       $tmp = $this->_md5_16($owner_pass);
+                       $owner_RC4_key = substr($tmp, 0, 5);
+                       return $this->_RC4($owner_RC4_key, $user_pass);
+               }
+               
+               /**
+               * Compute U value (used for RC4 encryption)
+               * @return String U value
+               * @access protected
+               * @since 2.0.000 (2008-01-02)
+               * @author Klemen Vodopivec
+               */
+               protected function _Uvalue() {
+                       return $this->_RC4($this->encryption_key, $this->padding);
+               }
+               
+               /**
+               * Compute encryption key
+               * @param String $user_pass user password
+               * @param String $owner_pass user password
+               * @param String $protection protection type
+               * @access protected
+               * @since 2.0.000 (2008-01-02)
+               * @author Klemen Vodopivec
+               */
+               protected function _generateencryptionkey($user_pass, $owner_pass, $protection) {
+                       // Pad passwords
+                       $user_pass = substr($user_pass.$this->padding, 0, 32);
+                       $owner_pass = substr($owner_pass.$this->padding, 0, 32);
+                       // Compute O value
+                       $this->Ovalue = $this->_Ovalue($user_pass, $owner_pass);
+                       // Compute encyption key
+                       $tmp = $this->_md5_16($user_pass.$this->Ovalue.chr($protection)."\xFF\xFF\xFF");
+                       $this->encryption_key = substr($tmp, 0, 5);
+                       // Compute U value
+                       $this->Uvalue = $this->_Uvalue();
+                       // Compute P value
+                       $this->Pvalue = -(($protection^255) + 1);
+               }
+               
+               /**
+               * Set document protection
+               * The permission array is composed of values taken from the following ones:
+               * - copy: copy text and images to the clipboard
+               * - print: print the document
+               * - modify: modify it (except for annotations and forms)
+               * - annot-forms: add annotations and forms 
+               * Remark: the protection against modification is for people who have the full Acrobat product.
+               * If you don't set any password, the document will open as usual. If you set a user password, the PDF viewer will ask for it before displaying the document. The master password, if different from the user one, can be used to get full access.
+               * Note: protecting a document requires to encrypt it, which increases the processing time a lot. This can cause a PHP time-out in some cases, especially if the document contains images or fonts.
+               * @param Array $permissions the set of permissions. Empty by default (only viewing is allowed). (print, modify, copy, annot-forms)
+               * @param String $user_pass user password. Empty by default.
+               * @param String $owner_pass owner password. If not specified, a random value is used.
+               * @access public
+               * @since 2.0.000 (2008-01-02)
+               * @author Klemen Vodopivec
+               */
+               public function SetProtection($permissions=array(), $user_pass='', $owner_pass=null) {
+                       $options = array('print' => 4, 'modify' => 8, 'copy' => 16, 'annot-forms' => 32);
+                       $protection = 192;
+                       foreach ($permissions as $permission) {
+                               if (!isset($options[$permission])) {
+                                       $this->Error('Incorrect permission: '.$permission);
+                               }
+                               $protection += $options[$permission];
+                       }
+                       if ($owner_pass === null) {
+                               $owner_pass = uniqid(rand());
+                       }
+                       $this->encrypted = true;
+                       $this->_generateencryptionkey($user_pass, $owner_pass, $protection);
+               }
+               
+               // END OF ENCRYPTION FUNCTIONS -------------------------
+               
+               // START TRANSFORMATIONS SECTION -----------------------
+               
+               /**
+               * Starts a 2D tranformation saving current graphic state.
+               * This function must be called before scaling, mirroring, translation, rotation and skewing.
+               * Use StartTransform() before, and StopTransform() after the transformations to restore the normal behavior.
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function StartTransform() {
+                       $this->_out('q');
+                       $this->transfmrk[$this->page][] = $this->pagelen[$this->page];
+                       ++$this->transfmatrix_key;
+                       $this->transfmatrix[$this->transfmatrix_key] = array();
+               }
+               
+               /**
+               * Stops a 2D tranformation restoring previous graphic state.
+               * This function must be called after scaling, mirroring, translation, rotation and skewing.
+               * Use StartTransform() before, and StopTransform() after the transformations to restore the normal behavior.
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function StopTransform() {
+                       $this->_out('Q');
+                       if (isset($this->transfmatrix[$this->transfmatrix_key])) {
+                               array_pop($this->transfmatrix[$this->transfmatrix_key]);
+                               --$this->transfmatrix_key;
+                       }
+                       array_pop($this->transfmrk[$this->page]);
+               }
+               /**
+               * Horizontal Scaling.
+               * @param float $s_x scaling factor for width as percent. 0 is not allowed.
+               * @param int $x abscissa of the scaling center. Default is current x position
+               * @param int $y ordinate of the scaling center. Default is current y position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function ScaleX($s_x, $x='', $y='') {
+                       $this->Scale($s_x, 100, $x, $y);
+               }
+               
+               /**
+               * Vertical Scaling.
+               * @param float $s_y scaling factor for height as percent. 0 is not allowed.
+               * @param int $x abscissa of the scaling center. Default is current x position
+               * @param int $y ordinate of the scaling center. Default is current y position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function ScaleY($s_y, $x='', $y='') {
+                       $this->Scale(100, $s_y, $x, $y);
+               }
+               
+               /**
+               * Vertical and horizontal proportional Scaling.
+               * @param float $s scaling factor for width and height as percent. 0 is not allowed.
+               * @param int $x abscissa of the scaling center. Default is current x position
+               * @param int $y ordinate of the scaling center. Default is current y position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function ScaleXY($s, $x='', $y='') {
+                       $this->Scale($s, $s, $x, $y);
+               }
+               
+               /**
+               * Vertical and horizontal non-proportional Scaling.
+               * @param float $s_x scaling factor for width as percent. 0 is not allowed.
+               * @param float $s_y scaling factor for height as percent. 0 is not allowed.
+               * @param int $x abscissa of the scaling center. Default is current x position
+               * @param int $y ordinate of the scaling center. Default is current y position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function Scale($s_x, $s_y, $x='', $y='') {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       if ($this->rtl) {
+                               $x = $this->w - $x;
+                       }
+                       if (($s_x == 0) OR ($s_y == 0)) {
+                               $this->Error('Please do not use values equal to zero for scaling');
+                       }
+                       $y = ($this->h - $y) * $this->k;
+                       $x *= $this->k;
+                       //calculate elements of transformation matrix
+                       $s_x /= 100;
+                       $s_y /= 100;
+                       $tm[0] = $s_x;
+                       $tm[1] = 0;
+                       $tm[2] = 0;
+                       $tm[3] = $s_y;
+                       $tm[4] = $x * (1 - $s_x);
+                       $tm[5] = $y * (1 - $s_y);
+                       //scale the coordinate system
+                       $this->Transform($tm);
+               }
+               
+               /**
+               * Horizontal Mirroring.
+               * @param int $x abscissa of the point. Default is current x position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function MirrorH($x='') {
+                       $this->Scale(-100, 100, $x);
+               }
+               
+               /**
+               * Verical Mirroring.
+               * @param int $y ordinate of the point. Default is current y position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function MirrorV($y='') {
+                       $this->Scale(100, -100, '', $y);
+               }
+               
+               /**
+               * Point reflection mirroring.
+               * @param int $x abscissa of the point. Default is current x position
+               * @param int $y ordinate of the point. Default is current y position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function MirrorP($x='',$y='') {
+                       $this->Scale(-100, -100, $x, $y);
+               }
+               
+               /**
+               * Reflection against a straight line through point (x, y) with the gradient angle (angle).
+               * @param float $angle gradient angle of the straight line. Default is 0 (horizontal line).
+               * @param int $x abscissa of the point. Default is current x position
+               * @param int $y ordinate of the point. Default is current y position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function MirrorL($angle=0, $x='',$y='') {
+                       $this->Scale(-100, 100, $x, $y);
+                       $this->Rotate(-2*($angle-90), $x, $y);
+               }
+               
+               /**
+               * Translate graphic object horizontally.
+               * @param int $t_x movement to the right (or left for RTL)
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function TranslateX($t_x) {
+                       $this->Translate($t_x, 0);
+               }
+               
+               /**
+               * Translate graphic object vertically.
+               * @param int $t_y movement to the bottom
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function TranslateY($t_y) {
+                       $this->Translate(0, $t_y);
+               }
+               
+               /**
+               * Translate graphic object horizontally and vertically.
+               * @param int $t_x movement to the right
+               * @param int $t_y movement to the bottom
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function Translate($t_x, $t_y) {
+                       if ($this->rtl) {
+                               $t_x = -$t_x;
+                       }
+                       //calculate elements of transformation matrix
+                       $tm[0] = 1;
+                       $tm[1] = 0;
+                       $tm[2] = 0;
+                       $tm[3] = 1;
+                       $tm[4] = $t_x * $this->k;
+                       $tm[5] = -$t_y * $this->k;
+                       //translate the coordinate system
+                       $this->Transform($tm);
+               }
+               
+               /**
+               * Rotate object.
+               * @param float $angle angle in degrees for counter-clockwise rotation
+               * @param int $x abscissa of the rotation center. Default is current x position
+               * @param int $y ordinate of the rotation center. Default is current y position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function Rotate($angle, $x='', $y='') {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       if ($this->rtl) {
+                               $x = $this->w - $x;
+                               $angle = -$angle;
+                       }
+                       $y = ($this->h - $y) * $this->k;
+                       $x *= $this->k;
+                       //calculate elements of transformation matrix
+                       $tm[0] = cos(deg2rad($angle));
+                       $tm[1] = sin(deg2rad($angle));
+                       $tm[2] = -$tm[1];
+                       $tm[3] = $tm[0];
+                       $tm[4] = $x + ($tm[1] * $y) - ($tm[0] * $x);
+                       $tm[5] = $y - ($tm[0] * $y) - ($tm[1] * $x);
+                       //rotate the coordinate system around ($x,$y)
+                       $this->Transform($tm);
+               }
+               
+               /**
+               * Skew horizontally.
+               * @param float $angle_x angle in degrees between -90 (skew to the left) and 90 (skew to the right)
+               * @param int $x abscissa of the skewing center. default is current x position
+               * @param int $y ordinate of the skewing center. default is current y position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function SkewX($angle_x, $x='', $y='') {
+                       $this->Skew($angle_x, 0, $x, $y);
+               }
+               
+               /**
+               * Skew vertically.
+               * @param float $angle_y angle in degrees between -90 (skew to the bottom) and 90 (skew to the top)
+               * @param int $x abscissa of the skewing center. default is current x position
+               * @param int $y ordinate of the skewing center. default is current y position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function SkewY($angle_y, $x='', $y='') {
+                       $this->Skew(0, $angle_y, $x, $y);
+               }
+               
+               /**
+               * Skew.
+               * @param float $angle_x angle in degrees between -90 (skew to the left) and 90 (skew to the right)
+               * @param float $angle_y angle in degrees between -90 (skew to the bottom) and 90 (skew to the top)
+               * @param int $x abscissa of the skewing center. default is current x position
+               * @param int $y ordinate of the skewing center. default is current y position
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               public function Skew($angle_x, $angle_y, $x='', $y='') {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       if ($this->rtl) {
+                               $x = $this->w - $x;
+                               $angle_x = -$angle_x;
+                       }
+                       if (($angle_x <= -90) OR ($angle_x >= 90) OR ($angle_y <= -90) OR ($angle_y >= 90)) {
+                               $this->Error('Please use values between -90 and +90 degrees for Skewing.');
+                       }
+                       $x *= $this->k;
+                       $y = ($this->h - $y) * $this->k;
+                       //calculate elements of transformation matrix
+                       $tm[0] = 1;
+                       $tm[1] = tan(deg2rad($angle_y));
+                       $tm[2] = tan(deg2rad($angle_x));
+                       $tm[3] = 1;
+                       $tm[4] = -$tm[2] * $y;
+                       $tm[5] = -$tm[1] * $x;
+                       //skew the coordinate system
+                       $this->Transform($tm);
+               }
+               
+               /**
+               * Apply graphic transformations.
+               * @access protected
+               * @since 2.1.000 (2008-01-07)
+               * @see StartTransform(), StopTransform()
+               */
+               protected function Transform($tm) {
+                       $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5]));
+                       // add tranformation matrix
+                       $this->transfmatrix[$this->transfmatrix_key][] = array('a' => $tm[0], 'b' => $tm[1], 'c' => $tm[2], 'd' => $tm[3], 'e' => $tm[4], 'f' => $tm[5]);
+                       // update tranformation mark
+                       if (end($this->transfmrk[$this->page]) !== false) {
+                               $key = key($this->transfmrk[$this->page]);
+                               $this->transfmrk[$this->page][$key] = $this->pagelen[$this->page];
+                       }
+               }
+               
+               // END TRANSFORMATIONS SECTION -------------------------
+               
+               
+               // START GRAPHIC FUNCTIONS SECTION ---------------------
+               // The following section is based on the code provided by David Hernandez Sanz
+               
+               /**
+               * Defines the line width. By default, the value equals 0.2 mm. The method can be called before the first page is created and the value is retained from page to page.
+               * @param float $width The width.
+               * @access public
+               * @since 1.0
+               * @see Line(), Rect(), Cell(), MultiCell()
+               */
+               public function SetLineWidth($width) {
+                       //Set line width
+                       $this->LineWidth = $width;
+                       $this->linestyleWidth = sprintf('%.2F w', ($width * $this->k));
+                       if ($this->page > 0) {
+                               $this->_out($this->linestyleWidth);
+                       }
+               }
+               
+               /**
+               * Returns the current the line width.
+               * @return int Line width 
+               * @access public
+               * @since 2.1.000 (2008-01-07)
+               * @see Line(), SetLineWidth()
+               */
+               public function GetLineWidth() {
+                       return $this->LineWidth;
+               }
+               
+               /**
+               * Set line style.
+               * @param array $style Line style. Array with keys among the following:
+               * <ul>
+               *        <li>width (float): Width of the line in user units.</li>
+               *        <li>cap (string): Type of cap to put on the line. Possible values are:
+               * butt, round, square. The difference between "square" and "butt" is that
+               * "square" projects a flat end past the end of the line.</li>
+               *        <li>join (string): Type of join. Possible values are: miter, round,
+               * bevel.</li>
+               *        <li>dash (mixed): Dash pattern. Is 0 (without dash) or string with
+               * series of length values, which are the lengths of the on and off dashes.
+               * For example: "2" represents 2 on, 2 off, 2 on, 2 off, ...; "2,1" is 2 on,
+               * 1 off, 2 on, 1 off, ...</li>
+               *        <li>phase (integer): Modifier on the dash pattern which is used to shift
+               * the point at which the pattern starts.</li>
+               *        <li>color (array): Draw color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K).</li>
+               * </ul>
+               * @access public
+               * @since 2.1.000 (2008-01-08)
+               */
+               public function SetLineStyle($style) {
+                       if (!is_array($style)) {
+                               return;
+                       }
+                       extract($style);
+                       if (isset($width)) {
+                               $width_prev = $this->LineWidth;
+                               $this->SetLineWidth($width);
+                               $this->LineWidth = $width_prev;
+                       }
+                       if (isset($cap)) {
+                               $ca = array('butt' => 0, 'round'=> 1, 'square' => 2);
+                               if (isset($ca[$cap])) {
+                                       $this->linestyleCap = $ca[$cap].' J';
+                                       $this->_out($this->linestyleCap);
+                               }
+                       }
+                       if (isset($join)) {
+                               $ja = array('miter' => 0, 'round' => 1, 'bevel' => 2);
+                               if (isset($ja[$join])) {
+                                       $this->linestyleJoin = $ja[$join].' j';
+                                       $this->_out($this->linestyleJoin);
+                               }
+                       }
+                       if (isset($dash)) {
+                               $dash_string = '';
+                               if ($dash) {
+                                       if (preg_match('/^.+,/', $dash) > 0) {
+                                               $tab = explode(',', $dash);
+                                       } else {
+                                               $tab = array($dash);
+                                       }
+                                       $dash_string = '';
+                                       foreach ($tab as $i => $v) {
+                                               if ($i) {
+                                                       $dash_string .= ' ';
+                                               }
+                                               $dash_string .= sprintf("%.2F", $v);
+                                       }
+                               }
+                               if (!isset($phase) OR !$dash) {
+                                       $phase = 0;
+                               }
+                               $this->linestyleDash = sprintf("[%s] %.2F d", $dash_string, $phase);
+                               $this->_out($this->linestyleDash);
+                       }
+                       if (isset($color)) {
+                               $this->SetDrawColorArray($color);
+                       }
+               }
+               
+               /*
+               * Set a draw point.
+               * @param float $x Abscissa of point.
+               * @param float $y Ordinate of point.
+               * @access protected
+               * @since 2.1.000 (2008-01-08)
+               */
+               protected function _outPoint($x, $y) {
+                       if ($this->rtl) {
+                               $x = $this->w - $x;
+                       }
+                       $this->_out(sprintf("%.2F %.2F m", $x * $this->k, ($this->h - $y) * $this->k));
+               }
+               
+               /*
+               * Draws a line from last draw point.
+               * @param float $x Abscissa of end point.
+               * @param float $y Ordinate of end point.
+               * @access protected
+               * @since 2.1.000 (2008-01-08)
+               */
+               protected function _outLine($x, $y) {
+                       if ($this->rtl) {
+                               $x = $this->w - $x;
+                       }
+                       $this->_out(sprintf("%.2F %.2F l", $x * $this->k, ($this->h - $y) * $this->k));
+               }
+               
+               /**
+               * Draws a rectangle.
+               * @param float $x Abscissa of upper-left corner (or upper-right corner for RTL language).
+               * @param float $y Ordinate of upper-left corner (or upper-right corner for RTL language).
+               * @param float $w Width.
+               * @param float $h Height.
+               * @param string $op options
+               * @access protected
+               * @since 2.1.000 (2008-01-08)
+               */
+               protected function _outRect($x, $y, $w, $h, $op) {
+                       if ($this->rtl) {
+                               $x = $this->w - $x - $w;
+                       }
+                       $this->_out(sprintf('%.2F %.2F %.2F %.2F re %s', $x*$this->k, ($this->h-$y)*$this->k, $w*$this->k, -$h*$this->k, $op));
+               }
+               
+               /*
+               * Draws a Bezier curve from last draw point.
+               * The Bezier curve is a tangent to the line between the control points at either end of the curve.
+               * @param float $x1 Abscissa of control point 1.
+               * @param float $y1 Ordinate of control point 1.
+               * @param float $x2 Abscissa of control point 2.
+               * @param float $y2 Ordinate of control point 2.
+               * @param float $x3 Abscissa of end point.
+               * @param float $y3 Ordinate of end point.
+               * @access protected
+               * @since 2.1.000 (2008-01-08)
+               */
+               protected function _outCurve($x1, $y1, $x2, $y2, $x3, $y3) {
+                       if ($this->rtl) {
+                               $x1 = $this->w - $x1;
+                               $x2 = $this->w - $x2;
+                               $x3 = $this->w - $x3;
+                       }
+                       $this->_out(sprintf("%.2F %.2F %.2F %.2F %.2F %.2F c", $x1 * $this->k, ($this->h - $y1) * $this->k, $x2 * $this->k, ($this->h - $y2) * $this->k, $x3 * $this->k, ($this->h - $y3) * $this->k));
+               }
+               
+               /**
+               * Draws a line between two points.
+               * @param float $x1 Abscissa of first point.
+               * @param float $y1 Ordinate of first point.
+               * @param float $x2 Abscissa of second point.
+               * @param float $y2 Ordinate of second point.
+               * @param array $style Line style. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).
+               * @access public
+               * @since 1.0
+               * @see SetLineWidth(), SetDrawColor(), SetLineStyle()
+               */
+               public function Line($x1, $y1, $x2, $y2, $style=array()) {
+                       if (is_array($style)) {
+                               $this->SetLineStyle($style);
+                       }
+                       $this->_outPoint($x1, $y1);
+                       $this->_outLine($x2, $y2);
+                       $this->_out(' S');
+               }
+               
+               /**
+               * Draws a rectangle.
+               * @param float $x Abscissa of upper-left corner (or upper-right corner for RTL language).
+               * @param float $y Ordinate of upper-left corner (or upper-right corner for RTL language).
+               * @param float $w Width.
+               * @param float $h Height.
+               * @param string $style Style of rendering. Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $border_style Border style of rectangle. Array with keys among the following:
+               * <ul>
+               *        <li>all: Line style of all borders. Array like for {@link SetLineStyle SetLineStyle}.</li>
+               *        <li>L, T, R, B or combinations: Line style of left, top, right or bottom border. Array like for {@link SetLineStyle SetLineStyle}.</li>
+               * </ul>
+               * If a key is not present or is null, not draws the border. Default value: default line style (empty array).
+               * @param array $border_style Border style of rectangle. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).
+               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).
+               * @access public
+               * @since 1.0
+               * @see SetLineStyle()
+               */
+               public function Rect($x, $y, $w, $h, $style='', $border_style=array(), $fill_color=array()) {
+                       if (!(false === strpos($style, 'F')) AND isset($fill_color)) {
+                               $this->SetFillColorArray($fill_color);
+                       }
+                       switch ($style) {
+                               case 'F': {
+                                       $op = 'f';
+                                       $border_style = array();
+                                       $this->_outRect($x, $y, $w, $h, $op);
+                                       break;
+                               }
+                               case 'DF':
+                               case 'FD': {
+                                       if ((!$border_style) OR (isset($border_style['all']))) {
+                                               $op = 'B';
+                                               if (isset($border_style['all'])) {
+                                                       $this->SetLineStyle($border_style['all']);
+                                                       $border_style = array();
+                                               }
+                                       } else {
+                                               $op = 'f';
+                                       }
+                                       $this->_outRect($x, $y, $w, $h, $op);
+                                       break;
+                               }
+                               case 'CNZ': {
+                                       $op = 'W n';
+                                       $this->_outRect($x, $y, $w, $h, $op);
+                                       break;
+                               }
+                               case 'CEO': {
+                                       $op = 'W* n';
+                                       $this->_outRect($x, $y, $w, $h, $op);
+                                       break;
+                               }
+                               default: {
+                                       $op = 'S';
+                                       if ((!$border_style) OR (isset($border_style['all']))) {
+                                               if (isset($border_style['all']) AND $border_style['all']) {
+                                                       $this->SetLineStyle($border_style['all']);
+                                                       $border_style = array();
+                                               }
+                                               $this->_outRect($x, $y, $w, $h, $op);
+                                       }
+                                       break;
+                               }
+                       }
+                       if ($border_style) {
+                               $border_style2 = array();
+                               foreach ($border_style as $line => $value) {
+                                       $lenght = strlen($line);
+                                       for ($i = 0; $i < $lenght; ++$i) {
+                                               $border_style2[$line[$i]] = $value;
+                                       }
+                               }
+                               $border_style = $border_style2;
+                               if (isset($border_style['L']) AND $border_style['L']) {
+                                       $this->Line($x, $y, $x, $y + $h, $border_style['L']);
+                               }
+                               if (isset($border_style['T']) AND $border_style['T']) {
+                                       $this->Line($x, $y, $x + $w, $y, $border_style['T']);
+                               }
+                               if (isset($border_style['R']) AND $border_style['R']) {
+                                       $this->Line($x + $w, $y, $x + $w, $y + $h, $border_style['R']);
+                               }
+                               if (isset($border_style['B']) AND $border_style['B']) {
+                                       $this->Line($x, $y + $h, $x + $w, $y + $h, $border_style['B']);
+                               }
+                       }
+               }
+               
+               
+               /**
+               * Draws a Bezier curve.
+               * The Bezier curve is a tangent to the line between the control points at
+               * either end of the curve.
+               * @param float $x0 Abscissa of start point.
+               * @param float $y0 Ordinate of start point.
+               * @param float $x1 Abscissa of control point 1.
+               * @param float $y1 Ordinate of control point 1.
+               * @param float $x2 Abscissa of control point 2.
+               * @param float $y2 Ordinate of control point 2.
+               * @param float $x3 Abscissa of end point.
+               * @param float $y3 Ordinate of end point.
+               * @param string $style Style of rendering. Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $line_style Line style of curve. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).
+               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).
+               * @access public
+               * @see SetLineStyle()
+               * @since 2.1.000 (2008-01-08)
+               */
+               public function Curve($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3, $style='', $line_style=array(), $fill_color=array()) {
+                       if (!(false === strpos($style, 'F')) AND isset($fill_color)) {
+                               $this->SetFillColorArray($fill_color);
+                       }
+                       switch ($style) {
+                               case 'F': {
+                                       $op = 'f';
+                                       $line_style = array();
+                                       break;
+                               }
+                               case 'FD': 
+                               case 'DF': {
+                                       $op = 'B';
+                                       break;
+                               }
+                               case 'CNZ': {
+                                       $op = 'W n';
+                                       break;
+                               }
+                               case 'CEO': {
+                                       $op = 'W* n';
+                                       break;
+                               }
+                               default: {
+                                       $op = 'S';
+                                       break;
+                               }
+                       }
+                       if ($line_style) {
+                               $this->SetLineStyle($line_style);
+                       }
+                       $this->_outPoint($x0, $y0);
+                       $this->_outCurve($x1, $y1, $x2, $y2, $x3, $y3);
+                       $this->_out($op);
+               }
+               
+               /**
+               * Draws a poly-Bezier curve.
+               * Each Bezier curve segment is a tangent to the line between the control points at
+               * either end of the curve.
+               * @param float $x0 Abscissa of start point.
+               * @param float $y0 Ordinate of start point.
+               * @param float $segments An array of bezier descriptions. Format: array(x1, y1, x2, y2, x3, y3).
+               * @param string $style Style of rendering. Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $line_style Line style of curve. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).
+               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).
+               * @access public
+               * @see SetLineStyle()
+               * @since 3.0008 (2008-05-12)
+               */
+               public function Polycurve($x0, $y0, $segments, $style='', $line_style=array(), $fill_color=array()) {
+                       if (!(false === strpos($style, 'F')) AND isset($fill_color)) {
+                               $this->SetFillColorArray($fill_color);
+                       }
+                       switch ($style) {
+                               case 'F': {
+                                       $op = 'f';
+                                       $line_style = array();
+                                       break;
+                               }
+                               case 'FD':
+                               case 'DF': {
+                                       $op = 'B';
+                                       break;
+                               }
+                               case 'CNZ': {
+                                       $op = 'W n';
+                                       break;
+                               }
+                               case 'CEO': {
+                                       $op = 'W* n';
+                                       break;
+                               }
+                               default: {
+                                       $op = 'S';
+                                       break;
+                               }
+                       }
+                       if ($line_style) {
+                               $this->SetLineStyle($line_style);
+                       }
+                       $this->_outPoint($x0, $y0);
+                       foreach ($segments as $segment) {
+                               list($x1, $y1, $x2, $y2, $x3, $y3) = $segment;
+                               $this->_outCurve($x1, $y1, $x2, $y2, $x3, $y3);
+                       }       
+                       $this->_out($op);
+               }
+               
+               /**
+               * Draws an ellipse.
+               * An ellipse is formed from n Bezier curves.
+               * @param float $x0 Abscissa of center point.
+               * @param float $y0 Ordinate of center point.
+               * @param float $rx Horizontal radius.
+               * @param float $ry Vertical radius (if ry = 0 then is a circle, see {@link Circle Circle}). Default value: 0.
+               * @param float $angle: Angle oriented (anti-clockwise). Default value: 0.
+               * @param float $astart: Angle start of draw line. Default value: 0.
+               * @param float $afinish: Angle finish of draw line. Default value: 360.
+               * @param string $style Style of rendering. Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>C: Draw close.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $line_style Line style of ellipse. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).
+               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).
+               * @param integer $nc Number of curves used in ellipse. Default value: 8.
+               * @access public
+               * @since 2.1.000 (2008-01-08)
+               */
+               public function Ellipse($x0, $y0, $rx, $ry=0, $angle=0, $astart=0, $afinish=360, $style='', $line_style=array(), $fill_color=array(), $nc=8) {
+                       if ($angle) {
+                               $this->StartTransform();
+                               $this->Rotate($angle, $x0, $y0);
+                               $this->Ellipse($x0, $y0, $rx, $ry, 0, $astart, $afinish, $style, $line_style, $fill_color, $nc);
+                               $this->StopTransform();
+                               return;
+                       }
+                       if ($rx) {
+                               if (!(false === strpos($style, 'F')) AND isset($fill_color)) {
+                                       $this->SetFillColorArray($fill_color);
+                               }
+                               switch ($style) {
+                                       case 'F': {
+                                               $op = 'f';
+                                               $line_style = array();
+                                               break;
+                                       }
+                                       case 'FD': 
+                                       case 'DF': {
+                                               $op = 'B';
+                                               break;
+                                       }
+                                       case 'C': {
+                                               $op = 's'; // Small 's' signifies closing the path as well
+                                               break;
+                                       }
+                                       case 'CNZ': {
+                                               $op = 'W n';
+                                               break;
+                                       }
+                                       case 'CEO': {
+                                               $op = 'W* n';
+                                               break;
+                                       }
+                                       default: {
+                                               $op = 'S';
+                                               break;
+                                       }
+                               }
+                               if ($line_style) {
+                                       $this->SetLineStyle($line_style);
+                               }
+                               if (!$ry) {
+                                       $ry = $rx;
+                               }
+                               $rx *= $this->k;
+                               $ry *= $this->k;
+                               if ($nc < 2) {
+                                       $nc = 2;
+                               }
+                               $astart = deg2rad((float) $astart);
+                               $afinish = deg2rad((float) $afinish);
+                               $total_angle = $afinish - $astart;
+                               $dt = $total_angle / $nc;
+                               $dtm = $dt / 3;
+                               $x0 *= $this->k;
+                               $y0 = ($this->h - $y0) * $this->k;
+                               $t1 = $astart;
+                               $a0 = $x0 + ($rx * cos($t1));
+                               $b0 = $y0 + ($ry * sin($t1));
+                               $c0 = -$rx * sin($t1);
+                               $d0 = $ry * cos($t1);
+                               $this->_outPoint($a0 / $this->k, $this->h - ($b0 / $this->k));
+                               for ($i = 1; $i <= $nc; ++$i) {
+                                       // Draw this bit of the total curve
+                                       $t1 = ($i * $dt) + $astart;
+                                       $a1 = $x0 + ($rx * cos($t1));
+                                       $b1 = $y0 + ($ry * sin($t1));
+                                       $c1 = -$rx * sin($t1);
+                                       $d1 = $ry * cos($t1);
+                                       $this->_outCurve(($a0 + ($c0 * $dtm)) / $this->k, $this->h - (($b0 + ($d0 * $dtm)) / $this->k), ($a1 - ($c1 * $dtm)) / $this->k, $this->h - (($b1 - ($d1 * $dtm)) / $this->k), $a1 / $this->k, $this->h - ($b1 / $this->k));
+                                       $a0 = $a1;
+                                       $b0 = $b1;
+                                       $c0 = $c1;
+                                       $d0 = $d1;
+                               }
+                               $this->_out($op);
+                       }
+               }
+               
+               /**
+               * Draws a circle.
+               * A circle is formed from n Bezier curves.
+               * @param float $x0 Abscissa of center point.
+               * @param float $y0 Ordinate of center point.
+               * @param float $r Radius.
+               * @param float $astart: Angle start of draw line. Default value: 0.
+               * @param float $afinish: Angle finish of draw line. Default value: 360.
+               * @param string $style Style of rendering. Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>C: Draw close.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $line_style Line style of circle. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).
+               * @param array $fill_color Fill color. Format: array(red, green, blue). Default value: default color (empty array).
+               * @param integer $nc Number of curves used in circle. Default value: 8.
+               * @access public
+               * @since 2.1.000 (2008-01-08)
+               */
+               public function Circle($x0, $y0, $r, $astart=0, $afinish=360, $style='', $line_style=array(), $fill_color=array(), $nc=8) {
+                       $this->Ellipse($x0, $y0, $r, 0, 0, $astart, $afinish, $style, $line_style, $fill_color, $nc);
+               }
+
+               /**
+               * Draws a polygonal line
+               * @param array $p Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1))
+               * @param string $style Style of rendering. Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $line_style Line style of polygon. Array with keys among the following:
+               * <ul>
+               *        <li>all: Line style of all lines. Array like for {@link SetLineStyle SetLineStyle}.</li>
+               *        <li>0 to ($np - 1): Line style of each line. Array like for {@link SetLineStyle SetLineStyle}.</li>
+               * </ul>
+               * If a key is not present or is null, not draws the line. Default value is default line style (empty array).
+               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).
+               * @param boolean $closed if true the polygon is closes, otherwise will remain open
+               * @access public
+               * @since 4.8.003 (2009-09-15)
+               */
+               public function PolyLine($p, $style='', $line_style=array(), $fill_color=array()) {
+                       $this->Polygon($p, $style, $line_style, $fill_color, false);
+               }
+
+               /**
+               * Draws a polygon.
+               * @param array $p Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1))
+               * @param string $style Style of rendering. Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $line_style Line style of polygon. Array with keys among the following:
+               * <ul>
+               *        <li>all: Line style of all lines. Array like for {@link SetLineStyle SetLineStyle}.</li>
+               *        <li>0 to ($np - 1): Line style of each line. Array like for {@link SetLineStyle SetLineStyle}.</li>
+               * </ul>
+               * If a key is not present or is null, not draws the line. Default value is default line style (empty array).
+               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).
+               * @param boolean $closed if true the polygon is closes, otherwise will remain open
+               * @access public
+               * @since 2.1.000 (2008-01-08)
+               */
+               public function Polygon($p, $style='', $line_style=array(), $fill_color=array(), $closed=true) {
+                       $nc = count($p); // number of coordinates
+                       $np = $nc / 2; // number of points
+                       if ($closed) {
+                               // close polygon by adding the first 2 points at the end (one line)
+                               for ($i = 0; $i < 4; ++$i) {
+                                       $p[$nc + $i] = $p[$i];
+                               }
+                               // copy style for the last added line
+                               if (isset($line_style[0])) {
+                                       $line_style[$np] = $line_style[0];
+                               }                       
+                               $nc += 4;
+                       }
+                       if (!(false === strpos($style, 'F')) AND isset($fill_color)) {
+                               $this->SetFillColorArray($fill_color);
+                       }
+                       switch ($style) {
+                               case 'F': {
+                                       $line_style = array();
+                                       $op = 'f';
+                                       break;
+                               }
+                               case 'FD': 
+                               case 'DF': {
+                                       $op = 'B';
+                                       break;
+                               }
+                               case 'CNZ': {
+                                       $op = 'W n';
+                                       break;
+                               }
+                               case 'CEO': {
+                                       $op = 'W* n';
+                                       break;
+                               }                               
+                               default: {
+                                       $op = 'S';
+                                       break;
+                               }
+                       }
+                       $draw = true;
+                       if ($line_style) {
+                               if (isset($line_style['all'])) {
+                                       $this->SetLineStyle($line_style['all']);
+                               } else {
+                                       $draw = false;
+                                       if ($op == 'B') {
+                                               // draw fill
+                                               $op = 'f';
+                                               $this->_outPoint($p[0], $p[1]);
+                                               for ($i = 2; $i < $nc; $i = $i + 2) {
+                                                       $this->_outLine($p[$i], $p[$i + 1]);
+                                               }
+                                               $this->_out($op);
+                                       }
+                                       // draw outline
+                                       $this->_outPoint($p[0], $p[1]);
+                                       for ($i = 2; $i < $nc; $i = $i + 2) {
+                                               $line_num = ($i / 2) - 1;
+                                               if (isset($line_style[$line_num])) {
+                                                       if ($line_style[$line_num] != 0) {
+                                                               if (is_array($line_style[$line_num])) {
+                                                                       $this->_out('S');
+                                                                       $this->SetLineStyle($line_style[$line_num]);
+                                                                       $this->_outPoint($p[$i - 2], $p[$i - 1]);
+                                                                       $this->_outLine($p[$i], $p[$i + 1]);
+                                                                       $this->_out('S');
+                                                                       $this->_outPoint($p[$i], $p[$i + 1]);
+                                                               } else {
+                                                                       $this->_outLine($p[$i], $p[$i + 1]);
+                                                               }
+                                                       }
+                                               } else {
+                                                       $this->_outLine($p[$i], $p[$i + 1]);
+                                               }
+                                       }
+                                       $this->_out($op);
+                               }
+                       }
+                       if ($draw) {
+                               $this->_outPoint($p[0], $p[1]);
+                               for ($i = 2; $i < $nc; $i = $i + 2) {
+                                       $this->_outLine($p[$i], $p[$i + 1]);
+                               }
+                               $this->_out($op);
+                       }
+               }
+               
+               /**
+               * Draws a regular polygon.
+               * @param float $x0 Abscissa of center point.
+               * @param float $y0 Ordinate of center point.
+               * @param float $r: Radius of inscribed circle.
+               * @param integer $ns Number of sides.
+               * @param float $angle Angle oriented (anti-clockwise). Default value: 0.
+               * @param boolean $draw_circle Draw inscribed circle or not. Default value: false.
+               * @param string $style Style of rendering. Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $line_style Line style of polygon sides. Array with keys among the following:
+               * <ul>
+               *        <li>all: Line style of all sides. Array like for {@link SetLineStyle SetLineStyle}.</li>
+               *        <li>0 to ($ns - 1): Line style of each side. Array like for {@link SetLineStyle SetLineStyle}.</li>
+               * </ul>
+               * If a key is not present or is null, not draws the side. Default value is default line style (empty array).
+               * @param array $fill_color Fill color. Format: array(red, green, blue). Default value: default color (empty array).
+               * @param string $circle_style Style of rendering of inscribed circle (if draws). Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $circle_outLine_style Line style of inscribed circle (if draws). Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).
+               * @param array $circle_fill_color Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array).
+               * @access public
+               * @since 2.1.000 (2008-01-08)
+               */
+               public function RegularPolygon($x0, $y0, $r, $ns, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) {
+                       if (3 > $ns) {
+                               $ns = 3;
+                       }
+                       if ($draw_circle) {
+                               $this->Circle($x0, $y0, $r, 0, 360, $circle_style, $circle_outLine_style, $circle_fill_color);
+                       }
+                       $p = array();
+                       for ($i = 0; $i < $ns; ++$i) {
+                               $a = $angle + ($i * 360 / $ns);
+                               $a_rad = deg2rad((float) $a);
+                               $p[] = $x0 + ($r * sin($a_rad));
+                               $p[] = $y0 + ($r * cos($a_rad));
+                       }
+                       $this->Polygon($p, $style, $line_style, $fill_color);
+               }
+               
+               /**
+               * Draws a star polygon
+               * @param float $x0 Abscissa of center point.
+               * @param float $y0 Ordinate of center point.
+               * @param float $r Radius of inscribed circle.
+               * @param integer $nv Number of vertices.
+               * @param integer $ng Number of gap (if ($ng % $nv = 1) then is a regular polygon).
+               * @param float $angle: Angle oriented (anti-clockwise). Default value: 0.
+               * @param boolean $draw_circle: Draw inscribed circle or not. Default value is false.
+               * @param string $style Style of rendering. Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $line_style Line style of polygon sides. Array with keys among the following:
+               * <ul>
+               *        <li>all: Line style of all sides. Array like for
+               * {@link SetLineStyle SetLineStyle}.</li>
+               *        <li>0 to (n - 1): Line style of each side. Array like for {@link SetLineStyle SetLineStyle}.</li>
+               * </ul>
+               * If a key is not present or is null, not draws the side. Default value is default line style (empty array).
+               * @param array $fill_color Fill color. Format: array(red, green, blue). Default value: default color (empty array).
+               * @param string $circle_style Style of rendering of inscribed circle (if draws). Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $circle_outLine_style Line style of inscribed circle (if draws). Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).
+               * @param array $circle_fill_color Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array).
+               * @access public
+               * @since 2.1.000 (2008-01-08)
+               */
+               public function StarPolygon($x0, $y0, $r, $nv, $ng, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) {
+                       if ($nv < 2) {
+                               $nv = 2;
+                       }
+                       if ($draw_circle) {
+                               $this->Circle($x0, $y0, $r, 0, 360, $circle_style, $circle_outLine_style, $circle_fill_color);
+                       }
+                       $p2 = array();
+                       $visited = array();
+                       for ($i = 0; $i < $nv; ++$i) {
+                               $a = $angle + ($i * 360 / $nv);
+                               $a_rad = deg2rad((float) $a);
+                               $p2[] = $x0 + ($r * sin($a_rad));
+                               $p2[] = $y0 + ($r * cos($a_rad));
+                               $visited[] = false;
+                       }
+                       $p = array();
+                       $i = 0;
+                       do {
+                               $p[] = $p2[$i * 2];
+                               $p[] = $p2[($i * 2) + 1];
+                               $visited[$i] = true;
+                               $i += $ng;
+                               $i %= $nv;
+                       } while (!$visited[$i]);
+                       $this->Polygon($p, $style, $line_style, $fill_color);
+               }
+               
+               /**
+               * Draws a rounded rectangle.
+               * @param float $x Abscissa of upper-left corner.
+               * @param float $y Ordinate of upper-left corner.
+               * @param float $w Width.
+               * @param float $h Height.
+               * @param float $r Radius of the rounded corners.
+               * @param string $round_corner Draws rounded corner or not. String with a 0 (not rounded i-corner) or 1 (rounded i-corner) in i-position. Positions are, in order and begin to 0: top left, top right, bottom right and bottom left. Default value: all rounded corner ("1111").
+               * @param string $style Style of rendering. Possible values are:
+               * <ul>
+               *        <li>D or empty string: Draw (default).</li>
+               *        <li>F: Fill.</li>
+               *        <li>DF or FD: Draw and fill.</li>
+               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
+               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
+               * </ul>
+               * @param array $border_style Border style of rectangle. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).
+               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).
+               * @access public
+               * @since 2.1.000 (2008-01-08)
+               */
+               public function RoundedRect($x, $y, $w, $h, $r, $round_corner='1111', $style='', $border_style=array(), $fill_color=array()) {
+                       if ('0000' == $round_corner) { // Not rounded
+                               $this->Rect($x, $y, $w, $h, $style, $border_style, $fill_color);
+                       } else { // Rounded
+                               if (!(false === strpos($style, 'F')) AND isset($fill_color)) {
+                                       $this->SetFillColorArray($fill_color);
+                               }
+                               switch ($style) {
+                                       case 'F': {
+                                               $border_style = array();
+                                               $op = 'f';
+                                               break;
+                                       }
+                                       case 'FD': 
+                                       case 'DF': {
+                                               $op = 'B';
+                                               break;
+                                       }
+                                       case 'CNZ': {
+                                               $op = 'W n';
+                                               break;
+                                       }
+                                       case 'CEO': {
+                                               $op = 'W* n';
+                                               break;
+                                       }
+                                       default: {
+                                               $op = 'S';
+                                               break;
+                                       }
+                               }
+                               if ($border_style) {
+                                       $this->SetLineStyle($border_style);
+                               }
+                               $MyArc = 4 / 3 * (sqrt(2) - 1);
+                               $this->_outPoint($x + $r, $y);
+                               $xc = $x + $w - $r;
+                               $yc = $y + $r;
+                               $this->_outLine($xc, $y);
+                               if ($round_corner[0]) {
+                                       $this->_outCurve($xc + ($r * $MyArc), $yc - $r, $xc + $r, $yc - ($r * $MyArc), $xc + $r, $yc);
+                               } else {
+                                       $this->_outLine($x + $w, $y);
+                               }
+                               $xc = $x + $w - $r;
+                               $yc = $y + $h - $r;
+                               $this->_outLine($x + $w, $yc);
+                               if ($round_corner[1]) {
+                                       $this->_outCurve($xc + $r, $yc + ($r * $MyArc), $xc + ($r * $MyArc), $yc + $r, $xc, $yc + $r);
+                               } else {
+                                       $this->_outLine($x + $w, $y + $h);
+                               }
+                               $xc = $x + $r;
+                               $yc = $y + $h - $r;
+                               $this->_outLine($xc, $y + $h);
+                               if ($round_corner[2]) {
+                                       $this->_outCurve($xc - ($r * $MyArc), $yc + $r, $xc - $r, $yc + ($r * $MyArc), $xc - $r, $yc);
+                               } else {
+                                       $this->_outLine($x, $y + $h);
+                               }
+                               $xc = $x + $r;
+                               $yc = $y + $r;
+                               $this->_outLine($x, $yc);
+                               if ($round_corner[3]) {
+                                       $this->_outCurve($xc - $r, $yc - ($r * $MyArc), $xc - ($r * $MyArc), $yc - $r, $xc, $yc - $r);
+                               } else {
+                                       $this->_outLine($x, $y);
+                                       $this->_outLine($x + $r, $y);
+                               }
+                               $this->_out($op);
+                       }
+               }
+               
+               /**
+               * Draws a grahic arrow.
+               * @parameter float $x0 Abscissa of first point.
+               * @parameter float $y0 Ordinate of first point.
+               * @parameter float $x0 Abscissa of second point.
+               * @parameter float $y1 Ordinate of second point.
+               * @parameter int $head_style (0 = draw only arrowhead arms, 1 = draw closed arrowhead, but no fill, 2 = closed and filled arrowhead, 3 = filled arrowhead)
+               * @parameter float $arm_size length of arrowhead arms
+               * @parameter int $arm_angle angle between an arm and the shaft
+               * @author Piotr Galecki, Nicola Asuni, Andy Meier
+               * @since 4.6.018 (2009-07-10)
+               */
+               public function Arrow($x0, $y0, $x1, $y1, $head_style=0, $arm_size=5, $arm_angle=15) {
+                       // getting arrow direction angle
+                       // 0 deg angle is when both arms go along X axis. angle grows clockwise.
+                       $dir_angle = rad2deg(atan2(($y0 - $y1), ($x0 - $x1)));
+                       $sx1 = $x1;
+                       $sy1 = $y1;
+                       if ($head_style > 0) {
+                               // calculate the stopping point for the arrow shaft
+                               $sx1 = $x1 + (($arm_size - $this->LineWidth) * cos(deg2rad($dir_angle)));
+                               $sy1 = $y1 + (($arm_size - $this->LineWidth) * sin(deg2rad($dir_angle)));
+                       } 
+                       // main arrow line / shaft
+                       $this->Line($x0, $y0, $sx1, $sy1);
+                       // left arrowhead arm tip
+                       $x2L = $x1 + ($arm_size * cos(deg2rad($dir_angle + $arm_angle)));
+                       $y2L = $y1 + ($arm_size * sin(deg2rad($dir_angle + $arm_angle)));
+                       // right arrowhead arm tip
+                       $x2R = $x1 + ($arm_size * cos(deg2rad($dir_angle - $arm_angle)));
+                       $y2R = $y1 + ($arm_size * sin(deg2rad($dir_angle - $arm_angle)));
+                       $mode = 'D';
+                       $style = array();
+                       switch ($head_style) {
+                               case 0: {
+                                       // draw only arrowhead arms
+                                       $mode = 'D';
+                                       $style = array(1, 1, 0);
+                                       break;
+                               }
+                               case 1: {
+                                       // draw closed arrowhead, but no fill
+                                       $mode = 'D';
+                                       break;
+                               }
+                               case 2: {
+                                       // closed and filled arrowhead
+                                       $mode = 'DF';
+                                       break;
+                               }
+                               case 3: {
+                                       // filled arrowhead
+                                       $mode = 'F';
+                                       break;
+                               }
+                       }
+                       $this->Polygon(array($x2L, $y2L, $x1, $y1, $x2R, $y2R), $mode, $style, array());
+               }
+               
+               // END GRAPHIC FUNCTIONS SECTION -----------------------
+               
+               // BIDIRECTIONAL TEXT SECTION --------------------------
+               /**
+                * Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
+                * @param string $str string to manipulate.
+                * @param bool $forcertl if 'R' forces RTL, if 'L' forces LTR
+                * @return string
+                * @access protected
+                * @author Nicola Asuni
+                * @since 2.1.000 (2008-01-08)
+               */
+               protected function utf8StrRev($str, $setbom=false, $forcertl=false) {
+                       return $this->arrUTF8ToUTF16BE($this->utf8Bidi($this->UTF8StringToArray($str), $str, $forcertl), $setbom);
+               }
+               
+               /**
+                * Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
+                * @param array $ta array of characters composing the string.
+                * @param string $str string to process
+                * @param bool $forcertl if 'R' forces RTL, if 'L' forces LTR
+                * @return string
+                * @author Nicola Asuni
+                * @access protected
+                * @since 2.4.000 (2008-03-06)
+               */
+               protected function utf8Bidi($ta, $str='', $forcertl=false) {
+                       global $unicode, $unicode_mirror, $unicode_arlet, $laa_array, $diacritics;
+                       // paragraph embedding level
+                       $pel = 0;
+                       // max level
+                       $maxlevel = 0;
+                       if ($this->empty_string($str)) {
+                               // create string from array
+                               $str = $this->UTF8ArrSubString($ta);
+                       }
+                       // check if string contains arabic text
+                       if (preg_match(K_RE_PATTERN_ARABIC, $str)) {
+                               $arabic = true;
+                       } else {
+                               $arabic = false;
+                       }
+                       // check if string contains RTL text
+                       if (!($forcertl OR $arabic OR preg_match(K_RE_PATTERN_RTL, $str))) {
+                               return $ta;
+                       }
+                       
+                       // get number of chars
+                       $numchars = count($ta);
+                       
+                       if ($forcertl == 'R') {
+                               $pel = 1;
+                       } elseif ($forcertl == 'L') {
+                               $pel = 0;
+                       } else {
+                               // P2. In each paragraph, find the first character of type L, AL, or R.
+                               // P3. If a character is found in P2 and it is of type AL or R, then set the paragraph embedding level to one; otherwise, set it to zero.
+                               for ($i=0; $i < $numchars; ++$i) {
+                                       $type = $unicode[$ta[$i]];
+                                       if ($type == 'L') {
+                                               $pel = 0;
+                                               break;
+                                       } elseif (($type == 'AL') OR ($type == 'R')) {
+                                               $pel = 1;
+                                               break;
+                                       }
+                               }
+                       }
+                       
+                       // Current Embedding Level
+                       $cel = $pel;
+                       // directional override status
+                       $dos = 'N';
+                       $remember = array();
+                       // start-of-level-run
+                       $sor = $pel % 2 ? 'R' : 'L';
+                       $eor = $sor;
+                       
+                       // Array of characters data
+                       $chardata = Array();
+                       
+                       // X1. Begin by setting the current embedding level to the paragraph embedding level. Set the directional override status to neutral. Process each character iteratively, applying rules X2 through X9. Only embedding levels from 0 to 61 are valid in this phase.
+                       //      In the resolution of levels in rules I1 and I2, the maximum embedding level of 62 can be reached.
+                       for ($i=0; $i < $numchars; ++$i) {
+                               if ($ta[$i] == K_RLE) {
+                                       // X2. With each RLE, compute the least greater odd embedding level.
+                                       //      a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to neutral.
+                                       //      b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status.
+                                       $next_level = $cel + ($cel % 2) + 1;
+                                       if ($next_level < 62) {
+                                               $remember[] = array('num' => K_RLE, 'cel' => $cel, 'dos' => $dos);
+                                               $cel = $next_level;
+                                               $dos = 'N';
+                                               $sor = $eor;
+                                               $eor = $cel % 2 ? 'R' : 'L';
+                                       }
+                               } elseif ($ta[$i] == K_LRE) {
+                                       // X3. With each LRE, compute the least greater even embedding level.
+                                       //      a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to neutral.
+                                       //      b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status.
+                                       $next_level = $cel + 2 - ($cel % 2);
+                                       if ( $next_level < 62 ) {
+                                               $remember[] = array('num' => K_LRE, 'cel' => $cel, 'dos' => $dos);
+                                               $cel = $next_level;
+                                               $dos = 'N';
+                                               $sor = $eor;
+                                               $eor = $cel % 2 ? 'R' : 'L';
+                                       }
+                               } elseif ($ta[$i] == K_RLO) {
+                                       // X4. With each RLO, compute the least greater odd embedding level.
+                                       //      a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to right-to-left.
+                                       //      b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status.
+                                       $next_level = $cel + ($cel % 2) + 1;
+                                       if ($next_level < 62) {
+                                               $remember[] = array('num' => K_RLO, 'cel' => $cel, 'dos' => $dos);
+                                               $cel = $next_level;
+                                               $dos = 'R';
+                                               $sor = $eor;
+                                               $eor = $cel % 2 ? 'R' : 'L';
+                                       }
+                               } elseif ($ta[$i] == K_LRO) {
+                                       // X5. With each LRO, compute the least greater even embedding level.
+                                       //      a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to left-to-right.
+                                       //      b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status.
+                                       $next_level = $cel + 2 - ($cel % 2);
+                                       if ( $next_level < 62 ) {
+                                               $remember[] = array('num' => K_LRO, 'cel' => $cel, 'dos' => $dos);
+                                               $cel = $next_level;
+                                               $dos = 'L';
+                                               $sor = $eor;
+                                               $eor = $cel % 2 ? 'R' : 'L';
+                                       }
+                               } elseif ($ta[$i] == K_PDF) {
+                                       // X7. With each PDF, determine the matching embedding or override code. If there was a valid matching code, restore (pop) the last remembered (pushed) embedding level and directional override.
+                                       if (count($remember)) {
+                                               $last = count($remember ) - 1;
+                                               if (($remember[$last]['num'] == K_RLE) OR 
+                                                         ($remember[$last]['num'] == K_LRE) OR 
+                                                         ($remember[$last]['num'] == K_RLO) OR 
+                                                         ($remember[$last]['num'] == K_LRO)) {
+                                                       $match = array_pop($remember);
+                                                       $cel = $match['cel'];
+                                                       $dos = $match['dos'];
+                                                       $sor = $eor;
+                                                       $eor = ($cel > $match['cel'] ? $cel : $match['cel']) % 2 ? 'R' : 'L';
+                                               }
+                                       }
+                               } elseif (($ta[$i] != K_RLE) AND
+                                                                ($ta[$i] != K_LRE) AND
+                                                                ($ta[$i] != K_RLO) AND
+                                                                ($ta[$i] != K_LRO) AND
+                                                                ($ta[$i] != K_PDF)) {
+                                       // X6. For all types besides RLE, LRE, RLO, LRO, and PDF:
+                                       //      a. Set the level of the current character to the current embedding level.
+                                       //      b. Whenever the directional override status is not neutral, reset the current character type to the directional override status.
+                                       if ($dos != 'N') {
+                                               $chardir = $dos;
+                                       } else {
+                                               if (isset($unicode[$ta[$i]])) {
+                                                       $chardir = $unicode[$ta[$i]];
+                                               } else {
+                                                       $chardir = 'L';
+                                               }
+                                       }
+                                       // stores string characters and other information
+                                       $chardata[] = array('char' => $ta[$i], 'level' => $cel, 'type' => $chardir, 'sor' => $sor, 'eor' => $eor);
+                               }
+                       } // end for each char
+                       
+                       // X8. All explicit directional embeddings and overrides are completely terminated at the end of each paragraph. Paragraph separators are not included in the embedding.
+                       // X9. Remove all RLE, LRE, RLO, LRO, PDF, and BN codes.
+                       // X10. The remaining rules are applied to each run of characters at the same level. For each run, determine the start-of-level-run (sor) and end-of-level-run (eor) type, either L or R. This depends on the higher of the two levels on either side of the boundary (at the start or end of the paragraph, the level of the 'other' run is the base embedding level). If the higher level is odd, the type is R; otherwise, it is L.
+                       
+                       // 3.3.3 Resolving Weak Types
+                       // Weak types are now resolved one level run at a time. At level run boundaries where the type of the character on the other side of the boundary is required, the type assigned to sor or eor is used.
+                       // Nonspacing marks are now resolved based on the previous characters.
+                       $numchars = count($chardata);
+                       
+                       // W1. Examine each nonspacing mark (NSM) in the level run, and change the type of the NSM to the type of the previous character. If the NSM is at the start of the level run, it will get the type of sor.
+                       $prevlevel = -1; // track level changes
+                       $levcount = 0; // counts consecutive chars at the same level
+                       for ($i=0; $i < $numchars; ++$i) {
+                               if ($chardata[$i]['type'] == 'NSM') {
+                                       if ($levcount) {
+                                               $chardata[$i]['type'] = $chardata[$i]['sor'];
+                                       } elseif ($i > 0) {
+                                               $chardata[$i]['type'] = $chardata[($i-1)]['type'];
+                                       }
+                               }
+                               if ($chardata[$i]['level'] != $prevlevel) {
+                                       $levcount = 0;
+                               } else {
+                                       ++$levcount;
+                               }
+                               $prevlevel = $chardata[$i]['level'];
+                       }
+                       
+                       // W2. Search backward from each instance of a European number until the first strong type (R, L, AL, or sor) is found. If an AL is found, change the type of the European number to Arabic number.
+                       $prevlevel = -1;
+                       $levcount = 0;
+                       for ($i=0; $i < $numchars; ++$i) {
+                               if ($chardata[$i]['char'] == 'EN') {
+                                       for ($j=$levcount; $j >= 0; $j--) {
+                                               if ($chardata[$j]['type'] == 'AL') {
+                                                       $chardata[$i]['type'] = 'AN';
+                                               } elseif (($chardata[$j]['type'] == 'L') OR ($chardata[$j]['type'] == 'R')) {
+                                                       break;
+                                               }
+                                       }
+                               }
+                               if ($chardata[$i]['level'] != $prevlevel) {
+                                       $levcount = 0;
+                               } else {
+                                       ++$levcount;
+                               }
+                               $prevlevel = $chardata[$i]['level'];
+                       }
+                       
+                       // W3. Change all ALs to R.
+                       for ($i=0; $i < $numchars; ++$i) {
+                               if ($chardata[$i]['type'] == 'AL') {
+                                       $chardata[$i]['type'] = 'R';
+                               } 
+                       }
+                       
+                       // W4. A single European separator between two European numbers changes to a European number. A single common separator between two numbers of the same type changes to that type.
+                       $prevlevel = -1;
+                       $levcount = 0;
+                       for ($i=0; $i < $numchars; ++$i) {
+                               if (($levcount > 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) {
+                                       if (($chardata[$i]['type'] == 'ES') AND ($chardata[($i-1)]['type'] == 'EN') AND ($chardata[($i+1)]['type'] == 'EN')) {
+                                               $chardata[$i]['type'] = 'EN';
+                                       } elseif (($chardata[$i]['type'] == 'CS') AND ($chardata[($i-1)]['type'] == 'EN') AND ($chardata[($i+1)]['type'] == 'EN')) {
+                                               $chardata[$i]['type'] = 'EN';
+                                       } elseif (($chardata[$i]['type'] == 'CS') AND ($chardata[($i-1)]['type'] == 'AN') AND ($chardata[($i+1)]['type'] == 'AN')) {
+                                               $chardata[$i]['type'] = 'AN';
+                                       }
+                               }
+                               if ($chardata[$i]['level'] != $prevlevel) {
+                                       $levcount = 0;
+                               } else {
+                                       ++$levcount;
+                               }
+                               $prevlevel = $chardata[$i]['level'];
+                       }
+                       
+                       // W5. A sequence of European terminators adjacent to European numbers changes to all European numbers.
+                       $prevlevel = -1;
+                       $levcount = 0;
+                       for ($i=0; $i < $numchars; ++$i) {
+                               if ($chardata[$i]['type'] == 'ET') {
+                                       if (($levcount > 0) AND ($chardata[($i-1)]['type'] == 'EN')) {
+                                               $chardata[$i]['type'] = 'EN';
+                                       } else {
+                                               $j = $i+1;
+                                               while (($j < $numchars) AND ($chardata[$j]['level'] == $prevlevel)) {
+                                                       if ($chardata[$j]['type'] == 'EN') {
+                                                               $chardata[$i]['type'] = 'EN';
+                                                               break;
+                                                       } elseif ($chardata[$j]['type'] != 'ET') {
+                                                               break;
+                                                       }
+                                                       ++$j;
+                                               }
+                                       }
+                               }
+                               if ($chardata[$i]['level'] != $prevlevel) {
+                                       $levcount = 0;
+                               } else {
+                                       ++$levcount;
+                               }
+                               $prevlevel = $chardata[$i]['level'];
+                       }
+                       
+                       // W6. Otherwise, separators and terminators change to Other Neutral.
+                       $prevlevel = -1;
+                       $levcount = 0;
+                       for ($i=0; $i < $numchars; ++$i) {
+                               if (($chardata[$i]['type'] == 'ET') OR ($chardata[$i]['type'] == 'ES') OR ($chardata[$i]['type'] == 'CS')) {
+                                       $chardata[$i]['type'] = 'ON';
+                               }
+                               if ($chardata[$i]['level'] != $prevlevel) {
+                                       $levcount = 0;
+                               } else {
+                                       ++$levcount;
+                               }
+                               $prevlevel = $chardata[$i]['level'];
+                       }
+                       
+                       //W7. Search backward from each instance of a European number until the first strong type (R, L, or sor) is found. If an L is found, then change the type of the European number to L.
+                       $prevlevel = -1;
+                       $levcount = 0;
+                       for ($i=0; $i < $numchars; ++$i) {
+                               if ($chardata[$i]['char'] == 'EN') {
+                                       for ($j=$levcount; $j >= 0; $j--) {
+                                               if ($chardata[$j]['type'] == 'L') {
+                                                       $chardata[$i]['type'] = 'L';
+                                               } elseif ($chardata[$j]['type'] == 'R') {
+                                                       break;
+                                               }
+                                       }
+                               }
+                               if ($chardata[$i]['level'] != $prevlevel) {
+                                       $levcount = 0;
+                               } else {
+                                       ++$levcount;
+                               }
+                               $prevlevel = $chardata[$i]['level'];
+                       }
+                       
+                       // N1. A sequence of neutrals takes the direction of the surrounding strong text if the text on both sides has the same direction. European and Arabic numbers act as if they were R in terms of their influence on neutrals. Start-of-level-run (sor) and end-of-level-run (eor) are used at level run boundaries.
+                       $prevlevel = -1;
+                       $levcount = 0;
+                       for ($i=0; $i < $numchars; ++$i) {
+                               if (($levcount > 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) {
+                                       if (($chardata[$i]['type'] == 'N') AND ($chardata[($i-1)]['type'] == 'L') AND ($chardata[($i+1)]['type'] == 'L')) {
+                                               $chardata[$i]['type'] = 'L';
+                                       } elseif (($chardata[$i]['type'] == 'N') AND
+                                        (($chardata[($i-1)]['type'] == 'R') OR ($chardata[($i-1)]['type'] == 'EN') OR ($chardata[($i-1)]['type'] == 'AN')) AND
+                                        (($chardata[($i+1)]['type'] == 'R') OR ($chardata[($i+1)]['type'] == 'EN') OR ($chardata[($i+1)]['type'] == 'AN'))) {
+                                               $chardata[$i]['type'] = 'R';
+                                       } elseif ($chardata[$i]['type'] == 'N') {
+                                               // N2. Any remaining neutrals take the embedding direction
+                                               $chardata[$i]['type'] = $chardata[$i]['sor'];
+                                       }
+                               } elseif (($levcount == 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) {
+                                       // first char
+                                       if (($chardata[$i]['type'] == 'N') AND ($chardata[$i]['sor'] == 'L') AND ($chardata[($i+1)]['type'] == 'L')) {
+                                               $chardata[$i]['type'] = 'L';
+                                       } elseif (($chardata[$i]['type'] == 'N') AND
+                                        (($chardata[$i]['sor'] == 'R') OR ($chardata[$i]['sor'] == 'EN') OR ($chardata[$i]['sor'] == 'AN')) AND
+                                        (($chardata[($i+1)]['type'] == 'R') OR ($chardata[($i+1)]['type'] == 'EN') OR ($chardata[($i+1)]['type'] == 'AN'))) {
+                                               $chardata[$i]['type'] = 'R';
+                                       } elseif ($chardata[$i]['type'] == 'N') {
+                                               // N2. Any remaining neutrals take the embedding direction
+                                               $chardata[$i]['type'] = $chardata[$i]['sor'];
+                                       }
+                               } elseif (($levcount > 0) AND ((($i+1) == $numchars) OR (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] != $prevlevel))) {
+                                       //last char
+                                       if (($chardata[$i]['type'] == 'N') AND ($chardata[($i-1)]['type'] == 'L') AND ($chardata[$i]['eor'] == 'L')) {
+                                               $chardata[$i]['type'] = 'L';
+                                       } elseif (($chardata[$i]['type'] == 'N') AND
+                                        (($chardata[($i-1)]['type'] == 'R') OR ($chardata[($i-1)]['type'] == 'EN') OR ($chardata[($i-1)]['type'] == 'AN')) AND
+                                        (($chardata[$i]['eor'] == 'R') OR ($chardata[$i]['eor'] == 'EN') OR ($chardata[$i]['eor'] == 'AN'))) {
+                                               $chardata[$i]['type'] = 'R';
+                                       } elseif ($chardata[$i]['type'] == 'N') {
+                                               // N2. Any remaining neutrals take the embedding direction
+                                               $chardata[$i]['type'] = $chardata[$i]['sor'];
+                                       }
+                               } elseif ($chardata[$i]['type'] == 'N') {
+                                       // N2. Any remaining neutrals take the embedding direction
+                                       $chardata[$i]['type'] = $chardata[$i]['sor'];
+                               }
+                               if ($chardata[$i]['level'] != $prevlevel) {
+                                       $levcount = 0;
+                               } else {
+                                       ++$levcount;
+                               }
+                               $prevlevel = $chardata[$i]['level'];
+                       }
+                       
+                       // I1. For all characters with an even (left-to-right) embedding direction, those of type R go up one level and those of type AN or EN go up two levels.
+                       // I2. For all characters with an odd (right-to-left) embedding direction, those of type L, EN or AN go up one level.
+                       for ($i=0; $i < $numchars; ++$i) {
+                               $odd = $chardata[$i]['level'] % 2;
+                               if ($odd) {
+                                       if (($chardata[$i]['type'] == 'L') OR ($chardata[$i]['type'] == 'AN') OR ($chardata[$i]['type'] == 'EN')) {
+                                               $chardata[$i]['level'] += 1;
+                                       }
+                               } else {
+                                       if ($chardata[$i]['type'] == 'R') {
+                                               $chardata[$i]['level'] += 1;
+                                       } elseif (($chardata[$i]['type'] == 'AN') OR ($chardata[$i]['type'] == 'EN')) {
+                                               $chardata[$i]['level'] += 2;
+                                       }
+                               }
+                               $maxlevel = max($chardata[$i]['level'],$maxlevel);
+                       }
+                       
+                       // L1. On each line, reset the embedding level of the following characters to the paragraph embedding level:
+                       //      1. Segment separators,
+                       //      2. Paragraph separators,
+                       //      3. Any sequence of whitespace characters preceding a segment separator or paragraph separator, and
+                       //      4. Any sequence of white space characters at the end of the line.
+                       for ($i=0; $i < $numchars; ++$i) {
+                               if (($chardata[$i]['type'] == 'B') OR ($chardata[$i]['type'] == 'S')) {
+                                       $chardata[$i]['level'] = $pel;
+                               } elseif ($chardata[$i]['type'] == 'WS') {
+                                       $j = $i+1;
+                                       while ($j < $numchars) {
+                                               if ((($chardata[$j]['type'] == 'B') OR ($chardata[$j]['type'] == 'S')) OR
+                                                       (($j == ($numchars-1)) AND ($chardata[$j]['type'] == 'WS'))) {
+                                                       $chardata[$i]['level'] = $pel;
+                                                       break;
+                                               } elseif ($chardata[$j]['type'] != 'WS') {
+                                                       break;
+                                               }
+                                               ++$j;
+                                       }
+                               }
+                       }
+                       
+                       // Arabic Shaping
+                       // Cursively connected scripts, such as Arabic or Syriac, require the selection of positional character shapes that depend on adjacent characters. Shaping is logically applied after the Bidirectional Algorithm is used and is limited to characters within the same directional run. 
+                       if ($arabic) {
+                               $endedletter = array(1569,1570,1571,1572,1573,1575,1577,1583,1584,1585,1586,1608,1688);
+                               $alfletter = array(1570,1571,1573,1575);
+                               $chardata2 = $chardata;
+                               $laaletter = false;
+                               $charAL = array();
+                               $x = 0;
+                               for ($i=0; $i < $numchars; ++$i) {
+                                       if (($unicode[$chardata[$i]['char']] == 'AL') OR ($chardata[$i]['char'] == 32) OR ($chardata[$i]['char'] == 8204)) {
+                                               $charAL[$x] = $chardata[$i];
+                                               $charAL[$x]['i'] = $i;
+                                               $chardata[$i]['x'] = $x;
+                                               ++$x;
+                                       }
+                               }
+                               $numAL = $x;
+                               for ($i=0; $i < $numchars; ++$i) {
+                                       $thischar = $chardata[$i];
+                                       if ($i > 0) {
+                                               $prevchar = $chardata[($i-1)];
+                                       } else {
+                                               $prevchar = false;
+                                       }
+                                       if (($i+1) < $numchars) {
+                                               $nextchar = $chardata[($i+1)];
+                                       } else {
+                                               $nextchar = false;
+                                       }
+                                       if ($unicode[$thischar['char']] == 'AL') {
+                                               $x = $thischar['x'];
+                                               if ($x > 0) {
+                                                       $prevchar = $charAL[($x-1)];
+                                               } else {
+                                                       $prevchar = false;
+                                               }
+                                               if (($x+1) < $numAL) {
+                                                       $nextchar = $charAL[($x+1)];
+                                               } else {
+                                                       $nextchar = false;
+                                               }
+                                               // if laa letter
+                                               if (($prevchar !== false) AND ($prevchar['char'] == 1604) AND (in_array($thischar['char'], $alfletter))) {
+                                                       $arabicarr = $laa_array;
+                                                       $laaletter = true;
+                                                       if ($x > 1) {
+                                                               $prevchar = $charAL[($x-2)];
+                                                       } else {
+                                                               $prevchar = false;
+                                                       }
+                                               } else {
+                                                       $arabicarr = $unicode_arlet;
+                                                       $laaletter = false;
+                                               }
+                                               if (($prevchar !== false) AND ($nextchar !== false) AND
+                                                       (($unicode[$prevchar['char']] == 'AL') OR ($unicode[$prevchar['char']] == 'NSM')) AND
+                                                       (($unicode[$nextchar['char']] == 'AL') OR ($unicode[$nextchar['char']] == 'NSM')) AND
+                                                       ($prevchar['type'] == $thischar['type']) AND
+                                                       ($nextchar['type'] == $thischar['type']) AND
+                                                       ($nextchar['char'] != 1567)) {
+                                                       if (in_array($prevchar['char'], $endedletter)) {
+                                                               if (isset($arabicarr[$thischar['char']][2])) {
+                                                                       // initial
+                                                                       $chardata2[$i]['char'] = $arabicarr[$thischar['char']][2];
+                                                               }
+                                                       } else {
+                                                               if (isset($arabicarr[$thischar['char']][3])) {
+                                                                       // medial
+                                                                       $chardata2[$i]['char'] = $arabicarr[$thischar['char']][3];
+                                                               }
+                                                       }
+                                               } elseif (($nextchar !== false) AND
+                                                       (($unicode[$nextchar['char']] == 'AL') OR ($unicode[$nextchar['char']] == 'NSM')) AND
+                                                       ($nextchar['type'] == $thischar['type']) AND
+                                                       ($nextchar['char'] != 1567)) {
+                                                       if (isset($arabicarr[$chardata[$i]['char']][2])) {
+                                                               // initial
+                                                               $chardata2[$i]['char'] = $arabicarr[$thischar['char']][2];
+                                                       }
+                                               } elseif ((($prevchar !== false) AND
+                                                       (($unicode[$prevchar['char']] == 'AL') OR ($unicode[$prevchar['char']] == 'NSM')) AND
+                                                       ($prevchar['type'] == $thischar['type'])) OR
+                                                       (($nextchar !== false) AND ($nextchar['char'] == 1567))) {
+                                                       // final
+                                                       if (($i > 1) AND ($thischar['char'] == 1607) AND
+                                                               ($chardata[$i-1]['char'] == 1604) AND
+                                                               ($chardata[$i-2]['char'] == 1604)) {
+                                                               //Allah Word
+                                                               // mark characters to delete with false
+                                                               $chardata2[$i-2]['char'] = false;
+                                                               $chardata2[$i-1]['char'] = false; 
+                                                               $chardata2[$i]['char'] = 65010;
+                                                       } else {
+                                                               if (($prevchar !== false) AND in_array($prevchar['char'], $endedletter)) {
+                                                                       if (isset($arabicarr[$thischar['char']][0])) {
+                                                                               // isolated
+                                                                               $chardata2[$i]['char'] = $arabicarr[$thischar['char']][0];
+                                                                       }
+                                                               } else {
+                                                                       if (isset($arabicarr[$thischar['char']][1])) {
+                                                                               // final
+                                                                               $chardata2[$i]['char'] = $arabicarr[$thischar['char']][1];
+                                                                       }
+                                                               }
+                                                       }
+                                               } elseif (isset($arabicarr[$thischar['char']][0])) {
+                                                       // isolated
+                                                       $chardata2[$i]['char'] = $arabicarr[$thischar['char']][0];
+                                               }
+                                               // if laa letter
+                                               if ($laaletter) {
+                                                       // mark characters to delete with false
+                                                       $chardata2[($charAL[($x-1)]['i'])]['char'] = false;
+                                               }
+                                       } // end if AL (Arabic Letter)
+                               } // end for each char
+                               /* 
+                                * Combining characters that can occur with Shadda (0651 HEX, 1617 DEC) are placed in UE586-UE594. 
+                                * Putting the combining mark and shadda in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner.
+                                */
+                               $cw = &$this->CurrentFont['cw'];
+                               for ($i = 0; $i < ($numchars-1); ++$i) {
+                                       if (($chardata2[$i]['char'] == 1617) AND (isset($diacritics[($chardata2[$i+1]['char'])]))) {
+                                               // check if the subtitution font is defined on current font
+                                               if (isset($cw[($diacritics[($chardata2[$i+1]['char'])])])) {
+                                                       $chardata2[$i]['char'] = false;
+                                                       $chardata2[$i+1]['char'] = $diacritics[($chardata2[$i+1]['char'])];
+                                               }
+                                       }
+                               }
+                               // remove marked characters
+                               foreach ($chardata2 as $key => $value) {
+                                       if ($value['char'] === false) {
+                                               unset($chardata2[$key]);
+                                       }
+                               }
+                               $chardata = array_values($chardata2);
+                               $numchars = count($chardata);
+                               unset($chardata2);
+                               unset($arabicarr);
+                               unset($laaletter);
+                               unset($charAL);
+                       }
+                       
+                       // L2. From the highest level found in the text to the lowest odd level on each line, including intermediate levels not actually present in the text, reverse any contiguous sequence of characters that are at that level or higher.
+                       for ($j=$maxlevel; $j > 0; $j--) {
+                               $ordarray = Array();
+                               $revarr = Array();
+                               $onlevel = false;
+                               for ($i=0; $i < $numchars; ++$i) {
+                                       if ($chardata[$i]['level'] >= $j) {
+                                               $onlevel = true;
+                                               if (isset($unicode_mirror[$chardata[$i]['char']])) {
+                                                       // L4. A character is depicted by a mirrored glyph if and only if (a) the resolved directionality of that character is R, and (b) the Bidi_Mirrored property value of that character is true.
+                                                       $chardata[$i]['char'] = $unicode_mirror[$chardata[$i]['char']];
+                                               }
+                                               $revarr[] = $chardata[$i];
+                                       } else {
+                                               if ($onlevel) {
+                                                       $revarr = array_reverse($revarr);
+                                                       $ordarray = array_merge($ordarray, $revarr);
+                                                       $revarr = Array();
+                                                       $onlevel = false;
+                                               }
+                                               $ordarray[] = $chardata[$i];
+                                       }
+                               }
+                               if ($onlevel) {
+                                       $revarr = array_reverse($revarr);
+                                       $ordarray = array_merge($ordarray, $revarr);
+                               }
+                               $chardata = $ordarray;
+                       }
+                       
+                       $ordarray = array();
+                       for ($i=0; $i < $numchars; ++$i) {
+                               $ordarray[] = $chardata[$i]['char'];
+                       }
+                       
+                       return $ordarray;
+               }
+               
+               // END OF BIDIRECTIONAL TEXT SECTION -------------------
+               
+               /*
+               * Adds a bookmark.
+               * @param string $txt bookmark description.
+               * @param int $level bookmark level (minimum value is 0).
+               * @param float $y Ordinate of the boorkmark position (default = -1 = current position).
+               * @param int $page target page number (leave empty for current page).
+               * @access public
+               * @author Olivier Plathey, Nicola Asuni
+               * @since 2.1.002 (2008-02-12)
+               */
+               public function Bookmark($txt, $level=0, $y=-1, $page='') {
+                       if ($level < 0) {
+                               $level = 0;
+                       }
+                       if (isset($this->outlines[0])) {
+                               $lastoutline = end($this->outlines);
+                               $maxlevel = $lastoutline['l'] + 1;
+                       } else {
+                               $maxlevel = 0;
+                       }
+                       if ($level > $maxlevel) {
+                               $level = $maxlevel;
+                       }
+                       if ($y == -1) {
+                               $y = $this->GetY();
+                       }
+                       if (empty($page)) {
+                               $page = $this->PageNo();
+                       }
+                       $this->outlines[] = array('t' => $txt, 'l' => $level, 'y' => $y, 'p' => $page);
+               }
+               
+               /*
+               * Create a bookmark PDF string.
+               * @access protected
+               * @author Olivier Plathey, Nicola Asuni
+               * @since 2.1.002 (2008-02-12)
+               */
+               protected function _putbookmarks() {
+                       $nb = count($this->outlines);
+                       if ($nb == 0) {
+                               return;
+                       }
+                       // get sorting columns
+                       $outline_p = array();
+                       $outline_y = array();                   
+                       foreach ($this->outlines as $key => $row) {
+                               $outline_p[$key]  = $row['p'];
+                               $outline_y[$key] = $row['p'];
+                       }
+                       // sort outlines by page and y position
+                       array_multisort($outline_p, SORT_NUMERIC, SORT_ASC, $outline_y, SORT_NUMERIC, SORT_ASC, $this->outlines);                       
+                       $lru = array();
+                       $level = 0;
+                       foreach ($this->outlines as $i => $o) {
+                               if ($o['l'] > 0) {
+                                       $parent = $lru[($o['l'] - 1)];
+                                       //Set parent and last pointers
+                                       $this->outlines[$i]['parent'] = $parent;
+                                       $this->outlines[$parent]['last'] = $i;
+                                       if ($o['l'] > $level) {
+                                               //Level increasing: set first pointer
+                                               $this->outlines[$parent]['first'] = $i;
+                                       }
+                               } else {
+                                       $this->outlines[$i]['parent'] = $nb;
+                               }
+                               if (($o['l'] <= $level) AND ($i > 0)) {
+                                       //Set prev and next pointers
+                                       $prev = $lru[$o['l']];
+                                       $this->outlines[$prev]['next'] = $i;
+                                       $this->outlines[$i]['prev'] = $prev;
+                               }
+                               $lru[$o['l']] = $i;
+                               $level = $o['l'];
+                       }
+                       //Outline items
+                       $n = $this->n + 1;
+                       foreach ($this->outlines as $i => $o) {
+                               $this->_newobj();
+                               $this->_out('<</Title '.$this->_textstring($o['t']));
+                               $this->_out('/Parent '.($n + $o['parent']).' 0 R');
+                               if (isset($o['prev']))
+                               $this->_out('/Prev '.($n + $o['prev']).' 0 R');
+                               if (isset($o['next']))
+                               $this->_out('/Next '.($n + $o['next']).' 0 R');
+                               if (isset($o['first']))
+                               $this->_out('/First '.($n + $o['first']).' 0 R');
+                               if (isset($o['last']))
+                               $this->_out('/Last '.($n + $o['last']).' 0 R');
+                               $this->_out(sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]', (1 + (2 * $o['p'])), ($this->pagedim[$o['p']]['h'] - ($o['y'] * $this->k))));
+                               $this->_out('/Count 0>>');
+                               $this->_out('endobj');
+                       }
+                       //Outline root
+                       $this->_newobj();
+                       $this->OutlineRoot = $this->n;
+                       $this->_out('<</Type /Outlines /First '.$n.' 0 R');
+                       $this->_out('/Last '.($n + $lru[0]).' 0 R>>');
+                       $this->_out('endobj');
+               }
+               
+               // --- JAVASCRIPT ------------------------------------------------------
+               
+               /*
+               * Adds a javascript
+               * @param string $script Javascript code
+               * @access public
+               * @author Johannes Güntert, Nicola Asuni
+               * @since 2.1.002 (2008-02-12)
+               */
+               public function IncludeJS($script) {
+                       $this->javascript .= $script;
+               }
+
+               /*
+               * Adds a javascript object and return object ID
+               * @param string $script Javascript code
+               * @param boolean $onload if true executes this object when opening the document
+               * @return int internal object ID
+               * @access public
+               * @author Nicola Asuni
+               * @since 4.8.000 (2009-09-07)
+               */
+               public function addJavascriptObject($script, $onload=false) {
+                       ++$this->js_obj_id;
+                       $this->js_objects[$this->js_obj_id] = array('js' => $script, 'onload' => $onload);
+                       return $this->js_obj_id;
+               }
+
+               /*
+               * Create a javascript PDF string.
+               * @access protected
+               * @author Johannes Güntert, Nicola Asuni
+               * @since 2.1.002 (2008-02-12)
+               */
+               protected function _putjavascript() {
+                       if (empty($this->javascript) AND empty($this->js_objects)) {
+                               return;
                        }
-                       // restore graphic settings
-                       $this->setGraphicVars($gvars);
-                       // calculate footer lenght\r
-                       $this->footerlen[$this->page] = $this->pagelen[$this->page] - $this->footerpos[$this->page] + 1;\r
-               }\r
-
-               /**\r
-                * This method is used to render the table header on new page (if any). \r
-                * @access protected\r
-                * @since 4.5.030 (2009-03-25)\r
-                */\r
-               protected function setTableHeader() {
-                       if (isset($this->theadMargins['top'])) {
-                               // restore the original top-margin
-                               $this->tMargin = $this->theadMargins['top'];
-                               $this->pagedim[$this->page]['tm'] = $this->tMargin;
-                               $this->y = $this->tMargin;
+                       if (strpos($this->javascript, 'this.addField') > 0) {
+                               if (!$this->ur) {
+                                       //$this->setUserRights();
+                               }
+                               // the following two lines are used to avoid form fields duplication after saving
+                               // The addField method only works on Acrobat Writer, unless the document is signed with Adobe private key (UR3)
+                               $jsa = sprintf("ftcpdfdocsaved=this.addField('%s','%s',%d,[%.2F,%.2F,%.2F,%.2F]);", 'tcpdfdocsaved', 'text', 0, 0, 1, 0, 1);
+                               $jsb = "getField('tcpdfdocsaved').value='saved';";
+                               $this->javascript = $jsa."\n".$this->javascript."\n".$jsb;
                        }
-                       if (!$this->empty_string($this->thead)) {
-                               // set margins
-                               $prev_lMargin = $this->lMargin;
-                               $prev_rMargin = $this->rMargin;
-                               $this->lMargin = $this->pagedim[$this->page]['olm'];
-                               $this->rMargin = $this->pagedim[$this->page]['orm'];
-                               $this->cMargin = $this->theadMargins['cmargin'];
-                               // print table header
-                               $this->writeHTML($this->thead, false, false, false, false, '');
-                               // set new top margin to skip the table headers
-                               if (!isset($this->theadMargins['top'])) {
-                                       $this->theadMargins['top'] = $this->tMargin;
+                       $this->n_js = $this->_newobj();
+                       $this->_out('<<');
+                       $this->_out('/Names [');
+                       if (!empty($this->javascript)) {
+                               $this->_out('(EmbeddedJS) '.($this->n + 1).' 0 R');
+                       }
+                       if (!empty($this->js_objects)) {
+                               foreach ($this->js_objects as $key => $val) {
+                                       if ($val['onload']) {
+                                               $this->_out('(JS'.$key.') '.$key.' 0 R');
+                                       }
                                }
-                               $this->tMargin = $this->y;
-                               $this->pagedim[$this->page]['tm'] = $this->tMargin;
-                               $this->lasth = 0;
-                               $this->lMargin = $prev_lMargin;
-                               $this->rMargin = $prev_rMargin;
-                       }\r
-               }
-               \r
-               /**\r
-               * Returns the current page number.\r
-               * @return int page number\r
-               * @access public\r
-               * @since 1.0\r
-               * @see AliasNbPages(), getAliasNbPages()\r
-               */\r
-               public function PageNo() {\r
-                       return $this->page;\r
-               }
-
-               /**\r
-               * Defines a new spot color. \r
-               * It can be expressed in RGB components or gray scale. \r
-               * The method can be called before the first page is created and the value is retained from page to page.\r
-               * @param int $c Cyan color for CMYK. Value between 0 and 255\r
-               * @param int $m Magenta color for CMYK. Value between 0 and 255\r
-               * @param int $y Yellow color for CMYK. Value between 0 and 255\r
-               * @param int $k Key (Black) color for CMYK. Value between 0 and 255\r
-               * @access public\r
-               * @since 4.0.024 (2008-09-12)\r
-               * @see SetDrawSpotColor(), SetFillSpotColor(), SetTextSpotColor()\r
-               */\r
-               public function AddSpotColor($name, $c, $m, $y, $k) {
-                       if (!isset($this->spot_colors[$name])) {
-                               $i = 1 + count($this->spot_colors);
-                               $this->spot_colors[$name] = array('i' => $i, 'c' => $c, 'm' => $m, 'y' => $y, 'k' => $k);
                        }
+                       $this->_out(']');
+                       $this->_out('>>');
+                       $this->_out('endobj');
+                       // default Javascript object
+                       if (!empty($this->javascript)) {
+                               $this->_newobj();
+                               $this->_out('<<');
+                               $this->_out('/S /JavaScript');
+                               $this->_out('/JS '.$this->_textstring($this->javascript));
+                               $this->_out('>>');
+                               $this->_out('endobj');
+                       }
+                       // additional Javascript objects
+                       if (!empty($this->js_objects)) {
+                               foreach ($this->js_objects as $key => $val) {
+                                       $this->offsets[$key] = $this->bufferlen;
+                                       $this->_out($key.' 0 obj');
+                                       $this->_out('<<');
+                                       $this->_out('/S /JavaScript');
+                                       $this->_out('/JS '.$this->_textstring($val['js']));
+                                       $this->_out('>>');
+                                       $this->_out('endobj');
+                               }
+                       }                       
                }
-\r
-               /**\r
-               * Defines the color used for all drawing operations (lines, rectangles and cell borders). \r
-               * It can be expressed in RGB components or gray scale. \r
-               * The method can be called before the first page is created and the value is retained from page to page.\r
-               * @param array $color array of colors\r
-               * @access public\r
-               * @since 3.1.000 (2008-06-11)\r
-               * @see SetDrawColor()\r
-               */\r
-               public function SetDrawColorArray($color) {\r
-                       if (isset($color)) {\r
-                               $color = array_values($color);\r
-                               $r = isset($color[0]) ? $color[0] : -1;\r
-                               $g = isset($color[1]) ? $color[1] : -1;\r
-                               $b = isset($color[2]) ? $color[2] : -1;\r
-                               $k = isset($color[3]) ? $color[3] : -1;\r
-                               if ($r >= 0) {\r
-                                       $this->SetDrawColor($r, $g, $b, $k);\r
-                               }\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Defines the color used for all drawing operations (lines, rectangles and cell borders). It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.\r
-               * @param int $col1 Gray level for single color, or Red color for RGB, or Cyan color for CMYK. Value between 0 and 255\r
-               * @param int $col2 Green color for RGB, or Magenta color for CMYK. Value between 0 and 255\r
-               * @param int $col3 Blue color for RGB, or Yellow color for CMYK. Value between 0 and 255\r
-               * @param int $col4 Key (Black) color for CMYK. Value between 0 and 255\r
-               * @access public\r
-               * @since 1.3\r
-               * @see SetDrawColorArray(), SetFillColor(), SetTextColor(), Line(), Rect(), Cell(), MultiCell()\r
-               */\r
-               public function SetDrawColor($col1=0, $col2=-1, $col3=-1, $col4=-1) {\r
-                       // set default values\r
-                       if (!is_numeric($col1)) {\r
-                               $col1 = 0;\r
-                       }\r
-                       if (!is_numeric($col2)) {\r
-                               $col2 = -1;\r
-                       }\r
-                       if (!is_numeric($col3)) {\r
-                               $col3 = -1;\r
-                       }\r
-                       if (!is_numeric($col4)) {\r
-                               $col4 = -1;\r
-                       }\r
-                       //Set color for all stroking operations\r
-                       if (($col2 == -1) AND ($col3 == -1) AND ($col4 == -1)) {\r
-                               // Grey scale\r
-                               $this->DrawColor = sprintf('%.3F G', $col1/255);\r
-                       } elseif ($col4 == -1) {\r
-                               // RGB\r
-                               $this->DrawColor = sprintf('%.3F %.3F %.3F RG', $col1/255, $col2/255, $col3/255);\r
-                       } else {\r
-                               // CMYK\r
-                               $this->DrawColor = sprintf('%.3F %.3F %.3F %.3F K', $col1/100, $col2/100, $col3/100, $col4/100);\r
-                       }\r
-                       if ($this->page > 0) {\r
-                               $this->_out($this->DrawColor);\r
-                       }\r
-               }
-               \r
-               /**\r
-               * Defines the spot color used for all drawing operations (lines, rectangles and cell borders).\r
-               * @param string $name name of the spot color\r
-               * @param int $tint the intensity of the color (from 0 to 100 ; 100 = full intensity by default).\r
-               * @access public\r
-               * @since 4.0.024 (2008-09-12)\r
-               * @see AddSpotColor(), SetFillSpotColor(), SetTextSpotColor()\r
-               */\r
-               public function SetDrawSpotColor($name, $tint=100) {
-                       if (!isset($this->spot_colors[$name])) {
-                               $this->Error('Undefined spot color: '.$name);
+               
+               /*
+               * Convert color to javascript color.
+               * @param string $color color name or #RRGGBB
+               * @access protected
+               * @author Denis Van Nuffelen, Nicola Asuni
+               * @since 2.1.002 (2008-02-12)
+               */
+               protected function _JScolor($color) {
+                       static $aColors = array('transparent', 'black', 'white', 'red', 'green', 'blue', 'cyan', 'magenta', 'yellow', 'dkGray', 'gray', 'ltGray');
+                       if (substr($color,0,1) == '#') {
+                               return sprintf("['RGB',%.3F,%.3F,%.3F]", hexdec(substr($color,1,2))/255, hexdec(substr($color,3,2))/255, hexdec(substr($color,5,2))/255);
                        }
-                       $this->DrawColor = sprintf('/CS%d CS %.3F SCN', $this->spot_colors[$name]['i'], $tint/100);
-                       if ($this->page > 0) {\r
-                               $this->_out($this->DrawColor);\r
-                       }
-               }
-               \r
-               /**\r
-               * Defines the color used for all filling operations (filled rectangles and cell backgrounds). \r
-               * It can be expressed in RGB components or gray scale. \r
-               * The method can be called before the first page is created and the value is retained from page to page.\r
-               * @param array $color array of colors\r
-               * @access public\r
-               * @since 3.1.000 (2008-6-11)\r
-               * @see SetFillColor()\r
-               */\r
-               public function SetFillColorArray($color) {\r
-                       if (isset($color)) {\r
-                               $color = array_values($color);\r
-                               $r = isset($color[0]) ? $color[0] : -1;\r
-                               $g = isset($color[1]) ? $color[1] : -1;\r
-                               $b = isset($color[2]) ? $color[2] : -1;\r
-                               $k = isset($color[3]) ? $color[3] : -1;\r
-                               if ($r >= 0) {\r
-                                       $this->SetFillColor($r, $g, $b, $k);\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Defines the color used for all filling operations (filled rectangles and cell backgrounds). It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.\r
-               * @param int $col1 Gray level for single color, or Red color for RGB, or Cyan color for CMYK. Value between 0 and 255\r
-               * @param int $col2 Green color for RGB, or Magenta color for CMYK. Value between 0 and 255\r
-               * @param int $col3 Blue color for RGB, or Yellow color for CMYK. Value between 0 and 255\r
-               * @param int $col4 Key (Black) color for CMYK. Value between 0 and 255\r
-               * @access public\r
-               * @since 1.3\r
-               * @see SetFillColorArray(), SetDrawColor(), SetTextColor(), Rect(), Cell(), MultiCell()\r
-               */\r
-               public function SetFillColor($col1=0, $col2=-1, $col3=-1, $col4=-1) {\r
-                       // set default values\r
-                       if (!is_numeric($col1)) {\r
-                               $col1 = 0;\r
-                       }\r
-                       if (!is_numeric($col2)) {\r
-                               $col2 = -1;\r
-                       }\r
-                       if (!is_numeric($col3)) {\r
-                               $col3 = -1;\r
-                       }\r
-                       if (!is_numeric($col4)) {\r
-                               $col4 = -1;\r
-                       }\r
-                       //Set color for all filling operations\r
-                       if (($col2 == -1) AND ($col3 == -1) AND ($col4 == -1)) {\r
-                               // Grey scale\r
-                               $this->FillColor = sprintf('%.3F g', $col1/255);\r
-                               $this->bgcolor = array('G' => $col1);\r
-                       } elseif ($col4 == -1) {\r
-                               // RGB\r
-                               $this->FillColor = sprintf('%.3F %.3F %.3F rg', $col1/255, $col2/255, $col3/255);\r
-                               $this->bgcolor = array('R' => $col1, 'G' => $col2, 'B' => $col3);\r
-                       } else {\r
-                               // CMYK\r
-                               $this->FillColor = sprintf('%.3F %.3F %.3F %.3F k', $col1/100, $col2/100, $col3/100, $col4/100);\r
-                               $this->bgcolor = array('C' => $col1, 'M' => $col2, 'Y' => $col3, 'K' => $col4);\r
-                       }\r
-                       $this->ColorFlag = ($this->FillColor != $this->TextColor);\r
-                       if ($this->page > 0) {\r
-                               $this->_out($this->FillColor);\r
-                       }\r
-               }
-               \r
-               /**\r
-               * Defines the spot color used for all filling operations (filled rectangles and cell backgrounds).\r
-               * @param string $name name of the spot color\r
-               * @param int $tint the intensity of the color (from 0 to 100 ; 100 = full intensity by default).\r
-               * @access public\r
-               * @since 4.0.024 (2008-09-12)\r
-               * @see AddSpotColor(), SetDrawSpotColor(), SetTextSpotColor()\r
-               */\r
-               public function SetFillSpotColor($name, $tint=100) {
-                       if (!isset($this->spot_colors[$name])) {
-                               $this->Error('Undefined spot color: '.$name);
+                       if (!in_array($color,$aColors)) {
+                               $this->Error('Invalid color: '.$color);
                        }
-                       $this->FillColor = sprintf('/CS%d cs %.3F scn', $this->spot_colors[$name]['i'], $tint/100);
-                       $this->ColorFlag = ($this->FillColor != $this->TextColor);
-                       if ($this->page > 0) {\r
-                               $this->_out($this->FillColor);\r
-                       }
-               }
-               \r
-               /**\r
-               * Defines the color used for text. It can be expressed in RGB components or gray scale. \r
-               * The method can be called before the first page is created and the value is retained from page to page.\r
-               * @param array $color array of colors\r
-               * @access public\r
-               * @since 3.1.000 (2008-6-11)\r
-               * @see SetFillColor()\r
-               */\r
-               public function SetTextColorArray($color) {\r
-                       if (isset($color)) {\r
-                               $color = array_values($color);\r
-                               $r = isset($color[0]) ? $color[0] : -1;\r
-                               $g = isset($color[1]) ? $color[1] : -1;\r
-                               $b = isset($color[2]) ? $color[2] : -1;\r
-                               $k = isset($color[3]) ? $color[3] : -1;\r
-                               if ($r >= 0) {\r
-                                       $this->SetTextColor($r, $g, $b, $k);\r
-                               }\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Defines the color used for text. It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.\r
-               * @param int $col1 Gray level for single color, or Red color for RGB, or Cyan color for CMYK. Value between 0 and 255\r
-               * @param int $col2 Green color for RGB, or Magenta color for CMYK. Value between 0 and 255\r
-               * @param int $col3 Blue color for RGB, or Yellow color for CMYK. Value between 0 and 255\r
-               * @param int $col4 Key (Black) color for CMYK. Value between 0 and 255\r
-               * @access public\r
-               * @since 1.3\r
-               * @see SetTextColorArray(), SetDrawColor(), SetFillColor(), Text(), Cell(), MultiCell()\r
-               */\r
-               public function SetTextColor($col1=0, $col2=-1, $col3=-1, $col4=-1) {\r
-                       // set default values\r
-                       if (!is_numeric($col1)) {\r
-                               $col1 = 0;\r
-                       }\r
-                       if (!is_numeric($col2)) {\r
-                               $col2 = -1;\r
-                       }\r
-                       if (!is_numeric($col3)) {\r
-                               $col3 = -1;\r
-                       }\r
-                       if (!is_numeric($col4)) {\r
-                               $col4 = -1;\r
-                       }\r
-                       //Set color for text\r
-                       if (($col2 == -1) AND ($col3 == -1) AND ($col4 == -1)) {\r
-                               // Grey scale\r
-                               $this->TextColor = sprintf('%.3F g', $col1/255);\r
-                               $this->fgcolor = array('G' => $col1);\r
-                       } elseif ($col4 == -1) {\r
-                               // RGB\r
-                               $this->TextColor = sprintf('%.3F %.3F %.3F rg', $col1/255, $col2/255, $col3/255);\r
-                               $this->fgcolor = array('R' => $col1, 'G' => $col2, 'B' => $col3);\r
-                       } else {\r
-                               // CMYK\r
-                               $this->TextColor = sprintf('%.3F %.3F %.3F %.3F k', $col1/100, $col2/100, $col3/100, $col4/100);\r
-                               $this->fgcolor = array('C' => $col1, 'M' => $col2, 'Y' => $col3, 'K' => $col4);\r
-                       }\r
-                       $this->ColorFlag = ($this->FillColor != $this->TextColor);\r
-               }
-               \r
-               /**\r
-               * Defines the spot color used for text.\r
-               * @param string $name name of the spot color\r
-               * @param int $tint the intensity of the color (from 0 to 100 ; 100 = full intensity by default).\r
-               * @access public\r
-               * @since 4.0.024 (2008-09-12)\r
-               * @see AddSpotColor(), SetDrawSpotColor(), SetFillSpotColor()\r
-               */\r
-               public function SetTextSpotColor($name, $tint=100) {
-                       if (!isset($this->spot_colors[$name])) {
-                               $this->Error('Undefined spot color: '.$name);
+                       return 'color.'.$color;
+               }
+               
+               /*
+               * Adds a javascript form field.
+               * @param string $type field type
+               * @param string $name field name
+               * @param int $x horizontal position
+               * @param int $y vertical position
+               * @param int $w width
+               * @param int $h height
+               * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
+               * @access protected
+               * @author Denis Van Nuffelen, Nicola Asuni
+               * @since 2.1.002 (2008-02-12)
+               */
+               protected function _addfield($type, $name, $x, $y, $w, $h, $prop) {
+                       if ($this->rtl) {
+                               $x = $x - $w;
                        }
-                       $this->TextColor = sprintf('/CS%d cs %.3F scn', $this->spot_colors[$name]['i'], $tint/100);
-                       $this->ColorFlag = ($this->FillColor != $this->TextColor);
-                       if ($this->page > 0) {\r
-                               $this->_out($this->TextColor);\r
-                       }
-               }\r
-\r
-               /**\r
-               * Returns the length of a string in user unit. A font must be selected.<br>\r
-               * @param string $s The string whose length is to be computed\r
-               * @param string $fontname Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained.\r
-               * @param string $fontstyle Font style. Possible values are (case insensitive):<ul><li>empty string: regular</li><li>B: bold</li><li>I: italic</li><li>U: underline</li><li>D: line trough</li></ul> or any combination. The default value is regular.\r
-               * @param float $fontsize Font size in points. The default value is the current size.\r
-               * @return int string length\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 1.2\r
-               */\r
-               public function GetStringWidth($s, $fontname='', $fontstyle='', $fontsize=0) {\r
-                       return $this->GetArrStringWidth($this->utf8Bidi($this->UTF8StringToArray($s), $s, $this->tmprtl), $fontname, $fontstyle, $fontsize);\r
-               }\r
-               \r
-               /**\r
-               * Returns the string length of an array of chars in user unit. A font must be selected.<br>\r
-               * @param string $arr The array of chars whose total length is to be computed\r
-               * @param string $fontname Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained.\r
-               * @param string $fontstyle Font style. Possible values are (case insensitive):<ul><li>empty string: regular</li><li>B: bold</li><li>I: italic</li><li>U: underline</li><li>D: line trough</li></ul> or any combination. The default value is regular.\r
-               * @param float $fontsize Font size in points. The default value is the current size.\r
-               * @return int string length\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 2.4.000 (2008-03-06)\r
-               */\r
-               public function GetArrStringWidth($sa, $fontname='', $fontstyle='', $fontsize=0) {\r
-                       // store current values\r
-                       if (!$this->empty_string($fontname)) {\r
-                               $prev_FontFamily = $this->FontFamily;\r
-                               $prev_FontStyle = $this->FontStyle;\r
-                               $prev_FontSizePt = $this->FontSizePt;\r
-                               $this->SetFont($fontname, $fontstyle, $fontsize);\r
-                       }\r
-                       $w = 0;\r
-                       foreach ($sa as $char) {\r
-                               $w += $this->GetCharWidth($char);\r
-                       }\r
-                       // restore previous values\r
-                       if (!$this->empty_string($fontname)) {\r
-                               $this->SetFont($prev_FontFamily, $prev_FontStyle, $prev_FontSizePt);\r
-                       }\r
-                       return $w;\r
-               }\r
-               \r
-               /**\r
-               * Returns the length of the char in user unit for the current font.<br>\r
-               * @param int $char The char code whose length is to be returned\r
-               * @return int char width\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 2.4.000 (2008-03-06)\r
-               */\r
-               public function GetCharWidth($char) {
-                       if ($char == 173) {
-                               // SHY character will not be printed
-                               return (0);
-                       }\r
-                       $cw = &$this->CurrentFont['cw'];\r
-                       if (isset($cw[$char])) {\r
-                               $w = $cw[$char];\r
-                       } elseif (isset($this->CurrentFont['dw'])) {
-                               // default width\r
-                               $w = $this->CurrentFont['dw'];\r
-                       } elseif (isset($cw[32])) {
-                               // default width
-                               $dw = $cw[32];\r
+                       // the followind avoid fields duplication after saving the document
+                       $this->javascript .= "if(getField('tcpdfdocsaved').value != 'saved') {";
+                       $k = $this->k;
+                       $this->javascript .= sprintf("f".$name."=this.addField('%s','%s',%d,[%.2F,%.2F,%.2F,%.2F]);", $name, $type, $this->PageNo()-1, $x*$k, ($this->h-$y)*$k+1, ($x+$w)*$k, ($this->h-$y-$h)*$k+1)."\n";
+                       $this->javascript .= 'f'.$name.'.textSize='.$this->FontSizePt.";\n";
+                       while (list($key, $val) = each($prop)) {
+                               if (strcmp(substr($key, -5), 'Color') == 0) {
+                                       $val = $this->_JScolor($val);
+                               } else {
+                                       $val = "'".$val."'";
+                               }
+                               $this->javascript .= 'f'.$name.'.'.$key.'='.$val.";\n";
+                       }
+                       if ($this->rtl) {
+                               $this->x -= $w;
                        } else {
-                               $w = 600;
-                       }\r
-                       return ($w * $this->FontSize / 1000);\r
-               }\r
-               \r
-               /**\r
-               * Returns the numbero of characters in a string.\r
-               * @param string $s The input string.\r
-               * @return int number of characters\r
-               * @access public\r
-               * @since 2.0.0001 (2008-01-07)\r
-               */\r
-               public function GetNumChars($s) {\r
-                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {\r
-                               return count($this->UTF8StringToArray($s));\r
-                       } \r
-                       return strlen($s);\r
-               }\r
-                       \r
-               /**\r
-               * Fill the list of available fonts ($this->fontlist).\r
-               * @access protected\r
-               * @since 4.0.013 (2008-07-28)\r
-               */\r
-               protected function getFontsList() {\r
-                       $fontsdir = opendir($this->_getfontpath());\r
-                       while (($file = readdir($fontsdir)) !== false) {\r
-                               if (substr($file, -4) == '.php') {\r
-                                       array_push($this->fontlist, strtolower(basename($file, '.php')));\r
-                               }\r
-                       }\r
-                       closedir($fontsdir);\r
-               }\r
-               \r
-               /**\r
-               * Imports a TrueType, Type1, core, or CID0 font and makes it available.\r
-               * It is necessary to generate a font definition file first (read /fonts/utils/README.TXT). \r
-               * The definition file (and the font file itself when embedding) must be present either in the current directory or in the one indicated by K_PATH_FONTS if the constant is defined. If it could not be found, the error "Could not include font definition file" is generated.\r
-               * @param string $family Font family. The name can be chosen arbitrarily. If it is a standard family name, it will override the corresponding font.\r
-               * @param string $style Font style. Possible values are (case insensitive):<ul><li>empty string: regular (default)</li><li>B: bold</li><li>I: italic</li><li>BI or IB: bold italic</li></ul>\r
-               * @param string $fontfile The font definition file. By default, the name is built from the family and style, in lower case with no spaces.\r
-               * @return array containing the font data, or false in case of error.\r
-               * @access public\r
-               * @since 1.5\r
-               * @see SetFont()\r
-               */\r
-               public function AddFont($family, $style='', $fontfile='') {\r
-                       if ($this->empty_string($family)) {\r
-                               if (!$this->empty_string($this->FontFamily)) {\r
-                                       $family = $this->FontFamily;\r
-                               } else {\r
-                                       $this->Error('Empty font family');\r
-                               }\r
-                       }\r
-                       $family = strtolower($family);\r
-                       if ((!$this->isunicode) AND ($family == 'arial')) {\r
-                               $family = 'helvetica';\r
-                       }\r
-                       if (($family == 'symbol') OR ($family == 'zapfdingbats')) {\r
-                               $style = '';\r
-                       }\r
-                       $tempstyle = strtoupper($style);
-                       $style = '';\r
-                       // underline\r
-                       if (strpos($tempstyle, 'U') !== false) {\r
-                               $this->underline = true;\r
-                       } else {\r
-                               $this->underline = false;\r
-                       }\r
-                       // line through (deleted)\r
-                       if (strpos($tempstyle, 'D') !== false) {\r
-                               $this->linethrough = true;\r
-                       } else {\r
-                               $this->linethrough = false;\r
-                       }
-                       // bold\r
-                       if (strpos($tempstyle, 'B') !== false) {\r
-                               $style .= 'B';\r
-                       }
-                       // oblique\r
-                       if (strpos($tempstyle, 'I') !== false) {\r
-                               $style .= 'I';\r
-                       }
-                       $bistyle = $style;\r
-                       $fontkey = $family.$style;
-                       $font_style = $style.($this->underline ? 'U' : '').($this->linethrough ? 'D' : '');\r
-                       $fontdata = array('fontkey' => $fontkey, 'family' => $family, 'style' => $font_style);
-                       // check if the font has been already added
-                       if ($this->getFontBuffer($fontkey) !== false) {\r
-                               return $fontdata;\r
+                               $this->x += $w;
                        }
-                       if (isset($type)) {\r
-                               unset($type); \r
-                       }\r
-                       if (isset($cw)) {\r
-                               unset($cw); \r
+                       $this->javascript .= '}';
+               }
+
+               // --- FORM FIELDS -----------------------------------------------------
+
+               /*
+               * Convert JavaScript form fields properties array to Annotation Properties array.
+               * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
+               * @return array of annotation properties
+               * @access protected
+               * @author Nicola Asuni
+               * @since 4.8.000 (2009-09-06)
+               */
+               protected function getAnnotOptFromJSProp($prop) {
+                       if (isset($prop['aopt']) AND is_array($prop['aopt'])) {
+                               // the annotation options area lready defined
+                               return $prop['aopt'];
+                       }
+                       $opt = array(); // value to be returned
+                       // alignment: Controls how the text is laid out within the text field.
+                       if (isset($prop['alignment'])) {
+                               switch ($prop['alignment']) {
+                                       case 'left': {
+                                               $opt['q'] = 0;
+                                               break;
+                                       }
+                                       case 'center': {
+                                               $opt['q'] = 1;
+                                               break;
+                                       }
+                                       case 'right': {
+                                               $opt['q'] = 2;
+                                               break;
+                                       }
+                                       default: {
+                                               $opt['q'] = ($this->rtl)?2:0;
+                                               break;
+                                       }
+                               }
                        }
-                       // get specified font directory (if any)
-                       $fontdir = '';
-                       if (!$this->empty_string($fontfile)) {
-                               $fontdir = dirname($fontfile);
-                               if ($this->empty_string($fontdir) OR ($fontdir == '.')) {
-                                       $fontdir = '';
+                       // lineWidth: Specifies the thickness of the border when stroking the perimeter of a field's rectangle.
+                       if (isset($prop['lineWidth'])) {
+                               $linewidth = intval($prop['lineWidth']);
+                       } else {
+                               $linewidth = 1;
+                       }
+                       // borderStyle: The border style for a field.
+                       if (isset($prop['borderStyle'])) {
+                               switch ($prop['borderStyle']) {
+                                       case 'border.d':
+                                       case 'dashed': {
+                                               $opt['border'] = array(0, 0, $linewidth, array(3, 2));
+                                               $opt['bs'] = array('w'=>$linewidth, 's'=>'D', 'd'=>array(3, 2));
+                                               break;
+                                       }
+                                       case 'border.b':
+                                       case 'beveled': {
+                                               $opt['border'] = array(0, 0, $linewidth);
+                                               $opt['bs'] = array('w'=>$linewidth, 's'=>'B');
+                                               break;
+                                       }
+                                       case 'border.i':
+                                       case 'inset': {
+                                               $opt['border'] = array(0, 0, $linewidth);
+                                               $opt['bs'] = array('w'=>$linewidth, 's'=>'I');
+                                               break;
+                                       }
+                                       case 'border.u':
+                                       case 'underline': {
+                                               $opt['border'] = array(0, 0, $linewidth);
+                                               $opt['bs'] = array('w'=>$linewidth, 's'=>'U');
+                                               break;
+                                       }
+                                       default:
+                                       case 'border.s':
+                                       case 'solid': {
+                                               $opt['border'] = array(0, 0, $linewidth);
+                                               $opt['bs'] = array('w'=>$linewidth, 's'=>'S');
+                                               break;
+                                       }
+                               }
+                       }
+                       if (isset($prop['border']) AND is_array($prop['border'])) {
+                               $opt['border'] = $prop['border'];
+                       }
+                       if (!isset($opt['mk'])) {
+                               $opt['mk'] = array();
+                       }
+                       if (!isset($opt['mk']['if'])) {
+                               $opt['mk']['if'] = array();
+                       }
+                       $opt['mk']['if']['a'] = array(0.5, 0.5);
+                       // buttonAlignX: Controls how space is distributed from the left of the button face with respect to the icon.
+                       if (isset($prop['buttonAlignX'])) {
+                               $opt['mk']['if']['a'][0] = $prop['buttonAlignX'];
+                       }
+                       // buttonAlignY: Controls how unused space is distributed from the bottom of the button face with respect to the icon.
+                       if (isset($prop['buttonAlignY'])) {
+                               $opt['mk']['if']['a'][1] = $prop['buttonAlignY'];
+                       }
+                       // buttonFitBounds: If true, the extent to which the icon may be scaled is set to the bounds of the button field.
+                       if (isset($prop['buttonFitBounds']) AND ($prop['buttonFitBounds'] == 'true')) {
+                               $opt['mk']['if']['fb'] = true;
+                       }                       
+                       // buttonScaleHow: Controls how the icon is scaled (if necessary) to fit inside the button face.
+                       if (isset($prop['buttonScaleHow'])) {
+                               switch ($prop['buttonScaleHow']) {
+                                       case 'scaleHow.proportional': {
+                                               $opt['mk']['if']['s'] = 'P';
+                                               break;
+                                       }
+                                       case 'scaleHow.anamorphic': {
+                                               $opt['mk']['if']['s'] = 'A';
+                                               break;
+                                       }
+                               }
+                       }
+                       // buttonScaleWhen: Controls when an icon is scaled to fit inside the button face.
+                       if (isset($prop['buttonScaleWhen'])) {
+                               switch ($prop['buttonScaleWhen']) {
+                                       case 'scaleWhen.always': {
+                                               $opt['mk']['if']['sw'] = 'A';
+                                               break;
+                                       }
+                                       case 'scaleWhen.never': {
+                                               $opt['mk']['if']['sw'] = 'N';
+                                               break;
+                                       }
+                                       case 'scaleWhen.tooBig': {
+                                               $opt['mk']['if']['sw'] = 'B';
+                                               break;
+                                       }
+                                       case 'scaleWhen.tooSmall': {
+                                               $opt['mk']['if']['sw'] = 'S';
+                                               break;
+                                       }
+                               }
+                       }
+                       // buttonPosition: Controls how the text and the icon of the button are positioned with respect to each other within the button face.
+                       if (isset($prop['buttonPosition'])) {
+                               switch ($prop['buttonPosition']) {
+                                       case 0:
+                                       case 'position.textOnly': {
+                                               $opt['mk']['tp'] = 0;
+                                               break;
+                                       }
+                                       case 1:
+                                       case 'position.iconOnly': {
+                                               $opt['mk']['tp'] = 1;
+                                               break;
+                                       }
+                                       case 2:
+                                       case 'position.iconTextV': {
+                                               $opt['mk']['tp'] = 2;
+                                               break;
+                                       }
+                                       case 3:
+                                       case 'position.textIconV': {
+                                               $opt['mk']['tp'] = 3;
+                                               break;
+                                       }
+                                       case 4:
+                                       case 'position.iconTextH': {
+                                               $opt['mk']['tp'] = 4;
+                                               break;
+                                       }
+                                       case 5:
+                                       case 'position.textIconH': {
+                                               $opt['mk']['tp'] = 5;
+                                               break;
+                                       }
+                                       case 6:
+                                       case 'position.overlay': {
+                                               $opt['mk']['tp'] = 6;
+                                               break;
+                                       }
+                               }                               
+                       }
+                       // fillColor: Specifies the background color for a field.
+                       if (isset($prop['fillColor'])) {
+                               if (is_array($prop['fillColor'])) {
+                                       $opt['mk']['bg'] = $prop['fillColor'];
                                } else {
-                                       $fontdir .= '/';
+                                       $opt['mk']['bg'] = $this->convertHTMLColorToDec($prop['fillColor']);
                                }
                        }
-                       // search and include font file
-                       if ($this->empty_string($fontfile) OR (!file_exists($fontfile))) {
-                               // build a standard filenames for specified font
-                               $fontfile1 = str_replace(' ', '', $family).strtolower($style).'.php';
-                               $fontfile2 = str_replace(' ', '', $family).'.php';
-                               // search files on various directories
-                               if (file_exists($fontdir.$fontfile1)) {
-                                       $fontfile = $fontdir.$fontfile1;
-                               } elseif (file_exists($this->_getfontpath().$fontfile1)) {
-                                       $fontfile = $this->_getfontpath().$fontfile1;
-                               } elseif (file_exists($fontfile1)) {
-                                       $fontfile = $fontfile1;
-                               } elseif (file_exists($fontdir.$fontfile2)) {
-                                       $fontfile = $fontdir.$fontfile2;
-                               } elseif (file_exists($this->_getfontpath().$fontfile2)) {
-                                       $fontfile = $this->_getfontpath().$fontfile2;
+                       // strokeColor: Specifies the stroke color for a field that is used to stroke the rectangle of the field with a line as large as the line width.
+                       if (isset($prop['strokeColor'])) {
+                               if (is_array($prop['strokeColor'])) {
+                                       $opt['mk']['bc'] = $prop['strokeColor'];
+                               } else {
+                                       $opt['mk']['bc'] = $this->convertHTMLColorToDec($prop['strokeColor']);
+                               }
+                       }
+                       // rotation: The rotation of a widget in counterclockwise increments.
+                       if (isset($prop['rotation'])) {
+                               $opt['mk']['r'] = $prop['rotation'];
+                       }
+                       // charLimit: Limits the number of characters that a user can type into a text field.
+                       if (isset($prop['charLimit'])) {
+                               $opt['maxlen'] = intval($prop['charLimit']);
+                       }
+                       if (!isset($ff)) {
+                               $ff = 0;
+                       }
+                       // readonly: The read-only characteristic of a field. If a field is read-only, the user can see the field but cannot change it.
+                       if (isset($prop['readonly']) AND ($prop['readonly'] == 'true')) {
+                               $ff += 1 << 0;
+                       }
+                       // required: Specifies whether a field requires a value.
+                       if (isset($prop['required']) AND ($prop['required'] == 'true')) {
+                               $ff += 1 << 1;
+                       }
+                       // multiline: Controls how text is wrapped within the field.
+                       if (isset($prop['multiline']) AND ($prop['multiline'] == 'true')) {
+                               $ff += 1 << 12;
+                       }
+                       // password: Specifies whether the field should display asterisks when data is entered in the field.
+                       if (isset($prop['password']) AND ($prop['password'] == 'true')) {
+                               $ff += 1 << 13;
+                       }
+                       // NoToggleToOff: If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect.
+                       if (isset($prop['NoToggleToOff']) AND ($prop['NoToggleToOff'] == 'true')) {
+                               $ff += 1 << 14;
+                       }
+                       // Radio: If set, the field is a set of radio buttons.
+                       if (isset($prop['Radio']) AND ($prop['Radio'] == 'true')) {
+                               $ff += 1 << 15;
+                       }
+                       // Pushbutton: If set, the field is a pushbutton that does not retain a permanent value.
+                       if (isset($prop['Pushbutton']) AND ($prop['Pushbutton'] == 'true')) {
+                               $ff += 1 << 16;
+                       }
+                       // Combo: If set, the field is a combo box; if clear, the field is a list box.
+                       if (isset($prop['Combo']) AND ($prop['Combo'] == 'true')) {
+                               $ff += 1 << 17;
+                       }
+                       // editable: Controls whether a combo box is editable.
+                       if (isset($prop['editable']) AND ($prop['editable'] == 'true')) {
+                               $ff += 1 << 18;
+                       }
+                       // Sort: If set, the field's option items shall be sorted alphabetically.
+                       if (isset($prop['Sort']) AND ($prop['Sort'] == 'true')) {
+                               $ff += 1 << 19;
+                       }
+                       // fileSelect: If true, sets the file-select flag in the Options tab of the text field (Field is Used for File Selection).
+                       if (isset($prop['fileSelect']) AND ($prop['fileSelect'] == 'true')) {
+                               $ff += 1 << 20;
+                       }
+                       // multipleSelection: If true, indicates that a list box allows a multiple selection of items.
+                       if (isset($prop['multipleSelection']) AND ($prop['multipleSelection'] == 'true')) {
+                               $ff += 1 << 21;
+                       }
+                       // doNotSpellCheck: If true, spell checking is not performed on this editable text field.
+                       if (isset($prop['doNotSpellCheck']) AND ($prop['doNotSpellCheck'] == 'true')) {
+                               $ff += 1 << 22;
+                       }
+                       // doNotScroll: If true, the text field does not scroll and the user, therefore, is limited by the rectangular region designed for the field.
+                       if (isset($prop['doNotScroll']) AND ($prop['doNotScroll'] == 'true')) {
+                               $ff += 1 << 23;
+                       }
+                       // comb: If set to true, the field background is drawn as series of boxes (one for each character in the value of the field) and each character of the content is drawn within those boxes. The number of boxes drawn is determined from the charLimit property. It applies only to text fields. The setter will also raise if any of the following field properties are also set multiline, password, and fileSelect. A side-effect of setting this property is that the doNotScroll property is also set.
+                       if (isset($prop['comb']) AND ($prop['comb'] == 'true')) {
+                               $ff += 1 << 24;
+                       }
+                       // radiosInUnison: If false, even if a group of radio buttons have the same name and export value, they behave in a mutually exclusive fashion, like HTML radio buttons.
+                       if (isset($prop['radiosInUnison']) AND ($prop['radiosInUnison'] == 'true')) {
+                               $ff += 1 << 25;
+                       }
+                       // richText: If true, the field allows rich text formatting.
+                       if (isset($prop['richText']) AND ($prop['richText'] == 'true')) {
+                               $ff += 1 << 25;
+                       }
+                       // commitOnSelChange: Controls whether a field value is committed after a selection change.
+                       if (isset($prop['commitOnSelChange']) AND ($prop['commitOnSelChange'] == 'true')) {
+                               $ff += 1 << 26;
+                       }
+                       $opt['ff'] = $ff;
+                       // defaultValue: The default value of a field - that is, the value that the field is set to when the form is reset.
+                       if (isset($prop['defaultValue'])) {
+                               $opt['dv'] = $prop['defaultValue'];
+                       }
+                       $f = 4; // default value for annotation flags
+                       // readonly: The read-only characteristic of a field. If a field is read-only, the user can see the field but cannot change it.
+                       if (isset($prop['readonly']) AND ($prop['readonly'] == 'true')) {
+                               $f += 1 << 6;
+                       }
+                       // display: Controls whether the field is hidden or visible on screen and in print.
+                       if (isset($prop['display'])) {
+                               if ($prop['display'] == 'display.visible') {
+                                       //
+                               } elseif ($prop['display'] == 'display.hidden') {
+                                       $f += 1 << 1;
+                               } elseif ($prop['display'] == 'display.noPrint') {
+                                       $f -= 1 << 2;
+                               } elseif ($prop['display'] == 'display.noView') {
+                                       $f += 1 << 5;
+                               }
+                       }
+                       $opt['f'] = $f;
+                       // currentValueIndices: Reads and writes single or multiple values of a list box or combo box.
+                       if (isset($prop['currentValueIndices']) AND is_array($prop['currentValueIndices'])) {
+                               $opt['i'] = $prop['currentValueIndices'];
+                       }
+                       // value: The value of the field data that the user has entered.
+                       if (isset($prop['value'])) {
+                               if (is_array($prop['value'])) {
+                                       $opt['opt'] = array();
+                                       foreach ($prop['value'] AS $key => $optval) {
+                                               // exportValues: An array of strings representing the export values for the field.
+                                               if (isset($prop['exportValues'][$key])) {
+                                                       $opt['opt'][$key] = array($prop['exportValues'][$key], $prop['value'][$key]);
+                                               } else {
+                                                       $opt['opt'][$key] = $prop['value'][$key];
+                                               }
+                                       }
+                               } else {
+                                       $opt['v'] = $prop['value'];
+                               }
+                       }
+                       // richValue: This property specifies the text contents and formatting of a rich text field.
+                       if (isset($prop['richValue'])) {
+                               $opt['rv'] = $prop['richValue'];
+                       }
+                       // submitName: If nonempty, used during form submission instead of name. Only applicable if submitting in HTML format (that is, URL-encoded).
+                       if (isset($prop['submitName'])) {
+                               $opt['tm'] = $prop['submitName'];
+                       }
+                       // name: Fully qualified field name.
+                       if (isset($prop['name'])) {
+                               $opt['t'] = $prop['name'];
+                       }
+                       // userName: The user name (short description string) of the field.
+                       if (isset($prop['userName'])) {
+                               $opt['tu'] = $prop['userName'];
+                       }
+                       // highlight: Defines how a button reacts when a user clicks it.
+                       if (isset($prop['highlight'])) {
+                               switch ($prop['highlight']) {
+                                       case 'none':
+                                       case 'highlight.n': {
+                                               $opt['h'] = 'N';
+                                               break;
+                                       }
+                                       case 'invert':
+                                       case 'highlight.i': {
+                                               $opt['h'] = 'i';
+                                               break;
+                                       }
+                                       case 'push':
+                                       case 'highlight.p': {
+                                               $opt['h'] = 'P';
+                                               break;
+                                       }
+                                       case 'outline':
+                                       case 'highlight.o': {
+                                               $opt['h'] = 'O';
+                                               break;
+                                       }
+                               }                               
+                       }
+                       // Unsupported options:
+                       // - calcOrderIndex: Changes the calculation order of fields in the document.
+                       // - delay: Delays the redrawing of a field's appearance.
+                       // - defaultStyle: This property defines the default style attributes for the form field.
+                       // - style: Allows the user to set the glyph style of a check box or radio button.
+                       // - textColor, textFont, textSize
+                       return $opt;
+               }
+               
+               /*
+               * Set default properties for form fields.
+               * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
+               * @access public
+               * @author Nicola Asuni
+               * @since 4.8.000 (2009-09-06)
+               */
+               public function setFormDefaultProp($prop=array()) {
+                       $this->default_form_prop = $prop;
+               }
+               
+               /*
+               * Return the default properties for form fields.
+               * @return array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
+               * @access public
+               * @author Nicola Asuni
+               * @since 4.8.000 (2009-09-06)
+               */
+               public function getFormDefaultProp() {
+                       return $this->default_form_prop;
+               }
+               
+               /*
+               * Creates a text field
+               * @param string $name field name
+               * @param float $w Width of the rectangle
+               * @param float $h Height of the rectangle
+               * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
+               * @param array $opt annotation parameters. Possible values are described on official PDF32000_2008 reference.
+               * @param float $x Abscissa of the upper-left corner of the rectangle
+               * @param float $y Ordinate of the upper-left corner of the rectangle
+               * @param boolean $js if true put the field using JavaScript (requires Acrobat Writer to be rendered).
+               * @access public
+               * @author Nicola Asuni
+               * @since 4.8.000 (2009-09-07)
+               */
+               public function TextField($name, $w, $h, $prop=array(), $opt=array(), $x='', $y='', $js=false) {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       if ($js) {
+                               $this->_addfield('text', $name, $x, $y, $w, $h, $prop);
+                               return;
+                       }
+                       // get default style
+                       $prop = array_merge($this->getFormDefaultProp(), $prop);
+                       // get annotation data
+                       $popt = $this->getAnnotOptFromJSProp($prop);
+                       // set default appearance stream
+                       $font = $this->FontFamily;
+                       $fontkey = array_search($font, $this->fontkeys);
+                       if (!in_array($fontkey, $this->annotation_fonts)) {
+                               $this->annotation_fonts[$font] = $fontkey;
+                       }
+                       $fontstyle = sprintf('/F%d %.2F Tf %s', ($fontkey + 1), $this->FontSizePt, $this->TextColor);
+                       $popt['da'] = $fontstyle;
+                       $popt['ap'] = array();
+                       $popt['ap']['n'] = 'q BT '.$fontstyle.' ET Q';
+                       // merge options
+                       $opt = array_merge($popt, $opt);
+                       // remove some conflicting options
+                       unset($opt['bs']);
+                       // set remaining annotation data
+                       $opt['Subtype'] = 'Widget';
+                       $opt['ft'] = 'Tx';
+                       $opt['t'] = $name;
+                       /*
+                       Additional annotation's parameters (check _putannotsobj() method):
+                       //$opt['f']
+                       //$opt['ap']
+                       //$opt['as']
+                       //$opt['bs']
+                       //$opt['be']
+                       //$opt['c']
+                       //$opt['border']
+                       //$opt['h']
+                       //$opt['mk']
+                       //$opt['mk']['r']
+                       //$opt['mk']['bc']
+                       //$opt['mk']['bg']
+                       //$opt['mk']['ca']
+                       //$opt['mk']['rc']
+                       //$opt['mk']['ac']
+                       //$opt['mk']['i']
+                       //$opt['mk']['ri']
+                       //$opt['mk']['ix']
+                       //$opt['mk']['if']
+                       //$opt['mk']['if']['sw']
+                       //$opt['mk']['if']['s']
+                       //$opt['mk']['if']['a']
+                       //$opt['mk']['if']['fb']
+                       //$opt['mk']['tp']
+                       //$opt['tu']
+                       //$opt['tm']
+                       //$opt['ff']
+                       //$opt['v']
+                       //$opt['dv']
+                       //$opt['a']
+                       //$opt['aa']
+                       //$opt['q']
+                       */
+                       $this->Annotation($x, $y, $w, $h, $name, $opt, 0);
+                       if ($this->rtl) {
+                               $this->x -= $w;
+                       } else {
+                               $this->x += $w;
+                       }
+               }
+
+               /*
+               * Creates a RadioButton field
+               * @param string $name field name
+               * @param int $w width
+               * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
+               * @param array $opt annotation parameters. Possible values are described on official PDF32000_2008 reference.
+               * @param string $onvalue value to be returned if selected.
+               * @param boolean $checked define the initial state.
+               * @param float $x Abscissa of the upper-left corner of the rectangle
+               * @param float $y Ordinate of the upper-left corner of the rectangle
+               * @param boolean $js if true put the field using JavaScript (requires Acrobat Writer to be rendered).
+               * @access public
+               * @author Nicola Asuni
+               * @since 4.8.000 (2009-09-07)
+               */
+               public function RadioButton($name, $w, $prop=array(), $opt=array(), $onvalue='On', $checked=false, $x='', $y='', $js=false) {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       if ($js) {
+                               $this->_addfield('radiobutton', $name, $x, $y, $w, $w, $prop);
+                               return;
+                       }
+                       if ($this->empty_string($onvalue)) {
+                               $onvalue = 'On';
+                       }
+                       if ($checked) {
+                               $defval = $onvalue;
+                       } else {
+                               $defval = 'Off';
+                       }
+                       // set data for parent group
+                       if (!isset($this->radiobutton_groups[$this->page])) {
+                               $this->radiobutton_groups[$this->page] = array();
+                       }
+                       if (!isset($this->radiobutton_groups[$this->page][$name])) {
+                               $this->radiobutton_groups[$this->page][$name] = array();
+                               ++$this->annot_obj_id;
+                               $this->radio_groups[] = $this->annot_obj_id;
+                       }
+                       // save object ID to be added on Kids entry on parent object
+                       $this->radiobutton_groups[$this->page][$name][] = array('kid' => ($this->annot_obj_id + 1), 'def' => $defval);
+                       // get default style
+                       $prop = array_merge($this->getFormDefaultProp(), $prop);
+                       $prop['NoToggleToOff'] = 'true';
+                       $prop['Radio'] = 'true';
+                       $prop['borderStyle'] = 'inset';
+                       // get annotation data
+                       $popt = $this->getAnnotOptFromJSProp($prop);
+                       // set additional default values
+                       $font = 'zapfdingbats';
+                       $this->AddFont($font);
+                       $fontkey = array_search($font, $this->fontkeys);
+                       if (!in_array($fontkey, $this->annotation_fonts)) {
+                               $this->annotation_fonts[$font] = $fontkey;
+                       }
+                       $fontstyle = sprintf('/F%d %.2F Tf %s', ($fontkey + 1), $this->FontSizePt, $this->TextColor);
+                       $popt['da'] = $fontstyle;
+                       $popt['ap'] = array();
+                       $popt['ap']['n'] = array();
+                       $popt['ap']['n'][$onvalue] = 'q BT '.$fontstyle.' 0 0 Td (8) Tj ET Q';
+                       $popt['ap']['n']['Off'] = 'q BT '.$fontstyle.' 0 0 Td (8) Tj ET Q';
+                       if (!isset($popt['mk'])) {
+                               $popt['mk'] = array();
+                       }
+                       $popt['mk']['ca'] = '(l)';
+                       // merge options
+                       $opt = array_merge($popt, $opt);
+                       // set remaining annotation data
+                       $opt['Subtype'] = 'Widget';
+                       $opt['ft'] = 'Btn';
+                       if ($checked) {
+                               $opt['v'] = array('/'.$onvalue);
+                               $opt['as'] = $onvalue;
+                       } else {
+                               $opt['as'] = 'Off';
+                       }
+                       $this->Annotation($x, $y, $w, $w, $name, $opt, 0);
+                       if ($this->rtl) {
+                               $this->x -= $w;
+                       } else {
+                               $this->x += $w;
+                       }
+               }
+               
+               /*
+               * Creates a List-box field
+               * @param string $name field name
+               * @param int $w width
+               * @param int $h height
+               * @param array $values array containing the list of values.
+               * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
+               * @param array $opt annotation parameters. Possible values are described on official PDF32000_2008 reference.
+               * @param float $x Abscissa of the upper-left corner of the rectangle
+               * @param float $y Ordinate of the upper-left corner of the rectangle
+               * @param boolean $js if true put the field using JavaScript (requires Acrobat Writer to be rendered).
+               * @access public
+               * @author Nicola Asuni
+               * @since 4.8.000 (2009-09-07)
+               */
+               public function ListBox($name, $w, $h, $values, $prop=array(), $opt=array(), $x='', $y='', $js=false) {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       if ($js) {
+                               $this->_addfield('listbox', $name, $x, $y, $w, $h, $prop);
+                               $s = '';
+                               foreach ($values as $value) {
+                                       $s .= "'".addslashes($value)."',";
+                               }
+                               $this->javascript .= 'f'.$name.'.setItems(['.substr($s, 0, -1)."]);\n";
+                               return;
+                       }
+                       // get default style
+                       $prop = array_merge($this->getFormDefaultProp(), $prop);
+                       // get annotation data
+                       $popt = $this->getAnnotOptFromJSProp($prop);
+                       // set additional default values
+                       $font = $this->FontFamily;
+                       $fontkey = array_search($font, $this->fontkeys);
+                       if (!in_array($fontkey, $this->annotation_fonts)) {
+                               $this->annotation_fonts[$font] = $fontkey;
+                       }
+                       $fontstyle = sprintf('/F%d %.2F Tf %s', ($fontkey + 1), $this->FontSizePt, $this->TextColor);
+                       $popt['da'] = $fontstyle;
+                       $popt['ap'] = array();
+                       $popt['ap']['n'] = 'q BT '.$fontstyle.' ET Q';
+                       // merge options
+                       $opt = array_merge($popt, $opt);
+                       // set remaining annotation data
+                       $opt['Subtype'] = 'Widget';
+                       $opt['ft'] = 'Ch';
+                       $opt['t'] = $name;
+                       $opt['opt'] = $values;
+                       $this->Annotation($x, $y, $w, $h, $name, $opt, 0);
+                       if ($this->rtl) {
+                               $this->x -= $w;
+                       } else {
+                               $this->x += $w;
+                       }
+               }
+               
+               /*
+               * Creates a Combo-box field
+               * @param string $name field name
+               * @param int $w width
+               * @param int $h height
+               * @param array $values array containing the list of values.
+               * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
+               * @param array $opt annotation parameters. Possible values are described on official PDF32000_2008 reference.
+               * @param float $x Abscissa of the upper-left corner of the rectangle
+               * @param float $y Ordinate of the upper-left corner of the rectangle
+               * @param boolean $js if true put the field using JavaScript (requires Acrobat Writer to be rendered).
+               * @access public
+               * @author Nicola Asuni
+               * @since 4.8.000 (2009-09-07)
+               */
+               public function ComboBox($name, $w, $h, $values, $prop=array(), $opt=array(), $x='', $y='', $js=false) {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       if ($js) {
+                               $this->_addfield('combobox', $name, $x, $y, $w, $h, $prop);
+                               $s = '';
+                               foreach ($values as $value) {
+                                       $s .= "'".addslashes($value)."',";
+                               }
+                               $this->javascript .= 'f'.$name.'.setItems(['.substr($s, 0, -1)."]);\n";
+                               return;
+                       }
+                       // get default style
+                       $prop = array_merge($this->getFormDefaultProp(), $prop);
+                       $prop['Combo'] = true;
+                       // get annotation data
+                       $popt = $this->getAnnotOptFromJSProp($prop);
+                       // set additional default options
+                       $font = $this->FontFamily;
+                       $fontkey = array_search($font, $this->fontkeys);
+                       if (!in_array($fontkey, $this->annotation_fonts)) {
+                               $this->annotation_fonts[$font] = $fontkey;
+                       }
+                       $fontstyle = sprintf('/F%d %.2F Tf %s', ($fontkey + 1), $this->FontSizePt, $this->TextColor);
+                       $popt['da'] = $fontstyle;
+                       $popt['ap'] = array();
+                       $popt['ap']['n'] = 'q BT '.$fontstyle.' ET Q';
+                       // merge options
+                       $opt = array_merge($popt, $opt);
+                       // set remaining annotation data
+                       $opt['Subtype'] = 'Widget';
+                       $opt['ft'] = 'Ch';
+                       $opt['t'] = $name;
+                       $opt['opt'] = $values;
+                       $this->Annotation($x, $y, $w, $h, $name, $opt, 0);
+                       if ($this->rtl) {
+                               $this->x -= $w;
+                       } else {
+                               $this->x += $w;
+                       }
+               }
+               
+               /*
+               * Creates a CheckBox field
+               * @param string $name field name
+               * @param int $w width
+               * @param boolean $checked define the initial state.
+               * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
+               * @param array $opt annotation parameters. Possible values are described on official PDF32000_2008 reference.
+               * @param string $onvalue value to be returned if selected.
+               * @param float $x Abscissa of the upper-left corner of the rectangle
+               * @param float $y Ordinate of the upper-left corner of the rectangle
+               * @param boolean $js if true put the field using JavaScript (requires Acrobat Writer to be rendered).
+               * @access public
+               * @author Nicola Asuni
+               * @since 4.8.000 (2009-09-07)
+               */
+               public function CheckBox($name, $w, $checked=false, $prop=array(), $opt=array(), $onvalue='Yes', $x='', $y='', $js=false) {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       if ($js) {
+                               $this->_addfield('checkbox', $name, $x, $y, $w, $w, $prop);
+                               return;
+                       }
+                       if (!isset($prop['value'])) {
+                               $prop['value'] = array('Yes');
+                       }
+                       // get default style
+                       $prop = array_merge($this->getFormDefaultProp(), $prop);
+                       $prop['borderStyle'] = 'inset';
+                       // get annotation data
+                       $popt = $this->getAnnotOptFromJSProp($prop);
+                       // set additional default options
+                       $font = 'zapfdingbats';
+                       $this->AddFont($font);
+                       $fontkey = array_search($font, $this->fontkeys);
+                       if (!in_array($fontkey, $this->annotation_fonts)) {
+                               $this->annotation_fonts[$font] = $fontkey;
+                       }
+                       $fontstyle = sprintf('/F%d %.2F Tf %s', ($fontkey + 1), $this->FontSizePt, $this->TextColor);
+                       $popt['da'] = $fontstyle;
+                       $popt['ap'] = array();
+                       $popt['ap']['n'] = array();
+                       $popt['ap']['n']['Yes'] = 'q BT '.$fontstyle.' 0 0 Td (8) Tj ET Q';
+                       $popt['ap']['n']['Off'] = 'q BT '.$fontstyle.' 0 0 Td (8) Tj ET Q';
+                       // merge options
+                       $opt = array_merge($popt, $opt);
+                       // set remaining annotation data
+                       $opt['Subtype'] = 'Widget';
+                       $opt['ft'] = 'Btn';
+                       $opt['t'] = $name;
+                       $opt['opt'] = array($onvalue);
+                       if ($checked) {
+                               $opt['v'] = array('/0');
+                               $opt['as'] = 'Yes';
+                       } else {
+                               $opt['v'] = array('/Off');
+                               $opt['as'] = 'Off';
+                       }
+                       $this->Annotation($x, $y, $w, $w, $name, $opt, 0);
+                       if ($this->rtl) {
+                               $this->x -= $w;
+                       } else {
+                               $this->x += $w;
+                       }
+               }
+               
+               /*
+               * Creates a button field
+               * @param string $name field name
+               * @param int $w width
+               * @param int $h height
+               * @param string $caption caption.
+               * @param mixed $action action triggered by pressing the button. Use a string to specify a javascript action. Use an array to specify a form action options as on section 12.7.5 of PDF32000_2008.
+               * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
+               * @param array $opt annotation parameters. Possible values are described on official PDF32000_2008 reference.
+               * @param float $x Abscissa of the upper-left corner of the rectangle
+               * @param float $y Ordinate of the upper-left corner of the rectangle
+               * @param boolean $js if true put the field using JavaScript (requires Acrobat Writer to be rendered).
+               * @access public
+               * @author Nicola Asuni
+               * @since 4.8.000 (2009-09-07)
+               */
+               public function Button($name, $w, $h, $caption, $action, $prop=array(), $opt=array(), $x='', $y='', $js=false) {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       if ($js) {
+                               $this->_addfield('button', $name, $this->x, $this->y, $w, $h, $prop);
+                               $this->javascript .= 'f'.$name.".buttonSetCaption('".addslashes($caption)."');\n";
+                               $this->javascript .= 'f'.$name.".setAction('MouseUp','".addslashes($action)."');\n";
+                               $this->javascript .= 'f'.$name.".highlight='push';\n";
+                               $this->javascript .= 'f'.$name.".print=false;\n";
+                               return;
+                       }
+                       // get default style
+                       $prop = array_merge($this->getFormDefaultProp(), $prop);
+                       $prop['Pushbutton'] = 'true';
+                       $prop['highlight'] = 'push';
+                       $prop['display'] = 'display.noPrint';
+                       // get annotation data
+                       $popt = $this->getAnnotOptFromJSProp($prop);
+                       // set additional default options
+                       if (!isset($popt['mk'])) {
+                               $popt['mk'] = array();
+                       }
+                       $popt['mk']['ca'] = $this->_textstring($caption);
+                       $popt['mk']['rc'] = $this->_textstring($caption);
+                       $popt['mk']['ac'] = $this->_textstring($caption);
+                       $font = $this->FontFamily;
+                       $fontkey = array_search($font, $this->fontkeys);
+                       if (!in_array($fontkey, $this->annotation_fonts)) {
+                               $this->annotation_fonts[$font] = $fontkey;
+                       }
+                       $fontstyle = sprintf('/F%d %.2F Tf %s', ($fontkey + 1), $this->FontSizePt, $this->TextColor);
+                       $popt['da'] = $fontstyle;
+                       $popt['ap'] = array();
+                       $popt['ap']['n'] = 'q BT '.$fontstyle.' ET Q';
+                       // merge options
+                       $opt = array_merge($popt, $opt);
+                       // set remaining annotation data
+                       $opt['Subtype'] = 'Widget';
+                       $opt['ft'] = 'Btn';
+                       $opt['t'] = $caption;
+                       $opt['v'] = $name;
+                       if (!empty($action)) {
+                               if (is_array($action)) {
+                                       // form action options as on section 12.7.5 of PDF32000_2008.
+                                       $opt['aa'] = '/D <<';
+                                       $bmode = array('SubmitForm', 'ResetForm', 'ImportData');
+                                       foreach ($action AS $key => $val) {
+                                               if (($key == 'S') AND in_array($val, $bmode)) {
+                                                       $opt['aa'] .= ' /S /'.$val;
+                                               } elseif (($key == 'F') AND (!empty($val))) {
+                                                       $opt['aa'] .= ' /F '.$this->_datastring($val);
+                                               } elseif (($key == 'Fields') AND is_array($val) AND !empty($val)) {
+                                                       $opt['aa'] .= ' /Fields [';
+                                                       foreach ($val AS $field) {
+                                                               $opt['aa'] .= ' '.$this->_textstring($field);
+                                                       }
+                                                       $opt['aa'] .= ']';
+                                               } elseif (($key == 'Flags')) {
+                                                       $ff = 0;
+                                                       if (is_array($val)) {
+                                                               foreach ($val AS $flag) {
+                                                                       switch ($flag) {
+                                                                               case 'Include/Exclude': {
+                                                                                       $ff += 1 << 0;
+                                                                                       break;
+                                                                               }
+                                                                               case 'IncludeNoValueFields': {
+                                                                                       $ff += 1 << 1;
+                                                                                       break;
+                                                                               }
+                                                                               case 'ExportFormat': {
+                                                                                       $ff += 1 << 2;
+                                                                                       break;
+                                                                               }
+                                                                               case 'GetMethod': {
+                                                                                       $ff += 1 << 3;
+                                                                                       break;
+                                                                               }
+                                                                               case 'SubmitCoordinates': {
+                                                                                       $ff += 1 << 4;
+                                                                                       break;
+                                                                               }
+                                                                               case 'XFDF': {
+                                                                                       $ff += 1 << 5;
+                                                                                       break;
+                                                                               }
+                                                                               case 'IncludeAppendSaves': {
+                                                                                       $ff += 1 << 6;
+                                                                                       break;
+                                                                               }
+                                                                               case 'IncludeAnnotations': {
+                                                                                       $ff += 1 << 7;
+                                                                                       break;
+                                                                               }
+                                                                               case 'SubmitPDF': {
+                                                                                       $ff += 1 << 8;
+                                                                                       break;
+                                                                               }
+                                                                               case 'CanonicalFormat': {
+                                                                                       $ff += 1 << 9;
+                                                                                       break;
+                                                                               }
+                                                                               case 'ExclNonUserAnnots': {
+                                                                                       $ff += 1 << 10;
+                                                                                       break;
+                                                                               }
+                                                                               case 'ExclFKey': {
+                                                                                       $ff += 1 << 11;
+                                                                                       break;
+                                                                               }
+                                                                               case 'EmbedForm': {
+                                                                                       $ff += 1 << 13;
+                                                                                       break;
+                                                                               }
+                                                                       }
+                                                               }
+                                                       } else {
+                                                               $ff = intval($val);
+                                                       }
+                                                       $opt['aa'] .= ' /Flags '.$ff;
+                                               }
+                                       }
+                                       $opt['aa'] .= ' >>';
                                } else {
-                                       $fontfile = $fontfile2;
+                                       // Javascript action or raw action command
+                                       $js_obj_id = $this->addJavascriptObject($action);
+                                       $opt['aa'] = '/D '.$js_obj_id.' 0 R';
                                }
                        }
-                       // include font file
-                       if (file_exists($fontfile)) {
-                               include($fontfile);
+                       $this->Annotation($x, $y, $w, $h, $name, $opt, 0);
+                       if ($this->rtl) {
+                               $this->x -= $w;
                        } else {
-                               $this->Error('Could not include font definition file: '.$family.'');
+                               $this->x += $w;
                        }
-                       // check font parameters\r
-                       if ((!isset($type)) OR (!isset($cw))) {\r
-                               $this->Error('The font definition file has a bad format: '.$fontfile.'');\r
+               }
+               
+               // --- END FORMS FIELDS ------------------------------------------------
+               
+               /*
+               * Add certification signature (DocMDP or UR3)
+               * You can set only one signature type
+               * @access protected
+               * @author Nicola Asuni
+               * @since 4.6.008 (2009-05-07)
+               */
+               protected function _putsignature() {
+                       if ((!$this->sign) OR (!isset($this->signature_data['cert_type']))) {
+                               return;
                        }
-                       if (!isset($file)) {\r
-                               $file = '';\r
+                       $this->_out('/Type /Sig');
+                       $this->_out('/Filter /Adobe.PPKLite');
+                       $this->_out('/SubFilter /adbe.pkcs7.detached');
+                       $this->_out($this->byterange_string);
+                       $this->_out('/Contents<>'.str_repeat(' ', $this->signature_max_lenght));
+                       $this->_out('/Reference');
+                       $this->_out('[');
+                       $this->_out('<<');
+                       $this->_out('/Type /SigRef');
+                       if ($this->signature_data['cert_type'] > 0) {
+                               $this->_out('/TransformMethod /DocMDP');
+                               $this->_out('/TransformParams');
+                               $this->_out('<<');
+                               $this->_out('/Type /TransformParams');
+                               $this->_out('/V /1.2');
+                               $this->_out('/P '.$this->signature_data['cert_type'].'');
+                       } else {
+                               $this->_out('/TransformMethod /UR3');
+                               $this->_out('/TransformParams');
+                               $this->_out('<<');
+                               $this->_out('/Type /TransformParams');
+                               $this->_out('/V /2.2');
+                               if (!$this->empty_string($this->ur_document)) {
+                                       $this->_out('/Document['.$this->ur_document.']');
+                               }
+                               if (!$this->empty_string($this->ur_annots)) {
+                                       $this->_out('/Annots['.$this->ur_annots.']');
+                               }
+                               if (!$this->empty_string($this->ur_form)) {
+                                       $this->_out('/Form['.$this->ur_form.']');
+                               }
+                               if (!$this->empty_string($this->ur_signature)) {
+                                       $this->_out('/Signature['.$this->ur_signature.']');
+                               }
                        }
-                       if (!isset($enc)) {\r
-                               $enc = '';\r
+                       $this->_out('>>');
+                       $this->_out('>>');
+                       $this->_out(']');
+                       if (isset($this->signature_data['info']['Name']) AND !$this->empty_string($this->signature_data['info']['Name'])) {
+                               $this->_out('/Name '.$this->_textstring($this->signature_data['info']['Name']).'');
                        }
-                       if (!isset($dw) OR $this->empty_string($dw)) {
-                               // set default width
-                               if (isset($desc['MissingWidth']) AND ($desc['MissingWidth'] > 0)) {
-                                       $dw = $desc['MissingWidth'];
-                               } elseif (isset($cw[32])) {\r
-                                       $dw = $cw[32];
-                               } else {
-                                       $dw = 600;
-                               }\r
-                       }\r
-                       ++$this->numfonts;                      \r
-                       // register CID font (all styles at once)\r
-                       if ($type == 'cidfont0') {
-                               $file = ''; // not embedded\r
-                               $styles = array('' => '', 'B' => ',Bold', 'I' => ',Italic', 'BI' => ',BoldItalic');\r
-                               $sname = $name.$styles[$bistyle];
-                               if ((strpos($bistyle, 'B') !== false) AND (isset($desc['StemV'])) AND ($desc['StemV'] == 70)) {\r
-                                       $desc['StemV'] = 120;\r
-                               }
-                               $this->setFontBuffer($fontkey, array('i' => $this->numfonts, 'type' => $type, 'name' => $sname, 'desc' => $desc, 'cidinfo' => $cidinfo, 'up' => $up, 'ut' => $ut, 'cw' => $cw, 'dw' => $dw, 'enc' => $enc));\r
-                       } elseif ($type == 'core') {\r
-                               $this->setFontBuffer($fontkey, array('i' => $this->numfonts, 'type' => 'core', 'name' => $this->CoreFonts[$fontkey], 'up' => -100, 'ut' => 50, 'cw' => $cw, 'dw' => $dw));\r
-                       } elseif (($type == 'TrueType') OR ($type == 'Type1')) {\r
-                               $this->setFontBuffer($fontkey, array('i' => $this->numfonts, 'type' => $type, 'name' => $name, 'up' => $up, 'ut' => $ut, 'cw' => $cw, 'dw' => $dw, 'file' => $file, 'enc' => $enc, 'desc' => $desc));\r
-                       } elseif ($type == 'TrueTypeUnicode') {\r
-                               $this->setFontBuffer($fontkey, array('i' => $this->numfonts, 'type' => $type, 'name' => $name, 'desc' => $desc, 'up' => $up, 'ut' => $ut, 'cw' => $cw, 'dw' => $dw, 'enc' => $enc, 'file' => $file, 'ctg' => $ctg));\r
-                       } else {\r
-                               $this->Error('Unknow font type: '.$type.'');\r
-                       }\r
-                       if (isset($diff) AND (!empty($diff))) {\r
-                               //Search existing encodings\r
-                               $d = 0;\r
-                               $nb = count($this->diffs);\r
-                               for ($i=1; $i <= $nb; ++$i) {\r
-                                       if ($this->diffs[$i] == $diff) {\r
-                                               $d = $i;\r
-                                               break;\r
-                                       }\r
-                               }\r
-                               if ($d == 0) {\r
-                                       $d = $nb + 1;\r
-                                       $this->diffs[$d] = $diff;\r
-                               }
-                               $this->setFontSubBuffer($fontkey, 'diff', $d);\r
-                       }\r
-                       if (!$this->empty_string($file)) {\r
-                               if ((strcasecmp($type,'TrueType') == 0) OR (strcasecmp($type, 'TrueTypeUnicode') == 0)) {\r
-                                       $this->FontFiles[$file] = array('length1' => $originalsize, 'fontdir' => $fontdir);\r
-                               } elseif ($type != 'core') {\r
-                                       $this->FontFiles[$file] = array('length1' => $size1, 'length2' => $size2, 'fontdir' => $fontdir);\r
-                               }\r
-                       }\r
-                       return $fontdata;\r
-               }\r
-\r
-               /**\r
-               * Sets the font used to print character strings. \r
-               * The font can be either a standard one or a font added via the AddFont() method. Standard fonts use Windows encoding cp1252 (Western Europe).\r
-               * The method can be called before the first page is created and the font is retained from page to page. \r
-               * If you just wish to change the current font size, it is simpler to call SetFontSize().\r
-               * Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:<ul><li>They are in the current directory (the one where the running script lies)</li><li>They are in one of the directories defined by the include_path parameter</li><li>They are in the directory defined by the K_PATH_FONTS constant</li></ul><br />\r
-               * @param string $family Family font. It can be either a name defined by AddFont() or one of the standard Type1 families (case insensitive):<ul><li>times (Times-Roman)</li><li>timesb (Times-Bold)</li><li>timesi (Times-Italic)</li><li>timesbi (Times-BoldItalic)</li><li>helvetica (Helvetica)</li><li>helveticab (Helvetica-Bold)</li><li>helveticai (Helvetica-Oblique)</li><li>helveticabi (Helvetica-BoldOblique)</li><li>courier (Courier)</li><li>courierb (Courier-Bold)</li><li>courieri (Courier-Oblique)</li><li>courierbi (Courier-BoldOblique)</li><li>symbol (Symbol)</li><li>zapfdingbats (ZapfDingbats)</li></ul> It is also possible to pass an empty string. In that case, the current family is retained.\r
-               * @param string $style Font style. Possible values are (case insensitive):<ul><li>empty string: regular</li><li>B: bold</li><li>I: italic</li><li>U: underline</li><li>D: line trough</li></ul> or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats basic fonts or other fonts when not defined.\r
-               * @param float $size Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12
-               * @param string $fontfile The font definition file. By default, the name is built from the family and style, in lower case with no spaces.\r
-               * @access public\r
-               * @since 1.0\r
-               * @see AddFont(), SetFontSize()\r
-               */\r
-               public function SetFont($family, $style='', $size=0, $fontfile='') {
-                       //Select a font; size given in points\r
-                       if ($size == 0) {\r
-                               $size = $this->FontSizePt;\r
-                       }\r
-                       // try to add font (if not already added)\r
-                       $fontdata = $this->AddFont($family, $style, $fontfile);\r
-                       $this->FontFamily = $fontdata['family'];\r
-                       $this->FontStyle = $fontdata['style'];\r
-                       $this->CurrentFont = $this->getFontBuffer($fontdata['fontkey']);\r
-                       $this->SetFontSize($size);\r
-               }\r
-\r
-               /**\r
-               * Defines the size of the current font.\r
-               * @param float $size The size (in points)\r
-               * @access public\r
-               * @since 1.0\r
-               * @see SetFont()\r
-               */\r
-               public function SetFontSize($size) {\r
-                       //Set font size in points\r
-                       $this->FontSizePt = $size;\r
-                       $this->FontSize = $size / $this->k;\r
-                       if (isset($this->CurrentFont['desc']['Ascent']) AND ($this->CurrentFont['desc']['Ascent'] > 0)) {\r
-                               $this->FontAscent = $this->CurrentFont['desc']['Ascent'] * $this->FontSize / 1000;\r
-                       } else {\r
-                               $this->FontAscent = 0.8 * $this->FontSize;\r
-                       }\r
-                       if (isset($this->CurrentFont['desc']['Descent']) AND ($this->CurrentFont['desc']['Descent'] > 0)) {\r
-                               $this->FontDescent = - $this->CurrentFont['desc']['Descent'] * $this->FontSize / 1000;\r
-                       } else {\r
-                               $this->FontDescent = 0.2 * $this->FontSize;\r
-                       }\r
-                       if (($this->page > 0) AND (isset($this->CurrentFont['i']))) {\r
-                               $this->_out(sprintf('BT /F%d %.2F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));\r
-                       }\r
-               }\r
-
-               /**\r
-               * Defines the default monospaced font.\r
-               * @param string $font Font name.\r
-               * @access public\r
-               * @since 4.5.025\r
-               */\r
-               public function SetDefaultMonospacedFont($font) {
-                       $this->default_monospaced_font = $font;
-               }
-               \r
-               /**\r
-               * Creates a new internal link and returns its identifier. An internal link is a clickable area which directs to another place within the document.<br />\r
-               * The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is defined with SetLink().\r
-               * @access public\r
-               * @since 1.5\r
-               * @see Cell(), Write(), Image(), Link(), SetLink()\r
-               */\r
-               public function AddLink() {\r
-                       //Create a new internal link\r
-                       $n = count($this->links) + 1;\r
-                       $this->links[$n] = array(0, 0);\r
-                       return $n;\r
-               }\r
-\r
-               /**\r
-               * Defines the page and position a link points to.\r
-               * @param int $link The link identifier returned by AddLink()\r
-               * @param float $y Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page)\r
-               * @param int $page Number of target page; -1 indicates the current page. This is the default value\r
-               * @access public\r
-               * @since 1.5\r
-               * @see AddLink()\r
-               */\r
-               public function SetLink($link, $y=0, $page=-1) {\r
-                       if ($y == -1) {\r
-                               $y = $this->y;\r
-                       }\r
-                       if ($page == -1) {\r
-                               $page = $this->page;\r
-                       }\r
-                       $this->links[$link] = array($page, $y);\r
-               }\r
-\r
-               /**\r
-               * Puts a link on a rectangular area of the page.\r
-               * Text or image links are generally put via Cell(), Write() or Image(), but this method can be useful for instance to define a clickable area inside an image.\r
-               * @param float $x Abscissa of the upper-left corner of the rectangle\r
-               * @param float $y Ordinate of the upper-left corner of the rectangle\r
-               * @param float $w Width of the rectangle\r
-               * @param float $h Height of the rectangle\r
-               * @param mixed $link URL or identifier returned by AddLink()
-               * @param int $spaces number of spaces on the text to link\r
-               * @access public\r
-               * @since 1.5\r
-               * @see AddLink(), Annotation(), Cell(), Write(), Image()\r
-               */\r
-               public function Link($x, $y, $w, $h, $link, $spaces=0) {\r
-                       $this->Annotation($x, $y, $w, $h, $link, array('Subtype'=>'Link'), $spaces);\r
-               }\r
-               \r
-               /**\r
-               * Puts a markup annotation on a rectangular area of the page.\r
-               * !!!!THE ANNOTATION SUPPORT IS NOT YET FULLY IMPLEMENTED !!!!\r
-               * @param float $x Abscissa of the upper-left corner of the rectangle\r
-               * @param float $y Ordinate of the upper-left corner of the rectangle\r
-               * @param float $w Width of the rectangle\r
-               * @param float $h Height of the rectangle\r
-               * @param string $text annotation text or alternate content\r
-               * @param array $opt array of options (see section 8.4 of PDF reference 1.7).
-               * @param int $spaces number of spaces on the text to link\r
-               * @access public\r
-               * @since 4.0.018 (2008-08-06)\r
-               */\r
-               public function Annotation($x, $y, $w, $h, $text, $opt=array('Subtype'=>'Text'), $spaces=0) {
-                       // recalculate coordinates to account for graphic transformations
-                       if (isset($this->transfmatrix)) {
-                               $maxid = count($this->transfmatrix) - 1;
-                               for ($i=$maxid; $i >= 0; $i--) {
-                                       $ctm = $this->transfmatrix[$i];
-                                       if (isset($ctm['a'])) {
-                                               $x = $x * $this->k;
-                                               $y = ($this->h - $y) * $this->k;
-                                               $w = $w * $this->k;
-                                               $h = $h * $this->k;
-                                               // top left
-                                               $xt = $x;
-                                               $yt = $y;
-                                               $x1 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e'];
-                                               $y1 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f'];
-                                               // top right
-                                               $xt = $x + $w;
-                                               $yt = $y;
-                                               $x2 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e'];
-                                               $y2 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f'];
-                                               // bottom left
-                                               $xt = $x;
-                                               $yt = $y - $h;
-                                               $x3 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e'];
-                                               $y3 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f'];
-                                               // bottom right
-                                               $xt = $x + $w;
-                                               $yt = $y - $h;
-                                               $x4 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e'];
-                                               $y4 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f'];
-                                               // new coordinates (rectangle area)
-                                               $x = min($x1, $x2, $x3, $x4);
-                                               $y = max($y1, $y2, $y3, $y4);
-                                               $w = (max($x1, $x2, $x3, $x4) - $x) / $this->k;
-                                               $h = ($y - min($y1, $y2, $y3, $y4)) / $this->k;
-                                               $x = $x / $this->k;
-                                               $y = $this->h - ($y / $this->k);
-                                       }
-                               }
-                       }\r
-                       $this->PageAnnots[$this->page][] = array('x' => $x, 'y' => $y, 'w' => $w, 'h' => $h, 'txt' => $text, 'opt' => $opt, 'numspaces' => $spaces);
-                       if (($opt['Subtype'] == 'FileAttachment') AND (!$this->empty_string($opt['FS'])) AND file_exists($opt['FS']) AND (!isset($this->embeddedfiles[basename($opt['FS'])]))) {
-                               $this->embeddedfiles[basename($opt['FS'])] = array('file' => $opt['FS'], 'n' => (count($this->embeddedfiles) + 100000));
-                       }\r
-               }
-
-               /**\r
-               * Embedd the attached files.\r
-               * @since 4.4.000 (2008-12-07)
-               * @access protected\r
-               * @see Annotation()\r
-               */\r
-               protected function _putEmbeddedFiles() {
-                       reset($this->embeddedfiles);
-                       foreach ($this->embeddedfiles as $filename => $filedata) {
-                               $data = file_get_contents($filedata['file']);
-                               $filter = '';
-                               if ($this->compress) {
-                                       $data = gzcompress($data);
-                                       $filter = ' /Filter /FlateDecode';
-                               }
-                               $this->offsets[$filedata['n']] = $this->bufferlen;\r
-                               $this->_out($filedata['n'].' 0 obj');\r
-                               $this->_out('<</Type /EmbeddedFile'.$filter.' /Length '.strlen($data).' >>');
-                               $this->_putstream($data);\r
-                               $this->_out('endobj');
+                       if (isset($this->signature_data['info']['Location']) AND !$this->empty_string($this->signature_data['info']['Location'])) {
+                               $this->_out('/Location '.$this->_textstring($this->signature_data['info']['Location']).'');
+                       }
+                       if (isset($this->signature_data['info']['Reason']) AND !$this->empty_string($this->signature_data['info']['Reason'])) {
+                               $this->_out('/Reason '.$this->_textstring($this->signature_data['info']['Reason']).'');
                        }
+                       if (isset($this->signature_data['info']['ContactInfo']) AND !$this->empty_string($this->signature_data['info']['ContactInfo'])) {
+                               $this->_out('/ContactInfo '.$this->_textstring($this->signature_data['info']['ContactInfo']).'');
+                       }
+                       $this->_out('/M '.$this->_datestring());
                }
-               \r
-               /**\r
-               * Prints a character string.
-               * The origin is on the left of the first charcter, on the baseline.
-               * This method allows to place a string precisely on the page.\r
-               * @param float $x Abscissa of the origin\r
-               * @param float $y Ordinate of the origin\r
-               * @param string $txt String to print\r
-               * @param int $stroke outline size in points (0 = disable)\r
-               * @param boolean $clip if true activate clipping mode (you must call StartTransform() before this function and StopTransform() to stop the clipping tranformation).\r
-               * @access public\r
-               * @since 1.0
-               * @deprecated deprecated since version 4.3.005 (2008-11-25)\r
-               * @see Cell(), Write(), MultiCell(), WriteHTML(), WriteHTMLCell()\r
-               */\r
-               public function Text($x, $y, $txt, $stroke=0, $clip=false) {\r
-                       //Output a string\r
-                       if ($this->rtl) {\r
-                               // bidirectional algorithm (some chars may be changed affecting the line length)\r
-                               $s = $this->utf8Bidi($this->UTF8StringToArray($txt), $txt, $this->tmprtl);\r
-                               $l = $this->GetArrStringWidth($s);\r
-                               $xr = $this->w - $x - $this->GetArrStringWidth($s);\r
-                       } else {\r
-                               $xr = $x;\r
-                       }\r
-                       $opt = '';\r
-                       if (($stroke > 0) AND (!$clip)) {\r
-                               $opt .= '1 Tr '.intval($stroke).' w ';\r
-                       } elseif (($stroke > 0) AND $clip) {\r
-                               $opt .= '5 Tr '.intval($stroke).' w ';\r
-                       } elseif ($clip) {\r
-                               $opt .= '7 Tr ';\r
-                       }\r
-                       $s = sprintf('BT %.2F %.2F Td %s(%s) Tj ET 0 Tr', $xr * $this->k, ($this->h-$y) * $this->k, $opt, $this->_escapetext($txt));\r
-                       if ($this->underline AND ($txt!='')) {\r
-                               $s .= ' '.$this->_dounderline($xr, $y, $txt);\r
-                       }\r
-                       if ($this->linethrough AND ($txt!='')) { \r
-                               $s .= ' '.$this->_dolinethrough($xr, $y, $txt); \r
-                       }\r
-                       if ($this->ColorFlag AND (!$clip)) {\r
-                               $s='q '.$this->TextColor.' '.$s.' Q';\r
-                       }\r
-                       $this->_out($s);\r
-               }\r
-\r
-               /**\r
-               * Whenever a page break condition is met, the method is called, and the break is issued or not depending on the returned value. \r
-               * The default implementation returns a value according to the mode selected by SetAutoPageBreak().<br />\r
-               * This method is called automatically and should not be called directly by the application.\r
-               * @return boolean\r
-               * @access public\r
-               * @since 1.4\r
-               * @see SetAutoPageBreak()\r
-               */\r
-               public function AcceptPageBreak() {\r
-                       return $this->AutoPageBreak;\r
-               }\r
-               \r
-               /**\r
-               * Add page if needed.\r
-               * @param float $h Cell height. Default value: 0.
-               * @param mixed $y starting y position, leave empty for current position.
-               * @param boolean $addpage if true add a page, otherwise only return the true/false state
-               * @return boolean true in case of page break, false otherwise.\r
-               * @since 3.2.000 (2008-07-01)\r
-               * @access protected\r
-               */\r
-               protected function checkPageBreak($h=0, $y='', $addpage=true) {\r
-                       if ($this->empty_string($y)) {
-                               $y = $this->y;
+               
+               /*
+               * Set User's Rights for PDF Reader
+               * WARNING: This works only using the Adobe private key with the setSignature() method!.
+               * Check the PDF Reference 8.7.1 Transform Methods, 
+               * Table 8.105 Entries in the UR transform parameters dictionary
+               * @param boolean $enable if true enable user's rights on PDF reader
+               * @param string $document Names specifying additional document-wide usage rights for the document. The only defined value is "/FullSave", which permits a user to save the document along with modified form and/or annotation data.
+               * @param string $annots Names specifying additional annotation-related usage rights for the document. Valid names in PDF 1.5 and later are /Create/Delete/Modify/Copy/Import/Export, which permit the user to perform the named operation on annotations.
+               * @param string $form Names specifying additional form-field-related usage rights for the document. Valid names are: /Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate 
+               * @param string $signature Names specifying additional signature-related usage rights for the document. The only defined value is /Modify, which permits a user to apply a digital signature to an existing signature form field or clear a signed signature form field.
+               * @access public
+               * @author Nicola Asuni
+               * @since 2.9.000 (2008-03-26)
+               */
+               public function setUserRights(
+                               $enable=true, 
+                               $document='/FullSave',
+                               $annots='/Create/Delete/Modify/Copy/Import/Export',
+                               $form='/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate',
+                               $signature='/Modify') {
+                       $this->ur = $enable;
+                       $this->ur_document = $document;
+                       $this->ur_annots = $annots;
+                       $this->ur_form = $form;
+                       $this->ur_signature = $signature;
+                       if (!$this->sign) {
+                               // This signature only works using the Adobe Private key that is unavailable!
+                               $this->setSignature('', '', '', '', 0, array());
                        }
-                       if ((($y + $h) > $this->PageBreakTrigger) AND (!$this->InFooter) AND ($this->AcceptPageBreak())) {\r
-                               if ($addpage) {
-                                       //Automatic page break\r
-                                       $x = $this->x;\r
-                                       $this->AddPage($this->CurOrientation);\r
-                                       $this->y = $this->tMargin;
-                                       $oldpage = $this->page - 1;
-                                       if ($this->rtl) {
-                                               if ($this->pagedim[$this->page]['orm'] != $this->pagedim[$oldpage]['orm']) {
-                                                       $this->x = $x - ($this->pagedim[$this->page]['orm'] - $this->pagedim[$oldpage]['orm']);
-                                               } else {
-                                                       $this->x = $x;
-                                               }
-                                       } else {
-                                               if ($this->pagedim[$this->page]['olm'] != $this->pagedim[$oldpage]['olm']) {
-                                                       $this->x = $x + ($this->pagedim[$this->page]['olm'] - $this->pagedim[$oldpage]['olm']);
-                                               } else {
-                                                       $this->x = $x;
-                                               }
-                                       }
-                               }
-                               return true;\r
-                       }
-                       return false;\r
-               }\r
-\r
-               /**\r
-               * Prints a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.<br />\r
-               * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.\r
-               * @param float $w Cell width. If 0, the cell extends up to the right margin.\r
-               * @param float $h Cell height. Default value: 0.\r
-               * @param string $txt String to print. Default value: empty string.\r
-               * @param mixed $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>\r
-               * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right (or left for RTL languages)</li><li>1: to the beginning of the next line</li><li>2: below</li></ul>\r
-               Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0.\r
-               * @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul>\r
-               * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.\r
-               * @param mixed $link URL or identifier returned by AddLink().\r
-               * @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
-               * @param boolean $ignore_min_height if true ignore automatic minimum height value.\r
-               * @access public\r
-               * @since 1.0\r
-               * @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), AddLink(), Ln(), MultiCell(), Write(), SetAutoPageBreak()\r
-               */\r
-               public function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false) {\r
-                       //$min_cell_height = $this->FontAscent + $this->FontDescent;\r
-                       $min_cell_height = $this->FontSize * $this->cell_height_ratio;\r
-                       if ($h < $min_cell_height) {\r
-                               $h = $min_cell_height;\r
-                       }\r
-                       $this->checkPageBreak($h);\r
-                       $this->_out($this->getCellCode($w, $h, $txt, $border, $ln, $align, $fill, $link, $stretch, $ignore_min_height));\r
-               }\r
-
-               /**\r
-               * Removes SHY characters from text.\r
-               * @param string $txt input string
-               * @return string without SHY characters.
+               }
+               
+               /*
+               * Enable document signature (requires the OpenSSL Library).
+               * The digital signature improve document authenticity and integrity and allows o enable extra features on Acrobat Reader.
+               * @param mixed $signing_cert signing certificate (string or filename prefixed with 'file://')
+               * @param mixed $private_key private key (string or filename prefixed with 'file://')
+               * @param string $private_key_password password
+               * @param string $extracerts specifies the name of a file containing a bunch of extra certificates to include in the signature which can for example be used to help the recipient to verify the certificate that you used.
+               * @param int $cert_type The access permissions granted for this document. Valid values shall be: 1 = No changes to the document shall be permitted; any change to the document shall invalidate the signature; 2 = Permitted changes shall be filling in forms, instantiating page templates, and signing; other changes shall invalidate the signature; 3 = Permitted changes shall be the same as for 2, as well as annotation creation, deletion, and modification; other changes shall invalidate the signature.
+               * @parm array $info array of option information: Name, Location, Reason, ContactInfo.
                * @access public
-               * @since (4.5.019) 2009-02-28\r
-               */\r
-               public function removeSHY($txt='') {
-                       /*
-                       * Unicode Data
-                       * Name : SOFT HYPHEN, commonly abbreviated as SHY
-                       * HTML Entity (decimal): &#173;
-                       * HTML Entity (hex): &#xad;
-                       * HTML Entity (named): &shy;
-                       * How to type in Microsoft Windows: [Alt +00AD] or [Alt 0173]
-                       * UTF-8 (hex): 0xC2 0xAD (c2ad)
-                       * UTF-8 character: chr(194).chr(173)
-                       */
-                       $txt = preg_replace('/([\\xc2]{1}[\\xad]{1})/', '', $txt);
-                       if (!$this->isunicode) {
-                               $txt = preg_replace('/([\\xad]{1})/', '', $txt);
+               * @author Nicola Asuni
+               * @since 4.6.005 (2009-04-24)
+               */
+               public function setSignature($signing_cert='', $private_key='', $private_key_password='', $extracerts='', $cert_type=2, $info=array()) {
+                       // to create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt
+                       // to convert pfx certificate to pem: openssl
+                       //     OpenSSL> pkcs12 -in <cert.pfx> -out <cert.crt> -nodes
+                       $this->sign = true;
+                       $this->signature_data = array();
+                       if (strlen($signing_cert) == 0) {
+                               $signing_cert = 'file://'.dirname(__FILE__).'/tcpdf.crt';
+                               $private_key_password = 'tcpdfdemo';
                        }
-                       return $txt;
+                       if (strlen($private_key) == 0) {
+                               $private_key = $signing_cert;
+                       }
+                       $this->signature_data['signcert'] = $signing_cert;
+                       $this->signature_data['privkey'] = $private_key;
+                       $this->signature_data['password'] = $private_key_password;
+                       $this->signature_data['extracerts'] = $extracerts;
+                       $this->signature_data['cert_type'] = $cert_type;
+                       $this->signature_data['info'] = $info;
                }
-               \r
-               /**\r
-               * Returns the PDF string code to print a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.<br />\r
-               * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.\r
-               * @param float $w Cell width. If 0, the cell extends up to the right margin.\r
-               * @param float $h Cell height. Default value: 0.\r
-               * @param string $txt String to print. Default value: empty string.\r
-               * @param mixed $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>\r
-               * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right (or left for RTL languages)</li><li>1: to the beginning of the next line</li><li>2: below</li></ul>Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0.\r
-               * @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul>\r
-               * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.\r
-               * @param mixed $link URL or identifier returned by AddLink().\r
-               * @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
-               * @param boolean $ignore_min_height if true ignore automatic minimum height value.\r
-               * @access protected\r
-               * @since 1.0\r
-               * @see Cell()\r
-               */\r
-               protected function getCellCode($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false) {
-                       $txt = $this->removeSHY($txt);
-                       $rs = ''; //string to be returned
-                       if (!$ignore_min_height) {\r
-                               $min_cell_height = $this->FontSize * $this->cell_height_ratio;\r
-                               if ($h < $min_cell_height) {\r
-                                       $h = $min_cell_height;\r
-                               }
-                       }\r
-                       $k = $this->k;\r
-                       if ($this->empty_string($w) OR ($w <= 0)) {\r
-                               if ($this->rtl) {\r
-                                       $w = $this->x - $this->lMargin;\r
-                               } else {\r
-                                       $w = $this->w - $this->rMargin - $this->x;\r
-                               }\r
-                       }\r
-                       $s = '';                        \r
-                       if (($fill == 1) OR ($border == 1)) {\r
-                               if ($fill == 1) {\r
-                                       $op = ($border == 1) ? 'B' : 'f';\r
-                               } else {\r
-                                       $op = 'S';\r
-                               }\r
-                               if ($this->rtl) {\r
-                                       $xk = (($this->x  - $w) * $k);\r
-                               } else {\r
-                                       $xk = ($this->x * $k);\r
-                               }\r
-                               $s .= sprintf('%.2F %.2F %.2F %.2F re %s ', $xk, (($this->h - $this->y) * $k), ($w * $k), (-$h * $k), $op);\r
-                       }\r
-                       if (is_string($border)) {
-                               $lm = ($this->LineWidth / 2);\r
-                               $x = $this->x;\r
-                               $y = $this->y;\r
-                               if (strpos($border,'L') !== false) {\r
-                                       if ($this->rtl) {\r
-                                               $xk = ($x - $w) * $k;\r
-                                       } else {\r
-                                               $xk = $x * $k;\r
-                                       }\r
-                                       $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y + $lm) * $k), $xk, (($this->h - ($y + $h + $lm)) * $k));\r
-                               }\r
-                               if (strpos($border,'T') !== false) {\r
-                                       if ($this->rtl) {\r
-                                               $xk = ($x - $w + $lm) * $k;\r
-                                               $xwk = ($x - $lm) * $k;\r
-                                       } else {\r
-                                               $xk = ($x - $lm) * $k;\r
-                                               $xwk = ($x + $w + $lm) * $k;\r
-                                       }\r
-                                       $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y) * $k), $xwk, (($this->h - $y) * $k));\r
-                               }\r
-                               if (strpos($border,'R') !== false) {\r
-                                       if ($this->rtl) {\r
-                                               $xk = $x * $k;\r
-                                       } else {\r
-                                               $xk = ($x + $w) * $k;\r
-                                       }\r
-                                       $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - $y + $lm) * $k), $xk, (($this->h - ($y + $h + $lm))* $k));\r
-                               }\r
-                               if (strpos($border,'B') !== false) {\r
-                                       if ($this->rtl) {\r
-                                               $xk = ($x - $w + $lm) * $k;\r
-                                               $xwk = ($x - $lm) * $k;\r
-                                       } else {\r
-                                               $xk = ($x - $lm) * $k;\r
-                                               $xwk = ($x + $w + $lm) * $k;\r
-                                       }\r
-                                       $s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $xk, (($this->h - ($y + $h)) * $k), $xwk, (($this->h - ($y + $h)) * $k));\r
-                               }\r
-                       }\r
-                       if ($txt != '') {\r
-                               // text lenght\r
-                               $width = $this->GetStringWidth($txt);\r
-                               // ratio between cell lenght and text lenght\r
-                               $ratio = ($w - (2 * $this->cMargin)) / $width;\r
-                               \r
-                               // stretch text if required\r
-                               if (($stretch > 0) AND (($ratio < 1) OR (($ratio > 1) AND (($stretch % 2) == 0)))) {\r
-                                       if ($stretch > 2) {\r
-                                               // spacing\r
-                                               //Calculate character spacing in points\r
-                                               $char_space = (($w - $width - (2 * $this->cMargin)) * $this->k) / max($this->GetNumChars($txt)-1,1);\r
-                                               //Set character spacing\r
-                                               $rs .= sprintf('BT %.2F Tc ET ', $char_space);\r
-                                       } else {\r
-                                               // scaling\r
-                                               //Calculate horizontal scaling\r
-                                               $horiz_scale = $ratio * 100.0;\r
-                                               //Set horizontal scaling\r
-                                               $rs .= sprintf('BT %.2F Tz ET ', $horiz_scale);\r
-                                       }\r
-                                       $align = '';\r
-                                       $width = $w - (2 * $this->cMargin);\r
-                               } else {\r
-                                       $stretch == 0;\r
-                               }\r
-                               if ($align == 'L') {\r
-                                       if ($this->rtl) {\r
-                                               $dx = $w - $width - $this->cMargin;\r
-                                       } else {\r
-                                               $dx = $this->cMargin;\r
-                                       }\r
-                               } elseif ($align == 'R') {\r
-                                       if ($this->rtl) {\r
-                                               $dx = $this->cMargin;\r
-                                       } else {\r
-                                               $dx = $w - $width - $this->cMargin;\r
-                                       }\r
-                               } elseif ($align == 'C') {\r
-                                       $dx = ($w - $width) / 2;\r
-                               } elseif ($align == 'J') {\r
-                                       if ($this->rtl) {\r
-                                               $dx = $w - $width - $this->cMargin;\r
-                                       } else {\r
-                                               $dx = $this->cMargin;\r
-                                       }\r
-                               } else {\r
-                                       $dx = $this->cMargin;\r
-                               }\r
-                               if ($this->ColorFlag) {\r
-                                       $s .= 'q '.$this->TextColor.' ';\r
-                               }\r
-                               $txt2 = $this->_escapetext($txt);\r
-                               if ($this->rtl) {\r
-                                       $xdk = ($this->x - $dx - $width) * $k;\r
-                               } else {\r
-                                       $xdk = ($this->x + $dx) * $k;\r
-                               }\r
-                               // Justification\r
-                               if ($align == 'J') {\r
-                                       // count number of spaces\r
-                                       $ns = substr_count($txt, ' ');\r
-                                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {\r
-                                               // get string width without spaces\r
-                                               $width = $this->GetStringWidth(str_replace(' ', '', $txt));\r
-                                               // calculate average space width\r
-                                               $spacewidth = ($w - $width - (2 * $this->cMargin)) / ($ns?$ns:1) / $this->FontSize / $this->k;\r
-                                               // set word position to be used with TJ operator\r
-                                               $txt2 = str_replace(chr(0).' ', ') '.(-2830 * $spacewidth).' (', $txt2);\r
-                                       } else {\r
-                                               // get string width\r
-                                               $width = $this->GetStringWidth($txt);\r
-                                               $spacewidth = (($w - $width - (2 * $this->cMargin)) / ($ns?$ns:1)) * $this->k;\r
-                                               $rs .= sprintf('BT %.3F Tw ET ', $spacewidth);\r
-                                       }\r
-                               }\r
-                               // calculate approximate position of the font base line\r
-                               //$basefonty = $this->y + (($h + $this->FontAscent - $this->FontDescent)/2);\r
-                               $basefonty = $this->y + ($h/2) + ($this->FontSize/3);\r
-                               // print text\r
-                               $s .= sprintf('BT %.2F %.2F Td [(%s)] TJ ET', $xdk, (($this->h - $basefonty) * $k), $txt2);\r
-                               if ($this->rtl) {\r
-                                       $xdx = $this->x - $dx - $width;\r
-                               } else {\r
-                                       $xdx = $this->x + $dx;\r
-                               }\r
-                               if ($this->underline)  {\r
-                                       $s .= ' '.$this->_dounderline($xdx, $basefonty, $txt);\r
-                               }\r
-                               if ($this->linethrough) { \r
-                                       $s .= ' '.$this->_dolinethrough($xdx, $basefonty, $txt);\r
-                               }\r
-                               if ($this->ColorFlag) {\r
-                                       $s .= ' Q';\r
-                               }\r
-                               if ($link) {\r
-                                       $this->Link($xdx, $this->y + (($h - $this->FontSize)/2), $width, $this->FontSize, $link, substr_count($txt, chr(32)));\r
-                               }\r
-                       }\r
-                       // output cell\r
-                       if ($s) {\r
-                               // output cell\r
-                               $rs .= $s;\r
-                               // reset text stretching\r
-                               if ($stretch > 2) {\r
-                                       //Reset character horizontal spacing\r
-                                       $rs .= ' BT 0 Tc ET';\r
-                               } elseif ($stretch > 0) {\r
-                                       //Reset character horizontal scaling\r
-                                       $rs .= ' BT 100 Tz ET';\r
-                               }\r
-                       }\r
-                       // reset word spacing
-                       if (!(($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) AND ($align == 'J')) {\r
-                               $rs .= ' BT 0 Tw ET';\r
-                       }\r
-                       $this->lasth = $h;\r
-                       if ($ln > 0) {\r
-                               //Go to the beginning of the next line\r
-                               $this->y += $h;\r
-                               if ($ln == 1) {\r
-                                       if ($this->rtl) {\r
-                                               $this->x = $this->w - $this->rMargin;\r
-                                       } else {\r
-                                               $this->x = $this->lMargin;\r
-                                       }\r
-                               }\r
-                       } else {\r
-                               // go left or right by case\r
-                               if ($this->rtl) {\r
-                                       $this->x -= $w;\r
-                               } else {\r
-                                       $this->x += $w;\r
-                               }\r
-                       }
-                       $gstyles = ''.$this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor.' '.$this->FillColor."\n";\r
-                       $rs = $gstyles.$rs;\r
-                       return $rs;\r
-               }\r
-\r
-               /**\r
-               * This method allows printing text with line breaks. \r
-               * They can be automatic (as soon as the text reaches the right border of the cell) or explicit (via the \n character). As many cells as necessary are output, one below the other.<br />\r
-               * Text can be aligned, centered or justified. The cell block can be framed and the background painted.\r
-               * @param float $w Width of cells. If 0, they extend up to the right margin of the page.\r
-               * @param float $h Cell minimum height. The cell extends automatically if needed.\r
-               * @param string $txt String to print\r
-               * @param mixed $border Indicates if borders must be drawn around the cell block. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>\r
-               * @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align</li><li>C: center</li><li>R: right align</li><li>J: justification (default value when $ishtml=false)</li></ul>\r
-               * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.\r
-               * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right</li><li>1: to the beginning of the next line [DEFAULT]</li><li>2: below</li></ul>\r
-               * @param float $x x position in user units\r
-               * @param float $y y position in user units\r
-               * @param boolean $reseth if true reset the last cell height (default true).\r
-               * @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>\r
-               * @param boolean $ishtml set to true if $txt is HTML content (default = false).
-               * @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width.
-               * @param float $maxh maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false.\r
-               * @return int Return the number of cells or 1 for html mode.\r
-               * @access public\r
-               * @since 1.3\r
-               * @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), Cell(), Write(), SetAutoPageBreak()\r
-               */\r
-               public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0) {     \r
-                       if ($this->empty_string($this->lasth) OR $reseth) {\r
-                               //set row height\r
-                               $this->lasth = $this->FontSize * $this->cell_height_ratio;\r
-                       }\r
-                       if (!$this->empty_string($y)) {\r
-                               $this->SetY($y);\r
-                       } else {\r
-                               $y = $this->GetY();\r
-                       }\r
-                       // check for page break\r
-                       $this->checkPageBreak($h);\r
-                       $y = $this->GetY();\r
-                       // get current page number\r
-                       $startpage = $this->page;\r
-                       if (!$this->empty_string($x)) {\r
-                               $this->SetX($x);\r
-                       } else {\r
-                               $x = $this->GetX();\r
-                       }\r
-                       if ($this->empty_string($w) OR ($w <= 0)) {\r
-                               if ($this->rtl) {\r
-                                       $w = $this->x - $this->lMargin;\r
-                               } else {\r
-                                       $w = $this->w - $this->rMargin - $this->x;\r
-                               }\r
-                       }\r
-                       // store original margin values\r
-                       $lMargin = $this->lMargin;\r
-                       $rMargin = $this->rMargin;\r
-                       if ($this->rtl) {\r
-                               $this->SetRightMargin($this->w - $this->x);\r
-                               $this->SetLeftMargin($this->x - $w);\r
-                       } else {\r
-                               $this->SetLeftMargin($this->x);\r
-                               $this->SetRightMargin($this->w - $this->x - $w);\r
+               
+               /*
+               * Create a new page group.
+               * NOTE: call this function before calling AddPage()
+               * @param int $page starting group page (leave empty for next page).
+               * @access public
+               * @since 3.0.000 (2008-03-27)
+               */
+               public function startPageGroup($page='') {
+                       if (empty($page)) {
+                               $page = $this->page + 1;
                        }
-                       $starty = $this->y;
-                       if ($autopadding) {\r
-                               // Adjust internal padding\r
-                               if ($this->cMargin < ($this->LineWidth / 2)) {\r
-                                       $this->cMargin = ($this->LineWidth / 2);\r
-                               }\r
-                               // Add top space if needed\r
-                               if (($this->lasth - $this->FontSize) < $this->LineWidth) {\r
-                                       $this->y += $this->LineWidth / 2;\r
-                               }\r
-                               // add top padding\r
-                               $this->y += $this->cMargin;
-                       }\r
-                       if ($ishtml) {\r
-                               // ******* Write HTML text\r
-                               $this->writeHTML($txt, true, 0, $reseth, true, $align);\r
-                               $nl = 1;\r
-                       } else {\r
-                               // ******* Write text\r
-                               $nl = $this->Write($this->lasth, $txt, '', 0, $align, true, $stretch, false, false, $maxh);\r
-                       }
-                       if ($autopadding) {\r
-                               // add bottom padding\r
-                               $this->y += $this->cMargin;\r
-                               // Add bottom space if needed\r
-                               if (($this->lasth - $this->FontSize) < $this->LineWidth) {\r
-                                       $this->y += $this->LineWidth / 2;\r
-                               }
-                       }\r
-                       // Get end-of-text Y position\r
-                       $currentY = $this->y;\r
-                       // get latest page number\r
-                       $endpage = $this->page;
-                       // check if a new page has been created\r
-                       if ($endpage > $startpage) {\r
-                               // design borders around HTML cells.\r
-                               for ($page=$startpage; $page <= $endpage; ++$page) {\r
-                                       $this->setPage($page);
-                                       if ($page == $startpage) {\r
-                                               $this->y = $starty; // put cursor at the beginning of cell on the first page
-                                               $h = $this->getPageHeight() - $starty - $this->getBreakMargin();
-                                               $cborder = $this->getBorderMode($border, $position='start');\r
-                                       } elseif ($page == $endpage) {\r
-                                               $this->y = $this->tMargin; // put cursor at the beginning of last page\r
-                                               $h = $currentY - $this->tMargin;
-                                               $cborder = $this->getBorderMode($border, $position='end');\r
-                                       } else {\r
-                                               $this->y = $this->tMargin; // put cursor at the beginning of the current page\r
-                                               $h = $this->getPageHeight() - $this->tMargin - $this->getBreakMargin();
-                                               $cborder = $this->getBorderMode($border, $position='middle');\r
-                                       }
-                                       $nx = $x;\r
-                                       // account for margin changes
-                                       if ($page > $startpage) {
-                                               if (($this->rtl) AND ($this->pagedim[$page]['orm'] != $this->pagedim[$startpage]['orm'])) {
-                                                       $nx = $x + ($this->pagedim[$page]['orm'] - $this->pagedim[$startpage]['orm']);
-                                               } elseif ((!$this->rtl) AND ($this->pagedim[$page]['olm'] != $this->pagedim[$startpage]['olm'])) {
-                                                       $nx = $x + ($this->pagedim[$page]['olm'] - $this->pagedim[$startpage]['olm']);
-                                               }
-                                       }
-                                       $this->SetX($nx);
-                                       $ccode = $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, false);
-                                       if ($cborder OR $fill) {
-                                               $pagebuff = $this->getPageBuffer($this->page);\r
-                                               $pstart = substr($pagebuff, 0, $this->intmrk[$this->page]);\r
-                                               $pend = substr($pagebuff, $this->intmrk[$this->page]);\r
-                                               $this->setPageBuffer($this->page, $pstart.$ccode."\n".$pend);\r
-                                               $this->intmrk[$this->page] += strlen($ccode."\n");
-                                       }\r
-                               }\r
-                       } else {\r
-                               $h = max($h, ($currentY - $y));\r
-                               // put cursor at the beginning of text\r
-                               $this->SetY($y); \r
-                               $this->SetX($x);\r
-                               // design a cell around the text
-                               $ccode = $this->getCellCode($w, $h, '', $border, 1, '', $fill, '', 0, true);
-                               if ($border OR $fill) {
-                                       if (end($this->transfmrk[$this->page]) !== false) {
-                                               $pagemarkkey = key($this->transfmrk[$this->page]);
-                                               $pagemark = &$this->transfmrk[$this->page][$pagemarkkey];
-                                       } elseif ($this->InFooter) {
-                                               $pagemark = &$this->footerpos[$this->page];
-                                       } else {
-                                               $pagemark = &$this->intmrk[$this->page];
-                                       }
-                                       $pagebuff = $this->getPageBuffer($this->page);\r
-                                       $pstart = substr($pagebuff, 0, $pagemark);\r
-                                       $pend = substr($pagebuff, $pagemark);\r
-                                       $this->setPageBuffer($this->page, $pstart.$ccode."\n".$pend);\r
-                                       $pagemark += strlen($ccode."\n");
-                               }\r
-                       }
-                       // Get end-of-cell Y position\r
-                       $currentY = $this->GetY();\r
-                       // restore original margin values\r
-                       $this->SetLeftMargin($lMargin);\r
-                       $this->SetRightMargin($rMargin);\r
-                       if ($ln > 0) {\r
-                               //Go to the beginning of the next line\r
-                               $this->SetY($currentY);\r
-                               if ($ln == 2) {\r
-                                       $this->SetX($x + $w);\r
-                               }\r
-                       } else {\r
-                               // go left or right by case\r
-                               $this->setPage($startpage);\r
-                               $this->y = $y;\r
-                               $this->SetX($x + $w);\r
-                       }\r
-                       return $nl;\r
-               }\r
+                       $this->newpagegroup[$page] = true;
+               }
+
+               /**
+               * Defines an alias for the total number of pages.
+               * It will be substituted as the document is closed.
+               * @param string $alias The alias.
+               * @access public
+               * @since 1.4
+               * @see getAliasNbPages(), PageNo(), Footer()
+               */
+               public function AliasNbPages($alias='{nb}') {
+                       $this->AliasNbPages = $alias;
+               }
+               
+               /**
+                * Returns the string alias used for the total number of pages.
+         * If the current font is unicode type, the returned string is surrounded by additional curly braces.
+                * @return string
+                * @access public
+                * @since 4.0.018 (2008-08-08)
+                * @see AliasNbPages(), PageNo(), Footer()
+               */
+               public function getAliasNbPages() {
+                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {
+                               return '{'.$this->AliasNbPages.'}';
+            }
+                       return $this->AliasNbPages;
+               }
+
+               /**
+               * Defines an alias for the page number.
+               * It will be substituted as the document is closed.
+               * @param string $alias The alias.
+               * @access public
+               * @since 4.5.000 (2009-01-02)
+               * @see getAliasNbPages(), PageNo(), Footer()
+               */
+               public function AliasNumPage($alias='{pnb}') {
+                       //Define an alias for total number of pages
+                       $this->AliasNumPage = $alias;
+               }
+               
+               /**
+                * Returns the string alias used for the page number.
+         * If the current font is unicode type, the returned string is surrounded by additional curly braces.
+                * @return string
+                * @access public
+                * @since 4.5.000 (2009-01-02)
+                * @see AliasNbPages(), PageNo(), Footer()
+               */
+               public function getAliasNumPage() {
+                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {
+                               return '{'.$this->AliasNumPage.'}';
+            }
+                       return $this->AliasNumPage;
+               }
+               
+               /*
+               * Return the current page in the group.
+               * @return current page in the group
+               * @access public
+               * @since 3.0.000 (2008-03-27)
+               */
+               public function getGroupPageNo() {
+                       return $this->pagegroups[$this->currpagegroup];
+               }
+
+               /**
+               * Returns the current group page number formatted as a string.
+               * @access public
+               * @since 4.3.003 (2008-11-18)
+               * @see PaneNo(), formatPageNumber()
+               */
+               public function getGroupPageNoFormatted() {
+                       return $this->formatPageNumber($this->getGroupPageNo());
+        }
+               
+               /*
+                * Return the alias of the current page group
+         * If the current font is unicode type, the returned string is surrounded by additional curly braces.
+                * (will be replaced by the total number of pages in this group).
+                * @return alias of the current page group
+                * @access public
+                * @since 3.0.000 (2008-03-27)
+               */
+               public function getPageGroupAlias() {
+                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {
+                               return '{'.$this->currpagegroup.'}';
+            }
+                       return $this->currpagegroup;
+               }
+               
+               /*
+                * Return the alias for the page number on the current page group
+         * If the current font is unicode type, the returned string is surrounded by additional curly braces.
+                * (will be replaced by the total number of pages in this group).
+                * @return alias of the current page group
+                * @access public
+                * @since 4.5.000 (2009-01-02)
+               */
+               public function getPageNumGroupAlias() {
+                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {
+                               return '{'.str_replace('{nb', '{pnb', $this->currpagegroup).'}';
+            }
+                       return str_replace('{nb', '{pnb', $this->currpagegroup);
+               }
+
+               /**
+               * Format the page numbers.
+               * This method can be overriden for custom formats.
+               * @param int $num page number
+               * @access protected
+               * @since 4.2.005 (2008-11-06)
+               */
+               protected function formatPageNumber($num) {
+                       return number_format((float)$num, 0, '', '.');
+               }
+
+               /**
+               * Format the page numbers on the Table Of Content.
+               * This method can be overriden for custom formats.
+               * @param int $num page number
+               * @access protected
+               * @since 4.5.001 (2009-01-04)
+               * @see addTOC()
+               */
+               protected function formatTOCPageNumber($num) {
+                       return number_format((float)$num, 0, '', '.');
+               }
+
+        /**
+               * Returns the current page number formatted as a string.
+               * @access public
+               * @since 4.2.005 (2008-11-06)
+               * @see PaneNo(), formatPageNumber()
+               */
+               public function PageNoFormatted() {
+                       return $this->formatPageNumber($this->PageNo());
+        }
 
-               /**
-               * Get the border mode accounting for multicell position (opens bottom side of multicell crossing pages)
-               * @param mixed $border Indicates if borders must be drawn around the cell block. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
-               * @param string multicell position: 'start', 'middle', 'end'
-               * @return border mode
+        /*
+               * Put visibility settings.
                * @access protected
-               * @since 4.4.002 (2008-12-09)
+               * @since 3.0.000 (2008-03-27)
                */
-               protected function getBorderMode($border, $position='start') {
-                       if ((!$this->opencell) AND ($border == 1)) {
-                               return 1;
-                       }
-                       $cborder = '';
-                       switch ($position) {
-                               case 'start': {
-                                       if ($border == 1) {
-                                               $cborder = 'LTR';
-                                       } else {
-                                               if (!(false === strpos($border, 'L'))) {
-                                                       $cborder .= 'L';
-                                               }
-                                               if (!(false === strpos($border, 'T'))) {
-                                                       $cborder .= 'T';
-                                               }
-                                               if (!(false === strpos($border, 'R'))) {
-                                                       $cborder .= 'R';
-                                               }
-                                               if ((!$this->opencell) AND (!(false === strpos($border, 'B')))) {
-                                                       $cborder .= 'B';
-                                               }
-                                       }
+               protected function _putocg() {
+                       $this->_newobj();
+                       $this->n_ocg_print = $this->n;
+                       $this->_out('<</Type /OCG /Name '.$this->_textstring('print'));
+                       $this->_out('/Usage <</Print <</PrintState /ON>> /View <</ViewState /OFF>>>>>>');
+                       $this->_out('endobj');
+                       $this->_newobj();
+                       $this->n_ocg_view = $this->n;
+                       $this->_out('<</Type /OCG /Name '.$this->_textstring('view'));
+                       $this->_out('/Usage <</Print <</PrintState /OFF>> /View <</ViewState /ON>>>>>>');
+                       $this->_out('endobj');
+               }
+               
+               /*
+               * Set the visibility of the successive elements.
+               * This can be useful, for instance, to put a background 
+               * image or color that will show on screen but won't print.
+               * @param string $v visibility mode. Legal values are: all, print, screen.
+               * @access public
+               * @since 3.0.000 (2008-03-27)
+               */
+               public function setVisibility($v) {
+                       if ($this->openMarkedContent) {
+                               // close existing open marked-content
+                               $this->_out('EMC');
+                               $this->openMarkedContent = false;
+                       }
+                       switch($v) {
+                               case 'print': {
+                                       $this->_out('/OC /OC1 BDC');
+                                       $this->openMarkedContent = true;
                                        break;
                                }
-                               case 'middle': {
-                                       if ($border == 1) {
-                                               $cborder = 'LR';
-                                       } else {
-                                               if (!(false === strpos($border, 'L'))) {
-                                                       $cborder .= 'L';
-                                               }
-                                               if ((!$this->opencell) AND (!(false === strpos($border, 'T')))) {
-                                                       $cborder .= 'T';
-                                               }
-                                               if (!(false === strpos($border, 'R'))) {
-                                                       $cborder .= 'R';
-                                               }
-                                               if ((!$this->opencell) AND (!(false === strpos($border, 'B')))) {
-                                                       $cborder .= 'B';
-                                               }
-                                       }
+                               case 'screen': {
+                                       $this->_out('/OC /OC2 BDC');
+                                       $this->openMarkedContent = true;
                                        break;
                                }
-                               case 'end': {
-                                       if ($border == 1) {
-                                               $cborder = 'LRB';
-                                       } else {
-                                               if (!(false === strpos($border, 'L'))) {
-                                                       $cborder .= 'L';
-                                               }
-                                               if ((!$this->opencell) AND (!(false === strpos($border, 'T')))) {
-                                                       $cborder .= 'T';
-                                               }
-                                               if (!(false === strpos($border, 'R'))) {
-                                                       $cborder .= 'R';
-                                               }
-                                               if (!(false === strpos($border, 'B'))) {
-                                                       $cborder .= 'B';
-                                               }
-                                       }
+                               case 'all': {
+                                       $this->_out('');
                                        break;
                                }
                                default: {
-                                       $cborder = $border;
+                                       $this->Error('Incorrect visibility: '.$v);
                                        break;
-                               }
-                       }
-                       return $cborder;
-               }
-
-               /**\r
-               * This method returns the estimated number of lines required to print the text.\r
-               * @param string $txt text to print\r
-               * @param float $w width of cell. If 0, they extend up to the right margin of the page.
-               * @return int Return the estimated number of lines.\r
-               * @access public\r
-               * @since 4.5.011\r
-               */\r
-               public function getNumLines($txt, $w=0) {
-                       $lines = 0;
-                       if ($this->empty_string($w) OR ($w <= 0)) {\r
-                               if ($this->rtl) {\r
-                                       $w = $this->x - $this->lMargin;\r
-                               } else {\r
-                                       $w = $this->w - $this->rMargin - $this->x;\r
-                               }\r
-                       }
-                       // max column width
-                       $wmax = $w - (2 * $this->cMargin);
-                       // remove carriage returns\r
-                       $txt = str_replace("\r", '', $txt);
-                       // remove last newline (if any)
-                       if (substr($txt,-1) == "\n") {
-                               $txt = substr($txt, 0, -1);
-                       }
-                       // divide text in blocks
-                       $txtblocks = explode("\n", $txt);
-                       // for each block;
-                       foreach ($txtblocks as $block) {
-                               // estimate the number of lines
-                               $lines += $this->empty_string($block) ? 1 : (ceil($this->GetStringWidth($block) / $wmax));
-                       }
-                       return $lines;
-               }
-                       \r
-               /**\r
-               * This method prints text from the current position.<br />\r
-               * @param float $h Line height\r
-               * @param string $txt String to print\r
-               * @param mixed $link URL or identifier returned by AddLink()\r
-               * @param int $fill Indicates if the background must be painted (1) or transparent (0). Default value: 0.\r
-               * @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul>\r
-               * @param boolean $ln if true set cursor at the bottom of the line, otherwise set cursor at the top of the line.\r
-               * @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>\r
-               * @param boolean $firstline if true prints only the first line and return the remaining string.
-               * @param boolean $firstblock if true the string is the starting of a line.
-               * @param float $maxh maximum height. The remaining unprinted text will be returned. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature.\r
-               * @return mixed Return the number of cells or the remaining string if $firstline = true.\r
-               * @access public\r
-               * @since 1.5\r
-               */\r
-               public function Write($h, $txt, $link='', $fill=0, $align='', $ln=false, $stretch=0, $firstline=false, $firstblock=false, $maxh=0) {
-                       if (strlen($txt) == 0) {
-                               $txt = ' ';
-                       }
-                       // remove carriage returns\r
-                       $s = str_replace("\r", '', $txt);\r
-                       // check if string contains arabic text\r
-                       if (preg_match(K_RE_PATTERN_ARABIC, $s)) {\r
-                               $arabic = true;\r
-                       } else {\r
-                               $arabic = false;\r
-                       }
-                       // check if string contains RTL text\r
-                       if ($arabic OR $this->tmprtl OR preg_match(K_RE_PATTERN_RTL, $txt)) {\r
-                               $rtlmode = true;\r
-                       } else {
-                               $rtlmode = false;
-                       }
-                       // get a char width
-                       $chrwidth = $this->GetCharWidth('.');\r
-                       // get array of unicode values\r
-                       $chars = $this->UTF8StringToArray($s);
-                       // get array of chars
-                       $uchars = $this->UTF8ArrayToUniArray($chars);\r
-                       // get the number of characters\r
-                       $nb = count($chars);
-                       // replacement for SHY character (minus symbol)
-                       $shy_replacement = 45;
-                       $shy_replacement_char = $this->unichr($shy_replacement);
-                       // widht for SHY replacement
-                       $shy_replacement_width = $this->GetCharWidth($shy_replacement);\r
-                       // store current position\r
-                       $prevx = $this->x;\r
-                       $prevy = $this->y;
-                       // max Y
-                       $maxy = $this->y + $maxh - $h - (2 * $this->cMargin);\r
-                       // calculate remaining line width ($w)\r
-                       if ($this->rtl) {\r
-                               $w = $this->x - $this->lMargin;\r
-                       } else {\r
-                               $w = $this->w - $this->rMargin - $this->x;\r
-                       }\r
-                       // max column width\r
-                       $wmax = $w - (2 * $this->cMargin);
-                       if (($chrwidth > $wmax) OR ($this->GetCharWidth($chars[0]) > $wmax)) {
-                               // a single character do not fit on column
-                               return '';
-                       }\r
-                       $i = 0; // character position\r
-                       $j = 0; // current starting position\r
-                       $sep = -1; // position of the last blank space
-                       $shy = false; // true if the last blank is a soft hypen (SHY)\r
-                       $l = 0; // current string lenght\r
-                       $nl = 0; //number of lines\r
-                       $linebreak = false;\r
-                       // for each character\r
-                       while ($i < $nb) {
-                               if (($maxh > 0) AND ($this->y >= $maxy) ) {
-                                       $firstline = true;
-                               }\r
-                               //Get the current character\r
-                               $c = $chars[$i];\r
-                               if ($c == 10) { // 10 = "\n" = new line\r
-                                       //Explicit line break\r
-                                       if ($align == 'J') {\r
-                                               if ($this->rtl) {\r
-                                                       $talign = 'R';\r
-                                               } else {\r
-                                                       $talign = 'L';\r
-                                               }\r
-                                       } else {\r
-                                               $talign = $align;\r
-                                       }
-                                       $tmpstr = $this->UniArrSubString($uchars, $j, $i);\r
-                                       if ($firstline) {\r
-                                               $startx = $this->x;
-                                               $tmparr = array_slice($chars, $j, $i);
-                                               if ($rtlmode) {\r
-                                                       $tmparr = $this->utf8Bidi($tmparr, $tmpstr, $this->tmprtl);
-                                               }
-                                               $linew = $this->GetArrStringWidth($tmparr);
-                                               unset($tmparr);\r
-                                               if ($this->rtl) {\r
-                                                       $this->endlinex = $startx - $linew;\r
-                                               } else {\r
-                                                       $this->endlinex = $startx + $linew;\r
-                                               }\r
-                                               $w = $linew;\r
-                                               $tmpcmargin = $this->cMargin;\r
-                                               if ($maxh == 0) {\r
-                                                       $this->cMargin = 0;
-                                               }\r
-                                       }\r
-                                       $this->Cell($w, $h, $tmpstr, 0, 1, $talign, $fill, $link, $stretch);
-                                       unset($tmpstr);\r
-                                       if ($firstline) {\r
-                                               $this->cMargin = $tmpcmargin;\r
-                                               return ($this->UniArrSubString($uchars, $i));\r
-                                       }\r
-                                       ++$nl;\r
-                                       $j = $i + 1;\r
-                                       $l = 0;\r
-                                       $sep = -1;
-                                       $shy = false;
-                                       // account for margin changes
-                                       if ((($this->y + $this->lasth) > $this->PageBreakTrigger) AND (!$this->InFooter)) {
-                                               // AcceptPageBreak() may be overriden on extended classed to include margin changes
-                                               $this->AcceptPageBreak();
-                                       }\r
-                                       $w = $this->getRemainingWidth();\r
-                                       $wmax = $w - (2 * $this->cMargin);\r
-                               } else {
-                                       // 160 is the non-breaking space.
-                                       // 173 is SHY (Soft Hypen).
-                                       // \p{Z} or \p{Separator}: any kind of Unicode whitespace or invisible separator.
-                                       // \p{Lo} or \p{Other_Letter}: a Unicode letter or ideograph that does not have lowercase and uppercase variants.
-                                       // \p{Lo} is needed because Chinese characters are packed next to each other without spaces in between.
-                                       if (($c != 160) AND (($c == 173) OR preg_match($this->re_spaces, $this->unichr($c)))) {\r
-                                               // update last blank space position\r
-                                               $sep = $i;
-                                               // check if is a SHY
-                                               if ($c == 173) {
-                                                       $shy = true;
-                                               } else {
-                                                       $shy = false;
-                                               }\r
-                                       }\r
-                                       // update string length
-                                       if ((($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) AND ($arabic)) {\r
-                                               // with bidirectional algorithm some chars may be changed affecting the line length\r
-                                               // *** very slow ***\r
-                                               $l = $this->GetArrStringWidth($this->utf8Bidi(array_slice($chars, $j, $i-$j+1), '', $this->tmprtl));\r
-                                       } else {\r
-                                               $l += $this->GetCharWidth($c);\r
-                                       }\r
-                                       if (($l > $wmax) OR ($shy AND (($l + $shy_replacement_width) > $wmax)) ) {\r
-                                               // we have reached the end of column\r
-                                               if ($sep == -1) {\r
-                                                       // check if the line was already started\r
-                                                       if (($this->rtl AND ($this->x <= ($this->w - $this->rMargin - $chrwidth)))\r
-                                                               OR ((!$this->rtl) AND ($this->x >= ($this->lMargin + $chrwidth)))) {\r
-                                                               // print a void cell and go to next line
-                                                               $this->Cell($w, $h, '', 0, 1);\r
-                                                               $linebreak = true;
-                                                               if ($firstline) {\r
-                                                                       return ($this->UniArrSubString($uchars, $j));\r
-                                                               }\r
-                                                       } else {\r
-                                                               // truncate the word because do not fit on column
-                                                               $tmpstr = $this->UniArrSubString($uchars, $j, $i);\r
-                                                               if ($firstline) {\r
-                                                                       $startx = $this->x;
-                                                                       $tmparr = array_slice($chars, $j, $i);
-                                                                       if ($rtlmode) {\r
-                                                                               $tmparr = $this->utf8Bidi($tmparr, $tmpstr, $this->tmprtl);
-                                                                       }
-                                                                       $linew = $this->GetArrStringWidth($tmparr);
-                                                                       unset($tmparr);\r
-                                                                       if ($this->rtl) {\r
-                                                                               $this->endlinex = $startx - $linew;\r
-                                                                       } else {\r
-                                                                               $this->endlinex = $startx + $linew;\r
-                                                                       }\r
-                                                                       $w = $linew;\r
-                                                                       $tmpcmargin = $this->cMargin;\r
-                                                                       if ($maxh == 0) {\r
-                                                                               $this->cMargin = 0;
-                                                                       }\r
-                                                               }\r
-                                                               $this->Cell($w, $h, $tmpstr, 0, 1, $align, $fill, $link, $stretch);
-                                                               unset($tmpstr);\r
-                                                               if ($firstline) {\r
-                                                                       $this->cMargin = $tmpcmargin;\r
-                                                                       return ($this->UniArrSubString($uchars, $i));\r
-                                                               }\r
-                                                               $j = $i;\r
-                                                               --$i;\r
-                                                       }       \r
-                                               } else {\r
-                                                       // word wrapping
-                                                       if ($this->rtl AND (!$firstblock)) {
-                                                               $endspace = 1;
-                                                       } else {
-                                                               $endspace = 0;
-                                                       }
-                                                       if ($shy) {
-                                                               // add hypen (minus symbol) at the end of the line
-                                                               $shy_width = $shy_replacement_width;
-                                                               if ($this->rtl) {\r
-                                                                       $shy_char_left = $shy_replacement_char;
-                                                                       $shy_char_right = '';\r
-                                                               } else {
-                                                                       $shy_char_left = '';\r
-                                                                       $shy_char_right = $shy_replacement_char;\r
-                                                               }
-                                                       } else {
-                                                               $shy_width = 0;
-                                                               $shy_char_left = '';
-                                                               $shy_char_right = '';
-                                                       }
-                                                       $tmpstr = $this->UniArrSubString($uchars, $j, ($sep + $endspace));\r
-                                                       if ($firstline) {\r
-                                                               $startx = $this->x;
-                                                               $tmparr = array_slice($chars, $j, ($sep + $endspace));
-                                                               if ($rtlmode) {\r
-                                                                       $tmparr = $this->utf8Bidi($tmparr, $tmpstr, $this->tmprtl);
-                                                               }
-                                                               $linew = $this->GetArrStringWidth($tmparr);
-                                                               unset($tmparr);\r
-                                                               if ($this->rtl) {\r
-                                                                       $this->endlinex = $startx - $linew - $shy_width;\r
-                                                               } else {\r
-                                                                       $this->endlinex = $startx + $linew + $shy_width;\r
-                                                               }\r
-                                                               $w = $linew;\r
-                                                               $tmpcmargin = $this->cMargin;
-                                                               if ($maxh == 0) {\r
-                                                                       $this->cMargin = 0;
-                                                               }\r
-                                                       }
-                                                       // print the line\r
-                                                       $this->Cell($w, $h, $shy_char_left.$tmpstr.$shy_char_right, 0, 1, $align, $fill, $link, $stretch);
-                                                       unset($tmpstr);\r
-                                                       if ($firstline) {
-                                                               // return the remaining text\r
-                                                               $this->cMargin = $tmpcmargin;\r
-                                                               return ($this->UniArrSubString($uchars, ($sep + $endspace)));\r
-                                                       }\r
-                                                       $i = $sep;\r
-                                                       $sep = -1;
-                                                       $shy = false;\r
-                                                       $j = ($i+1);\r
-                                               }
-                                               // account for margin changes
-                                               if ((($this->y + $this->lasth) > $this->PageBreakTrigger) AND (!$this->InFooter)) {
-                                                       // AcceptPageBreak() may be overriden on extended classed to include margin changes
-                                                       $this->AcceptPageBreak();
-                                               }\r
-                                               $w = $this->getRemainingWidth();\r
-                                               $wmax = $w - (2 * $this->cMargin);\r
-                                               if ($linebreak) {\r
-                                                       $linebreak = false;\r
-                                               } else {\r
-                                                       ++$nl;\r
-                                                       $l = 0;\r
-                                               }\r
-                                       }\r
-                               }\r
-                               ++$i;\r
-                       } // end while i < nb\r
-                       // print last substring (if any)\r
-                       if ($l > 0) {\r
-                               switch ($align) {\r
-                                       case 'J':\r
-                                       case 'C': {\r
-                                               $w = $w;\r
-                                               break;\r
-                                       }\r
-                                       case 'L': {\r
-                                               if ($this->rtl) {\r
-                                                       $w = $w;\r
-                                               } else {\r
-                                                       $w = $l;\r
-                                               }\r
-                                               break;\r
-                                       }\r
-                                       case 'R': {\r
-                                               if ($this->rtl) {\r
-                                                       $w = $l;\r
-                                               } else {\r
-                                                       $w = $w;\r
-                                               }\r
-                                               break;\r
-                                       }\r
-                                       default: {\r
-                                               $w = $l;\r
-                                               break;\r
-                                       }\r
-                               }
-                               $tmpstr = $this->UniArrSubString($uchars, $j, $nb);\r
-                               if ($firstline) {\r
-                                       $startx = $this->x;
-                                       $tmparr = array_slice($chars, $j, $nb);
-                                       if ($rtlmode) {\r
-                                               $tmparr = $this->utf8Bidi($tmparr, $tmpstr, $this->tmprtl);
-                                       }
-                                       $linew = $this->GetArrStringWidth($tmparr);
-                                       unset($tmparr);\r
-                                       if ($this->rtl) {\r
-                                               $this->endlinex = $startx - $linew;\r
-                                       } else {\r
-                                               $this->endlinex = $startx + $linew;\r
-                                       }\r
-                                       $w = $linew;\r
-                                       $tmpcmargin = $this->cMargin;
-                                       if ($maxh == 0) {\r
-                                               $this->cMargin = 0;
-                                       }\r
-                               }\r
-                               $this->Cell($w, $h, $tmpstr, 0, $ln, $align, $fill, $link, $stretch);
-                               unset($tmpstr);\r
-                               if ($firstline) {\r
-                                       $this->cMargin = $tmpcmargin;\r
-                                       return ($this->UniArrSubString($uchars, $nb));\r
-                               }\r
-                               ++$nl;\r
-                       }\r
-                       if ($firstline) {\r
-                               return '';\r
-                       }\r
-                       return $nl;\r
-               }\r
-                               \r
-               /**\r
-               * Returns the remaining width between the current position and margins.\r
-               * @return int Return the remaining width\r
-               * @access protected\r
-               */\r
-               protected function getRemainingWidth() {\r
-                       if ($this->rtl) {\r
-                               return ($this->x - $this->lMargin);\r
-                       } else {\r
-                               return ($this->w - $this->rMargin - $this->x);\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Extract a slice of the $strarr array and return it as string.\r
-               * @param string $strarr The input array of characters.\r
-               * @param int $start the starting element of $strarr.\r
-               * @param int $end first element that will not be returned.\r
-               * @return Return part of a string\r
-               * @access public\r
-               */\r
-               public function UTF8ArrSubString($strarr, $start='', $end='') {\r
-                       if (strlen($start) == 0) {\r
-                               $start = 0;\r
-                       }\r
-                       if (strlen($end) == 0) {\r
-                               $end = count($strarr);\r
-                       }\r
-                       $string = '';\r
-                       for ($i=$start; $i < $end; ++$i) {\r
-                               $string .= $this->unichr($strarr[$i]);\r
-                       }\r
-                       return $string;\r
-               }\r
-\r
-               /**\r
-               * Extract a slice of the $uniarr array and return it as string.\r
-               * @param string $uniarr The input array of characters.\r
-               * @param int $start the starting element of $strarr.\r
-               * @param int $end first element that will not be returned.\r
-               * @return Return part of a string\r
-               * @access public
-               * @since 4.5.037 (2009-04-07)\r
-               */\r
-               public function UniArrSubString($uniarr, $start='', $end='') {\r
-                       if (strlen($start) == 0) {\r
-                               $start = 0;\r
-                       }\r
-                       if (strlen($end) == 0) {\r
-                               $end = count($uniarr);\r
-                       }
-                       $string = '';\r
-                       for ($i=$start; $i < $end; ++$i) {\r
-                               $string .= $uniarr[$i];\r
-                       }\r
-                       return $string;\r
-               }\r
-\r
-               /**\r
-               * Convert an array of UTF8 values to array of unicode characters\r
-               * @param string $ta The input array of UTF8 values.\r
-               * @return Return array of unicode characters\r
-               * @access public
-               * @since 4.5.037 (2009-04-07)\r
-               */\r
-               public function UTF8ArrayToUniArray($ta) {\r
-                       return array_map(array($this, 'unichr'), $ta);\r
-               }\r
-               \r
-               /**\r
-               * Returns the unicode caracter specified by UTF-8 code\r
-               * @param int $c UTF-8 code\r
-               * @return Returns the specified character.\r
-               * @author Miguel Perez, Nicola Asuni\r
-               * @access public\r
-               * @since 2.3.000 (2008-03-05)\r
-               */\r
-               public function unichr($c) {\r
-                       if (!$this->isunicode) {\r
-                               return chr($c);\r
-                       } elseif ($c <= 0x7F) {\r
-                               // one byte\r
-                               return chr($c);\r
-                       } elseif ($c <= 0x7FF) {\r
-                               // two bytes\r
-                               return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F);\r
-                       } elseif ($c <= 0xFFFF) {\r
-                               // three bytes\r
-                               return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F);\r
-                       } elseif ($c <= 0x10FFFF) {\r
-                               // four bytes\r
-                               return chr(0xF0 | $c >> 18).chr(0x80 | $c >> 12 & 0x3F).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F);\r
-                       } else {\r
-                               return '';\r
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Puts an image in the page. \r
-               * The upper-left corner must be given. \r
-               * The dimensions can be specified in different ways:<ul>\r
-               * <li>explicit width and height (expressed in user unit)</li>\r
-               * <li>one explicit dimension, the other being calculated automatically in order to keep the original proportions</li>\r
-               * <li>no explicit dimension, in which case the image is put at 72 dpi</li></ul>\r
-               * Supported formats are JPEG and PNG images whitout GD library and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;\r
-               * The format can be specified explicitly or inferred from the file extension.<br />\r
-               * It is possible to put a link on the image.<br />\r
-               * Remark: if an image is used several times, only one copy will be embedded in the file.<br />\r
-               * @param string $file Name of the file containing the image.\r
-               * @param float $x Abscissa of the upper-left corner.\r
-               * @param float $y Ordinate of the upper-left corner.\r
-               * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated.\r
-               * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated.\r
-               * @param string $type Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension.\r
-               * @param mixed $link URL or identifier returned by AddLink().\r
-               * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>\r
-               * @param boolean $resize If true resize (reduce) the image to fit $w and $h (requires GD library).\r
-               * @param int $dpi dot-per-inch resolution used on resize\r
-               * @param string $palign Allows to center or align the image on the current line. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>
-               * @param boolean $ismask true if this image is a mask, false otherwise
-               * @param mixed $imgmask image object returned by this function or false
-               * @param mixed $border Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
-               * @param boolean $fitbox If true scale image dimensions proportionally to fit within the ($w, $h) box.
-               * @return image information\r
-               * @access public\r
-               * @since 1.1\r
-               */\r
-               public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false) {\r
-                       if ($x === '') {\r
-                               $x = $this->x;\r
-                       }\r
-                       if ($y === '') {\r
-                               $y = $this->y;\r
-                       }
-                       // get image dimensions
-                       $imsize = @getimagesize($file);
-                       if ($imsize === FALSE) {
-                               // encode spaces on filename
-                               $file = str_replace(' ', '%20', $file);
-                               $imsize = @getimagesize($file);
-                               if ($imsize === FALSE) {
-                                       $this->Error('[Image] No such file or directory in '.$file);
-                               }
-                       }
-                       // get original image width and height in pixels
-                       list($pixw, $pixh) = $imsize;\r
-                       // calculate image width and height on document\r
-                       if (($w <= 0) AND ($h <= 0)) {\r
-                               // convert image size to document unit\r
-                               $w = $this->pixelsToUnits($pixw);\r
-                               $h = $this->pixelsToUnits($pixh);\r
-                       } elseif ($w <= 0) {\r
-                               $w = $h * $pixw / $pixh;\r
-                       } elseif ($h <= 0) {\r
-                               $h = $w * $pixh / $pixw;\r
-                       } elseif ($fitbox AND ($w > 0) AND ($h > 0)) {
-                               // scale image dimensions proportionally to fit within the ($w, $h) box
-                               if ((($w * $pixh) / ($h * $pixw)) < 1) {
-                                       $h = $w * $pixh / $pixw;
-                               } else {
-                                       $w = $h * $pixw / $pixh;
-                               }
-                       }\r
-                       // calculate new minimum dimensions in pixels\r
-                       $neww = round($w * $this->k * $dpi / $this->dpi);\r
-                       $newh = round($h * $this->k * $dpi / $this->dpi);\r
-                       // check if resize is necessary (resize is used only to reduce the image)\r
-                       if (($neww * $newh) >= ($pixw * $pixh)) {\r
-                               $resize = false;\r
-                       }\r
-                       // check if image has been already added on document\r
-                       if (!in_array($file, $this->imagekeys)) {\r
-                               //First use of image, get info\r
-                               if ($type == '') {\r
-                                       $fileinfo = pathinfo($file);\r
-                                       if (isset($fileinfo['extension']) AND (!$this->empty_string($fileinfo['extension']))) {\r
-                                               $type = $fileinfo['extension'];\r
-                                       } else {\r
-                                               $this->Error('Image file has no extension and no type was specified: '.$file);\r
-                                       }\r
-                               }\r
-                               $type = strtolower($type);\r
-                               if ($type == 'jpg') {\r
-                                       $type = 'jpeg';\r
-                               }\r
-                               $mqr = get_magic_quotes_runtime();\r
-                               set_magic_quotes_runtime(0);\r
-                               // Specific image handlers\r
-                               $mtd = '_parse'.$type;\r
-                               // GD image handler function\r
-                               $gdfunction = 'imagecreatefrom'.$type;\r
-                               $info = false;\r
-                               if ((method_exists($this, $mtd)) AND (!($resize AND function_exists($gdfunction)))) {
-                                       // TCPDF image functions\r
-                                       $info = $this->$mtd($file);
-                                       if ($info == 'pngalpha') {
-                                               return $this->ImagePngAlpha($file, $x, $y, $w, $h, 'PNG', $link, $align, $resize, $dpi, $palign);
-                                       }\r
-                               } \r
-                               if (!$info) {\r
-                                       if (function_exists($gdfunction)) {\r
-                                               // GD library
-                                               $img = $gdfunction($file);\r
-                                               if ($resize) {\r
-                                                       $imgr = imagecreatetruecolor($neww, $newh);\r
-                                                       imagecopyresampled($imgr, $img, 0, 0, 0, 0, $neww, $newh, $pixw, $pixh); \r
-                                                       $info = $this->_toJPEG($imgr);\r
-                                               } else {\r
-                                                       $info = $this->_toJPEG($img);\r
-                                               }\r
-                                       } elseif (extension_loaded('imagick')) {\r
-                                               // ImageMagick library\r
-                                               $img = new Imagick();\r
-                                               $img->readImage($file);
-                                               if ($resize) {\r
-                                                       $img->resizeImage($neww, $newh, 10, 1, false);
-                                               }
-                                               $img->setCompressionQuality($this->jpeg_quality);
-                                               $img->setImageFormat('jpeg');
-                                               $tempname = tempnam(K_PATH_CACHE, 'jpg_');\r
-                                               $img->writeImage($tempname);\r
-                                               $info = $this->_parsejpeg($tempname);\r
-                                               unlink($tempname);\r
-                                               $img->destroy();\r
-                                       } else {
-                                               return;
-                                       }\r
-                               }\r
-                               if ($info === false) {\r
-                                       //If false, we cannot process image\r
-                                       return;\r
-                               }\r
-                               set_magic_quotes_runtime($mqr);
-                               if ($ismask) {
-                                       // force grayscale
-                                       $info['cs'] = 'DeviceGray';
-                               }\r
-                               $info['i'] = $this->numimages + 1;
-                               if ($imgmask !== false) {
-                                       $info['masked'] = $imgmask;
-                               }\r
-                               // add image to document\r
-                               $this->setImageBuffer($file, $info);\r
-                       } else {\r
-                               $info = $this->getImageBuffer($file);\r
-                       }\r
-                       // Check whether we need a new page first as this does not fit
-                       if ($this->checkPageBreak($h, $y)) {
-                               $y = $this->GetY() + $this->cMargin;
-                       }\r
-                       // set bottomcoordinates\r
-                       $this->img_rb_y = $y + $h;\r
-                       // set alignment\r
-                       if ($this->rtl) {\r
-                               if ($palign == 'L') {\r
-                                       $ximg = $this->lMargin;\r
-                                       // set right side coordinate\r
-                                       $this->img_rb_x = $ximg + $w;\r
-                               } elseif ($palign == 'C') {\r
-                                       $ximg = ($this->w - $x - $w) / 2;\r
-                                       // set right side coordinate\r
-                                       $this->img_rb_x = $ximg + $w;\r
-                               } else {\r
-                                       $ximg = $this->w - $x - $w;\r
-                                       // set left side coordinate\r
-                                       $this->img_rb_x = $ximg;\r
-                               }\r
-                       } else {\r
-                               if ($palign == 'R') {\r
-                                       $ximg = $this->w - $this->rMargin - $w;\r
-                                       // set left side coordinate\r
-                                       $this->img_rb_x = $ximg;\r
-                               } elseif ($palign == 'C') {\r
-                                       $ximg = ($this->w - $x - $w) / 2;\r
-                                       // set right side coordinate\r
-                                       $this->img_rb_x = $ximg + $w;\r
-                               } else {\r
-                                       $ximg = $x;\r
-                                       // set right side coordinate\r
-                                       $this->img_rb_x = $ximg + $w;\r
-                               }\r
-                       }
-                       if ($ismask) {
-                               // embed hidden, ouside the canvas
-                               $xkimg = ($this->pagedim[$this->page]['w'] + 10);
-                       } else {
-                               $xkimg = $ximg * $this->k;
-                       }\r
-                       $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q', ($w * $this->k), ($h * $this->k), $xkimg, (($this->h - ($y + $h)) * $this->k), $info['i']));\r
-                       if (!empty($border)) {
-                               $bx = $x;
-                               $by = $y;
-                               $this->x = $ximg;
-                               $this->y = $y;
-                               $this->Cell($w, $h, '', $border, 0, '', 0, '', 0);
-                               $this->x = $bx;
-                               $this->y = $by;
+                               }
                        }
-                       if ($link) {\r
-                               $this->Link($ximg, $y, $w, $h, $link, 0);\r
-                       }\r
-                       // set pointer to align the successive text/objects\r
-                       switch($align) {\r
-                               case 'T': {\r
-                                       $this->y = $y;\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'M': {\r
-                                       $this->y = $y + round($h/2);\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'B': {\r
-                                       $this->y = $this->img_rb_y;\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'N': {\r
-                                       $this->SetY($this->img_rb_y);\r
-                                       break;\r
-                               }\r
-                               default:{\r
-                                       break;\r
-                               }\r
-                       }\r
-                       $this->endlinex = $this->img_rb_x;
-                       return $info['i'];\r
-               }\r
-                               \r
-               /**\r
-               * Convert the loaded php image to a JPEG and then return a structure for the PDF creator.\r
-               * This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.\r
-               * @param string $file Image file name.\r
-               * @param image $image Image object.\r
-               * return image JPEG image object.\r
-               * @access protected\r
-               */\r
-               protected function _toJPEG($image) {\r
-                       $tempname = tempnam(K_PATH_CACHE, 'jpg_');\r
-                       imagejpeg($image, $tempname, $this->jpeg_quality);\r
-                       imagedestroy($image);\r
-                       $retvars = $this->_parsejpeg($tempname);\r
-                       // tidy up by removing temporary image\r
-                       unlink($tempname);\r
-                       return $retvars;\r
-               }\r
-               \r
-               /**\r
-               * Extract info from a JPEG file without using the GD library.\r
-               * @param string $file image file to parse\r
-               * @return array structure containing the image data\r
-               * @access protected\r
-               */\r
-               protected function _parsejpeg($file) {\r
-                       $a = getimagesize($file);\r
-                       if (empty($a)) {\r
-                               $this->Error('Missing or incorrect image file: '.$file);\r
-                       }\r
-                       if ($a[2] != 2) {\r
-                               $this->Error('Not a JPEG file: '.$file);\r
-                       }\r
-                       if ((!isset($a['channels'])) OR ($a['channels'] == 3)) {\r
-                               $colspace = 'DeviceRGB';\r
-                       } elseif ($a['channels'] == 4) {\r
-                               $colspace = 'DeviceCMYK';\r
-                       } else {\r
-                               $colspace = 'DeviceGray';\r
-                       }\r
-                       $bpc = isset($a['bits']) ? $a['bits'] : 8;\r
-                       $data = file_get_contents($file);\r
-                       return array('w' => $a[0], 'h' => $a[1], 'cs' => $colspace, 'bpc' => $bpc, 'f' => 'DCTDecode', 'data' => $data);\r
-               }\r
-\r
-               /**\r
-               * Extract info from a PNG file without using the GD library.\r
-               * @param string $file image file to parse\r
-               * @return array structure containing the image data\r
-               * @access protected\r
-               */\r
-               protected function _parsepng($file) {\r
-                       $f = fopen($file, 'rb');\r
-                       if ($f === false) {\r
-                               $this->Error('Can\'t open image file: '.$file);\r
-                       }\r
-                       //Check signature\r
-                       if (fread($f, 8) != chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) {\r
-                               $this->Error('Not a PNG file: '.$file);\r
-                       }\r
-                       //Read header chunk\r
-                       fread($f, 4);\r
-                       if (fread($f, 4) != 'IHDR') {\r
-                               $this->Error('Incorrect PNG file: '.$file);\r
-                       }\r
-                       $w = $this->_freadint($f);\r
-                       $h = $this->_freadint($f);\r
-                       $bpc = ord(fread($f, 1));\r
-                       if ($bpc > 8) {\r
-                               //$this->Error('16-bit depth not supported: '.$file);\r
-                               fclose($f);
-                               return false;\r
-                       }\r
-                       $ct = ord(fread($f, 1));\r
-                       if ($ct == 0) {\r
-                               $colspace = 'DeviceGray';\r
-                       } elseif ($ct == 2) {\r
-                               $colspace = 'DeviceRGB';\r
-                       } elseif ($ct == 3) {\r
-                               $colspace = 'Indexed';\r
-                       } else {
-                               // alpha channel\r
-                               fclose($f);
-                               return 'pngalpha';\r
-                       }\r
-                       if (ord(fread($f, 1)) != 0) {\r
-                               //$this->Error('Unknown compression method: '.$file);\r
-                               fclose($f);
-                               return false;\r
-                       }\r
-                       if (ord(fread($f, 1)) != 0) {\r
-                               //$this->Error('Unknown filter method: '.$file);\r
-                               fclose($f);
-                               return false;\r
-                       }\r
-                       if (ord(fread($f, 1)) != 0) {\r
-                               //$this->Error('Interlacing not supported: '.$file);\r
-                               fclose($f);
-                               return false;\r
-                       }\r
-                       fread($f, 4);\r
-                       $parms = '/DecodeParms <</Predictor 15 /Colors '.($ct==2 ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w.'>>';\r
-                       //Scan chunks looking for palette, transparency and image data\r
-                       $pal = '';\r
-                       $trns = '';\r
-                       $data = '';\r
-                       do {\r
-                               $n = $this->_freadint($f);\r
-                               $type = fread($f, 4);\r
-                               if ($type == 'PLTE') {\r
-                                       //Read palette\r
-                                       $pal = $this->rfread($f, $n);\r
-                                       fread($f, 4);\r
-                               } elseif ($type == 'tRNS') {\r
-                                       //Read transparency info\r
-                                       $t = $this->rfread($f, $n);\r
-                                       if ($ct == 0) {\r
-                                               $trns = array(ord(substr($t, 1, 1)));\r
-                                       } elseif ($ct == 2) {\r
-                                               $trns = array(ord(substr($t, 1, 1)), ord(substr($t, 3, 1)), ord(substr($t, 5, 1)));\r
-                                       } else {\r
-                                               $pos = strpos($t, chr(0));\r
-                                               if ($pos !== false) {\r
-                                                       $trns = array($pos);\r
-                                               }\r
-                                       }\r
-                                       fread($f, 4);\r
-                               } elseif ($type == 'IDAT') {\r
-                                       //Read image data block\r
-                                       $data .= $this->rfread($f, $n);\r
-                                       fread($f, 4);\r
-                               } elseif ($type == 'IEND') {\r
-                                       break;\r
-                               } else {\r
-                                       $this->rfread($f, $n + 4);\r
-                               }\r
-                       } while ($n);\r
-                       if (($colspace == 'Indexed') AND (empty($pal))) {\r
-                               //$this->Error('Missing palette in '.$file);\r
-                               fclose($f);
-                               return false;\r
-                       }\r
-                       fclose($f);\r
-                       return array('w' => $w, 'h' => $h, 'cs' => $colspace, 'bpc' => $bpc, 'f' => 'FlateDecode', 'parms' => $parms, 'pal' => $pal, 'trns' => $trns, 'data' => $data);\r
+                       $this->visibility = $v;
                }
-
-               /**\r
-               * Binary-safe and URL-safe file read.
-               * Reads up to length  bytes from the file pointer referenced by handle. Reading stops as soon as one of the following conditions is met: length bytes have been read; EOF (end of file) is reached.\r
-               * @param resource $handle\r
-               * @param int $length
-               * @return Returns the read string or FALSE in case of error.
-               * @author Nicola Asuni\r
-               * @access protected\r
-               * @since 4.5.027 (2009-03-16)\r
+               
+               /*
+               * Add transparency parameters to the current extgstate
+               * @param array $params parameters
+               * @return the number of extgstates
+               * @access protected
+               * @since 3.0.000 (2008-03-27)
                */
-               protected function rfread($handle, $length) {
-                       $data = fread($handle, $length);
-                       if ($data === false) {
-                               return false;
-                       }
-                       $rest = $length - strlen($data);
-                       if ($rest > 0) {
-                               $data .= $this->rfread($handle, $rest);
-                       }
-                       return $data;
+               protected function addExtGState($parms) {
+                       $n = count($this->extgstates) + 1;
+                       $this->extgstates[$n]['parms'] = $parms;
+                       return $n;
                }
-
-               /**\r
-               * Extract info from a PNG image with alpha channel using the GD library.\r
-               * @param string $file Name of the file containing the image.\r
-               * @param float $x Abscissa of the upper-left corner.\r
-               * @param float $y Ordinate of the upper-left corner.\r
-               * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated.\r
-               * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated.\r
-               * @param string $type Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension.\r
-               * @param mixed $link URL or identifier returned by AddLink().\r
-               * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>\r
-               * @param boolean $resize If true resize (reduce) the image to fit $w and $h (requires GD library).\r
-               * @param int $dpi dot-per-inch resolution used on resize\r
-               * @param string $palign Allows to center or align the image on the current line. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>
-               * @author Valentin Schmidt, Nicola Asuni\r
-               * @access protected\r
-               * @since 4.3.007 (2008-12-04)
-               * @see Image()\r
-               */\r
-               protected function ImagePngAlpha($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='') {
-                       // get image size
-                       list($wpx, $hpx) = getimagesize($file);
-                       // generate images
-                       $img = imagecreatefrompng($file);
-                       $imgalpha = imagecreate($wpx, $hpx);
-                       // generate gray scale pallete
-                       for ($c = 0; $c < 256; ++$c) {
-                               ImageColorAllocate($imgalpha, $c, $c, $c);
-                       }
-                       // extract alpha channel
-                       for ($xpx = 0; $xpx < $wpx; ++$xpx) {
-                               for ($ypx = 0; $ypx < $hpx; ++$ypx) {
-                                       $colorindex = imagecolorat($img, $xpx, $ypx);
-                                       $col = imagecolorsforindex($img, $colorindex);
-                                       imagesetpixel($imgalpha, $xpx, $ypx, $this->getGDgamma((127 - $col['alpha']) * 255 / 127));
-                               }
-                       }
-                       // create temp alpha file
-                       $tempfile_alpha = tempnam(K_PATH_CACHE, 'mska_');
-                       imagepng($imgalpha, $tempfile_alpha);
-                       imagedestroy($imgalpha);
-                       // extract image without alpha channel
-                       $imgplain = imagecreatetruecolor($wpx, $hpx);
-                       imagecopy($imgplain, $img, 0, 0, 0, 0, $wpx, $hpx);
-                       // create temp image file
-                       $tempfile_plain = tempnam(K_PATH_CACHE, 'mskp_');
-                       imagepng($imgplain, $tempfile_plain);
-                       imagedestroy($imgplain);
-                       // embed mask image
-                       $imgmask = $this->Image($tempfile_alpha, $x, $y, $w, $h, 'PNG', '', '', $resize, $dpi, '', true, false);
-                       // embed image, masked with previously embedded mask
-                       $this->Image($tempfile_plain, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, false, $imgmask);
-                       // remove temp files
-                       unlink($tempfile_alpha);
-                       unlink($tempfile_plain);
+               
+               /*
+               * Add an extgstate
+               * @param array $gs extgstate
+               * @access protected
+               * @since 3.0.000 (2008-03-27)
+               */
+               protected function setExtGState($gs) {
+                       $this->_out(sprintf('/GS%d gs', $gs));
                }
-
-               /**\r
-               * Correct the gamma value to be used with GD library\r
-               * @param float $v the gamma value to be corrected\r
-               * @access protected\r
-               * @since 4.3.007 (2008-12-04)\r
+               
+               /*
+               * Put extgstates for object transparency
+               * @param array $gs extgstate
+               * @access protected
+               * @since 3.0.000 (2008-03-27)
                */
-               protected function getGDgamma($v) {
-                       return (pow(($v / 255), 2.2) * 255);
-               } \r
-               \r
-               /**\r
-               * Performs a line break. \r
-               * The current abscissa goes back to the left margin and the ordinate increases by the amount passed in parameter.\r
-               * @param float $h The height of the break. By default, the value equals the height of the last printed cell.\r
-               * @param boolean $cell if true add a cMargin to the x coordinate\r
-               * @access public\r
-               * @since 1.0\r
-               * @see Cell()\r
-               */\r
-               public function Ln($h='', $cell=false) {\r
-                       //Line feed; default value is last cell height\r
-                       if ($cell) {\r
-                               $cellmargin = $this->cMargin;\r
-                       } else {\r
-                               $cellmargin = 0;\r
-                       }\r
-                       if ($this->rtl) {\r
-                               $this->x = $this->w - $this->rMargin - $cellmargin;\r
-                       } else {\r
-                               $this->x = $this->lMargin + $cellmargin;\r
-                       }\r
-                       if (is_string($h)) {\r
-                               $this->y += $this->lasth;\r
-                       } else {\r
-                               $this->y += $h;\r
-                       }\r
-                       $this->newline = true;\r
-               }\r
-\r
-               /**\r
-               * Returns the relative X value of current position.\r
-               * The value is relative to the left border for LTR languages and to the right border for RTL languages.\r
-               * @return float\r
-               * @access public\r
-               * @since 1.2\r
-               * @see SetX(), GetY(), SetY()\r
-               */\r
-               public function GetX() {\r
-                       //Get x position\r
-                       if ($this->rtl) {\r
-                               return ($this->w - $this->x);\r
-                       } else {\r
-                               return $this->x;\r
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Returns the absolute X value of current position.\r
-               * @return float\r
-               * @access public\r
-               * @since 1.2\r
-               * @see SetX(), GetY(), SetY()\r
-               */\r
-               public function GetAbsX() {\r
-                       return $this->x;\r
-               }\r
-               \r
-               /**\r
-               * Returns the ordinate of the current position.\r
-               * @return float\r
-               * @access public\r
-               * @since 1.0\r
-               * @see SetY(), GetX(), SetX()\r
-               */\r
-               public function GetY() {\r
-                       //Get y position\r
-                       return $this->y;\r
-               }\r
-               \r
-               /**\r
-               * Defines the abscissa of the current position. \r
-               * If the passed value is negative, it is relative to the right of the page (or left if language is RTL).\r
-               * @param float $x The value of the abscissa.\r
-               * @access public\r
-               * @since 1.2\r
-               * @see GetX(), GetY(), SetY(), SetXY()\r
-               */\r
-               public function SetX($x) {\r
-                       //Set x position\r
-                       if ($this->rtl) {\r
-                               if ($x >= 0) {\r
-                                       $this->x = $this->w - $x;\r
-                               } else {\r
-                                       $this->x = abs($x);\r
-                               }\r
-                       } else {\r
-                               if ($x >= 0) {\r
-                                       $this->x = $x;\r
-                               } else {\r
-                                       $this->x = $this->w + $x;\r
-                               }\r
-                       }
-                       if ($this->x < 0) {
-                               $this->x = 0;
-                       }
-                       if ($this->x > $this->w) {
-                               $this->x = $this->w;
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Moves the current abscissa back to the left margin and sets the ordinate.\r
-               * If the passed value is negative, it is relative to the bottom of the page.\r
-               * @param float $y The value of the ordinate.
-               * @param bool $resetx if true (default) reset the X position.\r
-               * @access public\r
-               * @since 1.0\r
-               * @see GetX(), GetY(), SetY(), SetXY()\r
-               */\r
-               public function SetY($y, $resetx=true) {
-                       if ($resetx) {\r
-                               //reset x
-                               if ($this->rtl) {\r
-                                       $this->x = $this->w - $this->rMargin;\r
-                               } else {\r
-                                       $this->x = $this->lMargin;\r
+               protected function _putextgstates() {
+                       $ne = count($this->extgstates);
+                       for ($i = 1; $i <= $ne; ++$i) {
+                               $this->_newobj();
+                               $this->extgstates[$i]['n'] = $this->n;
+                               $this->_out('<</Type /ExtGState');
+                               foreach ($this->extgstates[$i]['parms'] as $k => $v) {
+                                       $this->_out('/'.$k.' '.$v);
                                }
-                       }\r
-                       if ($y >= 0) {\r
-                               $this->y = $y;\r
-                       } else {\r
-                               $this->y = $this->h + $y;\r
-                       }
-                       if ($this->y < 0) {
-                               $this->y = 0;
-                       }
-                       if ($this->y > $this->h) {
-                               $this->y = $this->h;
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Defines the abscissa and ordinate of the current position. \r
-               * If the passed values are negative, they are relative respectively to the right and bottom of the page.\r
-               * @param float $x The value of the abscissa\r
-               * @param float $y The value of the ordinate\r
-               * @access public\r
-               * @since 1.2\r
-               * @see SetX(), SetY()\r
-               */\r
-               public function SetXY($x, $y) {\r
-                       //Set x and y positions\r
-                       $this->SetY($y);\r
-                       $this->SetX($x);\r
-               }\r
-\r
-               /**\r
-               * Send the document to a given destination: string, local file or browser. \r
-               * In the last case, the plug-in may be used (if present) or a download ("Save as" dialog box) may be forced.<br />\r
-               * The method first calls Close() if necessary to terminate the document.\r
-               * @param string $name The name of the file when saved. Note that special characters are removed and blanks characters are replaced with the underscore character.\r
-               * @param string $dest Destination where to send the document. It can take one of the following values:<ul><li>I: send the file inline to the browser (default). The plug-in is used if available. The name given by name is used when one selects the "Save as" option on the link generating the PDF.</li><li>D: send to the browser and force a file download with the name given by name.</li><li>F: save to a local file with the name given by name.</li><li>S: return the document as a string. name is ignored.</li></ul>\r
-               * @access public\r
-               * @since 1.0\r
-               * @see Close()\r
-               */\r
-               public function Output($name='doc.pdf', $dest='I') {\r
-                       //Output PDF to some destination\r
-                       //Finish document if necessary\r
-                       if ($this->state < 3) {\r
-                               $this->Close();\r
-                       }\r
-                       //Normalize parameters\r
-                       if (is_bool($dest)) {\r
-                               $dest = $dest ? 'D' : 'F';\r
-                       }\r
-                       $dest = strtoupper($dest);\r
-                       if ($dest != 'F') {
-                               $name = preg_replace('/[\s]+/', '_', $name);
-                               $name = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $name);\r
+                               $this->_out('>>');
+                               $this->_out('endobj');
                        }
-                       if ($this->sign) {
-                               // *** apply digital signature to the document ***
-                               // get the document content
-                               $pdfdoc = $this->getBuffer();
-                               // remove last newline
-                               $pdfdoc = substr($pdfdoc, 0, -1);
-                               // Remove the original buffer
-                               if (isset($this->diskcache) AND $this->diskcache) {
-                                       // remove buffer file from cache
-                                       unlink($this->buffer);
-                               }
-                               unset($this->buffer);
-                               // remove filler space
-                               $tmppos = strpos($pdfdoc, '/ByteRange[0 ********** ********** **********]') + 58;
-                               $pdfdoc = substr($pdfdoc, 0, $tmppos).substr($pdfdoc, $tmppos + $this->signature_max_lenght);
-                               // define the ByteRange
-                               $byte_range = array();
-                               $byte_range[0] = 0;
-                               $byte_range[1] = $tmppos - 1;
-                               $byte_range[2] = $byte_range[1] + $this->signature_max_lenght;
-                               $byte_range[3] = strlen($pdfdoc) - $byte_range[1];
-                               // replace the ByteRange
-                               $byterange = sprintf('/ByteRange[0 %010u %010u %010u]', $byte_range[1], $byte_range[2], $byte_range[3]);
-                               $pdfdoc = str_replace('/ByteRange[0 ********** ********** **********]', $byterange, $pdfdoc);
-                               // write the document to a temporary folder
-                               $tempdoc = tempnam(K_PATH_CACHE, 'tmppdf_');\r
-                               $f = fopen($tempdoc, 'wb');\r
-                               if (!$f) {\r
-                                       $this->Error('Unable to create temporary file: '.$tempdoc);\r
-                               }
-                               $pdfdoc_lenght = strlen($pdfdoc);\r
-                               fwrite($f, $pdfdoc, $pdfdoc_lenght);\r
-                               fclose($f);
-                               // get digital signature.
-                               // IS THE FOLLOWING PROCEDURE CORRECT?
-                               $tempsign = tempnam(K_PATH_CACHE, 'tmpsig_');
-                               if (empty($this->signature_data['extracerts'])) {\r
-                                       openssl_pkcs7_sign($tempdoc, $tempsign, $this->signature_data['signcert'], array($this->signature_data['privkey'], $this->signature_data['password']), array(), PKCS7_BINARY | PKCS7_DETACHED);\r
-                               } else {\r
-                                       openssl_pkcs7_sign($tempdoc, $tempsign, $this->signature_data['signcert'], array($this->signature_data['privkey'], $this->signature_data['password']), array(), PKCS7_BINARY | PKCS7_DETACHED, $this->signature_data['extracerts']);\r
-                               }       
-                               unlink($tempdoc);
-                               // read signature
-                               $signature = file_get_contents($tempsign, false, null, $pdfdoc_lenght);
-                               unlink($tempsign);
-                               // extract signature
-                               $signature = substr($signature, (strpos($signature, "%%EOF\n\n------") + 13));
-                               $tmparr = explode("\n\n", $signature);
-                               $signature = $tmparr[1];
-                               unset($tmparr);
-                               // decode signature
-                               $signature = base64_decode(trim($signature));
-                               // convert signature to hex
-                               $signature = current(unpack('H*', $signature));
-                               $signature = str_pad($signature, $this->signature_max_lenght, '0');
-                               // Add signature to the document
-                               $pdfdoc = substr($pdfdoc, 0, $byte_range[1]).$signature.substr($pdfdoc, (0 - $byte_range[3]));
-                               $this->diskcache = false;
-                               $this->buffer = &$pdfdoc;
-                               $this->bufferlen = strlen($pdfdoc);
-                       }\r
-                       switch($dest) {\r
-                               case 'I': {\r
-                                       // Send PDF to the standard output\r
-                                       if (ob_get_contents()) {\r
-                                               $this->Error('Some data has already been output, can\'t send PDF file');\r
-                                       }\r
-                                       if (php_sapi_name() != 'cli') {\r
-                                               //We send to a browser\r
-                                               header('Content-Type: application/pdf');\r
-                                               if (headers_sent()) {\r
-                                                       $this->Error('Some data has already been output to browser, can\'t send PDF file');\r
-                                               }\r
-                                               header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1\r
-                                               header('Pragma: public');\r
-                                               header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past\r
-                                               header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');      \r
-                                               header('Content-Length: '.$this->bufferlen);\r
-                                               header('Content-Disposition: inline; filename="'.basename($name).'";');\r
-                                       }\r
-                                       echo $this->getBuffer();\r
-                                       break;\r
-                               }\r
-                               case 'D': {\r
-                                       // Download PDF as file\r
-                                       if (ob_get_contents()) {\r
-                                               $this->Error('Some data has already been output, can\'t send PDF file');\r
-                                       }\r
-                                       header('Content-Description: File Transfer');\r
-                                       if (headers_sent()) {\r
-                                               $this->Error('Some data has already been output to browser, can\'t send PDF file');\r
-                                       }\r
-                                       header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1\r
-                                       header('Pragma: public');\r
-                                       header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past\r
-                                       header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');\r
-                                       // force download dialog\r
-                                       header('Content-Type: application/force-download');\r
-                                       header('Content-Type: application/octet-stream', false);\r
-                                       header('Content-Type: application/download', false);
-                                       header('Content-Type: application/pdf', false);\r
-                                       // use the Content-Disposition header to supply a recommended filename\r
-                                       header('Content-Disposition: attachment; filename="'.basename($name).'";');\r
-                                       header('Content-Transfer-Encoding: binary');\r
-                                       header('Content-Length: '.$this->bufferlen);\r
-                                       echo $this->getBuffer();\r
-                                       break;\r
-                               }\r
-                               case 'F': {\r
-                                       // Save PDF to a local file
-                                       if ($this->diskcache) {
-                                               copy($this->buffer, $name);
-                                       } else {\r
-                                               $f = fopen($name, 'wb');\r
-                                               if (!$f) {\r
-                                                       $this->Error('Unable to create output file: '.$name);\r
-                                               }\r
-                                               fwrite($f, $this->getBuffer(), $this->bufferlen);\r
-                                               fclose($f);
-                                       }\r
-                                       break;\r
-                               }\r
-                               case 'S': {
-                                       // Returns PDF as a string
-                                       return $this->getBuffer();\r
-                               }\r
-                               default: {\r
-                                       $this->Error('Incorrect output destination: '.$dest);\r
-                               }\r
-                       }\r
-                       return '';\r
+               }
+               
+               /*
+               * Set alpha for stroking (CA) and non-stroking (ca) operations.
+               * @param float $alpha real value from 0 (transparent) to 1 (opaque)
+               * @param string $bm blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity
+               * @access public
+               * @since 3.0.000 (2008-03-27)
+               */
+               public function setAlpha($alpha, $bm='Normal') {
+                       $gs = $this->addExtGState(array('ca' => $alpha, 'CA' => $alpha, 'BM' => '/'.$bm));
+                       $this->setExtGState($gs);
                }
 
-               /**\r
-                * Unset all class variables except the following critical variables: internal_encoding, state, bufferlen, buffer and diskcache.
-                * @param boolean $destroyall if true destroys all class variables, otherwise preserves critical variables.
-                * @param boolean $preserve_objcopy if true preserves the objcopy variable\r
-                * @access public
-                * @since 4.5.016 (2009-02-24)\r
-                */\r
-               public function _destroy($destroyall=false, $preserve_objcopy=false) {
-                       if ($destroyall AND isset($this->diskcache) AND $this->diskcache AND (!$preserve_objcopy) AND (!$this->empty_string($this->buffer))) {
-                               // remove buffer file from cache
-                               unlink($this->buffer);
+               /*
+               * Set the default JPEG compression quality (1-100)
+               * @param int $quality JPEG quality, integer between 1 and 100
+               * @access public
+               * @since 3.0.000 (2008-03-27)
+               */
+               public function setJPEGQuality($quality) {
+                       if (($quality < 1) OR ($quality > 100)) {
+                               $quality = 75;
                        }
-                       foreach (array_keys(get_object_vars($this)) as $val) {
-                               if ($destroyall OR (
-                                       ($val != 'internal_encoding') 
-                                       AND ($val != 'state') 
-                                       AND ($val != 'bufferlen') 
-                                       AND ($val != 'buffer') 
-                                       AND ($val != 'diskcache')
-                                       AND ($val != 'sign')\r
-                                       AND ($val != 'signature_data')
-                                       AND ($val != 'signature_max_lenght')
-                                       )) {
-                                       if (!$preserve_objcopy OR ($val != 'objcopy')) {
-                                               unset($this->$val);
-                                       }
-                               }
-                       }\r
-               }
-               \r
-               /**\r
-               * Check for locale-related bug\r
-               * @access protected\r
-               */\r
-               protected function _dochecks() {\r
-                       //Check for locale-related bug\r
-                       if (1.1 == 1) {\r
-                               $this->Error('Don\'t alter the locale before including class file');\r
-                       }\r
-                       //Check for decimal separator\r
-                       if (sprintf('%.1F', 1.0) != '1.0') {\r
-                               setlocale(LC_NUMERIC, 'C');\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Return fonts path\r
-               * @return string\r
-               * @access protected\r
-               */\r
-               protected function _getfontpath() {\r
-                       if (!defined('K_PATH_FONTS') AND is_dir(dirname(__FILE__).'/fonts')) {\r
-                               define('K_PATH_FONTS', dirname(__FILE__).'/fonts/');\r
-                       }\r
-                       return defined('K_PATH_FONTS') ? K_PATH_FONTS : '';\r
-               }\r
-               \r
-               /**\r
-               * Output pages.\r
-               * @access protected\r
-               */\r
-               protected function _putpages() {\r
-                       $nb = $this->numpages;\r
-                       if (!empty($this->AliasNbPages)) {
-                               $nbs = $this->formatPageNumber($nb);\r
-                               $nbu = $this->UTF8ToUTF16BE($nbs, false); // replacement for unicode font\r
-                               $alias_a = $this->_escape($this->AliasNbPages);\r
-                               $alias_au = $this->_escape('{'.$this->AliasNbPages.'}');\r
-                               if ($this->isunicode) {\r
-                                       $alias_b = $this->_escape($this->UTF8ToLatin1($this->AliasNbPages));\r
-                                       $alias_bu = $this->_escape($this->UTF8ToLatin1('{'.$this->AliasNbPages.'}'));\r
-                                       $alias_c = $this->_escape($this->utf8StrRev($this->AliasNbPages, false, $this->tmprtl));\r
-                                       $alias_cu = $this->_escape($this->utf8StrRev('{'.$this->AliasNbPages.'}', false, $this->tmprtl));\r
-                               }\r
-                       }
-                       if (!empty($this->AliasNumPage)) {\r
-                               $alias_pa = $this->_escape($this->AliasNumPage);\r
-                               $alias_pau = $this->_escape('{'.$this->AliasNumPage.'}');\r
-                               if ($this->isunicode) {\r
-                                       $alias_pb = $this->_escape($this->UTF8ToLatin1($this->AliasNumPage));\r
-                                       $alias_pbu = $this->_escape($this->UTF8ToLatin1('{'.$this->AliasNumPage.'}'));\r
-                                       $alias_pc = $this->_escape($this->utf8StrRev($this->AliasNumPage, false, $this->tmprtl));\r
-                                       $alias_pcu = $this->_escape($this->utf8StrRev('{'.$this->AliasNumPage.'}', false, $this->tmprtl));\r
-                               }\r
-                       }
-                       $pagegroupnum = 0;\r
-                       $filter = ($this->compress) ? '/Filter /FlateDecode ' : '';\r
-                       for ($n=1; $n <= $nb; ++$n) {
-                               $temppage = $this->getPageBuffer($n);
-                               if (!empty($this->pagegroups)) {
-                                       if(isset($this->newpagegroup[$n])) {
-                                               $pagegroupnum = 0;
-                                       }
-                                       ++$pagegroupnum;\r
-                                       foreach ($this->pagegroups as $k => $v) {
-                                               // replace total pages group numbers
-                                               $vs = $this->formatPageNumber($v);\r
-                                               $vu = $this->UTF8ToUTF16BE($vs, false);
-                                               $alias_ga = $this->_escape($k);\r
-                                               $alias_gau = $this->_escape('{'.$k.'}');\r
-                                               if ($this->isunicode) {\r
-                                                       $alias_gb = $this->_escape($this->UTF8ToLatin1($k));\r
-                                                       $alias_gbu = $this->_escape($this->UTF8ToLatin1('{'.$k.'}'));\r
-                                                       $alias_gc = $this->_escape($this->utf8StrRev($k, false, $this->tmprtl));\r
-                                                       $alias_gcu = $this->_escape($this->utf8StrRev('{'.$k.'}', false, $this->tmprtl));\r
-                                               }\r
-                                               $temppage = str_replace($alias_gau, $vu, $temppage);\r
-                                               if ($this->isunicode) {\r
-                                                       $temppage = str_replace($alias_gbu, $vu, $temppage);\r
-                                                       $temppage = str_replace($alias_gcu, $vu, $temppage);\r
-                                                       $temppage = str_replace($alias_gb, $vs, $temppage);\r
-                                                       $temppage = str_replace($alias_gc, $vs, $temppage);\r
-                                               }\r
-                                               $temppage = str_replace($alias_ga, $vs, $temppage);
-                                               // replace page group numbers
-                                               $pvs = $this->formatPageNumber($pagegroupnum);\r
-                                               $pvu = $this->UTF8ToUTF16BE($pvs, false);
-                                               $pk = str_replace('{nb', '{pnb', $k);
-                                               $alias_pga = $this->_escape($pk);\r
-                                               $alias_pgau = $this->_escape('{'.$pk.'}');\r
-                                               if ($this->isunicode) {\r
-                                                       $alias_pgb = $this->_escape($this->UTF8ToLatin1($pk));\r
-                                                       $alias_pgbu = $this->_escape($this->UTF8ToLatin1('{'.$pk.'}'));\r
-                                                       $alias_pgc = $this->_escape($this->utf8StrRev($pk, false, $this->tmprtl));\r
-                                                       $alias_pgcu = $this->_escape($this->utf8StrRev('{'.$pk.'}', false, $this->tmprtl));\r
-                                               }\r
-                                               $temppage = str_replace($alias_pgau, $pvu, $temppage);\r
-                                               if ($this->isunicode) {\r
-                                                       $temppage = str_replace($alias_pgbu, $pvu, $temppage);\r
-                                                       $temppage = str_replace($alias_pgcu, $pvu, $temppage);\r
-                                                       $temppage = str_replace($alias_pgb, $pvs, $temppage);\r
-                                                       $temppage = str_replace($alias_pgc, $pvs, $temppage);\r
-                                               }\r
-                                               $temppage = str_replace($alias_pga, $pvs, $temppage);\r
-                                       }\r
-                               }
-                               if (!empty($this->AliasNbPages)) {
-                                       // replace total pages number
-                                       $temppage = str_replace($alias_au, $nbu, $temppage);
-                                       if ($this->isunicode) {\r
-                                               $temppage = str_replace($alias_bu, $nbu, $temppage);\r
-                                               $temppage = str_replace($alias_cu, $nbu, $temppage);\r
-                                               $temppage = str_replace($alias_b, $nbs, $temppage);\r
-                                               $temppage = str_replace($alias_c, $nbs, $temppage);\r
-                                       }
-                                       $temppage = str_replace($alias_a, $nbs, $temppage);
-                               }
-                               if (!empty($this->AliasNumPage)) {
-                                       // replace page number
-                                       $pnbs = $this->formatPageNumber($n);\r
-                                       $pnbu = $this->UTF8ToUTF16BE($pnbs, false); // replacement for unicode font
-                                       $temppage = str_replace($alias_pau, $pnbu, $temppage);
-                                       if ($this->isunicode) {\r
-                                               $temppage = str_replace($alias_pbu, $pnbu, $temppage);\r
-                                               $temppage = str_replace($alias_pcu, $pnbu, $temppage);\r
-                                               $temppage = str_replace($alias_pb, $pnbs, $temppage);\r
-                                               $temppage = str_replace($alias_pc, $pnbs, $temppage);\r
-                                       }
-                                       $temppage = str_replace($alias_pa, $pnbs, $temppage);
-                               }
-                               $temppage = str_replace($this->epsmarker, '', $temppage);
-                               //$this->setPageBuffer($n, $temppage);\r
-                               //Page\r
-                               $this->_newobj();\r
-                               $this->_out('<</Type /Page');\r
-                               $this->_out('/Parent 1 0 R');\r
-                               $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]', $this->pagedim[$n]['w'], $this->pagedim[$n]['h']));\r
-                               $this->_out('/Resources 2 0 R');\r
-                               $this->_putannots($n);\r
-                               $this->_out('/Contents '.($this->n + 1).' 0 R>>');\r
-                               $this->_out('endobj');\r
-                               //Page content\r
-                               $p = ($this->compress) ? gzcompress($temppage) : $temppage;\r
-                               $this->_newobj();\r
-                               $this->_out('<<'.$filter.'/Length '.strlen($p).'>>');\r
-                               $this->_putstream($p);\r
-                               $this->_out('endobj');
-                               if ($this->diskcache) {
-                                       // remove temporary files
-                                       unlink($this->pages[$n]);
-                               }\r
-                       }\r
-                       //Pages root\r
-                       $this->offsets[1] = $this->bufferlen;\r
-                       $this->_out('1 0 obj');\r
-                       $this->_out('<</Type /Pages');\r
-                       $kids='/Kids [';\r
-                       for ($i=0; $i < $nb; ++$i) {\r
-                               $kids .= (3 + (2 * $i)).' 0 R ';\r
-                       }\r
-                       $this->_out($kids.']');\r
-                       $this->_out('/Count '.$nb);\r
-                       //$this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$this->pagedim[0]['w'],$this->pagedim[0]['h']));\r
-                       $this->_out('>>');\r
-                       $this->_out('endobj');\r
-               }\r
-\r
-               /**\r
-               * Output Page Annotations.
-               * !!! THIS FUNCTION IS NOT YET COMPLETED !!!\r
-               * See section 8.4 of PDF reference.\r
-               * @param int $n page number\r
-               * @access protected\r
-               * @author Nicola Asuni\r
-               * @since 4.0.018 (2008-08-06)\r
-               */\r
-               protected function _putannots($n) {\r
-                       if (isset($this->PageAnnots[$n])) {\r
-                               $annots = '/Annots [';\r
-                               foreach ($this->PageAnnots[$n] as $key => $pl) {\r
-                                       $pl['opt'] = array_change_key_case($pl['opt'], CASE_LOWER);\r
-                                       $a = $pl['x'] * $this->k;
-                                       $b = $this->pagedim[$n]['h'] - ($pl['y']  * $this->k);\r
-                                       $c = $pl['w'] * $this->k;\r
-                                       $d = $pl['h'] * $this->k;\r
-                                       $rect = sprintf('%.2F %.2F %.2F %.2F', $a, $b, $a+$c, $b-$d);\r
-                                       $annots .= "\n";
-                                       $annots .= '<</Type /Annot';\r
-                                       $annots .= ' /Subtype /'.$pl['opt']['subtype'];\r
-                                       $annots .= ' /Rect ['.$rect.']';\r
-                                       $annots .= ' /Contents '.$this->_textstring($pl['txt']);\r
-                                       //$annots .= ' /P ';\r
-                                       $annots .= ' /NM '.$this->_textstring(sprintf('%04u-%04u', $n, $key));\r
-                                       $annots .= ' /M '.$this->_datastring('D:'.date('YmdHis'));\r
-                                       if (isset($pl['opt']['f'])) {\r
-                                               $val = 0;\r
-                                               if (is_array($pl['opt']['f'])) {\r
-                                                       foreach ($pl['opt']['f'] as $f) {\r
-                                                               switch (strtolower($f)) {\r
-                                                                       case 'invisible': {\r
-                                                                               $val += 1 << 0;\r
-                                                                               break;\r
-                                                                       }\r
-                                                                       case 'hidden': {\r
-                                                                               $val += 1 << 1;\r
-                                                                               break;\r
-                                                                       }\r
-                                                                       case 'print': {\r
-                                                                               $val += 1 << 2;\r
-                                                                               break;\r
-                                                                       }\r
-                                                                       case 'nozoom': {\r
-                                                                               $val += 1 << 3;\r
-                                                                               break;\r
-                                                                       }\r
-                                                                       case 'norotate': {\r
-                                                                               $val += 1 << 4;\r
-                                                                               break;\r
-                                                                       }\r
-                                                                       case 'noview': {\r
-                                                                               $val += 1 << 5;\r
-                                                                               break;\r
-                                                                       }\r
-                                                                       case 'readonly': {\r
-                                                                               $val += 1 << 6;\r
-                                                                               break;\r
-                                                                       }\r
-                                                                       case 'locked': {\r
-                                                                               $val += 1 << 8;\r
-                                                                               break;\r
-                                                                       }\r
-                                                                       case 'togglenoview': {\r
-                                                                               $val += 1 << 9;\r
-                                                                               break;\r
-                                                                       }\r
-                                                                       case 'lockedcontents': {\r
-                                                                               $val += 1 << 10;\r
-                                                                               break;\r
-                                                                       }\r
-                                                                       default: {\r
-                                                                               break;\r
-                                                                       }\r
-                                                               }\r
-                                                       }\r
-                                               }\r
-                                               $annots .= ' /F '.intval($val);\r
-                                       }\r
-                                       //$annots .= ' /AP ';\r
-                                       //$annots .= ' /AS ';\r
-                                       $annots .= ' /Border [';\r
-                                       if (isset($pl['opt']['border']) AND (count($pl['opt']['border']) >= 3)) {\r
-                                               $annots .= intval($pl['opt']['border'][0]).' ';\r
-                                               $annots .= intval($pl['opt']['border'][1]).' ';\r
-                                               $annots .= intval($pl['opt']['border'][2]);\r
-                                               if (isset($pl['opt']['border'][3]) AND is_array($pl['opt']['border'][3])) {\r
-                                                       $annots .= ' [';\r
-                                                       foreach ($pl['opt']['border'][3] as $dash) {\r
-                                                               $annots .= intval($dash).' ';\r
-                                                       }\r
-                                                       $annots .= ']';\r
-                                               }\r
-                                       } else {\r
-                                               $annots .= '0 0 0';\r
-                                       }\r
-                                       $annots .= ']';\r
-                                       if (isset($pl['opt']['bs']) AND (is_array($pl['opt']['bs']))) {\r
-                                               $annots .= ' /BS <<Type /Border';\r
-                                               if (isset($pl['opt']['bs']['w'])) {\r
-                                                       $annots .= ' /W '.sprintf("%.4F", floatval($pl['opt']['bs']['w']));\r
-                                               }\r
-                                               $bstyles = array('S', 'D', 'B', 'I', 'U');\r
-                                               if (isset($pl['opt']['bs']['s']) AND in_array($pl['opt']['bs']['s'], $bstyles)) {\r
-                                                       $annots .= ' /S /'.$pl['opt']['bs']['s'];\r
-                                               }\r
-                                               if (isset($pl['opt']['bs']['d']) AND (is_array($pl['opt']['bs']['d']))) {\r
-                                                       $annots .= ' /D [';\r
-                                                       foreach ($pl['opt']['bs']['d'] as $cord) {\r
-                                                               $cord = floatval($cord);\r
-                                                               $annots .= sprintf(" %.4F", $cord);\r
-                                                       }\r
-                                                       $annots .= ']';\r
-                                               }\r
-                                               $annots .= '>> ';\r
-                                       }\r
-                                       if (isset($pl['opt']['be']) AND (is_array($pl['opt']['be']))) {\r
-                                               $annots .= ' /BE <<';\r
-                                               $bstyles = array('S', 'C');\r
-                                               if (isset($pl['opt']['be']['s']) AND in_array($pl['opt']['be']['s'], $markups)) {\r
-                                                       $annots .= ' /S /'.$pl['opt']['bs']['s'];\r
-                                               } else {\r
-                                                       $annots .= ' /S /S';\r
-                                               }\r
-                                               if (isset($pl['opt']['be']['i']) AND ($pl['opt']['be']['i'] >= 0) AND ($pl['opt']['be']['i'] <= 2)) {\r
-                                                       $annots .= ' /I '.sprintf(" %.4F", $pl['opt']['be']['i']);\r
-                                               }\r
-                                               $annots .= '>>';\r
-                                       }\r
-                                       $annots .= ' /C [';\r
-                                       if (isset($pl['opt']['c']) AND (is_array($pl['opt']['c']))) {\r
-                                               foreach ($pl['opt']['c'] as $col) {\r
-                                                       $col = intval($col);\r
-                                                       $color = $col <= 0 ? 0 : ($col >= 255 ? 1 : $col / 255);\r
-                                                       $annots .= sprintf(" %.4F", $color);\r
-                                               }\r
-                                       }\r
-                                       $annots .= ']';\r
-                                       //$annots .= ' /StructParent ';\r
-                                       //$annots .= ' /OC ';\r
-                                       $markups = array('text', 'freetext', 'line', 'square', 'circle', 'polygon', 'polyline', 'highlight',  'underline', 'squiggly', 'strikeout', 'stamp', 'caret', 'ink', 'fileattachment', 'sound');\r
-                                       if (in_array(strtolower($pl['opt']['subtype']), $markups)) {\r
-                                               // this is a markup type\r
-                                               if (isset($pl['opt']['t']) AND is_string($pl['opt']['t'])) {\r
-                                                       $annots .= ' /T '.$this->_textstring($pl['opt']['t']);\r
-                                               }\r
-                                               //$annots .= ' /Popup ';\r
-                                               if (isset($pl['opt']['ca'])) {\r
-                                                       $annots .= ' /CA '.sprintf("%.4F", floatval($pl['opt']['ca']));\r
-                                               }\r
-                                               if (isset($pl['opt']['rc'])) {\r
-                                                       $annots .= ' /RC '.$this->_textstring($pl['opt']['rc']);\r
-                                               }\r
-                                               $annots .= ' /CreationDate '.$this->_datastring('D:'.date('YmdHis'));\r
-                                               //$annots .= ' /IRT ';\r
-                                               if (isset($pl['opt']['subj'])) {\r
-                                                       $annots .= ' /Subj '.$this->_textstring($pl['opt']['subj']);\r
-                                               }\r
-                                               //$annots .= ' /RT ';\r
-                                               //$annots .= ' /IT ';\r
-                                               //$annots .= ' /ExData ';\r
-                                       }\r
-                                       switch (strtolower($pl['opt']['subtype'])) {\r
-                                               case 'text': {\r
-                                                       if (isset($pl['opt']['open'])) {\r
-                                                               $annots .= ' /Open '. (strtolower($pl['opt']['open']) == 'true' ? 'true' : 'false');\r
-                                                       }\r
-                                                       $iconsapp = array('Comment', 'Help', 'Insert', 'Key', 'NewParagraph', 'Note', 'Paragraph');\r
-                                                       if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) {\r
-                                                               $annots .= ' /Name /'.$pl['opt']['name'];\r
-                                                       } else {\r
-                                                               $annots .= ' /Name /Note';\r
-                                                       }\r
-                                                       $statemodels = array('Marked', 'Review');\r
-                                                       if (isset($pl['opt']['statemodel']) AND in_array($pl['opt']['statemodel'], $statemodels)) {\r
-                                                               $annots .= ' /StateModel /'.$pl['opt']['statemodel'];\r
-                                                       } else {\r
-                                                               $pl['opt']['statemodel'] = 'Marked';\r
-                                                               $annots .= ' /StateModel /'.$pl['opt']['statemodel'];\r
-                                                       }\r
-                                                       if ($pl['opt']['statemodel'] == 'Marked') {\r
-                                                               $states = array('Accepted', 'Unmarked');\r
-                                                       } else {\r
-                                                               $states = array('Accepted', 'Rejected', 'Cancelled', 'Completed', 'None');\r
-                                                       }\r
-                                                       if (isset($pl['opt']['state']) AND in_array($pl['opt']['state'], $states)) {\r
-                                                               $annots .= ' /State /'.$pl['opt']['state'];\r
-                                                       } else {\r
-                                                               if ($pl['opt']['statemodel'] == 'Marked') {\r
-                                                                       $annots .= ' /State /Unmarked';\r
-                                                               } else {\r
-                                                                       $annots .= ' /State /None';\r
-                                                               }\r
-                                                       }\r
-                                                       break;\r
-                                               }\r
-                                               case 'link': {
-                                                       if(is_string($pl['txt'])) {
-                                                               // external URI link\r
-                                                               $annots .= ' /A <</S /URI /URI '.$this->_datastring($pl['txt']).'>>';\r
-                                                       } else {
-                                                               // internal link\r
-                                                               $l = $this->links[$pl['txt']];\r
-                                                               $annots .= sprintf(' /Dest [%d 0 R /XYZ 0 %.2F null]', (1 + (2 * $l[0])), ($this->pagedim[$l[0]]['h'] - ($l[1] * $this->k)));\r
-                                                       }\r
-                                                       $hmodes = array('N', 'I', 'O', 'P');\r
-                                                       if (isset($pl['opt']['h']) AND in_array($pl['opt']['h'], $hmodes)) {\r
-                                                               $annots .= ' /H /'.$pl['opt']['h'];\r
-                                                       } else {\r
-                                                               $annots .= ' /H /I';\r
-                                                       }\r
-                                                       //$annots .= ' /PA ';\r
-                                                       //$annots .= ' /Quadpoints ';\r
-                                                       break;\r
-                                               }\r
-                                               case 'freetext': {\r
-                                                       $annots .= ' /DA '.$this->_textstring($pl['txt']);\r
-                                                       if (isset($pl['opt']['q']) AND ($pl['opt']['q'] >= 0) AND ($pl['opt']['q'] <= 2)) {\r
-                                                               $annots .= ' /Q '.intval($pl['opt']['q']);\r
-                                                       }\r
-                                                       if (isset($pl['opt']['rc'])) {\r
-                                                               $annots .= ' /RC '.$this->_textstring($pl['opt']['rc']);\r
-                                                       }\r
-                                                       if (isset($pl['opt']['ds'])) {\r
-                                                               $annots .= ' /DS '.$this->_textstring($pl['opt']['ds']);\r
-                                                       }\r
-                                                       if (isset($pl['opt']['cl']) AND is_array($pl['opt']['cl'])) {\r
-                                                               $annots .= ' /CL [';\r
-                                                               foreach ($pl['opt']['cl'] as $cl) {\r
-                                                                       $annots .= sprintf("%.4F ", $cl * $this->k);\r
-                                                               }\r
-                                                               $annots .= ']';\r
-                                                       }\r
-                                                       $tfit = array('FreeTextCallout', 'FreeTextTypeWriter');\r
-                                                       if (isset($pl['opt']['it']) AND in_array($pl['opt']['it'], $tfit)) {\r
-                                                               $annots .= ' /IT '.$pl['opt']['it'];\r
-                                                       }\r
-                                                       if (isset($pl['opt']['rd']) AND is_array($pl['opt']['rd'])) {\r
-                                                               $l = $pl['opt']['rd'][0] * $this->k;\r
-                                                               $r = $pl['opt']['rd'][1] * $this->k;\r
-                                                               $t = $pl['opt']['rd'][2] * $this->k;\r
-                                                               $b = $pl['opt']['rd'][3] * $this->k;\r
-                                                               $annots .= ' /RD ['.sprintf('%.2F %.2F %.2F %.2F', $l, $r, $t, $b).']';\r
-                                                       }\r
-                                                       //$annots .= ' /LE ';\r
-                                                       break;\r
-                                               }\r
-                                               // ... to be completed ...\r
-                                               case 'line': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'square': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'circle': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'polygon': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'polyline': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'highlight': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'underline': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'squiggly': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'strikeout': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'stamp': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'caret': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'ink': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'popup': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'fileattachment': {
-                                                       if (!isset($pl['opt']['fs'])) {
-                                                               break;
-                                                       }
-                                                       $filename = basename($pl['opt']['fs']);
-                                                       if (isset($this->embeddedfiles[$filename]['n'])) {
-                                                               $annots .= ' /FS <</Type /Filespec /F '.$this->_datastring($filename).' /EF <</F '.$this->embeddedfiles[$filename]['n'].' 0 R>> >>';
-                                                               $iconsapp = array('Graph', 'Paperclip', 'PushPin', 'Tag');\r
-                                                               if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) {\r
-                                                                       $annots .= ' /Name /'.$pl['opt']['name'];\r
-                                                               } else {\r
-                                                                       $annots .= ' /Name /PushPin';\r
-                                                               }
-                                                       }\r
-                                                       break;\r
-                                               }\r
-                                               case 'sound': {
-                                                       if (!isset($pl['opt']['sound'])) {
-                                                               break;
-                                                       }
-                                                       $filename = basename($pl['opt']['sound']);
-                                                       if (isset($this->embeddedfiles[$filename]['n'])) {
-                                                               // ... TO BE COMPLETED ...
-                                                               $iconsapp = array('Speaker', 'Mic');\r
-                                                               if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) {\r
-                                                                       $annots .= ' /Name /'.$pl['opt']['name'];\r
-                                                               } else {\r
-                                                                       $annots .= ' /Name /Speaker';\r
-                                                               }
-                                                       }\r
-                                                       break;\r
-                                               }\r
-                                               case 'movie': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'widget': {\r
-                                                       if (isset($pl['opt']['h'])) {\r
-                                                               $annots .= ' /H '.intval($pl['opt']['h']);\r
-                                                       }
-                                                       if (isset($pl['opt']['mk']) AND (is_array($pl['opt']['mk']))) {
-                                                               $annots .= ' /MK <<';
-                                                               // ... TO BE COMPLETED ...
-                                                               $annots .= '>>';
-                                                       }\r
-                                                       break;\r
-                                               }\r
-                                               case 'screen': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'printermark': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'trapnet': {\r
-                                                       break;\r
-                                               }\r
-                                               case 'watermark': {\r
-                                                       break;\r
-                                               }\r
-                                               case '3d': {\r
-                                                       break;\r
-                                               }\r
-                                               default: {\r
-                                                       break;\r
-                                               }\r
-                                       }\r
-                                       \r
-                               $annots .= '>>';\r
-                               }
-                               $annots .= "\n]";\r
-                               $this->_out($annots);\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Output fonts.\r
-               * @access protected\r
-               */\r
-               protected function _putfonts() {\r
-                       $nf = $this->n;\r
-                       foreach ($this->diffs as $diff) {\r
-                               //Encodings\r
-                               $this->_newobj();\r
-                               $this->_out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.']>>');\r
-                               $this->_out('endobj');\r
-                       }\r
-                       $mqr = get_magic_quotes_runtime();\r
-                       set_magic_quotes_runtime(0);\r
-                       foreach ($this->FontFiles as $file => $info) {
-                               // search and get font file to embedd
-                               $fontdir = $info['fontdir'];
-                               $file = strtolower($file);
-                               $fontfile = '';
-                               // search files on various directories
-                               if (file_exists($fontdir.$file)) {
-                                       $fontfile = $fontdir.$file;
-                               } elseif (file_exists($this->_getfontpath().$file)) {
-                                       $fontfile = $this->_getfontpath().$file;
-                               } elseif (file_exists($file)) {
-                                       $fontfile = $file;
-                               }
-                               if (!$this->empty_string($fontfile)) {\r
-                                       $font = file_get_contents($fontfile);\r
-                                       $compressed = (substr($file, -2) == '.z');\r
-                                       if ((!$compressed) AND (isset($info['length2']))) {\r
-                                               $header = (ord($font{0}) == 128);\r
-                                               if ($header) {\r
-                                                       //Strip first binary header\r
-                                                       $font = substr($font, 6);\r
-                                               }\r
-                                               if ($header AND (ord($font{$info['length1']}) == 128)) {\r
-                                                       //Strip second binary header\r
-                                                       $font = substr($font, 0, $info['length1']).substr($font, ($info['length1'] + 6));\r
-                                               }\r
-                                       }
-                                       $this->_newobj();
-                                       $this->FontFiles[$file]['n'] = $this->n;\r
-                                       $this->_out('<</Length '.strlen($font));\r
-                                       if ($compressed) {\r
-                                               $this->_out('/Filter /FlateDecode');\r
-                                       }\r
-                                       $this->_out('/Length1 '.$info['length1']);\r
-                                       if (isset($info['length2'])) {\r
-                                               $this->_out('/Length2 '.$info['length2'].' /Length3 0');\r
-                                       }\r
-                                       $this->_out('>>');\r
-                                       $this->_putstream($font);\r
-                                       $this->_out('endobj');
-                               }\r
-                       }\r
-                       set_magic_quotes_runtime($mqr);
-                       foreach ($this->fontkeys as $k) {\r
-                               //Font objects
-                               $this->setFontSubBuffer($k, 'n', $this->n + 1);
-                               $font = $this->getFontBuffer($k);\r
-                               $type = $font['type'];\r
-                               $name = $font['name'];\r
-                               if ($type == 'core') {\r
-                                       //Standard font\r
-                                       $this->_newobj();\r
-                                       $this->_out('<</Type /Font');\r
-                                       $this->_out('/BaseFont /'.$name);\r
-                                       $this->_out('/Subtype /Type1');\r
-                                       if (($name != 'symbol') AND ($name != 'zapfdingbats')) {\r
-                                               $this->_out('/Encoding /WinAnsiEncoding');\r
-                                       }\r
-                                       $this->_out('>>');\r
-                                       $this->_out('endobj');\r
-                               } elseif (($type == 'Type1') OR ($type == 'TrueType')) {\r
-                                       //Additional Type1 or TrueType font\r
-                                       $this->_newobj();\r
-                                       $this->_out('<</Type /Font');\r
-                                       $this->_out('/BaseFont /'.$name);\r
-                                       $this->_out('/Subtype /'.$type);\r
-                                       $this->_out('/FirstChar 32 /LastChar 255');\r
-                                       $this->_out('/Widths '.($this->n + 1).' 0 R');\r
-                                       $this->_out('/FontDescriptor '.($this->n + 2).' 0 R');\r
-                                       if ($font['enc']) {\r
-                                               if (isset($font['diff'])) {\r
-                                                       $this->_out('/Encoding '.($nf + $font['diff']).' 0 R');\r
-                                               } else {\r
-                                                       $this->_out('/Encoding /WinAnsiEncoding');\r
-                                               }\r
-                                       }\r
-                                       $this->_out('>>');\r
-                                       $this->_out('endobj');\r
-                                       // Widths\r
-                                       $this->_newobj();\r
-                                       $cw = &$font['cw'];\r
-                                       $s = '[';\r
-                                       for ($i = 32; $i < 256; ++$i) {\r
-                                               $s .= $cw[$i].' ';\r
-                                       }\r
-                                       $this->_out($s.']');\r
-                                       $this->_out('endobj');\r
-                                       //Descriptor\r
-                                       $this->_newobj();\r
-                                       $s = '<</Type /FontDescriptor /FontName /'.$name;\r
-                                       foreach ($font['desc'] as $k => $v) {
-                                               $s .= ' /'.$k.' '.$v.'';\r
-                                       }\r
-                                       if (!$this->empty_string($font['file'])) {\r
-                                               $s .= ' /FontFile'.($type == 'Type1' ? '' : '2').' '.$this->FontFiles[$font['file']]['n'].' 0 R';\r
-                                       }\r
-                                       $this->_out($s.'>>');\r
-                                       $this->_out('endobj');\r
-                               } else {\r
-                                       //Allow for additional types\r
-                                       $mtd = '_put'.strtolower($type);\r
-                                       if (!method_exists($this, $mtd)) {\r
-                                               $this->Error('Unsupported font type: '.$type);\r
-                                       }\r
-                                       $this->$mtd($font);\r
-                               }\r
-                       }\r
-               }
-               \r
-               /**\r
-               * Outputs font widths
-               * @parameter array $font font data
-               * @parameter int $cidoffset offset for CID values
-               * @author Nicola Asuni\r
-               * @access protected\r
-               * @since 4.4.000 (2008-12-07)\r
+                       $this->jpeg_quality = intval($quality);
+               }
+               
+               /*
+               * Set the default number of columns in a row for HTML tables.
+               * @param int $cols number of columns
+               * @access public
+               * @since 3.0.014 (2008-06-04)
+               */
+               public function setDefaultTableColumns($cols=4) { 
+                       $this->default_table_columns = intval($cols); 
+               }
+               
+               /*
+               * Set the height of the cell (line height) respect the font height.
+               * @param int $h cell proportion respect font height (typical value = 1.25).
+               * @access public
+               * @since 3.0.014 (2008-06-04)
+               */
+               public function setCellHeightRatio($h) { 
+                       $this->cell_height_ratio = $h; 
+               }
+               
+               /*
+               * return the height of cell repect font height.
+               * @access public
+               * @since 4.0.012 (2008-07-24)
+               */
+               public function getCellHeightRatio() { 
+                       return $this->cell_height_ratio; 
+               }
+               
+               /*
+               * Set the PDF version (check PDF reference for valid values).
+               * Default value is 1.t
+               * @access public
+               * @since 3.1.000 (2008-06-09)
+               */
+               public function setPDFVersion($version='1.7') { 
+                       $this->PDFVersion = $version;
+               }
+               
+               /*
+               * Set the viewer preferences dictionary controlling the way the document is to be presented on the screen or in print.
+               * (see Section 8.1 of PDF reference, "Viewer Preferences").
+               * <ul>
+               * <li>HideToolbar boolean (Optional) A flag specifying whether to hide the viewer application's tool bars when the document is active. Default value: false.</li>
+               * <li>HideMenubar boolean (Optional) A flag specifying whether to hide the viewer application's menu bar when the document is active. Default value: false.</li>
+               * <li>HideWindowUI boolean (Optional) A flag specifying whether to hide user interface elements in the document's window (such as scroll bars and navigation controls), leaving only the document's contents displayed. Default value: false.</li>
+               * <li>FitWindow boolean (Optional) A flag specifying whether to resize the document's window to fit the size of the first displayed page. Default value: false.</li>
+               * <li>CenterWindow boolean (Optional) A flag specifying whether to position the document's window in the center of the screen. Default value: false.</li>
+               * <li>DisplayDocTitle boolean (Optional; PDF 1.4) A flag specifying whether the window's title bar should display the document title taken from the Title entry of the document information dictionary (see Section 10.2.1, "Document Information Dictionary"). If false, the title bar should instead display the name of the PDF file containing the document. Default value: false.</li>
+               * <li>NonFullScreenPageMode name (Optional) The document's page mode, specifying how to display the document on exiting full-screen mode:<ul><li>UseNone Neither document outline nor thumbnail images visible</li><li>UseOutlines Document outline visible</li><li>UseThumbs Thumbnail images visible</li><li>UseOC Optional content group panel visible</li><ul>This entry is meaningful only if the value of the PageMode entry in the catalog dictionary (see Section 3.6.1, "Document Catalog") is FullScreen; it is ignored otherwise. Default value: UseNone.</li>
+               * <li>ViewArea name (Optional; PDF 1.4) The name of the page boundary representing the area of a page to be displayed when viewing the document on the screen. Valid values are (see Section 10.10.1, "Page Boundaries").:<ul><li>MediaBox</li><li>CropBox (default)</li><li>BleedBox</li><li>TrimBox</li><li>ArtBox</li></ul></li>
+               * <li>ViewClip name (Optional; PDF 1.4) The name of the page boundary to which the contents of a page are to be clipped when viewing the document on the screen. Valid values are (see Section 10.10.1, "Page Boundaries").:<ul><li>MediaBox</li><li>CropBox (default)</li><li>BleedBox</li><li>TrimBox</li><li>ArtBox</li></ul></li>
+               * <li>PrintArea name (Optional; PDF 1.4) The name of the page boundary representing the area of a page to be rendered when printing the document. Valid values are (see Section 10.10.1, "Page Boundaries").:<ul><li>MediaBox</li><li>CropBox (default)</li><li>BleedBox</li><li>TrimBox</li><li>ArtBox</li></ul></li>
+               * <li>PrintClip name (Optional; PDF 1.4) The name of the page boundary to which the contents of a page are to be clipped when printing the document. Valid values are (see Section 10.10.1, "Page Boundaries").:<ul><li>MediaBox</li><li>CropBox (default)</li><li>BleedBox</li><li>TrimBox</li><li>ArtBox</li></ul></li>
+               * <li>PrintScaling name (Optional; PDF 1.6) The page scaling option to be selected when a print dialog is displayed for this document. Valid values are: <ul><li>None, which indicates that the print dialog should reflect no page scaling</li><li>AppDefault (default), which indicates that applications should use the current print scaling</li><ul></li>
+               * <li>Duplex name (Optional; PDF 1.7) The paper handling option to use when printing the file from the print dialog. The following values are valid:<ul><li>Simplex - Print single-sided</li><li>DuplexFlipShortEdge - Duplex and flip on the short edge of the sheet</li><li>DuplexFlipLongEdge - Duplex and flip on the long edge of the sheet</li></ul>Default value: none</li>
+               * <li>PickTrayByPDFSize boolean (Optional; PDF 1.7) A flag specifying whether the PDF page size is used to select the input paper tray. This setting influences only the preset values used to populate the print dialog presented by a PDF viewer application. If PickTrayByPDFSize is true, the check box in the print dialog associated with input paper tray is checked. Note: This setting has no effect on Mac OS systems, which do not provide the ability to pick the input tray by size.</li>
+               * <li>PrintPageRange array (Optional; PDF 1.7) The page numbers used to initialize the print dialog box when the file is printed. The first page of the PDF file is denoted by 1. Each pair consists of the first and last pages in the sub-range. An odd number of integers causes this entry to be ignored. Negative numbers cause the entire array to be ignored. Default value: as defined by PDF viewer application</li>
+               * <li>NumCopies integer (Optional; PDF 1.7) The number of copies to be printed when the print dialog is opened for this file. Supported values are the integers 2 through 5. Values outside this range are ignored. Default value: as defined by PDF viewer application, but typically 1</li>
+               * </ul>
+               * @param array $preferences array of options.
+               * @author Nicola Asuni
+               * @access public
+               * @since 3.1.000 (2008-06-09)
+               */
+               public function setViewerPreferences($preferences) { 
+                       $this->viewer_preferences = $preferences;
+               }
+               
+               /**
+               * Paints a linear colour gradient.
+               * @param float $x abscissa of the top left corner of the rectangle.
+               * @param float $y ordinate of the top left corner of the rectangle.
+               * @param float $w width of the rectangle.
+               * @param float $h height of the rectangle.
+               * @param array $col1 first color (RGB components).
+               * @param array $col2 second color (RGB components).
+               * @param array $coords array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0).
+               * @author Andreas Würmser, Nicola Asuni
+               * @since 3.1.000 (2008-06-09)
+               * @access public
+               */
+               public function LinearGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0,0,1,0)) {
+                       $this->Clip($x, $y, $w, $h);
+                       $this->Gradient(2, $col1, $col2, $coords);
+               }
+               
+               /**
+               * Paints a radial colour gradient.
+               * @param float $x abscissa of the top left corner of the rectangle.
+               * @param float $y ordinate of the top left corner of the rectangle.
+               * @param float $w width of the rectangle.
+               * @param float $h height of the rectangle.
+               * @param array $col1 first color (RGB components).
+               * @param array $col2 second color (RGB components).
+               * @param array $coords array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined.
+               * @author Andreas Würmser, Nicola Asuni
+               * @since 3.1.000 (2008-06-09)
+               * @access public
                */
-               protected function _putfontwidths($font, $cidoffset=0) {
-                       ksort($font['cw']);
-                       $rangeid = 0;
-                       $range = array();
-                       $prevcid = -2;
-                       $prevwidth = -1;
-                       $interval = false;
-                       // for each character
-                       foreach ($font['cw'] as $cid => $width) {
-                               $cid -= $cidoffset;
-                               if ($width != $font['dw']) {
-                                       if ($cid == ($prevcid + 1)) {
-                                               // consecutive CID
-                                               if ($width == $prevwidth) {
-                                                       if ($width == $range[$rangeid][0]) {
-                                                               $range[$rangeid][] = $width;
-                                                       } else {
-                                                               array_pop($range[$rangeid]);
-                                                               // new range
-                                                               $rangeid = $prevcid;
-                                                               $range[$rangeid] = array();
-                                                               $range[$rangeid][] = $prevwidth;
-                                                               $range[$rangeid][] = $width;
-                                                       }
-                                                       $interval = true;
-                                                       $range[$rangeid]['interval'] = true;
-                                               } else {
-                                                       if ($interval) {
-                                                               // new range
-                                                               $rangeid = $cid;
-                                                               $range[$rangeid] = array();
-                                                               $range[$rangeid][] = $width;
-                                                       } else {
-                                                               $range[$rangeid][] = $width;
-                                                       }
-                                                       $interval = false;
-                                               }
-                                       } else {
-                                               // new range
-                                               $rangeid = $cid;
-                                               $range[$rangeid] = array();
-                                               $range[$rangeid][] = $width;
-                                               $interval = false;
-                                       }
-                                       $prevcid = $cid;
-                                       $prevwidth = $width;
+               public function RadialGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0.5,0.5,0.5,0.5,1)) {
+                       $this->Clip($x, $y, $w, $h);
+                       $this->Gradient(3, $col1, $col2, $coords);
+               }
+               
+               /**
+               * Paints a coons patch mesh.
+               * @param float $x abscissa of the top left corner of the rectangle.
+               * @param float $y ordinate of the top left corner of the rectangle.
+               * @param float $w width of the rectangle.
+               * @param float $h height of the rectangle.
+               * @param array $col1 first color (lower left corner) (RGB components).
+               * @param array $col2 second color (lower right corner) (RGB components).
+               * @param array $col3 third color (upper right corner) (RGB components).
+               * @param array $col4 fourth color (upper left corner) (RGB components).
+               * @param array $coords <ul><li>for one patch mesh: array(float x1, float y1, .... float x12, float y12): 12 pairs of coordinates (normally from 0 to 1) which specify the Bezier control points that define the patch. First pair is the lower left edge point, next is its right control point (control point 2). Then the other points are defined in the order: control point 1, edge point, control point 2 going counter-clockwise around the patch. Last (x12, y12) is the first edge point's left control point (control point 1).</li><li>for two or more patch meshes: array[number of patches]: arrays with the following keys for each patch: f: where to put that patch (0 = first patch, 1, 2, 3 = right, top and left of precedent patch - I didn't figure this out completely - just try and error ;-) points: 12 pairs of coordinates of the Bezier control points as above for the first patch, 8 pairs of coordinates for the following patches, ignoring the coordinates already defined by the precedent patch (I also didn't figure out the order of these - also: try and see what's happening) colors: must be 4 colors for the first patch, 2 colors for the following patches</li></ul>
+               * @param array $coords_min minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0
+               * @param array $coords_max maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1
+               * @author Andreas Würmser, Nicola Asuni
+               * @since 3.1.000 (2008-06-09)
+               * @access public
+               */
+               public function CoonsPatchMesh($x, $y, $w, $h, $col1=array(), $col2=array(), $col3=array(), $col4=array(), $coords=array(0.00,0.0,0.33,0.00,0.67,0.00,1.00,0.00,1.00,0.33,1.00,0.67,1.00,1.00,0.67,1.00,0.33,1.00,0.00,1.00,0.00,0.67,0.00,0.33), $coords_min=0, $coords_max=1) {
+                       $this->Clip($x, $y, $w, $h);        
+                       $n = count($this->gradients) + 1;
+                       $this->gradients[$n]['type'] = 6; //coons patch mesh
+                       //check the coords array if it is the simple array or the multi patch array
+                       if (!isset($coords[0]['f'])) {
+                               //simple array -> convert to multi patch array
+                               if (!isset($col1[1])) {
+                                       $col1[1] = $col1[2] = $col1[0];
+                               }
+                               if (!isset($col2[1])) {
+                                       $col2[1] = $col2[2] = $col2[0];
                                }
+                               if (!isset($col3[1])) {
+                                       $col3[1] = $col3[2] = $col3[0];
+                               }
+                               if (!isset($col4[1])) {
+                                       $col4[1] = $col4[2] = $col4[0];
+                               }
+                               $patch_array[0]['f'] = 0;
+                               $patch_array[0]['points'] = $coords;
+                               $patch_array[0]['colors'][0]['r'] = $col1[0];
+                               $patch_array[0]['colors'][0]['g'] = $col1[1];
+                               $patch_array[0]['colors'][0]['b'] = $col1[2];
+                               $patch_array[0]['colors'][1]['r'] = $col2[0];
+                               $patch_array[0]['colors'][1]['g'] = $col2[1];
+                               $patch_array[0]['colors'][1]['b'] = $col2[2];
+                               $patch_array[0]['colors'][2]['r'] = $col3[0];
+                               $patch_array[0]['colors'][2]['g'] = $col3[1];
+                               $patch_array[0]['colors'][2]['b'] = $col3[2];
+                               $patch_array[0]['colors'][3]['r'] = $col4[0];
+                               $patch_array[0]['colors'][3]['g'] = $col4[1];
+                               $patch_array[0]['colors'][3]['b'] = $col4[2];
+                       } else {
+                               //multi patch array
+                               $patch_array = $coords;
                        }
-                       // optimize ranges
-                       $prevk = -1;
-                       $nextk = -1;
-                       $prevint = false;
-                       foreach ($range as $k => $ws) {
-                               $cws = count($ws);
-                               if (($k == $nextk) AND (!$prevint) AND ((!isset($ws['interval'])) OR ($cws < 4))) {
-                                       if (isset($range[$k]['interval'])) {
-                                               unset($range[$k]['interval']);
+                       $bpcd = 65535; //16 BitsPerCoordinate
+                       //build the data stream
+                       $this->gradients[$n]['stream'] = '';
+                       $count_patch = count($patch_array);
+                       for ($i=0; $i < $count_patch; ++$i) {
+                               $this->gradients[$n]['stream'] .= chr($patch_array[$i]['f']); //start with the edge flag as 8 bit
+                               $count_points = count($patch_array[$i]['points']);
+                               for ($j=0; $j < $count_points; ++$j) {
+                                       //each point as 16 bit
+                                       $patch_array[$i]['points'][$j] = (($patch_array[$i]['points'][$j] - $coords_min) / ($coords_max - $coords_min)) * $bpcd;
+                                       if ($patch_array[$i]['points'][$j] < 0) {
+                                               $patch_array[$i]['points'][$j] = 0;
                                        }
-                                       $range[$prevk] = array_merge($range[$prevk], $range[$k]);
-                                       unset($range[$k]);
-                               } else {
-                                       $prevk = $k;
-                               }
-                               $nextk = $k + $cws;
-                               if (isset($ws['interval'])) {
-                                       if ($cws > 3) {
-                                               $prevint = true;
-                                       } else {
-                                               $prevint = false;
+                                       if ($patch_array[$i]['points'][$j] > $bpcd) {
+                                               $patch_array[$i]['points'][$j] = $bpcd;
                                        }
-                                       unset($range[$k]['interval']);
-                                       --$nextk;
-                               } else {
-                                       $prevint = false;
+                                       $this->gradients[$n]['stream'] .= chr(floor($patch_array[$i]['points'][$j] / 256));
+                                       $this->gradients[$n]['stream'] .= chr(floor($patch_array[$i]['points'][$j] % 256));
+                               }
+                               $count_cols = count($patch_array[$i]['colors']);
+                               for ($j=0; $j < $count_cols; ++$j) {
+                                       //each color component as 8 bit
+                                       $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['r']);
+                                       $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['g']);
+                                       $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['b']);
                                }
                        }
-                       // output data
-                       $w = '';
-                       foreach ($range as $k => $ws) {
-                               if (count(array_count_values($ws)) == 1) {
-                                       // interval mode is more compact
-                                       $w .= ' '.$k.' '.($k + count($ws) - 1).' '.$ws[0];
-                               } else {
-                                       // range mode\r
-                                       $w .= ' '.$k.' [ '.implode(' ', $ws).' ]';
-                               }\r
-                       }
-                       $this->_out('/W ['.$w.' ]');
+                       //paint the gradient
+                       $this->_out('/Sh'.$n.' sh');
+                       //restore previous Graphic State
+                       $this->_out('Q');
                }
-               \r
-               /**\r
-               * Adds unicode fonts.<br>\r
-               * Based on PDF Reference 1.3 (section 5)
-               * @parameter array $font font data\r
-               * @access protected\r
-               * @author Nicola Asuni\r
-               * @since 1.52.0.TC005 (2005-01-05)\r
-               */\r
-               protected function _puttruetypeunicode($font) {\r
-                       // Type0 Font\r
-                       // A composite font composed of other fonts, organized hierarchically\r
-                       $this->_newobj();\r
-                       $this->_out('<</Type /Font');\r
-                       $this->_out('/Subtype /Type0');\r
-                       $this->_out('/BaseFont /'.$font['name'].'');\r
-                       $this->_out('/Encoding /Identity-H'); //The horizontal identity mapping for 2-byte CIDs; may be used with CIDFonts using any Registry, Ordering, and Supplement values.
-                       $this->_out('/ToUnicode /Identity-H');
-                       $this->_out('/DescendantFonts ['.($this->n + 1).' 0 R]');\r
-                       $this->_out('>>');\r
-                       $this->_out('endobj');\r
-                       // CIDFontType2\r
-                       // A CIDFont whose glyph descriptions are based on TrueType font technology\r
-                       $this->_newobj();\r
-                       $this->_out('<</Type /Font');\r
-                       $this->_out('/Subtype /CIDFontType2');\r
-                       $this->_out('/BaseFont /'.$font['name'].'');
-                       // A dictionary containing entries that define the character collection of the CIDFont.
-                       $cidinfo = '/Registry '.$this->_datastring('Adobe');
-                       $cidinfo .= ' /Ordering '.$this->_datastring('Identity');
-                       $cidinfo .= ' /Supplement 0';\r
-                       $this->_out('/CIDSystemInfo <<'.$cidinfo.'>>');\r
-                       $this->_out('/FontDescriptor '.($this->n + 1).' 0 R');\r
-                       $this->_out('/DW '.$font['dw'].''); // default width
-                       $this->_putfontwidths($font, 0);\r
-                       $this->_out('/CIDToGIDMap '.($this->n + 2).' 0 R');\r
-                       $this->_out('>>');\r
-                       $this->_out('endobj');                  \r
-                       // Font descriptor\r
-                       // A font descriptor describing the CIDFont default metrics other than its glyph widths\r
-                       $this->_newobj();\r
-                       $this->_out('<</Type /FontDescriptor');\r
-                       $this->_out('/FontName /'.$font['name']);\r
-                       foreach ($font['desc'] as $key => $value) {\r
-                               $this->_out('/'.$key.' '.$value);\r
-                       }
-                       $fontdir = '';\r
-                       if (!$this->empty_string($font['file'])) {\r
-                               // A stream containing a TrueType font\r
-                               $this->_out('/FontFile2 '.$this->FontFiles[$font['file']]['n'].' 0 R');
-                               $fontdir = $this->FontFiles[$font['file']]['fontdir'];\r
-                       }\r
-                       $this->_out('>>');\r
-                       $this->_out('endobj');
-                       $this->_newobj();
-                       if (isset($font['ctg']) AND (!$this->empty_string($font['ctg']))) {
-                               // Embed CIDToGIDMap\r
-                               // A specification of the mapping from CIDs to glyph indices
-                               // search and get CTG font file to embedd
-                               $ctgfile = strtolower($font['ctg']);
-                               // search and get ctg font file to embedd
-                               $fontfile = '';
-                               // search files on various directories
-                               if (file_exists($fontdir.$ctgfile)) {
-                                       $fontfile = $fontdir.$ctgfile;
-                               } elseif (file_exists($this->_getfontpath().$ctgfile)) {
-                                       $fontfile = $this->_getfontpath().$ctgfile;
-                               } elseif (file_exists($ctgfile)) {
-                                       $fontfile = $ctgfile;
+               
+               /**
+               * Set a rectangular clipping area.
+               * @param float $x abscissa of the top left corner of the rectangle (or top right corner for RTL mode).
+               * @param float $y ordinate of the top left corner of the rectangle.
+               * @param float $w width of the rectangle.
+               * @param float $h height of the rectangle.
+               * @author Andreas Würmser, Nicola Asuni
+               * @since 3.1.000 (2008-06-09)
+               * @access protected
+               */
+               protected function Clip($x, $y, $w, $h) {
+                       if ($this->rtl) {
+                               $x = $this->w - $x - $w;
+                       }
+                       //save current Graphic State
+                       $s = 'q';
+                       //set clipping area
+                       $s .= sprintf(' %.2F %.2F %.2F %.2F re W n', $x*$this->k, ($this->h-$y)*$this->k, $w*$this->k, -$h*$this->k);
+                       //set up transformation matrix for gradient
+                       $s .= sprintf(' %.3F 0 0 %.3F %.3F %.3F cm', $w*$this->k, $h*$this->k, $x*$this->k, ($this->h-($y+$h))*$this->k);
+                       $this->_out($s);
+               }
+                               
+               /**
+               * Output gradient.
+               * @param int $type type of gradient.
+               * @param array $col1 first color (RGB components).
+               * @param array $col2 second color (RGB components).
+               * @param array $coords array of coordinates.
+               * @author Andreas Würmser, Nicola Asuni
+               * @since 3.1.000 (2008-06-09)
+               * @access protected
+               */
+               protected function Gradient($type, $col1, $col2, $coords) {
+                       $n = count($this->gradients) + 1;
+                       $this->gradients[$n]['type'] = $type;
+                       if (!isset($col1[1])) {
+                               $col1[1]=$col1[2]=$col1[0];
+                       }
+                       $this->gradients[$n]['col1'] = sprintf('%.3F %.3F %.3F', ($col1[0]/255), ($col1[1]/255), ($col1[2]/255));
+                       if (!isset($col2[1])) {
+                               $col2[1] = $col2[2] = $col2[0];
+                       }
+                       $this->gradients[$n]['col2'] = sprintf('%.3F %.3F %.3F', ($col2[0]/255), ($col2[1]/255), ($col2[2]/255));
+                       $this->gradients[$n]['coords'] = $coords;
+                       //paint the gradient
+                       $this->_out('/Sh'.$n.' sh');
+                       //restore previous Graphic State
+                       $this->_out('Q');
+               }
+               
+               /**
+               * Output shaders.
+               * @author Andreas Würmser, Nicola Asuni
+               * @since 3.1.000 (2008-06-09)
+               * @access protected
+               */
+               function _putshaders() {
+                       foreach ($this->gradients as $id => $grad) {  
+                               if (($grad['type'] == 2) OR ($grad['type'] == 3)) {
+                                       $this->_newobj();
+                                       $this->_out('<<');
+                                       $this->_out('/FunctionType 2');
+                                       $this->_out('/Domain [0.0 1.0]');
+                                       $this->_out('/C0 ['.$grad['col1'].']');
+                                       $this->_out('/C1 ['.$grad['col2'].']');
+                                       $this->_out('/N 1');
+                                       $this->_out('>>');
+                                       $this->_out('endobj');
+                                       $f1 = $this->n;
                                }
-                               if ($this->empty_string($fontfile)) {
-                                       $this->Error('Font file not found: '.$ctgfile);\r
-                               }\r
-                               $size = filesize($fontfile);\r
-                               $this->_out('<</Length '.$size.'');\r
-                               if (substr($fontfile, -2) == '.z') { // check file extension\r
-                                       // Decompresses data encoded using the public-domain \r
-                                       // zlib/deflate compression method, reproducing the \r
-                                       // original text or binary data\r
-                                       $this->_out('/Filter /FlateDecode');\r
-                               }\r
-                               $this->_out('>>');\r
-                               $this->_putstream(file_get_contents($fontfile));
+                               $this->_newobj();
+                               $this->_out('<<');
+                               $this->_out('/ShadingType '.$grad['type']);
+                               $this->_out('/ColorSpace /DeviceRGB');
+                               if ($grad['type'] == 2) {
+                                       $this->_out(sprintf('/Coords [%.3F %.3F %.3F %.3F]', $grad['coords'][0], $grad['coords'][1], $grad['coords'][2], $grad['coords'][3]));
+                                       $this->_out('/Function '.$f1.' 0 R');
+                                       $this->_out('/Extend [true true] ');
+                                       $this->_out('>>');
+                               } elseif ($grad['type'] == 3) {
+                                       //x0, y0, r0, x1, y1, r1
+                                       //at this this time radius of inner circle is 0
+                                       $this->_out(sprintf('/Coords [%.3F %.3F 0 %.3F %.3F %.3F]', $grad['coords'][0], $grad['coords'][1], $grad['coords'][2], $grad['coords'][3], $grad['coords'][4]));
+                                       $this->_out('/Function '.$f1.' 0 R');
+                                       $this->_out('/Extend [true true] ');
+                                       $this->_out('>>');
+                               } elseif ($grad['type'] == 6) {
+                                       $this->_out('/BitsPerCoordinate 16');
+                                       $this->_out('/BitsPerComponent 8');
+                                       $this->_out('/Decode[0 1 0 1 0 1 0 1 0 1]');
+                                       $this->_out('/BitsPerFlag 8');
+                                       $this->_out('/Length '.strlen($grad['stream']));
+                                       $this->_out('>>');
+                                       $this->_putstream($grad['stream']);
+                               }
+                               $this->_out('endobj');
+                               $this->gradients[$id]['id'] = $this->n;
                        }
-                       $this->_out('endobj');\r
                }
-               \r
-               /**\r
-                * Output CID-0 fonts.\r
-                * @param array $font font data\r
-                * @access protected\r
-                * @author Andrew Whitehead, Nicola Asuni, Yukihiro Nakadaira\r
-                * @since 3.2.000 (2008-06-23)\r
-                */\r
-               protected function _putcidfont0($font) {
-                       $cidoffset = 31;
-                       if (isset($font['cidinfo']['uni2cid'])) {
-                               // convert unicode to cid.
-                               $uni2cid = $font['cidinfo']['uni2cid'];
-                               $cw = array();
-                               foreach ($font['cw'] as $uni => $width) {
-                                       if (isset($uni2cid[$uni])) {
-                                               $cw[($uni2cid[$uni] + $cidoffset)] = $width;
-                                       } elseif ($uni < 256) {
-                                               $cw[$uni] = $width;
-                                       } // else unknown character
+
+               /**
+               * Output an arc
+               * @author Maxime Delorme, Nicola Asuni
+               * @since 3.1.000 (2008-06-09)
+               * @access protected
+               */
+               protected function _outarc($x1, $y1, $x2, $y2, $x3, $y3 ) {
+                       $h = $this->h;
+                       $this->_out(sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c', $x1*$this->k, ($h-$y1)*$this->k, $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k));
+               }
+               
+               /**
+               * Draw the sector of a circle.
+               * It can be used for instance to render pie charts.
+               * @param float $xc abscissa of the center.
+               * @param float $yc ordinate of the center.
+               * @param float $r radius.
+               * @param float $a start angle (in degrees).
+               * @param float $b end angle (in degrees).
+               * @param string $style: D, F, FD or DF (draw, fill, fill and draw). Default: FD.
+               * @param float $cw: indicates whether to go clockwise (default: true).
+               * @param float $o: origin of angles (0 for 3 o'clock, 90 for noon, 180 for 9 o'clock, 270 for 6 o'clock). Default: 90.
+               * @author Maxime Delorme, Nicola Asuni
+               * @since 3.1.000 (2008-06-09)
+               * @access public
+               */
+               public function PieSector($xc, $yc, $r, $a, $b, $style='FD', $cw=true, $o=90) {
+                       if ($this->rtl) {
+                               $xc = $this->w - $xc;
+                       }
+                       if ($cw) {
+                               $d = $b;
+                               $b = $o - $a;
+                               $a = $o - $d;
+                       } else {
+                               $b += $o;
+                               $a += $o;
+                       }
+                       $a = ($a % 360) + 360;
+                       $b = ($b % 360) + 360;
+                       if ($a > $b) {
+                               $b +=360;
+                       }
+                       $b = $b / 360 * 2 * M_PI;
+                       $a = $a / 360 * 2 * M_PI;
+                       $d = $b - $a;
+                       if ($d == 0 ) {
+                               $d = 2 * M_PI;
+                       }
+                       $k = $this->k;
+                       $hp = $this->h;
+                       if ($style=='F') {
+                               $op = 'f';
+                       } elseif ($style=='FD' or $style=='DF') {
+                               $op = 'b';
+                       } else {
+                               $op = 's';
+                       }
+                       if (sin($d/2)) {
+                               $MyArc = 4/3 * (1 - cos($d/2)) / sin($d/2) * $r;
+                       }
+                       //first put the center
+                       $this->_out(sprintf('%.2F %.2F m', ($xc)*$k, ($hp-$yc)*$k));
+                       //put the first point
+                       $this->_out(sprintf('%.2F %.2F l', ($xc+$r*cos($a))*$k, (($hp-($yc-$r*sin($a)))*$k)));
+                       //draw the arc
+                       if ($d < (M_PI/2)) {
+                               $this->_outarc($xc+$r*cos($a)+$MyArc*cos(M_PI/2+$a), $yc-$r*sin($a)-$MyArc*sin(M_PI/2+$a), $xc+$r*cos($b)+$MyArc*cos($b-M_PI/2), $yc-$r*sin($b)-$MyArc*sin($b-M_PI/2), $xc+$r*cos($b), $yc-$r*sin($b));
+                       } else {
+                               $b = $a + $d/4;
+                               $MyArc = 4/3*(1-cos($d/8))/sin($d/8)*$r;
+                               $this->_outarc($xc+$r*cos($a)+$MyArc*cos(M_PI/2+$a), $yc-$r*sin($a)-$MyArc*sin(M_PI/2+$a), $xc+$r*cos($b)+$MyArc*cos($b-M_PI/2), $yc-$r*sin($b)-$MyArc*sin($b-M_PI/2), $xc+$r*cos($b), $yc-$r*sin($b));
+                               $a = $b;
+                               $b = $a + $d/4;
+                               $this->_outarc($xc+$r*cos($a)+$MyArc*cos(M_PI/2+$a), $yc-$r*sin($a)-$MyArc*sin(M_PI/2+$a), $xc+$r*cos($b)+$MyArc*cos($b-M_PI/2), $yc-$r*sin($b)-$MyArc*sin($b-M_PI/2), $xc+$r*cos($b), $yc-$r*sin($b));
+                               $a = $b;
+                               $b = $a + $d/4;
+                               $this->_outarc($xc+$r*cos($a)+$MyArc*cos(M_PI/2+$a), $yc-$r*sin($a)-$MyArc*sin(M_PI/2+$a), $xc+$r*cos($b)+$MyArc*cos($b-M_PI/2), $yc-$r*sin($b)-$MyArc*sin($b-M_PI/2), $xc+$r*cos($b), $yc-$r*sin($b) );
+                               $a = $b;
+                               $b = $a + $d/4;
+                               $this->_outarc($xc+$r*cos($a)+$MyArc*cos(M_PI/2+$a), $yc-$r*sin($a)-$MyArc*sin(M_PI/2+$a), $xc+$r*cos($b)+$MyArc*cos($b-M_PI/2), $yc-$r*sin($b)-$MyArc*sin($b-M_PI/2), $xc+$r*cos($b), $yc-$r*sin($b));
+                       }
+                       //terminate drawing
+                       $this->_out($op);
+               }
+               
+               /**
+               * Embed vector-based Adobe Illustrator (AI) or AI-compatible EPS files.
+               * Only vector drawing is supported, not text or bitmap. 
+               * Although the script was successfully tested with various AI format versions, best results are probably achieved with files that were exported in the AI3 format (tested with Illustrator CS2, Freehand MX and Photoshop CS2).
+               * @param string $file Name of the file containing the image.
+               * @param float $x Abscissa of the upper-left corner.
+               * @param float $y Ordinate of the upper-left corner.
+               * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
+               * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
+               * @param mixed $link URL or identifier returned by AddLink().
+               * @param boolean useBoundingBox specifies whether to position the bounding box (true) or the complete canvas (false) at location (x,y). Default value is true.
+               * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>
+               * @param string $palign Allows to center or align the image on the current line. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>
+               * @param mixed $border Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
+               * @author Valentin Schmidt, Nicola Asuni
+               * @since 3.1.000 (2008-06-09)
+               * @access public
+               */
+               public function ImageEps($file, $x='', $y='', $w=0, $h=0, $link='', $useBoundingBox=true, $align='', $palign='', $border=0) {
+                       if ($x === '') {
+                               $x = $this->x;
+                       }
+                       if ($y === '') {
+                               $y = $this->y;
+                       }
+                       $k = $this->k;
+                       $data = file_get_contents($file);
+                       if ($data === false) {
+                               $this->Error('EPS file not found: '.$file);
+                       }
+                       $regs = array();
+                       // EPS/AI compatibility check (only checks files created by Adobe Illustrator!)
+                       preg_match("/%%Creator:([^\r\n]+)/", $data, $regs); # find Creator
+                       if (count($regs) > 1) {
+                               $version_str = trim($regs[1]); # e.g. "Adobe Illustrator(R) 8.0"
+                               if (strpos($version_str, 'Adobe Illustrator') !== false) {
+                                       $versexp = explode(' ', $version_str);
+                                       $version = (float)array_pop($versexp);
+                                       if ($version >= 9) {
+                                               $this->Error('This version of Adobe Illustrator file is not supported: '.$file);
+                                       }
                                }
-                               $font = array_merge($font, array('cw' => $cw));
-                       }\r
-                       $name = $font['name'];\r
-                       $enc = $font['enc'];\r
-                       if ($enc) {\r
-                               $longname = $name.'-'.$enc;\r
+                       }
+                       // strip binary bytes in front of PS-header
+                       $start = strpos($data, '%!PS-Adobe');
+                       if ($start > 0) {
+                               $data = substr($data, $start);
+                       }
+                       // find BoundingBox params
+                       preg_match("/%%BoundingBox:([^\r\n]+)/", $data, $regs);
+                       if (count($regs) > 1) {
+                               list($x1, $y1, $x2, $y2) = explode(' ', trim($regs[1]));
                        } else {
-                               $longname = $name;
-                       }\r
-                       $this->_newobj();\r
-                       $this->_out('<</Type /Font');
-                       $this->_out('/BaseFont /'.$longname);\r
-                       $this->_out('/Subtype /Type0');\r
-                       if ($enc) {\r
-                               $this->_out('/Encoding /'.$enc);\r
-                       }\r
-                       $this->_out('/DescendantFonts ['.($this->n + 1).' 0 R]');\r
-                       $this->_out('>>');\r
-                       $this->_out('endobj');\r
-                       $this->_newobj();\r
-                       $this->_out('<</Type /Font');\r
-                       $this->_out('/BaseFont /'.$name);\r
-                       $this->_out('/Subtype /CIDFontType0');
-                       $cidinfo = '/Registry '.$this->_datastring($font['cidinfo']['Registry']);
-                       $cidinfo .= ' /Ordering '.$this->_datastring($font['cidinfo']['Ordering']);
-                       $cidinfo .= ' /Supplement '.$font['cidinfo']['Supplement'];\r
-                       $this->_out('/CIDSystemInfo <<'.$cidinfo.'>>');\r
-                       $this->_out('/FontDescriptor '.($this->n + 1).' 0 R');\r
-                       $this->_out('/DW '.$font['dw']);
-                       $this->_putfontwidths($font, $cidoffset);\r
-                       $this->_out('>>');\r
-                       $this->_out('endobj');\r
-                       $this->_newobj();\r
-                       $s = '<</Type /FontDescriptor /FontName /'.$name;\r
-                       foreach ($font['desc'] as $k => $v) {
-                               if ($k != 'Style') {
-                                       $s .= ' /'.$k.' '.$v.'';
-                               }\r
-                       }\r
-                       $this->_out($s.'>>');\r
-                       $this->_out('endobj');\r
-               }\r
-\r
-               /**\r
-                * Output images.\r
-                * @access protected\r
-                */\r
-               protected function _putimages() {\r
-                       $filter = ($this->compress) ? '/Filter /FlateDecode ' : '';
-                       foreach ($this->imagekeys as $file) {
-                               $info = $this->getImageBuffer($file);\r
-                               $this->_newobj();\r
-                               $this->setImageSubBuffer($file, 'n', $this->n);\r
-                               $this->_out('<</Type /XObject');\r
-                               $this->_out('/Subtype /Image');\r
-                               $this->_out('/Width '.$info['w']);\r
-                               $this->_out('/Height '.$info['h']);\r
-                               if (isset($info['masked'])) {\r
-                                       $this->_out('/SMask '.($this->n - 1).' 0 R');\r
-                               }\r
-                               if ($info['cs'] == 'Indexed') {\r
-                                       $this->_out('/ColorSpace [/Indexed /DeviceRGB '.((strlen($info['pal']) / 3) - 1).' '.($this->n + 1).' 0 R]');\r
-                               } else {\r
-                                       $this->_out('/ColorSpace /'.$info['cs']);\r
-                                       if ($info['cs'] == 'DeviceCMYK') {\r
-                                               $this->_out('/Decode [1 0 1 0 1 0 1 0]');\r
-                                       }\r
-                               }\r
-                               $this->_out('/BitsPerComponent '.$info['bpc']);\r
-                               if (isset($info['f'])) {\r
-                                       $this->_out('/Filter /'.$info['f']);\r
-                               }\r
-                               if (isset($info['parms'])) {\r
-                                       $this->_out($info['parms']);\r
-                               }\r
-                               if (isset($info['trns']) AND is_array($info['trns'])) {\r
-                                       $trns='';\r
-                                       $count_info = count($info['trns']);
-                                       for ($i=0; $i < $count_info; ++$i) {\r
-                                               $trns .= $info['trns'][$i].' '.$info['trns'][$i].' ';\r
-                                       }\r
-                                       $this->_out('/Mask ['.$trns.']');\r
-                               }\r
-                               $this->_out('/Length '.strlen($info['data']).'>>');\r
-                               $this->_putstream($info['data']);\r
-                               $this->_out('endobj');\r
-                               //Palette\r
-                               if ($info['cs'] == 'Indexed') {\r
-                                       $this->_newobj();\r
-                                       $pal = ($this->compress) ? gzcompress($info['pal']) : $info['pal'];\r
-                                       $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>');\r
-                                       $this->_putstream($pal);\r
-                                       $this->_out('endobj');\r
-                               }\r
-                       }\r
-               }
-
-               /**\r
-               * Output Spot Colors Resources.\r
-               * @access protected
-               * @since 4.0.024 (2008-09-12)\r
-               */\r
-               protected function _putspotcolors() {
-                       foreach ($this->spot_colors as $name => $color) {
-                               $this->_newobj();
-                               $this->spot_colors[$name]['n'] = $this->n;
-                               $this->_out('[/Separation /'.str_replace(' ', '#20', $name));
-                               $this->_out('/DeviceCMYK <<');
-                               $this->_out('/Range [0 1 0 1 0 1 0 1] /C0 [0 0 0 0] ');
-                               $this->_out(sprintf('/C1 [%.4F %.4F %.4F %.4F] ', $color['c']/100, $color['m']/100, $color['y']/100, $color['k']/100));
-                               $this->_out('/FunctionType 2 /Domain [0 1] /N 1>>]');
-                               $this->_out('endobj');
+                               $this->Error('No BoundingBox found in EPS file: '.$file);
                        }
-               }\r
-\r
-               /**\r
-               * Output object dictionary for images.\r
-               * @access protected\r
-               */\r
-               protected function _putxobjectdict() {\r
-                       foreach ($this->imagekeys as $file) {
-                               $info = $this->getImageBuffer($file);\r
-                               $this->_out('/I'.$info['i'].' '.$info['n'].' 0 R');\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Output Resources Dictionary.\r
-               * @access protected\r
-               */\r
-               protected function _putresourcedict() {\r
-                       $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');\r
-                       $this->_out('/Font <<');\r
-                       foreach ($this->fontkeys as $fontkey) {
-                               $font = $this->getFontBuffer($fontkey);\r
-                               $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R');\r
-                       }\r
-                       $this->_out('>>');\r
-                       $this->_out('/XObject <<');\r
-                       $this->_putxobjectdict();\r
-                       $this->_out('>>');\r
-                       // visibility\r
-                       $this->_out('/Properties <</OC1 '.$this->n_ocg_print.' 0 R /OC2 '.$this->n_ocg_view.' 0 R>>');\r
-                       // transparency\r
-                       $this->_out('/ExtGState <<');\r
-                       foreach ($this->extgstates as $k => $extgstate) {\r
-                               $this->_out('/GS'.$k.' '.$extgstate['n'].' 0 R');\r
-                       }\r
-                       $this->_out('>>');\r
-                       // gradients\r
-                       if (isset($this->gradients) AND (count($this->gradients) > 0)) {\r
-                               $this->_out('/Shading <<');\r
-                               foreach ($this->gradients as $id => $grad) {\r
-                                       $this->_out('/Sh'.$id.' '.$grad['id'].' 0 R');\r
-                               }\r
-                               $this->_out('>>');\r
+                       $start = strpos($data, '%%EndSetup');
+                       if ($start === false) {
+                               $start = strpos($data, '%%EndProlog');
                        }
-                       // spot colors
-                       if (isset($this->spot_colors) AND (count($this->spot_colors) > 0)) {
-                               $this->_out('/ColorSpace <<');
-                               foreach ($this->spot_colors as $color) {
-                                       $this->_out('/CS'.$color['i'].' '.$color['n'].' 0 R');
+                       if ($start === false) {
+                               $start = strpos($data, '%%BoundingBox');
+                       }
+                       $data = substr($data, $start);
+                       $end = strpos($data, '%%PageTrailer');
+                       if ($end===false) {
+                               $end = strpos($data, 'showpage');
+                       }
+                       if ($end) {
+                               $data = substr($data, 0, $end);
+                       }
+                       if ($w > 0) {
+                               $scale_x = $w / (($x2 - $x1) / $k);
+                               if ($h > 0) {
+                                       $scale_y = $h / (($y2 - $y1) / $k);
+                               } else {
+                                       $scale_y = $scale_x;
+                                       $h = ($y2 - $y1) / $k * $scale_y;
                                }
-                               $this->_out('>>');
-                       }\r
-               }
-               \r
-               /**\r
-               * Output Resources.\r
-               * @access protected\r
-               */\r
-               protected function _putresources() {
-                       $this->_putextgstates();\r
-                       $this->_putocg();\r
-                       $this->_putfonts();\r
-                       $this->_putimages();
-                       $this->_putspotcolors();\r
-                       $this->_putshaders();\r
-                       //Resource dictionary\r
-                       $this->offsets[2] = $this->bufferlen;\r
-                       $this->_out('2 0 obj');\r
-                       $this->_out('<<');\r
-                       $this->_putresourcedict();\r
-                       $this->_out('>>');\r
-                       $this->_out('endobj');\r
-                       $this->_putjavascript();\r
-                       $this->_putbookmarks();
-                       $this->_putEmbeddedFiles();\r
-                       // encryption\r
-                       if ($this->encrypted) {\r
-                               $this->_newobj();\r
-                               $this->enc_obj_id = $this->n;\r
-                               $this->_out('<<');\r
-                               $this->_putencryption();\r
-                               $this->_out('>>');\r
-                               $this->_out('endobj');\r
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Adds some Metadata information\r
-               * (see Chapter 10.2 of PDF Reference)\r
-               * @access protected\r
-               */\r
-               protected function _putinfo() {\r
-                       if ($this->empty_string($this->title)) {\r
-                               $this->title = '?';\r
-                       }
-                       $this->_out('/Title '.$this->_textstring($this->title));\r
-                       if ($this->empty_string($this->author)) {\r
-                               $this->author = '?';\r
-                       }
-                       $this->_out('/Author '.$this->_textstring($this->author));\r
-                       if ($this->empty_string($this->subject)) {\r
-                               $this->subject = '?';\r
-                       }
-                       $this->_out('/Subject '.$this->_textstring($this->subject));\r
-                       if ($this->empty_string($this->keywords)) {\r
-                               $this->keywords = '?';\r
-                       }
-                       $this->_out('/Keywords '.$this->_textstring($this->keywords));\r
-                       if ($this->empty_string($this->creator)) {\r
-                               $this->creator = '?';\r
-                       }
-                       $this->_out('/Creator '.$this->_textstring($this->creator));\r
-                       if (defined('PDF_PRODUCER')) {\r
-                               $this->_out('/Producer '.$this->_textstring(PDF_PRODUCER));\r
                        } else {
-                               $this->_out('/Producer '.$this->_textstring('TCPDF'));
-                       }\r
-                       $this->_out('/CreationDate '.$this->_datastring('D:'.date('YmdHis')));\r
-                       $this->_out('/ModDate '.$this->_datastring('D:'.date('YmdHis')));       \r
-               }\r
-               \r
-               /**\r
-               * Output Catalog.\r
-               * @access protected\r
-               */\r
-               protected function _putcatalog() {\r
-                       $this->_out('/Type /Catalog');\r
-                       $this->_out('/Pages 1 0 R');\r
-                       if ($this->ZoomMode == 'fullpage') {\r
-                               $this->_out('/OpenAction [3 0 R /Fit]');\r
-                       } elseif ($this->ZoomMode == 'fullwidth') {\r
-                               $this->_out('/OpenAction [3 0 R /FitH null]');\r
-                       } elseif ($this->ZoomMode == 'real') {\r
-                               $this->_out('/OpenAction [3 0 R /XYZ null null 1]');\r
-                       } elseif (!is_string($this->ZoomMode)) {\r
-                               $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode / 100).']');\r
-                       }\r
-                       if (isset($this->LayoutMode) AND (!$this->empty_string($this->LayoutMode))) {\r
-                               $this->_out('/PageLayout /'.$this->LayoutMode.'');\r
-                       }\r
-                       if (isset($this->PageMode) AND (!$this->empty_string($this->PageMode))) {\r
-                               $this->_out('/PageMode /'.$this->PageMode);\r
-                       }\r
-                       if (isset($this->l['a_meta_language'])) {\r
-                               $this->_out('/Lang /'.$this->l['a_meta_language']);\r
-                       }
-                       $this->_out('/Names <<');\r
-                       if (!$this->empty_string($this->javascript)) {\r
-                               $this->_out('/JavaScript '.($this->n_js).' 0 R');\r
-                       }
-                       $this->_out('>>');\r
-                       if (count($this->outlines) > 0) {\r
-                               $this->_out('/Outlines '.$this->OutlineRoot.' 0 R');\r
-                               $this->_out('/PageMode /UseOutlines');\r
-                       }\r
-                       $this->_putviewerpreferences();\r
-                       $p = $this->n_ocg_print.' 0 R';\r
-                       $v = $this->n_ocg_view.' 0 R';\r
-                       $as = '<</Event /Print /OCGs ['.$p.' '.$v.'] /Category [/Print]>> <</Event /View /OCGs ['.$p.' '.$v.'] /Category [/View]>>';
-                       $this->_out('/OCProperties <</OCGs ['.$p.' '.$v.'] /D <</ON ['.$p.'] /OFF ['.$v.'] /AS ['.$as.']>>>>');\r
-               }\r
-               \r
-               /**\r
-               * Output viewer preferences.\r
-               * @author Nicola asuni\r
-               * @since 3.1.000 (2008-06-09)\r
-               * @access protected\r
-               */\r
-               protected function _putviewerpreferences() {\r
-                       $this->_out('/ViewerPreferences<<');\r
-                       if ($this->rtl) {\r
-                               $this->_out('/Direction /R2L');\r
-                       } else {\r
-                               $this->_out('/Direction /L2R');\r
-                       }\r
-                       if (isset($this->viewer_preferences['HideToolbar']) AND ($this->viewer_preferences['HideToolbar'])) {\r
-                               $this->_out('/HideToolbar true');\r
-                       }\r
-                       if (isset($this->viewer_preferences['HideMenubar']) AND ($this->viewer_preferences['HideMenubar'])) {\r
-                               $this->_out('/HideMenubar true');\r
-                       }\r
-                       if (isset($this->viewer_preferences['HideWindowUI']) AND ($this->viewer_preferences['HideWindowUI'])) {\r
-                               $this->_out('/HideWindowUI true');\r
-                       }\r
-                       if (isset($this->viewer_preferences['FitWindow']) AND ($this->viewer_preferences['FitWindow'])) {\r
-                               $this->_out('/FitWindow true');\r
-                       }\r
-                       if (isset($this->viewer_preferences['CenterWindow']) AND ($this->viewer_preferences['CenterWindow'])) {\r
-                               $this->_out('/CenterWindow true');\r
-                       }\r
-                       if (isset($this->viewer_preferences['DisplayDocTitle']) AND ($this->viewer_preferences['DisplayDocTitle'])) {\r
-                               $this->_out('/DisplayDocTitle true');\r
-                       }\r
-                       if (isset($this->viewer_preferences['NonFullScreenPageMode'])) {\r
-                               $this->_out('/NonFullScreenPageMode /'.$this->viewer_preferences['NonFullScreenPageMode'].'');\r
-                       }\r
-                       if (isset($this->viewer_preferences['ViewArea'])) {\r
-                               $this->_out('/ViewArea /'.$this->viewer_preferences['ViewArea']);\r
-                       }\r
-                       if (isset($this->viewer_preferences['ViewClip'])) {\r
-                               $this->_out('/ViewClip /'.$this->viewer_preferences['ViewClip']);\r
-                       }\r
-                       if (isset($this->viewer_preferences['PrintArea'])) {\r
-                               $this->_out('/PrintArea /'.$this->viewer_preferences['PrintArea']);\r
-                       }\r
-                       if (isset($this->viewer_preferences['PrintClip'])) {\r
-                               $this->_out('/PrintClip /'.$this->viewer_preferences['PrintClip']);\r
-                       }\r
-                       if (isset($this->viewer_preferences['PrintScaling'])) {\r
-                               $this->_out('/PrintScaling /'.$this->viewer_preferences['PrintScaling']);\r
-                       }\r
-                       if (isset($this->viewer_preferences['Duplex']) AND (!$this->empty_string($this->viewer_preferences['Duplex']))) {\r
-                               $this->_out('/Duplex /'.$this->viewer_preferences['Duplex']);\r
-                       }\r
-                       if (isset($this->viewer_preferences['PickTrayByPDFSize'])) {\r
-                               if ($this->viewer_preferences['PickTrayByPDFSize']) {\r
-                                       $this->_out('/PickTrayByPDFSize true');\r
-                               } else {\r
-                                       $this->_out('/PickTrayByPDFSize false');\r
-                               }\r
-                       }\r
-                       if (isset($this->viewer_preferences['PrintPageRange'])) {\r
-                               $PrintPageRangeNum = '';\r
-                               foreach ($this->viewer_preferences['PrintPageRange'] as $k => $v) {\r
-                                       $PrintPageRangeNum .= ' '.($v - 1).'';\r
-                               }\r
-                               $this->_out('/PrintPageRange ['.substr($PrintPageRangeNum,1).']');\r
-                       }\r
-                       if (isset($this->viewer_preferences['NumCopies'])) {\r
-                               $this->_out('/NumCopies '.intval($this->viewer_preferences['NumCopies']));\r
-                       }\r
-                       $this->_out('>>');\r
-               }\r
-\r
-               /**\r
-               * Output trailer.\r
-               * @access protected\r
-               */\r
-               protected function _puttrailer() {\r
-                       $this->_out('/Size '.($this->n + 1));\r
-                       $this->_out('/Root '.$this->n.' 0 R');\r
-                       $this->_out('/Info '.($this->n - 1).' 0 R');\r
-                       if ($this->encrypted) {\r
-                               $this->_out('/Encrypt '.$this->enc_obj_id.' 0 R');\r
-                               $this->_out('/ID [()()]');\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Output PDF header.\r
-               * @access protected\r
-               */\r
-               protected function _putheader() {\r
-                       $this->_out('%PDF-'.$this->PDFVersion);\r
-               }\r
-\r
-               /**\r
-               * Output end of document (EOF).\r
-               * @access protected\r
-               */\r
-               protected function _enddoc() {\r
-                       $this->state = 1;
-                       $this->_putheader();\r
-                       $this->_putpages();\r
-                       $this->_putresources();\r
-                       //Info\r
-                       $this->_newobj();\r
-                       $this->_out('<<');\r
-                       $this->_putinfo();\r
-                       $this->_out('>>');\r
-                       $this->_out('endobj');\r
-                       //Catalog\r
-                       $this->_newobj();\r
-                       $this->_out('<<');\r
-                       $this->_putcatalog();
-                       $this->_putcertification();
-                       $this->_putuserrights();\r
-                       $this->_out('>>');\r
-                       $this->_out('endobj');\r
-                       //Cross-ref\r
-                       $o = $this->bufferlen;\r
-                       $this->_out('xref');\r
-                       $this->_out('0 '.($this->n + 1));\r
-                       $this->_out('0000000000 65535 f ');\r
-                       for ($i=1; $i <= $this->n; ++$i) {\r
-                               $this->_out(sprintf('%010d 00000 n ', $this->offsets[$i]));\r
+                               if ($h > 0) {
+                                       $scale_y = $h / (($y2 - $y1) / $k);
+                                       $scale_x = $scale_y;
+                                       $w = ($x2-$x1) / $k * $scale_x;
+                               } else {
+                                       $w = ($x2 - $x1) / $k;
+                                       $h = ($y2 - $y1) / $k;
+                               }
                        }
-                       if (isset($this->embeddedfiles) AND count($this->embeddedfiles) > 0) {
-                               $this->_out('100000 '.count($this->embeddedfiles));
-                               foreach ($this->embeddedfiles as $filename => $filedata) {
-                                       $this->_out(sprintf('%010d 00000 n ', $this->offsets[$filedata['n']]));
+                       // Check whether we need a new page first as this does not fit
+                       $prev_x = $this->x;
+                       if ($this->checkPageBreak($h, $y)) {
+                               $y = $this->GetY() + $this->cMargin;
+                               if ($this->rtl) {
+                                       $x += ($prev_x - $this->x);
+                               } else {
+                                       $x += ($this->x - $prev_x);
                                }
-                       }\r
-                       //Trailer\r
-                       $this->_out('trailer');\r
-                       $this->_out('<<');\r
-                       $this->_puttrailer();\r
-                       $this->_out('>>');\r
-                       $this->_out('startxref');\r
-                       $this->_out($o);\r
-                       $this->_out('%%EOF');\r
-                       $this->state = 3; // end-of-doc
-                       if ($this->diskcache) {
-                               // remove temporary files used for images
-                               foreach ($this->imagekeys as $key) {
-                                       // remove temporary files
-                                       unlink($this->images[$key]);
+                       }
+                       // set bottomcoordinates
+                       $this->img_rb_y = $y + $h;
+                       // set alignment
+                       if ($this->rtl) {
+                               if ($palign == 'L') {
+                                       $ximg = $this->lMargin;
+                                       // set right side coordinate
+                                       $this->img_rb_x = $ximg + $w;
+                               } elseif ($palign == 'C') {
+                                       $ximg = ($this->w - $x - $w) / 2;
+                                       // set right side coordinate
+                                       $this->img_rb_x = $ximg + $w;
+                               } else {
+                                       $ximg = $this->w - $x - $w;
+                                       // set left side coordinate
+                                       $this->img_rb_x = $ximg;
                                }
-                               foreach ($this->fontkeys as $key) {
-                                       // remove temporary files
-                                       unlink($this->fonts[$key]);
+                       } else {
+                               if ($palign == 'R') {
+                                       $ximg = $this->w - $this->rMargin - $w;
+                                       // set left side coordinate
+                                       $this->img_rb_x = $ximg;
+                               } elseif ($palign == 'C') {
+                                       $ximg = ($this->w - $x - $w) / 2;
+                                       // set right side coordinate
+                                       $this->img_rb_x = $ximg + $w;
+                               } else {
+                                       $ximg = $x;
+                                       // set right side coordinate
+                                       $this->img_rb_x = $ximg + $w;
                                }
-                       }\r
-               }\r
-\r
-               /**\r
-               * Initialize a new page.\r
-               * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or PORTRAIT (default)</li><li>L or LANDSCAPE</li></ul>\r
-               * @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).<ul><li>4A0</li><li>2A0</li><li>A0</li><li>A1</li><li>A2</li><li>A3</li><li>A4 (default)</li><li>A5</li><li>A6</li><li>A7</li><li>A8</li><li>A9</li><li>A10</li><li>B0</li><li>B1</li><li>B2</li><li>B3</li><li>B4</li><li>B5</li><li>B6</li><li>B7</li><li>B8</li><li>B9</li><li>B10</li><li>C0</li><li>C1</li><li>C2</li><li>C3</li><li>C4</li><li>C5</li><li>C6</li><li>C7</li><li>C8</li><li>C9</li><li>C10</li><li>RA0</li><li>RA1</li><li>RA2</li><li>RA3</li><li>RA4</li><li>SRA0</li><li>SRA1</li><li>SRA2</li><li>SRA3</li><li>SRA4</li><li>LETTER</li><li>LEGAL</li><li>EXECUTIVE</li><li>FOLIO</li></ul>\r
-               * @access protected\r
-               */\r
-               protected function _beginpage($orientation='', $format='') {\r
-                       ++$this->page;\r
-                       $this->setPageBuffer($this->page, '');
-                       // initialize array for graphics tranformation positions inside a page buffer
-                       $this->transfmrk[$this->page] = array();\r
-                       $this->state = 2;\r
-                       if ($this->empty_string($orientation)) {\r
-                               if (isset($this->CurOrientation)) {\r
-                                       $orientation = $this->CurOrientation;\r
-                               } else {\r
-                                       $orientation = 'P';\r
-                               }\r
-                       }\r
-                       if ($this->empty_string($format)) {\r
-                               $this->setPageOrientation($orientation);\r
-                       } else {\r
-                               $this->setPageFormat($format, $orientation);\r
-                       }\r
-                       if ($this->rtl) {\r
-                               $this->x = $this->w - $this->rMargin;\r
-                       } else {\r
-                               $this->x = $this->lMargin;\r
-                       }\r
-                       $this->y = $this->tMargin;\r
-                       if (isset($this->newpagegroup[$this->page])) {\r
-                               // start a new group\r
-                               $n = sizeof($this->pagegroups) + 1;\r
-                               $alias = '{nb'.$n.'}';\r
-                               $this->pagegroups[$alias] = 1;\r
-                               $this->currpagegroup = $alias;\r
-                       } elseif ($this->currpagegroup) {\r
-                               ++$this->pagegroups[$this->currpagegroup];\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Mark end of page.\r
-               * @access protected\r
-               */\r
-               protected function _endpage() {\r
-                       $this->setVisibility('all');\r
-                       $this->state = 1;\r
-               }\r
-\r
-               /**\r
-               * Begin a new object.\r
-               * @access protected\r
-               */\r
-               protected function _newobj() {\r
-                       ++$this->n;\r
-                       $this->offsets[$this->n] = $this->bufferlen;\r
-                       $this->_out($this->n.' 0 obj');\r
-               }\r
-\r
-               /**\r
-               * Underline text.\r
-               * @param int $x X coordinate\r
-               * @param int $y Y coordinate\r
-               * @param string $txt text to underline\r
-               * @access protected\r
-               */\r
-               protected function _dounderline($x, $y, $txt) {\r
-                       $up = $this->CurrentFont['up'];\r
-                       $ut = $this->CurrentFont['ut'];\r
-                       $w = $this->GetStringWidth($txt);\r
-                       return sprintf('%.2F %.2F %.2F %.2F re f', $x * $this->k, ($this->h - ($y - $up / 1000 * $this->FontSize)) * $this->k, $w * $this->k, -$ut / 1000 * $this->FontSizePt);\r
-               }\r
-               \r
-               /**\r
-               * Line through text.\r
-               * @param int $x X coordinate\r
-               * @param int $y Y coordinate\r
-               * @param string $txt text to linethrough\r
-               * @access protected\r
-               */\r
-               protected function _dolinethrough($x, $y, $txt) {\r
-                       $up = $this->CurrentFont['up'];\r
-                       $ut = $this->CurrentFont['ut'];\r
-                       $w = $this->GetStringWidth($txt);\r
-                       return sprintf('%.2F %.2F %.2F %.2F re f', $x * $this->k, ($this->h - ($y - ($this->FontSize/2) - $up / 1000 * $this->FontSize)) * $this->k, $w * $this->k, -$ut / 1000 * $this->FontSizePt);\r
-               }\r
-               \r
-               /**\r
-               * Read a 4-byte integer from file.\r
-               * @param string $f file name.\r
-               * @return 4-byte integer\r
-               * @access protected\r
-               */\r
-               protected function _freadint($f) {\r
-                       $a = unpack('Ni', fread($f, 4));\r
-                       return $a['i'];\r
-               }
-               \r
-               /**\r
-               * Add "\" before "\", "(" and ")"\r
-               * @param string $s string to escape.\r
-               * @return string escaped string.\r
-               * @access protected\r
-               */\r
-               protected function _escape($s) {\r
-                       // the chr(13) substitution fixes the Bugs item #1421290.\r
-                       return strtr($s, array(')' => '\\)', '(' => '\\(', '\\' => '\\\\', chr(13) => '\r'));\r
-               }
-               \r
-               /**\r
-               * Format a date string for meta information\r
-               * @param string $s date string to escape.\r
-               * @return string escaped string.\r
-               * @access protected\r
-               */\r
-               protected function _datastring($s) {\r
-                       if ($this->encrypted) {\r
-                               $s = $this->_RC4($this->_objectkey($this->n), $s);\r
-                       }\r
-                       return '('. $this->_escape($s).')';\r
-               }
-               \r
-               /**\r
-               * Format a text string for meta information\r
-               * @param string $s string to escape.\r
-               * @return string escaped string.\r
-               * @access protected\r
-               */\r
-               protected function _textstring($s) {\r
-                       if ($this->isunicode) {\r
-                               //Convert string to UTF-16BE\r
-                               $s = $this->UTF8ToUTF16BE($s, true);\r
-                       }
-                       return $this->_datastring($s);\r
-               }\r
-                               \r
-               /**\r
-               * Format a text string\r
-               * @param string $s string to escape.\r
-               * @return string escaped string.\r
-               * @access protected\r
-               */\r
-               protected function _escapetext($s) {\r
-                       if ($this->isunicode) {\r
-                               if (($this->CurrentFont['type'] == 'core') OR ($this->CurrentFont['type'] == 'TrueType') OR ($this->CurrentFont['type'] == 'Type1')) {\r
-                                       $s = $this->UTF8ToLatin1($s);\r
-                               } else {\r
-                                       //Convert string to UTF-16BE and reverse RTL language\r
-                                       $s = $this->utf8StrRev($s, false, $this->tmprtl);\r
-                               }\r
-                       }\r
-                       return $this->_escape($s);\r
-               }
-               \r
-               /**\r
-               * Output a stream.\r
-               * @param string $s string to output.\r
-               * @access protected\r
-               */\r
-               protected function _putstream($s) {\r
-                       if ($this->encrypted) {\r
-                               $s = $this->_RC4($this->_objectkey($this->n), $s);\r
-                       }\r
-                       $this->_out('stream');\r
-                       $this->_out($s);\r
-                       $this->_out('endstream');\r
-               }\r
-               \r
-               /**\r
-               * Output a string to the document.\r
-               * @param string $s string to output.\r
-               * @access protected\r
-               */\r
-               protected function _out($s) {
-                       if ($this->state == 2) {\r
-                               if ((!$this->InFooter) AND isset($this->footerlen[$this->page]) AND ($this->footerlen[$this->page] > 0)) {\r
-                                       // puts data before page footer
-                                       $pagebuff = $this->getPageBuffer($this->page);\r
-                                       $page = substr($pagebuff, 0, -$this->footerlen[$this->page]);\r
-                                       $footer = substr($pagebuff, -$this->footerlen[$this->page]);\r
-                                       $this->setPageBuffer($this->page, $page.$s."\n".$footer);
-                                       // update footer position
-                                       $this->footerpos[$this->page] += strlen($s."\n");       \r
-                               } else {\r
-                                       $this->setPageBuffer($this->page, $s."\n", true);\r
-                               }\r
+                       }
+                       if ($useBoundingBox) {
+                               $dx = $ximg * $k - $x1;
+                               $dy = $y * $k - $y1;
                        } else {
-                               $this->setBuffer($s."\n");\r
-                       }\r
-               }\r
-               \r
-                /**\r
-                * Converts UTF-8 strings to codepoints array.<br>\r
-                * Invalid byte sequences will be replaced with 0xFFFD (replacement character)<br>\r
-                * Based on: http://www.faqs.org/rfcs/rfc3629.html\r
-                * <pre>\r
-                *        Char. number range  |        UTF-8 octet sequence\r
-                *       (hexadecimal)    |              (binary)\r
-                *    --------------------+-----------------------------------------------\r
-                *    0000 0000-0000 007F | 0xxxxxxx\r
-                *    0000 0080-0000 07FF | 110xxxxx 10xxxxxx\r
-                *    0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx\r
-                *    0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\r
-                *    ---------------------------------------------------------------------\r
-                *\r
-                *   ABFN notation:\r
-                *   ---------------------------------------------------------------------\r
-                *   UTF8-octets = *( UTF8-char )\r
-                *   UTF8-char   = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4\r
-                *   UTF8-1      = %x00-7F\r
-                *   UTF8-2      = %xC2-DF UTF8-tail\r
-                *\r
-                *   UTF8-3      = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /\r
-                *                 %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )\r
-                *   UTF8-4      = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /\r
-                *                 %xF4 %x80-8F 2( UTF8-tail )\r
-                *   UTF8-tail   = %x80-BF\r
-                *   ---------------------------------------------------------------------\r
-                * </pre>\r
-                * @param string $str string to process.\r
-                * @return array containing codepoints (UTF-8 characters values)\r
-                * @access protected\r
-                * @author Nicola Asuni\r
-                * @since 1.53.0.TC005 (2005-01-05)\r
-                */\r
-               protected function UTF8StringToArray($str) {
-                       if (isset($this->cache_UTF8StringToArray['_'.$str])) {
-                               // return cached value
-                               return($this->cache_UTF8StringToArray['_'.$str]);
+                               $dx = $ximg * $k;
+                               $dy = $y * $k;
                        }
-                       // check cache size
-                       if ($this->cache_size_UTF8StringToArray >= $this->cache_maxsize_UTF8StringToArray) {
-                               // remove first element
-                               array_shift($this->cache_UTF8StringToArray);
+                       // save the current graphic state
+                       $this->_out('q'.$this->epsmarker);
+                       // translate
+                       $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', 1, 0, 0, 1, $dx, $dy + ($this->hPt - (2 * $y * $k) - ($y2 - $y1))));
+                       // scale
+                       if (isset($scale_x)) {
+                               $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $scale_x, 0, 0, $scale_y, $x1 * (1 - $scale_x), $y2 * (1 - $scale_y)));
                        }
-                       ++$this->cache_size_UTF8StringToArray;
-                       if (!$this->isunicode) {\r
-                               // split string into array of equivalent codes\r
-                               $strarr = array();\r
-                               $strlen = strlen($str);\r
-                               for ($i=0; $i < $strlen; ++$i) {\r
-                                       $strarr[] = ord($str{$i});\r
+                       // handle pc/unix/mac line endings
+                       preg_match('/[\r\n]+/s', $data, $regs);
+                       $lines = explode($regs[0], $data);
+                       $u=0;
+                       $cnt = count($lines);
+                       for ($i=0; $i < $cnt; ++$i) {
+                               $line = $lines[$i];
+                               if (($line == '') OR ($line{0} == '%')) {
+                                       continue;
+                               }
+                               $len = strlen($line);
+                               $chunks = explode(' ', $line);
+                               $cmd = array_pop($chunks);
+                               // RGB
+                               if (($cmd == 'Xa') OR ($cmd == 'XA')) {
+                                       $b = array_pop($chunks); 
+                                       $g = array_pop($chunks); 
+                                       $r = array_pop($chunks);
+                                       $this->_out(''.$r.' '.$g.' '.$b.' '.($cmd=='Xa'?'rg':'RG')); //substr($line, 0, -2).'rg' -> in EPS (AI8): c m y k r g b rg!
+                                       continue;
+                               }
+                               switch ($cmd) {
+                                       case 'm':
+                                       case 'l':
+                                       case 'v':
+                                       case 'y':
+                                       case 'c':
+                                       case 'k':
+                                       case 'K':
+                                       case 'g':
+                                       case 'G':
+                                       case 's':
+                                       case 'S':
+                                       case 'J':
+                                       case 'j':
+                                       case 'w':
+                                       case 'M':
+                                       case 'd':
+                                       case 'n':
+                                       case 'v': {
+                                               $this->_out($line);
+                                               break;
+                                       }
+                                       case 'x': {// custom fill color
+                                               list($c,$m,$y,$k) = $chunks;
+                                               $this->_out(''.$c.' '.$m.' '.$y.' '.$k.' k');
+                                               break;
+                                       }
+                                       case 'X': { // custom stroke color
+                                               list($c,$m,$y,$k) = $chunks;
+                                               $this->_out(''.$c.' '.$m.' '.$y.' '.$k.' K');
+                                               break;
+                                       }
+                                       case 'Y':
+                                       case 'N':
+                                       case 'V':
+                                       case 'L':
+                                       case 'C': {
+                                               $line{$len-1} = strtolower($cmd);
+                                               $this->_out($line);
+                                               break;
+                                       }
+                                       case 'b':
+                                       case 'B': {
+                                               $this->_out($cmd . '*');
+                                               break;
+                                       }
+                                       case 'f':
+                                       case 'F': {
+                                               if ($u > 0) {
+                                                       $isU = false;
+                                                       $max = min($i+5, $cnt);
+                                                       for ($j=$i+1; $j < $max; ++$j)
+                                                         $isU = ($isU OR (($lines[$j] == 'U') OR ($lines[$j] == '*U')));
+                                                       if ($isU) {
+                                                               $this->_out('f*');
+                                                       }
+                                               } else {
+                                                       $this->_out('f*');
+                                               }
+                                               break;
+                                       }
+                                       case '*u': {
+                                               ++$u;
+                                               break;
+                                       }
+                                       case '*U': {
+                                               --$u;
+                                               break;
+                                       }
                                }
-                               // insert new value on cache
-                               $this->cache_UTF8StringToArray['_'.$str] = $strarr;\r
-                               return $strarr;\r
-                       }\r
-                       $unicode = array(); // array containing unicode values\r
-                       $bytes  = array(); // array containing single character byte sequences\r
-                       $numbytes  = 1; // number of octetc needed to represent the UTF-8 character\r
-                       $str .= ''; // force $str to be a string\r
-                       $length = strlen($str);\r
-                       for ($i = 0; $i < $length; ++$i) {\r
-                               $char = ord($str{$i}); // get one string character at time\r
-                               if (count($bytes) == 0) { // get starting octect\r
-                                       if ($char <= 0x7F) {\r
-                                               $unicode[] = $char; // use the character "as is" because is ASCII\r
-                                               $numbytes = 1;\r
-                                       } elseif (($char >> 0x05) == 0x06) { // 2 bytes character (0x06 = 110 BIN)\r
-                                               $bytes[] = ($char - 0xC0) << 0x06; \r
-                                               $numbytes = 2;\r
-                                       } elseif (($char >> 0x04) == 0x0E) { // 3 bytes character (0x0E = 1110 BIN)\r
-                                               $bytes[] = ($char - 0xE0) << 0x0C; \r
-                                               $numbytes = 3;\r
-                                       } elseif (($char >> 0x03) == 0x1E) { // 4 bytes character (0x1E = 11110 BIN)\r
-                                               $bytes[] = ($char - 0xF0) << 0x12; \r
-                                               $numbytes = 4;\r
-                                       } else {\r
-                                               // use replacement character for other invalid sequences\r
-                                               $unicode[] = 0xFFFD;\r
-                                               $bytes = array();\r
-                                               $numbytes = 1;\r
-                                       }\r
-                               } elseif (($char >> 0x06) == 0x02) { // bytes 2, 3 and 4 must start with 0x02 = 10 BIN\r
-                                       $bytes[] = $char - 0x80;\r
-                                       if (count($bytes) == $numbytes) {\r
-                                               // compose UTF-8 bytes to a single unicode value\r
-                                               $char = $bytes[0];\r
-                                               for ($j = 1; $j < $numbytes; ++$j) {\r
-                                                       $char += ($bytes[$j] << (($numbytes - $j - 1) * 0x06));\r
-                                               }\r
-                                               if ((($char >= 0xD800) AND ($char <= 0xDFFF)) OR ($char >= 0x10FFFF)) {\r
-                                                       /* The definition of UTF-8 prohibits encoding character numbers between\r
-                                                       U+D800 and U+DFFF, which are reserved for use with the UTF-16\r
-                                                       encoding form (as surrogate pairs) and do not directly represent\r
-                                                       characters. */\r
-                                                       $unicode[] = 0xFFFD; // use replacement character\r
-                                               } else {\r
-                                                       $unicode[] = $char; // add char to array\r
-                                               }\r
-                                               // reset data for next char\r
-                                               $bytes = array(); \r
-                                               $numbytes = 1;\r
-                                       }\r
-                               } else {\r
-                                       // use replacement character for other invalid sequences\r
-                                       $unicode[] = 0xFFFD;\r
-                                       $bytes = array();\r
-                                       $numbytes = 1;\r
-                               }\r
                        }
-                       // insert new value on cache
-                       $this->cache_UTF8StringToArray['_'.$str] = $unicode;\r
-                       return $unicode;\r
-               }\r
-               \r
-               /**\r
-                * Converts UTF-8 strings to UTF16-BE.<br>\r
-                * @param string $str string to process.\r
-                * @param boolean $setbom if true set the Byte Order Mark (BOM = 0xFEFF)\r
-                * @return string\r
-                * @access protected\r
-                * @author Nicola Asuni\r
-                * @since 1.53.0.TC005 (2005-01-05)\r
-                * @uses UTF8StringToArray(), arrUTF8ToUTF16BE()\r
-                */\r
-               protected function UTF8ToUTF16BE($str, $setbom=true) {\r
-                       if (!$this->isunicode) {\r
-                               return $str; // string is not in unicode\r
-                       }\r
-                       $unicode = $this->UTF8StringToArray($str); // array containing UTF-8 unicode values\r
-                       return $this->arrUTF8ToUTF16BE($unicode, $setbom);\r
-               }\r
-               \r
-               /**\r
-                * Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.<br>\r
-                * @param string $str string to process.\r
-                * @return string\r
-                * @author Andrew Whitehead, Nicola Asuni\r
-                * @access protected\r
-                * @since 3.2.000 (2008-06-23)\r
-                */\r
-               protected function UTF8ToLatin1($str) {
-                       global $utf8tolatin;
-                       if (!$this->isunicode) {\r
-                               return $str; // string is not in unicode\r
-                       }\r
-                       $outstr = ''; // string to be returned\r
-                       $unicode = $this->UTF8StringToArray($str); // array containing UTF-8 unicode values\r
-                       foreach ($unicode as $char) {
-                               if ($char < 256) {
-                                       $outstr .= chr($char);
-                               } elseif (array_key_exists($char, $utf8tolatin)) {
-                                       // map from UTF-8
-                                       $outstr .= chr($utf8tolatin[$char]);
-                               } elseif ($char == 0xFFFD) {
-                                       // skip
-                               } else {
-                                       $outstr .= '?';
-                               }\r
-                       }\r
-                       return $outstr;\r
-               }\r
-\r
-               /**\r
-                * Converts array of UTF-8 characters to UTF16-BE string.<br>\r
-                * Based on: http://www.faqs.org/rfcs/rfc2781.html\r
-                * <pre>\r
-                *   Encoding UTF-16:\r
-                * \r
-                *   Encoding of a single character from an ISO 10646 character value to\r
-                *    UTF-16 proceeds as follows. Let U be the character number, no greater\r
-                *    than 0x10FFFF.\r
-                * \r
-                *    1) If U < 0x10000, encode U as a 16-bit unsigned integer and\r
-                *       terminate.\r
-                * \r
-                *    2) Let U' = U - 0x10000. Because U is less than or equal to 0x10FFFF,\r
-                *       U' must be less than or equal to 0xFFFFF. That is, U' can be\r
-                *       represented in 20 bits.\r
-                * \r
-                *    3) Initialize two 16-bit unsigned integers, W1 and W2, to 0xD800 and\r
-                *       0xDC00, respectively. These integers each have 10 bits free to\r
-                *       encode the character value, for a total of 20 bits.\r
-                * \r
-                *    4) Assign the 10 high-order bits of the 20-bit U' to the 10 low-order\r
-                *       bits of W1 and the 10 low-order bits of U' to the 10 low-order\r
-                *       bits of W2. Terminate.\r
-                * \r
-                *    Graphically, steps 2 through 4 look like:\r
-                *    U' = yyyyyyyyyyxxxxxxxxxx\r
-                *    W1 = 110110yyyyyyyyyy\r
-                *    W2 = 110111xxxxxxxxxx\r
-                * </pre>\r
-                * @param array $unicode array containing UTF-8 unicode values\r
-                * @param boolean $setbom if true set the Byte Order Mark (BOM = 0xFEFF)\r
-                * @return string\r
-                * @access protected\r
-                * @author Nicola Asuni\r
-                * @since 2.1.000 (2008-01-08)\r
-                * @see UTF8ToUTF16BE()\r
-                */\r
-               protected function arrUTF8ToUTF16BE($unicode, $setbom=true) {\r
-                       $outstr = ''; // string to be returned\r
-                       if ($setbom) {\r
-                               $outstr .= "\xFE\xFF"; // Byte Order Mark (BOM)\r
-                       }\r
-                       foreach ($unicode as $char) {\r
-                               if ($char == 0xFFFD) {\r
-                                       $outstr .= "\xFF\xFD"; // replacement character\r
-                               } elseif ($char < 0x10000) {\r
-                                       $outstr .= chr($char >> 0x08);\r
-                                       $outstr .= chr($char & 0xFF);\r
-                               } else {\r
-                                       $char -= 0x10000;\r
-                                       $w1 = 0xD800 | ($char >> 0x10);\r
-                                       $w2 = 0xDC00 | ($char & 0x3FF); \r
-                                       $outstr .= chr($w1 >> 0x08);\r
-                                       $outstr .= chr($w1 & 0xFF);\r
-                                       $outstr .= chr($w2 >> 0x08);\r
-                                       $outstr .= chr($w2 & 0xFF);\r
-                               }\r
-                       }\r
-                       return $outstr;\r
-               }\r
-               // ====================================================\r
-               \r
-               /**\r
-                * Set header font.\r
-                * @param array $font font\r
-                * @access public\r
-                * @since 1.1\r
-                */\r
-               public function setHeaderFont($font) {\r
-                       $this->header_font = $font;\r
-               }\r
-               \r
-               /**\r
-                * Get header font.\r
-                * @return array()\r
-                * @access public\r
-                * @since 4.0.012 (2008-07-24)\r
-                */\r
-               public function getHeaderFont() {\r
-                       return $this->header_font;\r
-               }\r
-               \r
-               /**\r
-                * Set footer font.\r
-                * @param array $font font\r
-                * @access public\r
-                * @since 1.1\r
-                */\r
-               public function setFooterFont($font) {\r
-                       $this->footer_font = $font;\r
-               }\r
-               \r
-               /**\r
-                * Get Footer font.\r
-                * @return array()\r
-                * @access public\r
-                * @since 4.0.012 (2008-07-24)\r
-                */\r
-               public function getFooterFont() {\r
-                       return $this->footer_font;\r
-               }\r
-               \r
-               /**\r
-                * Set language array.\r
-                * @param array $language\r
-                * @access public\r
-                * @since 1.1\r
-                */\r
-               public function setLanguageArray($language) {\r
-                       $this->l = $language;\r
-                       $this->rtl = $this->l['a_meta_dir']=='rtl' ? true : false;\r
-               }\r
-               \r
-               /**\r
-                * Returns the PDF data.\r
-                * @access public\r
-                */\r
-               public function getPDFData() {\r
-                       if ($this->state < 3) {\r
-                               $this->Close();\r
-                       }\r
-                       return $this->buffer;\r
-               }
-                               \r
-               /**\r
-                * Output anchor link.\r
-                * @param string $url link URL or internal link (i.e.: &lt;a href="#23"&gt;link to page 23&lt;/a&gt;)\r
-                * @param string $name link name\r
-                * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.\r
-                * @param boolean $firstline if true prints only the first line and return the remaining string.
-                * @param array $color array of RGB text color
-                * @param string $style font style (U, D, B, I)\r
-                * @return the number of cells used or the remaining text if $firstline = true;\r
-                * @access public\r
-                */\r
-               public function addHtmlLink($url, $name, $fill=0, $firstline=false, $color='', $style=-1) {\r
-                       if (!$this->empty_string($url) AND ($url{0} == '#')) {
-                               // convert url to internal link
-                               $page = intval(substr($url, 1));
-                               $url = $this->AddLink();
-                               $this->SetLink($url, 0, $page);
+                       // restore previous graphic state
+                       $this->_out($this->epsmarker.'Q');
+                       if (!empty($border)) {
+                               $bx = $x;
+                               $by = $y;
+                               $this->x = $x;
+                               $this->y = $y;
+                               $this->Cell($w, $h, '', $border, 0, '', 0, '', 0);
+                               $this->x = $bx;
+                               $this->y = $by;
                        }
-                       // store current settings
-                       $prevcolor = $this->fgcolor;
-                       $prevstyle = $this->FontStyle;
-                       if (empty($color)) {\r
-                               $this->SetTextColorArray($this->htmlLinkColorArray);
-                       } else {
-                               $this->SetTextColorArray($color);
+                       if ($link) {
+                               $this->Link($ximg, $y, $w, $h, $link, 0);
                        }
-                       if ($style == -1) {\r
-                               $this->SetFont('', $this->FontStyle.$this->htmlLinkFontStyle);
-                       } else {
-                               $this->SetFont('', $this->FontStyle.$style);
-                       }\r
-                       $ret = $this->Write($this->lasth, $name, $url, $fill, '', false, 0, $firstline);
-                       // restore settings
-                       $this->SetFont('', $prevstyle);\r
-                       $this->SetTextColorArray($prevcolor);\r
-                       return $ret;\r
-               }\r
-               \r
-               /**\r
-                * Returns an associative array (keys: R,G,B) from an html color name or a six-digit or three-digit hexadecimal color representation (i.e. #3FE5AA or #7FF).\r
-                * @param string $color html color \r
-                * @return array RGB color or false in case of error.\r
-                * @access public\r
-                */             \r
-               public function convertHTMLColorToDec($color='#FFFFFF') {\r
-                       global $webcolor;
-                       $returncolor = false;
-                       $color = preg_replace('/[\s]*/', '', $color); // remove extra spaces\r
-                       $color = strtolower($color);\r
-                       if (strlen($color) == 0) {\r
-                               return false;\r
+                       // set pointer to align the successive text/objects
+                       switch($align) {
+                               case 'T':{
+                                       $this->y = $y;
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'M':{
+                                       $this->y = $y + round($h/2);
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'B':{
+                                       $this->y = $this->img_rb_y;
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'N':{
+                                       $this->SetY($this->img_rb_y);
+                                       break;
+                               }
+                               default:{
+                                       break;
+                               }
                        }
-                       if (substr($color, 0, 3) == 'rgb') {
-                               $codes = substr($color, 4);
-                               $codes = str_replace(')', '', $codes);
-                               $returncolor = explode(',', $codes, 3);
-                               return $returncolor;
-                       }\r
-                       if (substr($color, 0, 1) != '#') {\r
-                               // decode color name\r
-                               if (isset($webcolor[$color])) {\r
-                                       $color_code = $webcolor[$color];\r
-                               } else {\r
-                                       return false;\r
-                               }\r
-                       } else {\r
-                               $color_code = substr($color, 1);\r
-                       }\r
-                       switch (strlen($color_code)) {\r
-                               case 3: {\r
-                                       // three-digit hexadecimal representation\r
-                                       $r = substr($color_code, 0, 1);\r
-                                       $g = substr($color_code, 1, 1);\r
-                                       $b = substr($color_code, 2, 1);\r
-                                       $returncolor['R'] = hexdec($r.$r);\r
-                                       $returncolor['G'] = hexdec($g.$g);\r
-                                       $returncolor['B'] = hexdec($b.$b);\r
-                                       break;\r
-                               }\r
-                               case 6: {\r
-                                       // six-digit hexadecimal representation\r
-                                       $returncolor['R'] = hexdec(substr($color_code, 0, 2));\r
-                                       $returncolor['G'] = hexdec(substr($color_code, 2, 2));\r
-                                       $returncolor['B'] = hexdec(substr($color_code, 4, 2));\r
-                                       break;\r
-                               }\r
-                       }\r
-                       return $returncolor;\r
-               }\r
-               \r
-               /**\r
-                * Converts pixels to User's Units.\r
-                * @param int $px pixels\r
-                * @return float value in user's unit\r
+                       $this->endlinex = $this->img_rb_x;
+               }
+               
+               /**
+                * Set document barcode.
+                * @param string $bc barcode
                 * @access public
-                * @see setImageScale(), getImageScale()\r
-                */\r
-               public function pixelsToUnits($px) {\r
-                       return ($px / ($this->imgscale * $this->k));\r
-               }\r
-                       \r
-               /**\r
-                * Reverse function for htmlentities. \r
-                * Convert entities in UTF-8.\r
-                * @param $text_to_convert Text to convert.\r
-                * @return string converted\r
-                * @access public\r
-               */\r
-               public function unhtmlentities($text_to_convert) {\r
-                       return html_entity_decode($text_to_convert, ENT_QUOTES, $this->encoding);\r
-               }\r
-               \r
-               // ENCRYPTION METHODS ----------------------------------\r
-               // SINCE 2.0.000 (2008-01-02)
-               \r
-               /**\r
-               * Compute encryption key depending on object number where the encrypted data is stored\r
-               * @param int $n object number\r
-               * @access protected\r
-               * @since 2.0.000 (2008-01-02)\r
-               */\r
-               protected function _objectkey($n) {\r
-                       return substr($this->_md5_16($this->encryption_key.pack('VXxx', $n)), 0, 10);\r
-               }\r
-               \r
-               /**\r
-                * Put encryption on PDF document.\r
-                * @access protected\r
-                * @since 2.0.000 (2008-01-02)\r
-                */\r
-               protected function _putencryption() {\r
-                       $this->_out('/Filter /Standard');\r
-                       $this->_out('/V 1');\r
-                       $this->_out('/R 2');\r
-                       $this->_out('/O ('.$this->_escape($this->Ovalue).')');\r
-                       $this->_out('/U ('.$this->_escape($this->Uvalue).')');\r
-                       $this->_out('/P '.$this->Pvalue);\r
-               }\r
-               \r
-               /**\r
-               * Returns the input text exrypted using RC4 algorithm and the specified key.\r
-               * RC4 is the standard encryption algorithm used in PDF format\r
-               * @param string $key encryption key\r
-               * @param String $text input text to be encrypted\r
-               * @return String encrypted text\r
-               * @access protected\r
-               * @since 2.0.000 (2008-01-02)\r
-               * @author Klemen Vodopivec\r
-               */\r
-               protected function _RC4($key, $text) {\r
-                       if ($this->last_rc4_key != $key) {\r
-                               $k = str_repeat($key, ((256 / strlen($key)) + 1));\r
-                               $rc4 = range(0, 255);\r
-                               $j = 0;\r
-                               for ($i = 0; $i < 256; ++$i) {\r
-                                       $t = $rc4[$i];\r
-                                       $j = ($j + $t + ord($k{$i})) % 256;\r
-                                       $rc4[$i] = $rc4[$j];\r
-                                       $rc4[$j] = $t;\r
-                               }\r
-                               $this->last_rc4_key = $key;\r
-                               $this->last_rc4_key_c = $rc4;\r
-                       } else {\r
-                               $rc4 = $this->last_rc4_key_c;\r
-                       }\r
-                       $len = strlen($text);\r
-                       $a = 0;\r
-                       $b = 0;\r
-                       $out = '';\r
-                       for ($i = 0; $i < $len; ++$i) {\r
-                               $a = ($a + 1) % 256;\r
-                               $t = $rc4[$a];\r
-                               $b = ($b + $t) % 256;\r
-                               $rc4[$a] = $rc4[$b];\r
-                               $rc4[$b] = $t;\r
-                               $k = $rc4[($rc4[$a] + $rc4[$b]) % 256];\r
-                               $out .= chr(ord($text{$i}) ^ $k);\r
-                       }\r
-                       return $out;\r
-               }\r
-               \r
-               /**\r
-               * Encrypts a string using MD5 and returns it's value as a binary string.\r
-               * @param string $str input string\r
-               * @return String MD5 encrypted binary string\r
-               * @access protected\r
-               * @since 2.0.000 (2008-01-02)\r
-               * @author Klemen Vodopivec\r
-               */\r
-               protected function _md5_16($str) {\r
-                       return pack('H*', md5($str));\r
-               }\r
-               \r
-               /**\r
-               * Compute O value (used for RC4 encryption)\r
-               * @param String $user_pass user password\r
-               * @param String $owner_pass user password\r
-               * @return String O value\r
-               * @access protected\r
-               * @since 2.0.000 (2008-01-02)\r
-               * @author Klemen Vodopivec\r
-               */\r
-               protected function _Ovalue($user_pass, $owner_pass) {\r
-                       $tmp = $this->_md5_16($owner_pass);\r
-                       $owner_RC4_key = substr($tmp, 0, 5);\r
-                       return $this->_RC4($owner_RC4_key, $user_pass);\r
-               }\r
-               \r
-               /**\r
-               * Compute U value (used for RC4 encryption)\r
-               * @return String U value\r
-               * @access protected\r
-               * @since 2.0.000 (2008-01-02)\r
-               * @author Klemen Vodopivec\r
-               */\r
-               protected function _Uvalue() {\r
-                       return $this->_RC4($this->encryption_key, $this->padding);\r
-               }\r
-               \r
-               /**\r
-               * Compute encryption key\r
-               * @param String $user_pass user password\r
-               * @param String $owner_pass user password\r
-               * @param String $protection protection type\r
-               * @access protected\r
-               * @since 2.0.000 (2008-01-02)\r
-               * @author Klemen Vodopivec\r
-               */\r
-               protected function _generateencryptionkey($user_pass, $owner_pass, $protection) {\r
-                       // Pad passwords\r
-                       $user_pass = substr($user_pass.$this->padding, 0, 32);\r
-                       $owner_pass = substr($owner_pass.$this->padding, 0, 32);\r
-                       // Compute O value\r
-                       $this->Ovalue = $this->_Ovalue($user_pass, $owner_pass);\r
-                       // Compute encyption key\r
-                       $tmp = $this->_md5_16($user_pass.$this->Ovalue.chr($protection)."\xFF\xFF\xFF");\r
-                       $this->encryption_key = substr($tmp, 0, 5);\r
-                       // Compute U value\r
-                       $this->Uvalue = $this->_Uvalue();\r
-                       // Compute P value\r
-                       $this->Pvalue = -(($protection^255) + 1);\r
-               }\r
-               \r
-               /**\r
-               * Set document protection\r
-               * The permission array is composed of values taken from the following ones:\r
-               * - copy: copy text and images to the clipboard\r
-               * - print: print the document\r
-               * - modify: modify it (except for annotations and forms)\r
-               * - annot-forms: add annotations and forms \r
-               * Remark: the protection against modification is for people who have the full Acrobat product.\r
-               * If you don't set any password, the document will open as usual. If you set a user password, the PDF viewer will ask for it before displaying the document. The master password, if different from the user one, can be used to get full access.\r
-               * Note: protecting a document requires to encrypt it, which increases the processing time a lot. This can cause a PHP time-out in some cases, especially if the document contains images or fonts.\r
-               * @param Array $permissions the set of permissions. Empty by default (only viewing is allowed). (print, modify, copy, annot-forms)\r
-               * @param String $user_pass user password. Empty by default.\r
-               * @param String $owner_pass owner password. If not specified, a random value is used.\r
-               * @access public\r
-               * @since 2.0.000 (2008-01-02)\r
-               * @author Klemen Vodopivec\r
-               */\r
-               public function SetProtection($permissions=array(), $user_pass='', $owner_pass=null) {\r
-                       $options = array('print' => 4, 'modify' => 8, 'copy' => 16, 'annot-forms' => 32);\r
-                       $protection = 192;\r
-                       foreach ($permissions as $permission) {\r
-                               if (!isset($options[$permission])) {\r
-                                       $this->Error('Incorrect permission: '.$permission);\r
-                               }\r
-                               $protection += $options[$permission];\r
-                       }\r
-                       if ($owner_pass === null) {\r
-                               $owner_pass = uniqid(rand());\r
-                       }\r
-                       $this->encrypted = true;\r
-                       $this->_generateencryptionkey($user_pass, $owner_pass, $protection);\r
-               }\r
-               \r
-               // END OF ENCRYPTION FUNCTIONS -------------------------\r
-               \r
-               // START TRANSFORMATIONS SECTION -----------------------\r
-               \r
-               /**\r
-               * Starts a 2D tranformation saving current graphic state.\r
-               * This function must be called before scaling, mirroring, translation, rotation and skewing.\r
-               * Use StartTransform() before, and StopTransform() after the transformations to restore the normal behavior.\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function StartTransform() {\r
-                       $this->_out('q');
-                       $this->transfmrk[$this->page][] = $this->pagelen[$this->page];\r
-               }\r
-               \r
-               /**\r
-               * Stops a 2D tranformation restoring previous graphic state.\r
-               * This function must be called after scaling, mirroring, translation, rotation and skewing.\r
-               * Use StartTransform() before, and StopTransform() after the transformations to restore the normal behavior.\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function StopTransform() {\r
-                       $this->_out('Q');
-                       if (isset($this->transfmatrix)) {
-                               array_pop($this->transfmatrix);
-                       }
-                       array_pop($this->transfmrk[$this->page]);\r
-               }\r
-               /**\r
-               * Horizontal Scaling.\r
-               * @param float $s_x scaling factor for width as percent. 0 is not allowed.\r
-               * @param int $x abscissa of the scaling center. Default is current x position\r
-               * @param int $y ordinate of the scaling center. Default is current y position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function ScaleX($s_x, $x='', $y='') {\r
-                       $this->Scale($s_x, 100, $x, $y);\r
-               }\r
-               \r
-               /**\r
-               * Vertical Scaling.\r
-               * @param float $s_y scaling factor for height as percent. 0 is not allowed.\r
-               * @param int $x abscissa of the scaling center. Default is current x position\r
-               * @param int $y ordinate of the scaling center. Default is current y position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function ScaleY($s_y, $x='', $y='') {\r
-                       $this->Scale(100, $s_y, $x, $y);\r
-               }\r
-               \r
-               /**\r
-               * Vertical and horizontal proportional Scaling.\r
-               * @param float $s scaling factor for width and height as percent. 0 is not allowed.\r
-               * @param int $x abscissa of the scaling center. Default is current x position\r
-               * @param int $y ordinate of the scaling center. Default is current y position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function ScaleXY($s, $x='', $y='') {\r
-                       $this->Scale($s, $s, $x, $y);\r
-               }\r
-               \r
-               /**\r
-               * Vertical and horizontal non-proportional Scaling.\r
-               * @param float $s_x scaling factor for width as percent. 0 is not allowed.\r
-               * @param float $s_y scaling factor for height as percent. 0 is not allowed.\r
-               * @param int $x abscissa of the scaling center. Default is current x position\r
-               * @param int $y ordinate of the scaling center. Default is current y position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function Scale($s_x, $s_y, $x='', $y='') {\r
-                       if ($x === '') {\r
-                               $x = $this->x;\r
-                       }\r
-                       if ($y === '') {\r
-                               $y = $this->y;\r
-                       }\r
-                       if ($this->rtl) {\r
-                               $x = $this->w - $x;\r
-                       }\r
-                       if (($s_x == 0) OR ($s_y == 0)) {\r
-                               $this->Error('Please do not use values equal to zero for scaling');\r
-                       }\r
-                       $y = ($this->h - $y) * $this->k;\r
-                       $x *= $this->k;\r
-                       //calculate elements of transformation matrix\r
-                       $s_x /= 100;\r
-                       $s_y /= 100;\r
-                       $tm[0] = $s_x;\r
-                       $tm[1] = 0;\r
-                       $tm[2] = 0;\r
-                       $tm[3] = $s_y;\r
-                       $tm[4] = $x * (1 - $s_x);\r
-                       $tm[5] = $y * (1 - $s_y);\r
-                       //scale the coordinate system\r
-                       $this->Transform($tm);\r
-               }\r
-               \r
-               /**\r
-               * Horizontal Mirroring.\r
-               * @param int $x abscissa of the point. Default is current x position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function MirrorH($x='') {\r
-                       $this->Scale(-100, 100, $x);\r
-               }\r
-               \r
-               /**\r
-               * Verical Mirroring.\r
-               * @param int $y ordinate of the point. Default is current y position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function MirrorV($y='') {\r
-                       $this->Scale(100, -100, '', $y);\r
-               }\r
-               \r
-               /**\r
-               * Point reflection mirroring.\r
-               * @param int $x abscissa of the point. Default is current x position\r
-               * @param int $y ordinate of the point. Default is current y position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function MirrorP($x='',$y='') {\r
-                       $this->Scale(-100, -100, $x, $y);\r
-               }\r
-               \r
-               /**\r
-               * Reflection against a straight line through point (x, y) with the gradient angle (angle).\r
-               * @param float $angle gradient angle of the straight line. Default is 0 (horizontal line).\r
-               * @param int $x abscissa of the point. Default is current x position\r
-               * @param int $y ordinate of the point. Default is current y position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function MirrorL($angle=0, $x='',$y='') {\r
-                       $this->Scale(-100, 100, $x, $y);\r
-                       $this->Rotate(-2*($angle-90), $x, $y);\r
-               }\r
-               \r
-               /**\r
-               * Translate graphic object horizontally.\r
-               * @param int $t_x movement to the right (or left for RTL)\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function TranslateX($t_x) {\r
-                       $this->Translate($t_x, 0);\r
-               }\r
-               \r
-               /**\r
-               * Translate graphic object vertically.\r
-               * @param int $t_y movement to the bottom\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function TranslateY($t_y) {\r
-                       $this->Translate(0, $t_y);\r
-               }\r
-               \r
-               /**\r
-               * Translate graphic object horizontally and vertically.\r
-               * @param int $t_x movement to the right\r
-               * @param int $t_y movement to the bottom\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function Translate($t_x, $t_y) {\r
-                       if ($this->rtl) {\r
-                               $t_x = -$t_x;\r
-                       }\r
-                       //calculate elements of transformation matrix\r
-                       $tm[0] = 1;\r
-                       $tm[1] = 0;\r
-                       $tm[2] = 0;\r
-                       $tm[3] = 1;\r
-                       $tm[4] = $t_x * $this->k;\r
-                       $tm[5] = -$t_y * $this->k;\r
-                       //translate the coordinate system\r
-                       $this->Transform($tm);\r
-               }\r
-               \r
-               /**\r
-               * Rotate object.\r
-               * @param float $angle angle in degrees for counter-clockwise rotation\r
-               * @param int $x abscissa of the rotation center. Default is current x position\r
-               * @param int $y ordinate of the rotation center. Default is current y position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function Rotate($angle, $x='', $y='') {\r
-                       if ($x === '') {\r
-                               $x = $this->x;\r
-                       }\r
-                       if ($y === '') {\r
-                               $y = $this->y;\r
-                       }\r
-                       if ($this->rtl) {\r
-                               $x = $this->w - $x;\r
-                               $angle = -$angle;\r
-                       }\r
-                       $y = ($this->h - $y) * $this->k;\r
-                       $x *= $this->k;\r
-                       //calculate elements of transformation matrix\r
-                       $tm[0] = cos(deg2rad($angle));\r
-                       $tm[1] = sin(deg2rad($angle));\r
-                       $tm[2] = -$tm[1];\r
-                       $tm[3] = $tm[0];\r
-                       $tm[4] = $x + ($tm[1] * $y) - ($tm[0] * $x);\r
-                       $tm[5] = $y - ($tm[0] * $y) - ($tm[1] * $x);\r
-                       //rotate the coordinate system around ($x,$y)\r
-                       $this->Transform($tm);\r
-               }\r
-               \r
-               /**\r
-               * Skew horizontally.\r
-               * @param float $angle_x angle in degrees between -90 (skew to the left) and 90 (skew to the right)\r
-               * @param int $x abscissa of the skewing center. default is current x position\r
-               * @param int $y ordinate of the skewing center. default is current y position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function SkewX($angle_x, $x='', $y='') {\r
-                       $this->Skew($angle_x, 0, $x, $y);\r
-               }\r
-               \r
-               /**\r
-               * Skew vertically.\r
-               * @param float $angle_y angle in degrees between -90 (skew to the bottom) and 90 (skew to the top)\r
-               * @param int $x abscissa of the skewing center. default is current x position\r
-               * @param int $y ordinate of the skewing center. default is current y position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function SkewY($angle_y, $x='', $y='') {\r
-                       $this->Skew(0, $angle_y, $x, $y);\r
-               }\r
-               \r
-               /**\r
-               * Skew.\r
-               * @param float $angle_x angle in degrees between -90 (skew to the left) and 90 (skew to the right)\r
-               * @param float $angle_y angle in degrees between -90 (skew to the bottom) and 90 (skew to the top)\r
-               * @param int $x abscissa of the skewing center. default is current x position\r
-               * @param int $y ordinate of the skewing center. default is current y position\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               public function Skew($angle_x, $angle_y, $x='', $y='') {\r
-                       if ($x === '') {\r
-                               $x = $this->x;\r
-                       }\r
-                       if ($y === '') {\r
-                               $y = $this->y;\r
-                       }\r
-                       if ($this->rtl) {\r
-                               $x = $this->w - $x;\r
-                               $angle_x = -$angle_x;\r
-                       }\r
-                       if (($angle_x <= -90) OR ($angle_x >= 90) OR ($angle_y <= -90) OR ($angle_y >= 90)) {\r
-                               $this->Error('Please use values between -90 and +90 degrees for Skewing.');\r
-                       }\r
-                       $x *= $this->k;\r
-                       $y = ($this->h - $y) * $this->k;\r
-                       //calculate elements of transformation matrix\r
-                       $tm[0] = 1;\r
-                       $tm[1] = tan(deg2rad($angle_y));\r
-                       $tm[2] = tan(deg2rad($angle_x));\r
-                       $tm[3] = 1;\r
-                       $tm[4] = -$tm[2] * $y;\r
-                       $tm[5] = -$tm[1] * $x;\r
-                       //skew the coordinate system\r
-                       $this->Transform($tm);\r
-               }\r
-               \r
-               /**\r
-               * Apply graphic transformations.\r
-               * @access protected\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see StartTransform(), StopTransform()\r
-               */\r
-               protected function Transform($tm) {\r
-                       $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5]));
-                       // store transformation matrix
-                       $this->transfmatrix[] = array('a' => $tm[0], 'b' => $tm[1], 'c' => $tm[2], 'd' => $tm[3], 'e' => $tm[4], 'f' => $tm[5]);
-                       // update tranformation mark
-                       if (end($this->transfmrk[$this->page]) !== false) {
-                               $key = key($this->transfmrk[$this->page]);
-                               $this->transfmrk[$this->page][$key] = $this->pagelen[$this->page];
-                       }\r
-               }\r
-               \r
-               // END TRANSFORMATIONS SECTION -------------------------\r
-               \r
-               \r
-               // START GRAPHIC FUNCTIONS SECTION ---------------------\r
-               // The following section is based on the code provided by David Hernandez Sanz\r
-               \r
-               /**\r
-               * Defines the line width. By default, the value equals 0.2 mm. The method can be called before the first page is created and the value is retained from page to page.\r
-               * @param float $width The width.\r
-               * @access public\r
-               * @since 1.0\r
-               * @see Line(), Rect(), Cell(), MultiCell()\r
-               */\r
-               public function SetLineWidth($width) {\r
-                       //Set line width\r
-                       $this->LineWidth = $width;\r
-                       $this->linestyleWidth = sprintf('%.2F w', ($width * $this->k));
-                       if ($this->page > 0) {\r
-                               $this->_out($this->linestyleWidth);
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Returns the current the line width.\r
-               * @return int Line width \r
-               * @access public\r
-               * @since 2.1.000 (2008-01-07)\r
-               * @see Line(), SetLineWidth()\r
-               */\r
-               public function GetLineWidth() {\r
-                       return $this->LineWidth;\r
-               }\r
-               \r
-               /**\r
-               * Set line style.\r
-               * @param array $style Line style. Array with keys among the following:\r
-               * <ul>\r
-               *        <li>width (float): Width of the line in user units.</li>\r
-               *        <li>cap (string): Type of cap to put on the line. Possible values are:\r
-               * butt, round, square. The difference between "square" and "butt" is that\r
-               * "square" projects a flat end past the end of the line.</li>\r
-               *        <li>join (string): Type of join. Possible values are: miter, round,\r
-               * bevel.</li>\r
-               *        <li>dash (mixed): Dash pattern. Is 0 (without dash) or string with\r
-               * series of length values, which are the lengths of the on and off dashes.\r
-               * For example: "2" represents 2 on, 2 off, 2 on, 2 off, ...; "2,1" is 2 on,\r
-               * 1 off, 2 on, 1 off, ...</li>\r
-               *        <li>phase (integer): Modifier on the dash pattern which is used to shift\r
-               * the point at which the pattern starts.</li>\r
-               *        <li>color (array): Draw color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K).</li>\r
-               * </ul>\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               public function SetLineStyle($style) {\r
-                       extract($style);\r
-                       if (isset($width)) {\r
-                               $width_prev = $this->LineWidth;\r
-                               $this->SetLineWidth($width);\r
-                               $this->LineWidth = $width_prev;\r
-                       }\r
-                       if (isset($cap)) {\r
-                               $ca = array('butt' => 0, 'round'=> 1, 'square' => 2);\r
-                               if (isset($ca[$cap])) {\r
-                                       $this->linestyleCap = $ca[$cap].' J';\r
-                                       $this->_out($this->linestyleCap);\r
-                               }\r
-                       }\r
-                       if (isset($join)) {\r
-                               $ja = array('miter' => 0, 'round' => 1, 'bevel' => 2);\r
-                               if (isset($ja[$join])) {\r
-                                       $this->linestyleJoin = $ja[$join].' j';\r
-                                       $this->_out($this->linestyleJoin);\r
-                               }\r
-                       }\r
-                       if (isset($dash)) {\r
-                               $dash_string = '';\r
-                               if ($dash) {\r
-                                       if (preg_match('/^.+,/', $dash)) {\r
-                                               $tab = explode(',', $dash);\r
-                                       } else {\r
-                                               $tab = array($dash);\r
-                                       }\r
-                                       $dash_string = '';\r
-                                       foreach ($tab as $i => $v) {\r
-                                               if ($i) {\r
-                                                       $dash_string .= ' ';\r
-                                               }\r
-                                               $dash_string .= sprintf("%.2F", $v);\r
-                                       }\r
-                               }\r
-                               if (!isset($phase) OR !$dash) {\r
-                                       $phase = 0;\r
-                               }\r
-                               $this->linestyleDash = sprintf("[%s] %.2F d", $dash_string, $phase);\r
-                               $this->_out($this->linestyleDash);\r
-                       }\r
-                       if (isset($color)) {\r
-                               $this->SetDrawColorArray($color);\r
-                       }\r
-               }\r
-               \r
-               /*\r
-               * Set a draw point.\r
-               * @param float $x Abscissa of point.\r
-               * @param float $y Ordinate of point.\r
-               * @access protected\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               protected function _outPoint($x, $y) {\r
-                       if ($this->rtl) {\r
-                               $x = $this->w - $x;\r
-                       }\r
-                       $this->_out(sprintf("%.2F %.2F m", $x * $this->k, ($this->h - $y) * $this->k));\r
-               }\r
-               \r
-               /*\r
-               * Draws a line from last draw point.\r
-               * @param float $x Abscissa of end point.\r
-               * @param float $y Ordinate of end point.\r
-               * @access protected\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               protected function _outLine($x, $y) {\r
-                       if ($this->rtl) {\r
-                               $x = $this->w - $x;\r
-                       }\r
-                       $this->_out(sprintf("%.2F %.2F l", $x * $this->k, ($this->h - $y) * $this->k));\r
-               }\r
-               \r
-               /**\r
-               * Draws a rectangle.\r
-               * @param float $x Abscissa of upper-left corner (or upper-right corner for RTL language).\r
-               * @param float $y Ordinate of upper-left corner (or upper-right corner for RTL language).\r
-               * @param float $w Width.\r
-               * @param float $h Height.\r
-               * @param string $op options\r
-               * @access protected\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               protected function _outRect($x, $y, $w, $h, $op) {\r
-                       if ($this->rtl) {\r
-                               $x = $this->w - $x - $w;\r
-                       }\r
-                       $this->_out(sprintf('%.2F %.2F %.2F %.2F re %s', $x*$this->k, ($this->h-$y)*$this->k, $w*$this->k, -$h*$this->k, $op));\r
-               }\r
-               \r
-               /*\r
-               * Draws a Bezier curve from last draw point.\r
-               * The Bezier curve is a tangent to the line between the control points at either end of the curve.\r
-               * @param float $x1 Abscissa of control point 1.\r
-               * @param float $y1 Ordinate of control point 1.\r
-               * @param float $x2 Abscissa of control point 2.\r
-               * @param float $y2 Ordinate of control point 2.\r
-               * @param float $x3 Abscissa of end point.\r
-               * @param float $y3 Ordinate of end point.\r
-               * @access protected\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               protected function _outCurve($x1, $y1, $x2, $y2, $x3, $y3) {\r
-                       if ($this->rtl) {\r
-                               $x1 = $this->w - $x1;\r
-                               $x2 = $this->w - $x2;\r
-                               $x3 = $this->w - $x3;\r
-                       }\r
-                       $this->_out(sprintf("%.2F %.2F %.2F %.2F %.2F %.2F c", $x1 * $this->k, ($this->h - $y1) * $this->k, $x2 * $this->k, ($this->h - $y2) * $this->k, $x3 * $this->k, ($this->h - $y3) * $this->k));\r
-               }\r
-               \r
-               /**\r
-               * Draws a line between two points.\r
-               * @param float $x1 Abscissa of first point.\r
-               * @param float $y1 Ordinate of first point.\r
-               * @param float $x2 Abscissa of second point.\r
-               * @param float $y2 Ordinate of second point.\r
-               * @param array $style Line style. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).\r
-               * @access public\r
-               * @since 1.0\r
-               * @see SetLineWidth(), SetDrawColor(), SetLineStyle()\r
-               */\r
-               public function Line($x1, $y1, $x2, $y2, $style=array()) {\r
-                       if ($style) {\r
-                               $this->SetLineStyle($style);\r
-                       }\r
-                       $this->_outPoint($x1, $y1);\r
-                       $this->_outLine($x2, $y2);\r
-                       $this->_out(' S');\r
-               }\r
-               \r
-               /**\r
-               * Draws a rectangle.\r
-               * @param float $x Abscissa of upper-left corner (or upper-right corner for RTL language).\r
-               * @param float $y Ordinate of upper-left corner (or upper-right corner for RTL language).\r
-               * @param float $w Width.\r
-               * @param float $h Height.\r
-               * @param string $style Style of rendering. Possible values are:\r
-               * <ul>\r
-               *        <li>D or empty string: Draw (default).</li>\r
-               *        <li>F: Fill.</li>\r
-               *        <li>DF or FD: Draw and fill.</li>\r
-               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>\r
-               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>\r
-               * </ul>\r
-               * @param array $border_style Border style of rectangle. Array with keys among the following:\r
-               * <ul>\r
-               *        <li>all: Line style of all borders. Array like for {@link SetLineStyle SetLineStyle}.</li>\r
-               *        <li>L, T, R, B or combinations: Line style of left, top, right or bottom border. Array like for {@link SetLineStyle SetLineStyle}.</li>\r
-               * </ul>\r
-               * If a key is not present or is null, not draws the border. Default value: default line style (empty array).\r
-               * @param array $border_style Border style of rectangle. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).\r
-               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).\r
-               * @access public\r
-               * @since 1.0\r
-               * @see SetLineStyle()\r
-               */\r
-               public function Rect($x, $y, $w, $h, $style='', $border_style=array(), $fill_color=array()) {\r
-                       if (!(false === strpos($style, 'F')) AND isset($fill_color)) {\r
-                               $this->SetFillColorArray($fill_color);\r
-                       }\r
-                       switch ($style) {\r
-                               case 'F': {\r
-                                       $op = 'f';\r
-                                       $border_style = array();\r
-                                       $this->_outRect($x, $y, $w, $h, $op);\r
-                                       break;\r
-                               }\r
-                               case 'DF':\r
-                               case 'FD': {\r
-                                       if ((!$border_style) OR (isset($border_style['all']))) {\r
-                                               $op = 'B';\r
-                                               if (isset($border_style['all'])) {\r
-                                                       $this->SetLineStyle($border_style['all']);\r
-                                                       $border_style = array();\r
-                                               }\r
-                                       } else {\r
-                                               $op = 'f';\r
-                                       }\r
-                                       $this->_outRect($x, $y, $w, $h, $op);\r
-                                       break;\r
-                               }\r
-                               case 'CNZ': {\r
-                                       $op = 'W n';
-                                       $this->_outRect($x, $y, $w, $h, $op);\r
-                                       break;\r
-                               }\r
-                               case 'CEO': {\r
-                                       $op = 'W* n';
-                                       $this->_outRect($x, $y, $w, $h, $op);\r
-                                       break;\r
-                               }\r
-                               default: {\r
-                                       $op = 'S';\r
-                                       if ((!$border_style) OR (isset($border_style['all']))) {\r
-                                               if (isset($border_style['all']) AND $border_style['all']) {\r
-                                                       $this->SetLineStyle($border_style['all']);\r
-                                                       $border_style = array();\r
-                                               }\r
-                                               $this->_outRect($x, $y, $w, $h, $op);\r
-                                       }\r
-                                       break;\r
-                               }\r
-                       }\r
-                       if ($border_style) {\r
-                               $border_style2 = array();\r
-                               foreach ($border_style as $line => $value) {\r
-                                       $lenght = strlen($line);\r
-                                       for ($i = 0; $i < $lenght; ++$i) {\r
-                                               $border_style2[$line[$i]] = $value;\r
-                                       }\r
-                               }\r
-                               $border_style = $border_style2;\r
-                               if (isset($border_style['L']) AND $border_style['L']) {\r
-                                       $this->Line($x, $y, $x, $y + $h, $border_style['L']);\r
-                               }\r
-                               if (isset($border_style['T']) AND $border_style['T']) {\r
-                                       $this->Line($x, $y, $x + $w, $y, $border_style['T']);\r
-                               }\r
-                               if (isset($border_style['R']) AND $border_style['R']) {\r
-                                       $this->Line($x + $w, $y, $x + $w, $y + $h, $border_style['R']);\r
-                               }\r
-                               if (isset($border_style['B']) AND $border_style['B']) {\r
-                                       $this->Line($x, $y + $h, $x + $w, $y + $h, $border_style['B']);\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               \r
-               /**\r
-               * Draws a Bezier curve.\r
-               * The Bezier curve is a tangent to the line between the control points at\r
-               * either end of the curve.\r
-               * @param float $x0 Abscissa of start point.\r
-               * @param float $y0 Ordinate of start point.\r
-               * @param float $x1 Abscissa of control point 1.\r
-               * @param float $y1 Ordinate of control point 1.\r
-               * @param float $x2 Abscissa of control point 2.\r
-               * @param float $y2 Ordinate of control point 2.\r
-               * @param float $x3 Abscissa of end point.\r
-               * @param float $y3 Ordinate of end point.\r
-               * @param string $style Style of rendering. Possible values are:\r
-               * <ul>\r
-               *        <li>D or empty string: Draw (default).</li>\r
-               *        <li>F: Fill.</li>\r
-               *        <li>DF or FD: Draw and fill.</li>\r
-               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>\r
-               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>\r
-               * </ul>\r
-               * @param array $line_style Line style of curve. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).\r
-               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).\r
-               * @access public\r
-               * @see SetLineStyle()\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               public function Curve($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3, $style='', $line_style=array(), $fill_color=array()) {\r
-                       if (!(false === strpos($style, 'F')) AND isset($fill_color)) {\r
-                               $this->SetFillColorArray($fill_color);\r
-                       }\r
-                       switch ($style) {\r
-                               case 'F': {\r
-                                       $op = 'f';\r
-                                       $line_style = array();\r
-                                       break;\r
-                               }\r
-                               case 'FD': \r
-                               case 'DF': {\r
-                                       $op = 'B';\r
-                                       break;\r
-                               }\r
-                               case 'CNZ': {\r
-                                       $op = 'W n';\r
-                                       break;\r
-                               }\r
-                               case 'CEO': {\r
-                                       $op = 'W* n';\r
-                                       break;\r
-                               }\r
-                               default: {\r
-                                       $op = 'S';\r
-                                       break;\r
-                               }\r
-                       }\r
-                       if ($line_style) {\r
-                               $this->SetLineStyle($line_style);\r
-                       }\r
-                       $this->_outPoint($x0, $y0);\r
-                       $this->_outCurve($x1, $y1, $x2, $y2, $x3, $y3);\r
-                       $this->_out($op);\r
-               }\r
-               \r
-               /**\r
-               * Draws a poly-Bezier curve.\r
-               * Each Bezier curve segment is a tangent to the line between the control points at\r
-               * either end of the curve.\r
-               * @param float $x0 Abscissa of start point.\r
-               * @param float $y0 Ordinate of start point.\r
-               * @param float $segments An array of bezier descriptions. Format: array(x1, y1, x2, y2, x3, y3).\r
-               * @param string $style Style of rendering. Possible values are:\r
-               * <ul>\r
-               *        <li>D or empty string: Draw (default).</li>\r
-               *        <li>F: Fill.</li>\r
-               *        <li>DF or FD: Draw and fill.</li>\r
-               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>\r
-               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>\r
-               * </ul>\r
-               * @param array $line_style Line style of curve. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).\r
-               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).\r
-               * @access public\r
-               * @see SetLineStyle()\r
-               * @since 3.0008 (2008-05-12)\r
-               */\r
-               public function Polycurve($x0, $y0, $segments, $style='', $line_style=array(), $fill_color=array()) {\r
-                       if (!(false === strpos($style, 'F')) AND isset($fill_color)) {\r
-                               $this->SetFillColorArray($fill_color);\r
-                       }\r
-                       switch ($style) {\r
-                               case 'F': {\r
-                                       $op = 'f';\r
-                                       $line_style = array();\r
-                                       break;\r
-                               }\r
-                               case 'FD':\r
-                               case 'DF': {\r
-                                       $op = 'B';\r
-                                       break;\r
-                               }\r
-                               case 'CNZ': {\r
-                                       $op = 'W n';\r
-                                       break;\r
-                               }\r
-                               case 'CEO': {\r
-                                       $op = 'W* n';\r
-                                       break;\r
-                               }\r
-                               default: {\r
-                                       $op = 'S';\r
-                                       break;\r
-                               }\r
-                       }\r
-                       if ($line_style) {\r
-                               $this->SetLineStyle($line_style);\r
-                       }\r
-                       $this->_outPoint($x0, $y0);\r
-                       foreach ($segments as $segment) {\r
-                               list($x1, $y1, $x2, $y2, $x3, $y3) = $segment;\r
-                               $this->_outCurve($x1, $y1, $x2, $y2, $x3, $y3);\r
-                       }       \r
-                       $this->_out($op);\r
-               }\r
-               \r
-               /**\r
-               * Draws an ellipse.\r
-               * An ellipse is formed from n Bezier curves.\r
-               * @param float $x0 Abscissa of center point.\r
-               * @param float $y0 Ordinate of center point.\r
-               * @param float $rx Horizontal radius.\r
-               * @param float $ry Vertical radius (if ry = 0 then is a circle, see {@link Circle Circle}). Default value: 0.\r
-               * @param float $angle: Angle oriented (anti-clockwise). Default value: 0.\r
-               * @param float $astart: Angle start of draw line. Default value: 0.\r
-               * @param float $afinish: Angle finish of draw line. Default value: 360.\r
-               * @param string $style Style of rendering. Possible values are:\r
-               * <ul>\r
-               *        <li>D or empty string: Draw (default).</li>\r
-               *        <li>F: Fill.</li>\r
-               *        <li>DF or FD: Draw and fill.</li>\r
-               *        <li>C: Draw close.</li>\r
-               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>\r
-               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>\r
-               * </ul>\r
-               * @param array $line_style Line style of ellipse. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).\r
-               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).\r
-               * @param integer $nc Number of curves used in ellipse. Default value: 8.\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               public function Ellipse($x0, $y0, $rx, $ry=0, $angle=0, $astart=0, $afinish=360, $style='', $line_style=array(), $fill_color=array(), $nc=8) {\r
-                       if ($angle) {\r
-                               $this->StartTransform();\r
-                               $this->Rotate($angle, $x0, $y0);\r
-                               $this->Ellipse($x0, $y0, $rx, $ry, 0, $astart, $afinish, $style, $line_style, $fill_color, $nc);\r
-                               $this->StopTransform();\r
-                               return;\r
-                       }\r
-                       if ($rx) {\r
-                               if (!(false === strpos($style, 'F')) AND isset($fill_color)) {\r
-                                       $this->SetFillColorArray($fill_color);\r
-                               }\r
-                               switch ($style) {\r
-                                       case 'F': {\r
-                                               $op = 'f';\r
-                                               $line_style = array();\r
-                                               break;\r
-                                       }\r
-                                       case 'FD': \r
-                                       case 'DF': {\r
-                                               $op = 'B';\r
-                                               break;\r
-                                       }\r
-                                       case 'C': {\r
-                                               $op = 's'; // Small 's' signifies closing the path as well\r
-                                               break;\r
-                                       }\r
-                                       case 'CNZ': {\r
-                                               $op = 'W n';\r
-                                               break;\r
-                                       }\r
-                                       case 'CEO': {\r
-                                               $op = 'W* n';\r
-                                               break;\r
-                                       }\r
-                                       default: {\r
-                                               $op = 'S';\r
-                                               break;\r
-                                       }\r
-                               }\r
-                               if ($line_style) {\r
-                                       $this->SetLineStyle($line_style);\r
-                               }\r
-                               if (!$ry) {\r
-                                       $ry = $rx;\r
-                               }\r
-                               $rx *= $this->k;\r
-                               $ry *= $this->k;\r
-                               if ($nc < 2) {\r
-                                       $nc = 2;\r
-                               }\r
-                               $astart = deg2rad((float) $astart);\r
-                               $afinish = deg2rad((float) $afinish);\r
-                               $total_angle = $afinish - $astart;\r
-                               $dt = $total_angle / $nc;\r
-                               $dtm = $dt / 3;\r
-                               $x0 *= $this->k;\r
-                               $y0 = ($this->h - $y0) * $this->k;\r
-                               $t1 = $astart;\r
-                               $a0 = $x0 + ($rx * cos($t1));\r
-                               $b0 = $y0 + ($ry * sin($t1));\r
-                               $c0 = -$rx * sin($t1);\r
-                               $d0 = $ry * cos($t1);\r
-                               $this->_outPoint($a0 / $this->k, $this->h - ($b0 / $this->k));\r
-                               for ($i = 1; $i <= $nc; ++$i) {\r
-                                       // Draw this bit of the total curve\r
-                                       $t1 = ($i * $dt) + $astart;\r
-                                       $a1 = $x0 + ($rx * cos($t1));\r
-                                       $b1 = $y0 + ($ry * sin($t1));\r
-                                       $c1 = -$rx * sin($t1);\r
-                                       $d1 = $ry * cos($t1);\r
-                                       $this->_outCurve(($a0 + ($c0 * $dtm)) / $this->k, $this->h - (($b0 + ($d0 * $dtm)) / $this->k), ($a1 - ($c1 * $dtm)) / $this->k, $this->h - (($b1 - ($d1 * $dtm)) / $this->k), $a1 / $this->k, $this->h - ($b1 / $this->k));\r
-                                       $a0 = $a1;\r
-                                       $b0 = $b1;\r
-                                       $c0 = $c1;\r
-                                       $d0 = $d1;\r
-                               }\r
-                               $this->_out($op);\r
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Draws a circle.\r
-               * A circle is formed from n Bezier curves.\r
-               * @param float $x0 Abscissa of center point.\r
-               * @param float $y0 Ordinate of center point.\r
-               * @param float $r Radius.\r
-               * @param float $astart: Angle start of draw line. Default value: 0.\r
-               * @param float $afinish: Angle finish of draw line. Default value: 360.\r
-               * @param string $style Style of rendering. Possible values are:\r
-               * <ul>\r
-               *        <li>D or empty string: Draw (default).</li>\r
-               *        <li>F: Fill.</li>\r
-               *        <li>DF or FD: Draw and fill.</li>\r
-               *        <li>C: Draw close.</li>\r
-               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>\r
-               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>\r
-               * </ul>\r
-               * @param array $line_style Line style of circle. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).\r
-               * @param array $fill_color Fill color. Format: array(red, green, blue). Default value: default color (empty array).\r
-               * @param integer $nc Number of curves used in circle. Default value: 8.\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               public function Circle($x0, $y0, $r, $astart=0, $afinish=360, $style='', $line_style=array(), $fill_color=array(), $nc=8) {\r
-                       $this->Ellipse($x0, $y0, $r, 0, 0, $astart, $afinish, $style, $line_style, $fill_color, $nc);\r
-               }\r
-               \r
-               /**\r
-               * Draws a polygon.\r
-               * @param array $p Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1))\r
-               * @param string $style Style of rendering. Possible values are:\r
-               * <ul>\r
-               *        <li>D or empty string: Draw (default).</li>\r
-               *        <li>F: Fill.</li>\r
-               *        <li>DF or FD: Draw and fill.</li>\r
-               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>\r
-               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>\r
-               * </ul>\r
-               * @param array $line_style Line style of polygon. Array with keys among the following:\r
-               * <ul>\r
-               *        <li>all: Line style of all lines. Array like for {@link SetLineStyle SetLineStyle}.</li>\r
-               *        <li>0 to ($np - 1): Line style of each line. Array like for {@link SetLineStyle SetLineStyle}.</li>\r
-               * </ul>\r
-               * If a key is not present or is null, not draws the line. Default value is default line style (empty array).\r
-               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               public function Polygon($p, $style='', $line_style=array(), $fill_color=array()) {\r
-                       $np = count($p) / 2;\r
-                       if (!(false === strpos($style, 'F')) AND isset($fill_color)) {\r
-                               $this->SetFillColorArray($fill_color);\r
-                       }\r
-                       switch ($style) {\r
-                               case 'F': {\r
-                                       $line_style = array();\r
-                                       $op = 'f';\r
-                                       break;\r
-                               }\r
-                               case 'FD': \r
-                               case 'DF': {\r
-                                       $op = 'B';\r
-                                       break;\r
-                               }\r
-                               case 'CNZ': {\r
-                                       $op = 'W n';\r
-                                       break;\r
-                               }\r
-                               case 'CEO': {\r
-                                       $op = 'W* n';\r
-                                       break;\r
-                               }                               \r
-                               default: {\r
-                                       $op = 'S';\r
-                                       break;\r
-                               }\r
-                       }\r
-                       $draw = true;\r
-                       if ($line_style) {\r
-                               if (isset($line_style['all'])) {\r
-                                       $this->SetLineStyle($line_style['all']);\r
-                               } else { // 0 .. (np - 1), op = {B, S}\r
-                                       $draw = false;\r
-                                       if ('B' == $op) {\r
-                                               $op = 'f';\r
-                                               $this->_outPoint($p[0], $p[1]);\r
-                                               for ($i = 2; $i < ($np * 2); $i = $i + 2) {\r
-                                                       $this->_outLine($p[$i], $p[$i + 1]);\r
-                                               }\r
-                                               $this->_outLine($p[0], $p[1]);\r
-                                               $this->_out($op);\r
-                                       }\r
-                                       $p[($np * 2)] = $p[0];\r
-                                       $p[(($np * 2) + 1)] = $p[1];\r
-                                       for ($i = 0; $i < $np; ++$i) {\r
-                                               if (isset($line_style[$i]) AND ($line_style[$i] != 0)) {\r
-                                                       $this->Line($p[($i * 2)], $p[(($i * 2) + 1)], $p[(($i * 2) + 2)], $p[(($i * 2) + 3)], $line_style[$i]);\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-                       if ($draw) {\r
-                               $this->_outPoint($p[0], $p[1]);\r
-                               for ($i = 2; $i < ($np * 2); $i = $i + 2) {\r
-                                       $this->_outLine($p[$i], $p[$i + 1]);\r
-                               }\r
-                               $this->_outLine($p[0], $p[1]);\r
-                               $this->_out($op);\r
-                       }\r
-               }\r
-               \r
-               /**\r
-               * Draws a regular polygon.\r
-               * @param float $x0 Abscissa of center point.\r
-               * @param float $y0 Ordinate of center point.\r
-               * @param float $r: Radius of inscribed circle.\r
-               * @param integer $ns Number of sides.\r
-               * @param float $angle Angle oriented (anti-clockwise). Default value: 0.\r
-               * @param boolean $draw_circle Draw inscribed circle or not. Default value: false.\r
-               * @param string $style Style of rendering. Possible values are:\r
-               * <ul>\r
-               *        <li>D or empty string: Draw (default).</li>\r
-               *        <li>F: Fill.</li>\r
-               *        <li>DF or FD: Draw and fill.</li>\r
-               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>\r
-               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>\r
-               * </ul>\r
-               * @param array $line_style Line style of polygon sides. Array with keys among the following:\r
-               * <ul>\r
-               *        <li>all: Line style of all sides. Array like for {@link SetLineStyle SetLineStyle}.</li>\r
-               *        <li>0 to ($ns - 1): Line style of each side. Array like for {@link SetLineStyle SetLineStyle}.</li>\r
-               * </ul>\r
-               * If a key is not present or is null, not draws the side. Default value is default line style (empty array).\r
-               * @param array $fill_color Fill color. Format: array(red, green, blue). Default value: default color (empty array).\r
-               * @param string $circle_style Style of rendering of inscribed circle (if draws). Possible values are:\r
-               * <ul>\r
-               *        <li>D or empty string: Draw (default).</li>\r
-               *        <li>F: Fill.</li>\r
-               *        <li>DF or FD: Draw and fill.</li>\r
-               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>\r
-               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>\r
-               * </ul>\r
-               * @param array $circle_outLine_style Line style of inscribed circle (if draws). Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).\r
-               * @param array $circle_fill_color Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array).\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               public function RegularPolygon($x0, $y0, $r, $ns, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) {\r
-                       if (3 > $ns) {\r
-                               $ns = 3;\r
-                       }\r
-                       if ($draw_circle) {\r
-                               $this->Circle($x0, $y0, $r, 0, 360, $circle_style, $circle_outLine_style, $circle_fill_color);\r
-                       }\r
-                       $p = array();\r
-                       for ($i = 0; $i < $ns; ++$i) {\r
-                               $a = $angle + ($i * 360 / $ns);\r
-                               $a_rad = deg2rad((float) $a);\r
-                               $p[] = $x0 + ($r * sin($a_rad));\r
-                               $p[] = $y0 + ($r * cos($a_rad));\r
-                       }\r
-                       $this->Polygon($p, $style, $line_style, $fill_color);\r
-               }\r
-               \r
-               /**\r
-               * Draws a star polygon\r
-               * @param float $x0 Abscissa of center point.\r
-               * @param float $y0 Ordinate of center point.\r
-               * @param float $r Radius of inscribed circle.\r
-               * @param integer $nv Number of vertices.\r
-               * @param integer $ng Number of gap (if ($ng % $nv = 1) then is a regular polygon).\r
-               * @param float $angle: Angle oriented (anti-clockwise). Default value: 0.\r
-               * @param boolean $draw_circle: Draw inscribed circle or not. Default value is false.\r
-               * @param string $style Style of rendering. Possible values are:\r
-               * <ul>\r
-               *        <li>D or empty string: Draw (default).</li>\r
-               *        <li>F: Fill.</li>\r
-               *        <li>DF or FD: Draw and fill.</li>\r
-               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>\r
-               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>\r
-               * </ul>\r
-               * @param array $line_style Line style of polygon sides. Array with keys among the following:\r
-               * <ul>\r
-               *        <li>all: Line style of all sides. Array like for\r
-               * {@link SetLineStyle SetLineStyle}.</li>\r
-               *        <li>0 to (n - 1): Line style of each side. Array like for {@link SetLineStyle SetLineStyle}.</li>\r
-               * </ul>\r
-               * If a key is not present or is null, not draws the side. Default value is default line style (empty array).\r
-               * @param array $fill_color Fill color. Format: array(red, green, blue). Default value: default color (empty array).\r
-               * @param string $circle_style Style of rendering of inscribed circle (if draws). Possible values are:\r
-               * <ul>\r
-               *        <li>D or empty string: Draw (default).</li>\r
-               *        <li>F: Fill.</li>\r
-               *        <li>DF or FD: Draw and fill.</li>\r
-               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>\r
-               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>\r
-               * </ul>\r
-               * @param array $circle_outLine_style Line style of inscribed circle (if draws). Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).\r
-               * @param array $circle_fill_color Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array).\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               public function StarPolygon($x0, $y0, $r, $nv, $ng, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) {\r
-                       if (2 > $nv) {\r
-                               $nv = 2;\r
-                       }\r
-                       if ($draw_circle) {\r
-                               $this->Circle($x0, $y0, $r, 0, 360, $circle_style, $circle_outLine_style, $circle_fill_color);\r
-                       }\r
-                       $p2 = array();\r
-                       $visited = array();\r
-                       for ($i = 0; $i < $nv; ++$i) {\r
-                               $a = $angle + ($i * 360 / $nv);\r
-                               $a_rad = deg2rad((float) $a);\r
-                               $p2[] = $x0 + ($r * sin($a_rad));\r
-                               $p2[] = $y0 + ($r * cos($a_rad));\r
-                               $visited[] = false;\r
-                       }\r
-                       $p = array();\r
-                       $i = 0;\r
-                       do {\r
-                               $p[] = $p2[$i * 2];\r
-                               $p[] = $p2[($i * 2) + 1];\r
-                               $visited[$i] = true;\r
-                               $i += $ng;\r
-                               $i %= $nv;\r
-                       } while (!$visited[$i]);\r
-                       $this->Polygon($p, $style, $line_style, $fill_color);\r
-               }\r
-               \r
-               /**\r
-               * Draws a rounded rectangle.\r
-               * @param float $x Abscissa of upper-left corner.\r
-               * @param float $y Ordinate of upper-left corner.\r
-               * @param float $w Width.\r
-               * @param float $h Height.\r
-               * @param float $r Radius of the rounded corners.\r
-               * @param string $round_corner Draws rounded corner or not. String with a 0 (not rounded i-corner) or 1 (rounded i-corner) in i-position. Positions are, in order and begin to 0: top left, top right, bottom right and bottom left. Default value: all rounded corner ("1111").\r
-               * @param string $style Style of rendering. Possible values are:\r
-               * <ul>\r
-               *        <li>D or empty string: Draw (default).</li>\r
-               *        <li>F: Fill.</li>\r
-               *        <li>DF or FD: Draw and fill.</li>\r
-               *        <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>\r
-               *        <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>\r
-               * </ul>\r
-               * @param array $border_style Border style of rectangle. Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array).\r
-               * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).\r
-               * @access public\r
-               * @since 2.1.000 (2008-01-08)\r
-               */\r
-               public function RoundedRect($x, $y, $w, $h, $r, $round_corner='1111', $style='', $border_style=array(), $fill_color=array()) {\r
-                       if ('0000' == $round_corner) { // Not rounded\r
-                               $this->Rect($x, $y, $w, $h, $style, $border_style, $fill_color);\r
-                       } else { // Rounded\r
-                               if (!(false === strpos($style, 'F')) AND isset($fill_color)) {\r
-                                       $this->SetFillColorArray($fill_color);\r
-                               }\r
-                               switch ($style) {\r
-                                       case 'F': {\r
-                                               $border_style = array();\r
-                                               $op = 'f';\r
-                                               break;\r
-                                       }\r
-                                       case 'FD': \r
-                                       case 'DF': {\r
-                                               $op = 'B';\r
-                                               break;\r
-                                       }\r
-                                       case 'CNZ': {\r
-                                               $op = 'W n';\r
-                                               break;\r
-                                       }\r
-                                       case 'CEO': {\r
-                                               $op = 'W* n';\r
-                                               break;\r
-                                       }\r
-                                       default: {\r
-                                               $op = 'S';\r
-                                               break;\r
-                                       }\r
-                               }\r
-                               if ($border_style) {\r
-                                       $this->SetLineStyle($border_style);\r
-                               }\r
-                               $MyArc = 4 / 3 * (sqrt(2) - 1);\r
-                               $this->_outPoint($x + $r, $y);\r
-                               $xc = $x + $w - $r;\r
-                               $yc = $y + $r;\r
-                               $this->_outLine($xc, $y);\r
-                               if ($round_corner[0]) {\r
-                                       $this->_outCurve($xc + ($r * $MyArc), $yc - $r, $xc + $r, $yc - ($r * $MyArc), $xc + $r, $yc);\r
-                               } else {\r
-                                       $this->_outLine($x + $w, $y);\r
-                               }\r
-                               $xc = $x + $w - $r;\r
-                               $yc = $y + $h - $r;\r
-                               $this->_outLine($x + $w, $yc);\r
-                               if ($round_corner[1]) {\r
-                                       $this->_outCurve($xc + $r, $yc + ($r * $MyArc), $xc + ($r * $MyArc), $yc + $r, $xc, $yc + $r);\r
-                               } else {\r
-                                       $this->_outLine($x + $w, $y + $h);\r
-                               }\r
-                               $xc = $x + $r;\r
-                               $yc = $y + $h - $r;\r
-                               $this->_outLine($xc, $y + $h);\r
-                               if ($round_corner[2]) {\r
-                                       $this->_outCurve($xc - ($r * $MyArc), $yc + $r, $xc - $r, $yc + ($r * $MyArc), $xc - $r, $yc);\r
-                               } else {\r
-                                       $this->_outLine($x, $y + $h);\r
-                               }\r
-                               $xc = $x + $r;\r
-                               $yc = $y + $r;\r
-                               $this->_outLine($x, $yc);\r
-                               if ($round_corner[3]) {\r
-                                       $this->_outCurve($xc - $r, $yc - ($r * $MyArc), $xc - ($r * $MyArc), $yc - $r, $xc, $yc - $r);\r
-                               } else {\r
-                                       $this->_outLine($x, $y);\r
-                                       $this->_outLine($x + $r, $y);\r
-                               }\r
-                               $this->_out($op);\r
-                       }\r
+                */
+               public function setBarcode($bc='') {
+                       $this->barcode = $bc;
                }
                
                /**
-               * Draws a grahic arrow.
-               * @parameter float $x0 Abscissa of first point.
-               * @parameter float $y0 Ordinate of first point.
-               * @parameter float $x0 Abscissa of second point.
-               * @parameter float $y1 Ordinate of second point.
-               * @parameter int $head_style (0 = draw only arrowhead arms, 1 = draw closed arrowhead, but no fill, 2 = closed and filled arrowhead)
-               * @parameter float $arm_size length of arrowhead arms
-               * @parameter int $arm_angle angle between an arm and the shaft
-               * @author Piotr Galecki, Nicola Asuni
-               * @since 4.6.018 (2009-07-10)
-               */
-               public function Arrow($x0, $y0, $x1, $y1, $head_style=0, $arm_size=5, $arm_angle=15) {
-                       //main arrow line / shaft
-                       $this->Line($x0, $y0, $x1, $y1);
-                       //getting arrow direction angle
-                       $dir_angle = rad2deg(atan2(($y0 - $y1), ($x0 - $x1)));
-                       //0 angle is when both arms go along X axis. angle grows clockwise.
-                       //left arrowhead arm tip
-                       $x2L = $x1 + ($arm_size * cos(deg2rad($dir_angle + $arm_angle)));
-                       $y2L = $y1 + ($arm_size * sin(deg2rad($dir_angle + $arm_angle)));
-                       //right arrowhead arm tip
-                       $x2R = $x1 + ($arm_size * cos(deg2rad($dir_angle - $arm_angle)));
-                       $y2R = $y1 + ($arm_size * sin(deg2rad($dir_angle - $arm_angle)));
-                       if($head_style > 0) {
-                               //closed arrowhead
-                               $this->Polygon(array($x1, $y1, $x2L, $y2L, $x2R, $y2R), (($head_style === 1) ? 'D' : 'DF'), array(), array());
-                       } else { //just arms
-                               //left arm
-                               $this->Line($x1, $y1, $x2L, $y2L);
-                               //right arm
-                               $this->Line($x1, $y1, $x2R, $y2R);
-                       }
-               } \r
-               \r
-               // END GRAPHIC FUNCTIONS SECTION -----------------------\r
-               \r
-               // BIDIRECTIONAL TEXT SECTION --------------------------\r
-               /**\r
-                * Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).\r
-                * @param string $str string to manipulate.\r
-                * @param bool $forcertl if 'R' forces RTL, if 'L' forces LTR\r
-                * @return string\r
-                * @access protected\r
-                * @author Nicola Asuni\r
-                * @since 2.1.000 (2008-01-08)\r
-               */\r
-               protected function utf8StrRev($str, $setbom=false, $forcertl=false) {\r
-                       return $this->arrUTF8ToUTF16BE($this->utf8Bidi($this->UTF8StringToArray($str), $str, $forcertl), $setbom);\r
-               }\r
-               \r
-               /**\r
-                * Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).\r
-                * @param array $ta array of characters composing the string.
-                * @param string $str string to process\r
-                * @param bool $forcertl if 'R' forces RTL, if 'L' forces LTR\r
-                * @return string\r
-                * @author Nicola Asuni\r
-                * @access protected\r
-                * @since 2.4.000 (2008-03-06)\r
-               */\r
-               protected function utf8Bidi($ta, $str='', $forcertl=false) {\r
-                       global $unicode, $unicode_mirror, $unicode_arlet, $laa_array, $diacritics;\r
-                       // paragraph embedding level\r
-                       $pel = 0;\r
-                       // max level\r
-                       $maxlevel = 0;
-                       if ($this->empty_string($str)) {\r
-                               // create string from array\r
-                               $str = $this->UTF8ArrSubString($ta);
-                       }\r
-                       // check if string contains arabic text\r
-                       if (preg_match(K_RE_PATTERN_ARABIC, $str)) {\r
-                               $arabic = true;\r
-                       } else {\r
-                               $arabic = false;\r
-                       }\r
-                       // check if string contains RTL text\r
-                       if (!($forcertl OR $arabic OR preg_match(K_RE_PATTERN_RTL, $str))) {\r
-                               return $ta;\r
-                       }\r
-                       \r
-                       // get number of chars\r
-                       $numchars = count($ta);
-                       \r
-                       if ($forcertl == 'R') {\r
-                                       $pel = 1;\r
-                       } elseif ($forcertl == 'L') {\r
-                                       $pel = 0;\r
-                       } else {\r
-                               // P2. In each paragraph, find the first character of type L, AL, or R.\r
-                               // P3. If a character is found in P2 and it is of type AL or R, then set the paragraph embedding level to one; otherwise, set it to zero.\r
-                               for ($i=0; $i < $numchars; ++$i) {\r
-                                       $type = $unicode[$ta[$i]];\r
-                                       if ($type == 'L') {\r
-                                               $pel = 0;\r
-                                               break;\r
-                                       } elseif (($type == 'AL') OR ($type == 'R')) {\r
-                                               $pel = 1;\r
-                                               break;\r
-                                       }\r
-                               }\r
-                       }\r
-                       \r
-                       // Current Embedding Level\r
-                       $cel = $pel;\r
-                       // directional override status\r
-                       $dos = 'N';\r
-                       $remember = array();\r
-                       // start-of-level-run\r
-                       $sor = $pel % 2 ? 'R' : 'L';\r
-                       $eor = $sor;\r
-                       \r
-                       // Array of characters data\r
-                       $chardata = Array();\r
-                       \r
-                       // X1. Begin by setting the current embedding level to the paragraph embedding level. Set the directional override status to neutral. Process each character iteratively, applying rules X2 through X9. Only embedding levels from 0 to 61 are valid in this phase.\r
-                       //      In the resolution of levels in rules I1 and I2, the maximum embedding level of 62 can be reached.\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               if ($ta[$i] == K_RLE) {\r
-                                       // X2. With each RLE, compute the least greater odd embedding level.\r
-                                       //      a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to neutral.\r
-                                       //      b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status.\r
-                                       $next_level = $cel + ($cel % 2) + 1;\r
-                                       if ($next_level < 62) {\r
-                                               $remember[] = array('num' => K_RLE, 'cel' => $cel, 'dos' => $dos);\r
-                                               $cel = $next_level;\r
-                                               $dos = 'N';\r
-                                               $sor = $eor;\r
-                                               $eor = $cel % 2 ? 'R' : 'L';\r
-                                       }\r
-                               } elseif ($ta[$i] == K_LRE) {\r
-                                       // X3. With each LRE, compute the least greater even embedding level.\r
-                                       //      a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to neutral.\r
-                                       //      b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status.\r
-                                       $next_level = $cel + 2 - ($cel % 2);\r
-                                       if ( $next_level < 62 ) {\r
-                                               $remember[] = array('num' => K_LRE, 'cel' => $cel, 'dos' => $dos);\r
-                                               $cel = $next_level;\r
-                                               $dos = 'N';\r
-                                               $sor = $eor;\r
-                                               $eor = $cel % 2 ? 'R' : 'L';\r
-                                       }\r
-                               } elseif ($ta[$i] == K_RLO) {\r
-                                       // X4. With each RLO, compute the least greater odd embedding level.\r
-                                       //      a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to right-to-left.\r
-                                       //      b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status.\r
-                                       $next_level = $cel + ($cel % 2) + 1;\r
-                                       if ($next_level < 62) {\r
-                                               $remember[] = array('num' => K_RLO, 'cel' => $cel, 'dos' => $dos);\r
-                                               $cel = $next_level;\r
-                                               $dos = 'R';\r
-                                               $sor = $eor;\r
-                                               $eor = $cel % 2 ? 'R' : 'L';\r
-                                       }\r
-                               } elseif ($ta[$i] == K_LRO) {\r
-                                       // X5. With each LRO, compute the least greater even embedding level.\r
-                                       //      a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to left-to-right.\r
-                                       //      b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status.\r
-                                       $next_level = $cel + 2 - ($cel % 2);\r
-                                       if ( $next_level < 62 ) {\r
-                                               $remember[] = array('num' => K_LRO, 'cel' => $cel, 'dos' => $dos);\r
-                                               $cel = $next_level;\r
-                                               $dos = 'L';\r
-                                               $sor = $eor;\r
-                                               $eor = $cel % 2 ? 'R' : 'L';\r
-                                       }\r
-                               } elseif ($ta[$i] == K_PDF) {\r
-                                       // X7. With each PDF, determine the matching embedding or override code. If there was a valid matching code, restore (pop) the last remembered (pushed) embedding level and directional override.\r
-                                       if (count($remember)) {\r
-                                               $last = count($remember ) - 1;\r
-                                               if (($remember[$last]['num'] == K_RLE) OR \r
-                                                         ($remember[$last]['num'] == K_LRE) OR \r
-                                                         ($remember[$last]['num'] == K_RLO) OR \r
-                                                         ($remember[$last]['num'] == K_LRO)) {\r
-                                                       $match = array_pop($remember);\r
-                                                       $cel = $match['cel'];\r
-                                                       $dos = $match['dos'];\r
-                                                       $sor = $eor;\r
-                                                       $eor = ($cel > $match['cel'] ? $cel : $match['cel']) % 2 ? 'R' : 'L';\r
-                                               }\r
-                                       }\r
-                               } elseif (($ta[$i] != K_RLE) AND\r
-                                                                ($ta[$i] != K_LRE) AND\r
-                                                                ($ta[$i] != K_RLO) AND\r
-                                                                ($ta[$i] != K_LRO) AND\r
-                                                                ($ta[$i] != K_PDF)) {\r
-                                       // X6. For all types besides RLE, LRE, RLO, LRO, and PDF:\r
-                                       //      a. Set the level of the current character to the current embedding level.\r
-                                       //      b. Whenever the directional override status is not neutral, reset the current character type to the directional override status.\r
-                                       if ($dos != 'N') {\r
-                                               $chardir = $dos;\r
-                                       } else {\r
-                                               $chardir = $unicode[$ta[$i]];\r
-                                       }\r
-                                       // stores string characters and other information\r
-                                       $chardata[] = array('char' => $ta[$i], 'level' => $cel, 'type' => $chardir, 'sor' => $sor, 'eor' => $eor);\r
-                               }\r
-                       } // end for each char\r
-                       \r
-                       // X8. All explicit directional embeddings and overrides are completely terminated at the end of each paragraph. Paragraph separators are not included in the embedding.\r
-                       // X9. Remove all RLE, LRE, RLO, LRO, PDF, and BN codes.\r
-                       // X10. The remaining rules are applied to each run of characters at the same level. For each run, determine the start-of-level-run (sor) and end-of-level-run (eor) type, either L or R. This depends on the higher of the two levels on either side of the boundary (at the start or end of the paragraph, the level of the 'other' run is the base embedding level). If the higher level is odd, the type is R; otherwise, it is L.\r
-                       \r
-                       // 3.3.3 Resolving Weak Types\r
-                       // Weak types are now resolved one level run at a time. At level run boundaries where the type of the character on the other side of the boundary is required, the type assigned to sor or eor is used.\r
-                       // Nonspacing marks are now resolved based on the previous characters.\r
-                       $numchars = count($chardata);\r
-                       \r
-                       // W1. Examine each nonspacing mark (NSM) in the level run, and change the type of the NSM to the type of the previous character. If the NSM is at the start of the level run, it will get the type of sor.\r
-                       $prevlevel = -1; // track level changes\r
-                       $levcount = 0; // counts consecutive chars at the same level\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               if ($chardata[$i]['type'] == 'NSM') {\r
-                                       if ($levcount) {\r
-                                               $chardata[$i]['type'] = $chardata[$i]['sor'];\r
-                                       } elseif ($i > 0) {\r
-                                               $chardata[$i]['type'] = $chardata[($i-1)]['type'];\r
-                                       }\r
-                               }\r
-                               if ($chardata[$i]['level'] != $prevlevel) {\r
-                                       $levcount = 0;\r
-                               } else {\r
-                                       ++$levcount;\r
-                               }\r
-                               $prevlevel = $chardata[$i]['level'];\r
-                       }\r
-                       \r
-                       // W2. Search backward from each instance of a European number until the first strong type (R, L, AL, or sor) is found. If an AL is found, change the type of the European number to Arabic number.\r
-                       $prevlevel = -1;\r
-                       $levcount = 0;\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               if ($chardata[$i]['char'] == 'EN') {\r
-                                       for ($j=$levcount; $j >= 0; $j--) {\r
-                                               if ($chardata[$j]['type'] == 'AL') {\r
-                                                       $chardata[$i]['type'] = 'AN';\r
-                                               } elseif (($chardata[$j]['type'] == 'L') OR ($chardata[$j]['type'] == 'R')) {\r
-                                                       break;\r
-                                               }\r
-                                       }\r
-                               }\r
-                               if ($chardata[$i]['level'] != $prevlevel) {\r
-                                       $levcount = 0;\r
-                               } else {\r
-                                       ++$levcount;\r
-                               }\r
-                               $prevlevel = $chardata[$i]['level'];\r
-                       }\r
-                       \r
-                       // W3. Change all ALs to R.\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               if ($chardata[$i]['type'] == 'AL') {\r
-                                       $chardata[$i]['type'] = 'R';\r
-                               } \r
-                       }\r
-                       \r
-                       // W4. A single European separator between two European numbers changes to a European number. A single common separator between two numbers of the same type changes to that type.\r
-                       $prevlevel = -1;\r
-                       $levcount = 0;\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               if (($levcount > 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) {\r
-                                       if (($chardata[$i]['type'] == 'ES') AND ($chardata[($i-1)]['type'] == 'EN') AND ($chardata[($i+1)]['type'] == 'EN')) {\r
-                                               $chardata[$i]['type'] = 'EN';\r
-                                       } elseif (($chardata[$i]['type'] == 'CS') AND ($chardata[($i-1)]['type'] == 'EN') AND ($chardata[($i+1)]['type'] == 'EN')) {\r
-                                               $chardata[$i]['type'] = 'EN';\r
-                                       } elseif (($chardata[$i]['type'] == 'CS') AND ($chardata[($i-1)]['type'] == 'AN') AND ($chardata[($i+1)]['type'] == 'AN')) {\r
-                                               $chardata[$i]['type'] = 'AN';\r
-                                       }\r
-                               }\r
-                               if ($chardata[$i]['level'] != $prevlevel) {\r
-                                       $levcount = 0;\r
-                               } else {\r
-                                       ++$levcount;\r
-                               }\r
-                               $prevlevel = $chardata[$i]['level'];\r
-                       }\r
-                       \r
-                       // W5. A sequence of European terminators adjacent to European numbers changes to all European numbers.\r
-                       $prevlevel = -1;\r
-                       $levcount = 0;\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               if ($chardata[$i]['type'] == 'ET') {\r
-                                       if (($levcount > 0) AND ($chardata[($i-1)]['type'] == 'EN')) {\r
-                                               $chardata[$i]['type'] = 'EN';\r
-                                       } else {\r
-                                               $j = $i+1;\r
-                                               while (($j < $numchars) AND ($chardata[$j]['level'] == $prevlevel)) {\r
-                                                       if ($chardata[$j]['type'] == 'EN') {\r
-                                                               $chardata[$i]['type'] = 'EN';\r
-                                                               break;\r
-                                                       } elseif ($chardata[$j]['type'] != 'ET') {\r
-                                                               break;\r
-                                                       }\r
-                                                       ++$j;\r
-                                               }\r
-                                       }\r
-                               }\r
-                               if ($chardata[$i]['level'] != $prevlevel) {\r
-                                       $levcount = 0;\r
-                               } else {\r
-                                       ++$levcount;\r
-                               }\r
-                               $prevlevel = $chardata[$i]['level'];\r
-                       }\r
-                       \r
-                       // W6. Otherwise, separators and terminators change to Other Neutral.\r
-                       $prevlevel = -1;\r
-                       $levcount = 0;\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               if (($chardata[$i]['type'] == 'ET') OR ($chardata[$i]['type'] == 'ES') OR ($chardata[$i]['type'] == 'CS')) {\r
-                                       $chardata[$i]['type'] = 'ON';\r
-                               }\r
-                               if ($chardata[$i]['level'] != $prevlevel) {\r
-                                       $levcount = 0;\r
-                               } else {\r
-                                       ++$levcount;\r
-                               }\r
-                               $prevlevel = $chardata[$i]['level'];\r
-                       }\r
-                       \r
-                       //W7. Search backward from each instance of a European number until the first strong type (R, L, or sor) is found. If an L is found, then change the type of the European number to L.\r
-                       $prevlevel = -1;\r
-                       $levcount = 0;\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               if ($chardata[$i]['char'] == 'EN') {\r
-                                       for ($j=$levcount; $j >= 0; $j--) {\r
-                                               if ($chardata[$j]['type'] == 'L') {\r
-                                                       $chardata[$i]['type'] = 'L';\r
-                                               } elseif ($chardata[$j]['type'] == 'R') {\r
-                                                       break;\r
-                                               }\r
-                                       }\r
-                               }\r
-                               if ($chardata[$i]['level'] != $prevlevel) {\r
-                                       $levcount = 0;\r
-                               } else {\r
-                                       ++$levcount;\r
-                               }\r
-                               $prevlevel = $chardata[$i]['level'];\r
-                       }\r
-                       \r
-                       // N1. A sequence of neutrals takes the direction of the surrounding strong text if the text on both sides has the same direction. European and Arabic numbers act as if they were R in terms of their influence on neutrals. Start-of-level-run (sor) and end-of-level-run (eor) are used at level run boundaries.\r
-                       $prevlevel = -1;\r
-                       $levcount = 0;\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               if (($levcount > 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) {\r
-                                       if (($chardata[$i]['type'] == 'N') AND ($chardata[($i-1)]['type'] == 'L') AND ($chardata[($i+1)]['type'] == 'L')) {\r
-                                               $chardata[$i]['type'] = 'L';\r
-                                       } elseif (($chardata[$i]['type'] == 'N') AND\r
-                                        (($chardata[($i-1)]['type'] == 'R') OR ($chardata[($i-1)]['type'] == 'EN') OR ($chardata[($i-1)]['type'] == 'AN')) AND\r
-                                        (($chardata[($i+1)]['type'] == 'R') OR ($chardata[($i+1)]['type'] == 'EN') OR ($chardata[($i+1)]['type'] == 'AN'))) {\r
-                                               $chardata[$i]['type'] = 'R';\r
-                                       } elseif ($chardata[$i]['type'] == 'N') {\r
-                                               // N2. Any remaining neutrals take the embedding direction\r
-                                               $chardata[$i]['type'] = $chardata[$i]['sor'];\r
-                                       }\r
-                               } elseif (($levcount == 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) {\r
-                                       // first char\r
-                                       if (($chardata[$i]['type'] == 'N') AND ($chardata[$i]['sor'] == 'L') AND ($chardata[($i+1)]['type'] == 'L')) {\r
-                                               $chardata[$i]['type'] = 'L';\r
-                                       } elseif (($chardata[$i]['type'] == 'N') AND\r
-                                        (($chardata[$i]['sor'] == 'R') OR ($chardata[$i]['sor'] == 'EN') OR ($chardata[$i]['sor'] == 'AN')) AND\r
-                                        (($chardata[($i+1)]['type'] == 'R') OR ($chardata[($i+1)]['type'] == 'EN') OR ($chardata[($i+1)]['type'] == 'AN'))) {\r
-                                               $chardata[$i]['type'] = 'R';\r
-                                       } elseif ($chardata[$i]['type'] == 'N') {\r
-                                               // N2. Any remaining neutrals take the embedding direction\r
-                                               $chardata[$i]['type'] = $chardata[$i]['sor'];\r
-                                       }\r
-                               } elseif (($levcount > 0) AND ((($i+1) == $numchars) OR (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] != $prevlevel))) {\r
-                                       //last char\r
-                                       if (($chardata[$i]['type'] == 'N') AND ($chardata[($i-1)]['type'] == 'L') AND ($chardata[$i]['eor'] == 'L')) {\r
-                                               $chardata[$i]['type'] = 'L';\r
-                                       } elseif (($chardata[$i]['type'] == 'N') AND\r
-                                        (($chardata[($i-1)]['type'] == 'R') OR ($chardata[($i-1)]['type'] == 'EN') OR ($chardata[($i-1)]['type'] == 'AN')) AND\r
-                                        (($chardata[$i]['eor'] == 'R') OR ($chardata[$i]['eor'] == 'EN') OR ($chardata[$i]['eor'] == 'AN'))) {\r
-                                               $chardata[$i]['type'] = 'R';\r
-                                       } elseif ($chardata[$i]['type'] == 'N') {\r
-                                               // N2. Any remaining neutrals take the embedding direction\r
-                                               $chardata[$i]['type'] = $chardata[$i]['sor'];\r
-                                       }\r
-                               } elseif ($chardata[$i]['type'] == 'N') {\r
-                                       // N2. Any remaining neutrals take the embedding direction\r
-                                       $chardata[$i]['type'] = $chardata[$i]['sor'];\r
-                               }\r
-                               if ($chardata[$i]['level'] != $prevlevel) {\r
-                                       $levcount = 0;\r
-                               } else {\r
-                                       ++$levcount;\r
-                               }\r
-                               $prevlevel = $chardata[$i]['level'];\r
-                       }\r
-                       \r
-                       // I1. For all characters with an even (left-to-right) embedding direction, those of type R go up one level and those of type AN or EN go up two levels.\r
-                       // I2. For all characters with an odd (right-to-left) embedding direction, those of type L, EN or AN go up one level.\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               $odd = $chardata[$i]['level'] % 2;\r
-                               if ($odd) {\r
-                                       if (($chardata[$i]['type'] == 'L') OR ($chardata[$i]['type'] == 'AN') OR ($chardata[$i]['type'] == 'EN')) {\r
-                                               $chardata[$i]['level'] += 1;\r
-                                       }\r
-                               } else {\r
-                                       if ($chardata[$i]['type'] == 'R') {\r
-                                               $chardata[$i]['level'] += 1;\r
-                                       } elseif (($chardata[$i]['type'] == 'AN') OR ($chardata[$i]['type'] == 'EN')) {\r
-                                               $chardata[$i]['level'] += 2;\r
-                                       }\r
-                               }\r
-                               $maxlevel = max($chardata[$i]['level'],$maxlevel);\r
-                       }\r
-                       \r
-                       // L1. On each line, reset the embedding level of the following characters to the paragraph embedding level:\r
-                       //      1. Segment separators,\r
-                       //      2. Paragraph separators,\r
-                       //      3. Any sequence of whitespace characters preceding a segment separator or paragraph separator, and\r
-                       //      4. Any sequence of white space characters at the end of the line.\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               if (($chardata[$i]['type'] == 'B') OR ($chardata[$i]['type'] == 'S')) {\r
-                                       $chardata[$i]['level'] = $pel;\r
-                               } elseif ($chardata[$i]['type'] == 'WS') {\r
-                                       $j = $i+1;\r
-                                       while ($j < $numchars) {\r
-                                               if ((($chardata[$j]['type'] == 'B') OR ($chardata[$j]['type'] == 'S')) OR\r
-                                                       (($j == ($numchars-1)) AND ($chardata[$j]['type'] == 'WS'))) {\r
-                                                       $chardata[$i]['level'] = $pel;\r
-                                                       break;\r
-                                               } elseif ($chardata[$j]['type'] != 'WS') {\r
-                                                       break;\r
-                                               }\r
-                                               ++$j;\r
-                                       }\r
-                               }\r
-                       }\r
-                       \r
-                       // Arabic Shaping\r
-                       // Cursively connected scripts, such as Arabic or Syriac, require the selection of positional character shapes that depend on adjacent characters. Shaping is logically applied after the Bidirectional Algorithm is used and is limited to characters within the same directional run. \r
-                       if ($arabic) {\r
-                               $endedletter = array(1569,1570,1571,1572,1573,1575,1577,1583,1584,1585,1586,1608,1688);\r
-                               $alfletter = array(1570,1571,1573,1575);\r
-                               $chardata2 = $chardata;\r
-                               $laaletter = false;\r
-                               $charAL = array();\r
-                               $x = 0;\r
-                               for ($i=0; $i < $numchars; ++$i) {\r
-                                       if (($unicode[$chardata[$i]['char']] == 'AL') OR ($chardata[$i]['char'] == 32) OR ($chardata[$i]['char'] == 8204)) {\r
-                                               $charAL[$x] = $chardata[$i];\r
-                                               $charAL[$x]['i'] = $i;\r
-                                               $chardata[$i]['x'] = $x;\r
-                                               ++$x;\r
-                                       }\r
-                               }\r
-                               $numAL = $x;\r
-                               for ($i=0; $i < $numchars; ++$i) {\r
-                                       $thischar = $chardata[$i];\r
-                                       if ($i > 0) {\r
-                                               $prevchar = $chardata[($i-1)];\r
-                                       } else {\r
-                                               $prevchar = false;\r
-                                       }\r
-                                       if (($i+1) < $numchars) {\r
-                                               $nextchar = $chardata[($i+1)];\r
-                                       } else {\r
-                                               $nextchar = false;\r
-                                       }\r
-                                       if ($unicode[$thischar['char']] == 'AL') {\r
-                                               $x = $thischar['x'];\r
-                                               if ($x > 0) {\r
-                                                       $prevchar = $charAL[($x-1)];\r
-                                               } else {\r
-                                                       $prevchar = false;\r
-                                               }\r
-                                               if (($x+1) < $numAL) {\r
-                                                       $nextchar = $charAL[($x+1)];\r
-                                               } else {\r
-                                                       $nextchar = false;\r
-                                               }\r
-                                               // if laa letter\r
-                                               if (($prevchar !== false) AND ($prevchar['char'] == 1604) AND (in_array($thischar['char'], $alfletter))) {\r
-                                                       $arabicarr = $laa_array;\r
-                                                       $laaletter = true;\r
-                                                       if ($x > 1) {\r
-                                                               $prevchar = $charAL[($x-2)];\r
-                                                       } else {\r
-                                                               $prevchar = false;\r
-                                                       }\r
-                                               } else {\r
-                                                       $arabicarr = $unicode_arlet;\r
-                                                       $laaletter = false;\r
-                                               }\r
-                                               if (($prevchar !== false) AND ($nextchar !== false) AND\r
-                                                       (($unicode[$prevchar['char']] == 'AL') OR ($unicode[$prevchar['char']] == 'NSM')) AND\r
-                                                       (($unicode[$nextchar['char']] == 'AL') OR ($unicode[$nextchar['char']] == 'NSM')) AND\r
-                                                       ($prevchar['type'] == $thischar['type']) AND\r
-                                                       ($nextchar['type'] == $thischar['type']) AND\r
-                                                       ($nextchar['char'] != 1567)) {\r
-                                                       if (in_array($prevchar['char'], $endedletter)) {\r
-                                                               if (isset($arabicarr[$thischar['char']][2])) {\r
-                                                                       // initial\r
-                                                                       $chardata2[$i]['char'] = $arabicarr[$thischar['char']][2];\r
-                                                               }\r
-                                                       } else {\r
-                                                               if (isset($arabicarr[$thischar['char']][3])) {\r
-                                                                       // medial\r
-                                                                       $chardata2[$i]['char'] = $arabicarr[$thischar['char']][3];\r
-                                                               }\r
-                                                       }\r
-                                               } elseif (($nextchar !== false) AND\r
-                                                       (($unicode[$nextchar['char']] == 'AL') OR ($unicode[$nextchar['char']] == 'NSM')) AND\r
-                                                       ($nextchar['type'] == $thischar['type']) AND\r
-                                                       ($nextchar['char'] != 1567)) {\r
-                                                       if (isset($arabicarr[$chardata[$i]['char']][2])) {\r
-                                                               // initial\r
-                                                               $chardata2[$i]['char'] = $arabicarr[$thischar['char']][2];\r
-                                                       }\r
-                                               } elseif ((($prevchar !== false) AND\r
-                                                       (($unicode[$prevchar['char']] == 'AL') OR ($unicode[$prevchar['char']] == 'NSM')) AND\r
-                                                       ($prevchar['type'] == $thischar['type'])) OR\r
-                                                       (($nextchar !== false) AND ($nextchar['char'] == 1567))) {\r
-                                                       // final\r
-                                                       if (($i > 1) AND ($thischar['char'] == 1607) AND\r
-                                                               ($chardata[$i-1]['char'] == 1604) AND\r
-                                                               ($chardata[$i-2]['char'] == 1604)) {\r
-                                                               //Allah Word\r
-                                                               // mark characters to delete with false\r
-                                                               $chardata2[$i-2]['char'] = false;\r
-                                                               $chardata2[$i-1]['char'] = false; \r
-                                                               $chardata2[$i]['char'] = 65010;\r
-                                                       } else {\r
-                                                               if (($prevchar !== false) AND in_array($prevchar['char'], $endedletter)) {\r
-                                                                       if (isset($arabicarr[$thischar['char']][0])) {\r
-                                                                               // isolated\r
-                                                                               $chardata2[$i]['char'] = $arabicarr[$thischar['char']][0];\r
-                                                                       }\r
-                                                               } else {\r
-                                                                       if (isset($arabicarr[$thischar['char']][1])) {\r
-                                                                               // final\r
-                                                                               $chardata2[$i]['char'] = $arabicarr[$thischar['char']][1];\r
-                                                                       }\r
-                                                               }\r
-                                                       }\r
-                                               } elseif (isset($arabicarr[$thischar['char']][0])) {\r
-                                                       // isolated\r
-                                                       $chardata2[$i]['char'] = $arabicarr[$thischar['char']][0];\r
-                                               }\r
-                                               // if laa letter\r
-                                               if ($laaletter) {\r
-                                                       // mark characters to delete with false\r
-                                                       $chardata2[($charAL[($x-1)]['i'])]['char'] = false;\r
-                                               }\r
-                                       } // end if AL (Arabic Letter)\r
-                               } // end for each char\r
-                               /* \r
-                                * Combining characters that can occur with Shadda (0651 HEX, 1617 DEC) are placed in UE586-UE594. \r
-                                * Putting the combining mark and shadda in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner.\r
-                                */\r
-                               $cw = &$this->CurrentFont['cw'];\r
-                               for ($i = 0; $i < ($numchars-1); ++$i) {\r
-                                       if (($chardata2[$i]['char'] == 1617) AND (isset($diacritics[($chardata2[$i+1]['char'])]))) {\r
-                                               // check if the subtitution font is defined on current font\r
-                                               if (isset($cw[($diacritics[($chardata2[$i+1]['char'])])])) {\r
-                                                       $chardata2[$i]['char'] = false;\r
-                                                       $chardata2[$i+1]['char'] = $diacritics[($chardata2[$i+1]['char'])];\r
-                                               }\r
-                                       }\r
-                               }\r
-                               // remove marked characters\r
-                               foreach ($chardata2 as $key => $value) {\r
-                                       if ($value['char'] === false) {\r
-                                               unset($chardata2[$key]);\r
-                                       }\r
-                               }\r
-                               $chardata = array_values($chardata2);\r
-                               $numchars = count($chardata);\r
-                               unset($chardata2);\r
-                               unset($arabicarr);\r
-                               unset($laaletter);\r
-                               unset($charAL);\r
-                       }\r
-                       \r
-                       // L2. From the highest level found in the text to the lowest odd level on each line, including intermediate levels not actually present in the text, reverse any contiguous sequence of characters that are at that level or higher.\r
-                       for ($j=$maxlevel; $j > 0; $j--) {\r
-                               $ordarray = Array();\r
-                               $revarr = Array();\r
-                               $onlevel = false;\r
-                               for ($i=0; $i < $numchars; ++$i) {\r
-                                       if ($chardata[$i]['level'] >= $j) {\r
-                                               $onlevel = true;\r
-                                               if (isset($unicode_mirror[$chardata[$i]['char']])) {\r
-                                                       // L4. A character is depicted by a mirrored glyph if and only if (a) the resolved directionality of that character is R, and (b) the Bidi_Mirrored property value of that character is true.\r
-                                                       $chardata[$i]['char'] = $unicode_mirror[$chardata[$i]['char']];\r
-                                               }\r
-                                               $revarr[] = $chardata[$i];\r
-                                       } else {\r
-                                               if ($onlevel) {\r
-                                                       $revarr = array_reverse($revarr);\r
-                                                       $ordarray = array_merge($ordarray, $revarr);\r
-                                                       $revarr = Array();\r
-                                                       $onlevel = false;\r
-                                               }\r
-                                               $ordarray[] = $chardata[$i];\r
-                                       }\r
-                               }\r
-                               if ($onlevel) {\r
-                                       $revarr = array_reverse($revarr);\r
-                                       $ordarray = array_merge($ordarray, $revarr);\r
-                               }\r
-                               $chardata = $ordarray;\r
-                       }\r
-                       \r
-                       $ordarray = array();\r
-                       for ($i=0; $i < $numchars; ++$i) {\r
-                               $ordarray[] = $chardata[$i]['char'];\r
-                       }
-                       \r
-                       return $ordarray;\r
-               }\r
-               \r
-               // END OF BIDIRECTIONAL TEXT SECTION -------------------\r
-               \r
-               /*\r
-               * Adds a bookmark.\r
-               * @param string $txt bookmark description.\r
-               * @param int $level bookmark level (minimum value is 0).\r
-               * @param float $y Ordinate of the boorkmark position (default = -1 = current position).
-               * @param int $page target page number (leave empty for current page).\r
-               * @access public\r
-               * @author Olivier Plathey, Nicola Asuni\r
-               * @since 2.1.002 (2008-02-12)\r
-               */\r
-               public function Bookmark($txt, $level=0, $y=-1, $page='') {\r
-                       if ($level < 0) {
-                               $level = 0;
+                * Get current barcode.
+                * @return string
+                * @access public
+                * @since 4.0.012 (2008-07-24)
+                */
+               public function getBarcode() {
+                       return $this->barcode;
+               }
+               
+               /**
+                * Print a Linear Barcode.
+                * @param string $code code to print
+                * @param string $type type of barcode.
+                * @param int $x x position in user units
+                * @param int $y y position in user units
+                * @param int $w width in user units
+                * @param int $h height in user units
+                * @param float $xres width of the smallest bar in user units
+                * @param array $style array of options:<ul><li>string $style['position'] barcode position inside the specified width: L = left (default for LTR); C = center; R = right (default for RTL); S = stretch</li><li>boolean $style['border'] if true prints a border around the barcode</li><li>int $style['padding'] padding to leave around the barcode in user units</li><li>array $style['fgcolor'] color array for bars and text</li><li>mixed $style['bgcolor'] color array for background or false for transparent</li><li>boolean $style["text"] boolean if true prints text below the barcode</li><li>string $style['font'] font name for text</li><li>int $style['fontsize'] font size for text</li><li>int $style['stretchtext']: 0 = disabled; 1 = horizontal scaling only if necessary; 2 = forced horizontal scaling; 3 = character spacing only if necessary; 4 = forced character spacing</li></ul>
+                * @param string $align Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>
+                * @author Nicola Asuni
+                * @since 3.1.000 (2008-06-09)
+                * @access public
+                */
+               public function write1DBarcode($code, $type, $x='', $y='', $w='', $h='', $xres=0.4, $style='', $align='') {
+                       if ($this->empty_string($code)) {
+                               return;
                        }
-                       if (isset($this->outlines[0])) {
-                               $lastoutline = end($this->outlines);
-                               $maxlevel = $lastoutline['l'] + 1;
-                       } else {
-                               $maxlevel = 0;
+                       require_once(dirname(__FILE__).'/barcodes.php');
+                       // save current graphic settings
+                       $gvars = $this->getGraphicVars();
+                       // create new barcode object
+                       $barcodeobj = new TCPDFBarcode($code, $type);
+                       $arrcode = $barcodeobj->getBarcodeArray();
+                       if ($arrcode === false) {
+                               $this->Error('Error in 1D barcode string');
+                       }
+                       // set default values
+                       if (!isset($style['position'])) {
+                               if ($this->rtl) {
+                                       $style['position'] = 'R';
+                               } else {
+                                       $style['position'] = 'L';
+                               }
                        }
-                       if ($level > $maxlevel) {
-                               $level = $maxlevel;
+                       if (!isset($style['padding'])) {
+                               $style['padding'] = 0;
                        }
-                       if ($y == -1) {\r
-                               $y = $this->GetY();\r
+                       if (!isset($style['fgcolor'])) {
+                               $style['fgcolor'] = array(0,0,0); // default black
                        }
-                       if (empty($page)) {
-                               $page = $this->PageNo();
-                       }\r
-                       $this->outlines[] = array('t' => $txt, 'l' => $level, 'y' => $y, 'p' => $page);\r
-               }\r
-               \r
-               /*\r
-               * Create a bookmark PDF string.\r
-               * @access protected\r
-               * @author Olivier Plathey, Nicola Asuni\r
-               * @since 2.1.002 (2008-02-12)\r
-               */\r
-               protected function _putbookmarks() {\r
-                       $nb = count($this->outlines);\r
-                       if ($nb == 0) {\r
-                               return;\r
-                       }\r
-                       $lru = array();\r
-                       $level = 0;\r
-                       foreach ($this->outlines as $i => $o) {\r
-                               if ($o['l'] > 0) {\r
-                                       $parent = $lru[($o['l'] - 1)];\r
-                                       //Set parent and last pointers\r
-                                       $this->outlines[$i]['parent'] = $parent;\r
-                                       $this->outlines[$parent]['last'] = $i;\r
-                                       if ($o['l'] > $level) {\r
-                                               //Level increasing: set first pointer\r
-                                               $this->outlines[$parent]['first'] = $i;\r
-                                       }\r
-                               } else {\r
-                                       $this->outlines[$i]['parent'] = $nb;\r
-                               }\r
-                               if (($o['l'] <= $level) AND ($i > 0)) {\r
-                                       //Set prev and next pointers\r
-                                       $prev = $lru[$o['l']];\r
-                                       $this->outlines[$prev]['next'] = $i;\r
-                                       $this->outlines[$i]['prev'] = $prev;\r
-                               }\r
-                               $lru[$o['l']] = $i;\r
-                               $level = $o['l'];\r
-                       }\r
-                       //Outline items\r
-                       $n = $this->n + 1;\r
-                       foreach ($this->outlines as $i => $o) {\r
-                               $this->_newobj();\r
-                               $this->_out('<</Title '.$this->_textstring($o['t']));\r
-                               $this->_out('/Parent '.($n + $o['parent']).' 0 R');\r
-                               if (isset($o['prev']))\r
-                               $this->_out('/Prev '.($n + $o['prev']).' 0 R');\r
-                               if (isset($o['next']))\r
-                               $this->_out('/Next '.($n + $o['next']).' 0 R');\r
-                               if (isset($o['first']))\r
-                               $this->_out('/First '.($n + $o['first']).' 0 R');\r
-                               if (isset($o['last']))\r
-                               $this->_out('/Last '.($n + $o['last']).' 0 R');\r
-                               $this->_out(sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]', (1 + (2 * $o['p'])), ($this->pagedim[$o['p']]['h'] - ($o['y'] * $this->k))));\r
-                               $this->_out('/Count 0>>');\r
-                               $this->_out('endobj');\r
-                       }\r
-                       //Outline root\r
-                       $this->_newobj();\r
-                       $this->OutlineRoot = $this->n;\r
-                       $this->_out('<</Type /Outlines /First '.$n.' 0 R');\r
-                       $this->_out('/Last '.($n + $lru[0]).' 0 R>>');\r
-                       $this->_out('endobj');\r
-               }\r
-               \r
-               \r
-               // --- JAVASCRIPT - FORMS ------------------------------\r
-               \r
-               /*\r
-               * Adds a javascript\r
-               * @access public\r
-               * @author Johannes Güntert, Nicola Asuni\r
-               * @since 2.1.002 (2008-02-12)\r
-               */\r
-               public function IncludeJS($script) {\r
-                       $this->javascript .= $script;\r
-               }\r
-               \r
-               /*\r
-               * Create a javascript PDF string.\r
-               * @access protected\r
-               * @author Johannes Güntert, Nicola Asuni\r
-               * @since 2.1.002 (2008-02-12)\r
-               */\r
-               protected function _putjavascript() {\r
-                       if (empty($this->javascript)) {\r
-                               return;\r
-                       }
-                       // the following two lines are uded to avoid form fields duplication after saving
-                       $js1 = sprintf("ftcpdfdocsaved=this.addField('%s','%s',%d,[%.2F,%.2F,%.2F,%.2F]);", 'tcpdfdocsaved', 'text', 0, 0, 1, 0, 1);
-                       $js2 = "getField('tcpdfdocsaved').value = 'saved';";\r
-                       $this->_newobj();\r
-                       $this->n_js = $this->n;\r
-                       $this->_out('<<');\r
-                       $this->_out('/Names [(EmbeddedJS) '.($this->n + 1).' 0 R ]');\r
-                       $this->_out('>>');\r
-                       $this->_out('endobj');\r
-                       $this->_newobj();\r
-                       $this->_out('<<');\r
-                       $this->_out('/S /JavaScript');\r
-                       $this->_out('/JS '.$this->_textstring($js1."\n".$this->javascript."\n".$js2));\r
-                       $this->_out('>>');\r
-                       $this->_out('endobj');\r
-               }\r
-               \r
-               /*\r
-               * Convert color to javascript color.\r
-               * @param string $color color name or #RRGGBB\r
-               * @access protected\r
-               * @author Denis Van Nuffelen, Nicola Asuni\r
-               * @since 2.1.002 (2008-02-12)\r
-               */\r
-               protected function _JScolor($color) {\r
-                       static $aColors = array('transparent', 'black', 'white', 'red', 'green', 'blue', 'cyan', 'magenta', 'yellow', 'dkGray', 'gray', 'ltGray');\r
-                       if (substr($color,0,1) == '#') {\r
-                               return sprintf("['RGB',%.3F,%.3F,%.3F]", hexdec(substr($color,1,2))/255, hexdec(substr($color,3,2))/255, hexdec(substr($color,5,2))/255);\r
-                       }\r
-                       if (!in_array($color,$aColors)) {\r
-                               $this->Error('Invalid color: '.$color);\r
-                       }\r
-                       return 'color.'.$color;\r
-               }\r
-               \r
-               /*\r
-               * Adds a javascript form field.\r
-               * @param string $type field type\r
-               * @param string $name field name\r
-               * @param int $x horizontal position\r
-               * @param int $y vertical position\r
-               * @param int $w width\r
-               * @param int $h height\r
-               * @param array $prop array of properties. Possible values are (http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf): <ul><li>rect: Position and size of field on page.</li><li>borderStyle: Rectangle border appearance.</li><li>strokeColor: Color of bounding rectangle.</li><li>lineWidth: Width of the edge of the surrounding rectangle.</li><li>rotation: Rotation of field in 90-degree increments.</li><li>fillColor: Background color of field (gray, transparent, RGB, or CMYK).</li><li>userName: Short description of field that appears on mouse-over.</li><li>readonly: Whether the user may change the field contents.</li><li>doNotScroll: Whether text fields may scroll.</li><li>display: Whether visible or hidden on screen or in print.</li><li>textFont: Text font.</li><li>textColor: Text color.</li><li>textSize: Text size.</li><li>richText: Rich text.</li><li>richValue: Text.</li><li>comb: Text comb format.</li><li>multiline: Text multiline.</li><li>charLimit: Text limit to number of characters.</li><li>fileSelect: Text file selection format.</li><li>password: Text password format.</li><li>alignment: Text layout in text fields.</li><li>buttonAlignX: X alignment of icon on button face.</li><li>buttonAlignY: Y alignment of icon on button face.</li><li>buttonFitBounds: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleHow: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleWhen: Relative scaling of an icon to fit inside a button face.</li><li>highlight: Appearance of a button when pushed.</li><li>style: Glyph style for checkbox and radio buttons.</li><li>numItems: Number of items in a combo box or list box.</li><li>editable: Whether the user can type in a combo box.</li><li>multipleSelection: Whether multiple list box items may be selected.</li></ul>\r
-               * @access protected\r
-               * @author Denis Van Nuffelen, Nicola Asuni\r
-               * @since 2.1.002 (2008-02-12)\r
-               */\r
-               protected function _addfield($type, $name, $x, $y, $w, $h, $prop) {
-                       if ($this->rtl) {\r
-                               $x = $x - $w;\r
+                       if (!isset($style['bgcolor'])) {
+                               $style['bgcolor'] = false; // default transparent
                        }
-                       // the followind avoid fields duplication after saving the document
-                       $this->javascript .= "if(getField('tcpdfdocsaved').value != 'saved') {";\r
-                       $k = $this->k;\r
-                       $this->javascript .= sprintf("f".$name."=this.addField('%s','%s',%d,[%.2F,%.2F,%.2F,%.2F]);", $name, $type, $this->PageNo()-1, $x*$k, ($this->h-$y)*$k+1, ($x+$w)*$k, ($this->h-$y-$h)*$k+1)."\n";\r
-                       $this->javascript .= 'f'.$name.'.textSize='.$this->FontSizePt.";\n";\r
-                       while (list($key, $val) = each($prop)) {\r
-                               if (strcmp(substr($key, -5), 'Color') == 0) {\r
-                                       $val = $this->_JScolor($val);\r
-                               } else {\r
-                                       $val = "'".$val."'";\r
-                               }\r
-                               $this->javascript .= 'f'.$name.'.'.$key.'='.$val.";\n";\r
-                       }
-                       if ($this->rtl) {\r
-                               $this->x -= $w;\r
-                       } else {\r
-                               $this->x += $w;
+                       if (!isset($style['border'])) {
+                               $style['border'] = false;
                        }
-                       $this->javascript .= '}';\r
-               }\r
-               \r
-               /*\r
-               * Creates a text field\r
-               * @param string $name field name\r
-               * @param int $w width\r
-               * @param int $h height\r
-               * @param string $prop properties. The value property allows to set the initial value. The multiline property allows to define the field as multiline. Possible values are (http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf): <ul><li>rect: Position and size of field on page.</li><li>borderStyle: Rectangle border appearance.</li><li>strokeColor: Color of bounding rectangle.</li><li>lineWidth: Width of the edge of the surrounding rectangle.</li><li>rotation: Rotation of field in 90-degree increments.</li><li>fillColor: Background color of field (gray, transparent, RGB, or CMYK).</li><li>userName: Short description of field that appears on mouse-over.</li><li>readonly: Whether the user may change the field contents.</li><li>doNotScroll: Whether text fields may scroll.</li><li>display: Whether visible or hidden on screen or in print.</li><li>textFont: Text font.</li><li>textColor: Text color.</li><li>textSize: Text size.</li><li>richText: Rich text.</li><li>richValue: Text.</li><li>comb: Text comb format.</li><li>multiline: Text multiline.</li><li>charLimit: Text limit to number of characters.</li><li>fileSelect: Text file selection format.</li><li>password: Text password format.</li><li>alignment: Text layout in text fields.</li><li>buttonAlignX: X alignment of icon on button face.</li><li>buttonAlignY: Y alignment of icon on button face.</li><li>buttonFitBounds: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleHow: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleWhen: Relative scaling of an icon to fit inside a button face.</li><li>highlight: Appearance of a button when pushed.</li><li>style: Glyph style for checkbox and radio buttons.</li><li>numItems: Number of items in a combo box or list box.</li><li>editable: Whether the user can type in a combo box.</li><li>multipleSelection: Whether multiple list box items may be selected.</li></ul>\r
-               * @access public\r
-               * @author Denis Van Nuffelen, Nicola Asuni\r
-               * @since 2.1.002 (2008-02-12)\r
-               */\r
-               public function TextField($name, $w, $h, $prop=array()) {\r
-                       $this->_addfield('text', $name, $this->x, $this->y, $w, $h, $prop);\r
-               }\r
-               \r
-               /*\r
-               * Creates a RadioButton field\r
-               * @param string $name field name\r
-               * @param int $w width\r
-               * @param string $prop properties. Possible values are (http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf): <ul><li>rect: Position and size of field on page.</li><li>borderStyle: Rectangle border appearance.</li><li>strokeColor: Color of bounding rectangle.</li><li>lineWidth: Width of the edge of the surrounding rectangle.</li><li>rotation: Rotation of field in 90-degree increments.</li><li>fillColor: Background color of field (gray, transparent, RGB, or CMYK).</li><li>userName: Short description of field that appears on mouse-over.</li><li>readonly: Whether the user may change the field contents.</li><li>doNotScroll: Whether text fields may scroll.</li><li>display: Whether visible or hidden on screen or in print.</li><li>textFont: Text font.</li><li>textColor: Text color.</li><li>textSize: Text size.</li><li>richText: Rich text.</li><li>richValue: Text.</li><li>comb: Text comb format.</li><li>multiline: Text multiline.</li><li>charLimit: Text limit to number of characters.</li><li>fileSelect: Text file selection format.</li><li>password: Text password format.</li><li>alignment: Text layout in text fields.</li><li>buttonAlignX: X alignment of icon on button face.</li><li>buttonAlignY: Y alignment of icon on button face.</li><li>buttonFitBounds: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleHow: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleWhen: Relative scaling of an icon to fit inside a button face.</li><li>highlight: Appearance of a button when pushed.</li><li>style: Glyph style for checkbox and radio buttons.</li><li>numItems: Number of items in a combo box or list box.</li><li>editable: Whether the user can type in a combo box.</li><li>multipleSelection: Whether multiple list box items may be selected.</li></ul>\r
-               * @access public\r
-               * @author Nicola Asuni\r
-               * @since 2.2.003 (2008-03-03)\r
-               */\r
-               public function RadioButton($name, $w, $prop=array()) {\r
-                       if (!isset($prop['strokeColor'])) {\r
-                               $prop['strokeColor']='black';\r
-                       }\r
-                       $this->_addfield('radiobutton', $name, $this->x, $this->y, $w, $w, $prop);\r
-               }\r
-               \r
-               /*\r
-               * Creates a List-box field\r
-               * @param string $name field name\r
-               * @param int $w width\r
-               * @param int $h height\r
-               * @param array $values array containing the list of values.\r
-               * @param string $prop properties. Possible values are (http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf): <ul><li>rect: Position and size of field on page.</li><li>borderStyle: Rectangle border appearance.</li><li>strokeColor: Color of bounding rectangle.</li><li>lineWidth: Width of the edge of the surrounding rectangle.</li><li>rotation: Rotation of field in 90-degree increments.</li><li>fillColor: Background color of field (gray, transparent, RGB, or CMYK).</li><li>userName: Short description of field that appears on mouse-over.</li><li>readonly: Whether the user may change the field contents.</li><li>doNotScroll: Whether text fields may scroll.</li><li>display: Whether visible or hidden on screen or in print.</li><li>textFont: Text font.</li><li>textColor: Text color.</li><li>textSize: Text size.</li><li>richText: Rich text.</li><li>richValue: Text.</li><li>comb: Text comb format.</li><li>multiline: Text multiline.</li><li>charLimit: Text limit to number of characters.</li><li>fileSelect: Text file selection format.</li><li>password: Text password format.</li><li>alignment: Text layout in text fields.</li><li>buttonAlignX: X alignment of icon on button face.</li><li>buttonAlignY: Y alignment of icon on button face.</li><li>buttonFitBounds: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleHow: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleWhen: Relative scaling of an icon to fit inside a button face.</li><li>highlight: Appearance of a button when pushed.</li><li>style: Glyph style for checkbox and radio buttons.</li><li>numItems: Number of items in a combo box or list box.</li><li>editable: Whether the user can type in a combo box.</li><li>multipleSelection: Whether multiple list box items may be selected.</li></ul>\r
-               * @access public\r
-               * @author Nicola Asuni\r
-               * @since 2.2.003 (2008-03-03)\r
-               */\r
-               public function ListBox($name, $w, $h, $values, $prop=array()) {\r
-                       if (!isset($prop['strokeColor'])) {\r
-                               $prop['strokeColor'] = 'ltGray';\r
-                       }\r
-                       $this->_addfield('listbox', $name, $this->x, $this->y, $w, $h, $prop);\r
-                       $s = '';\r
-                       foreach ($values as $value) {\r
-                               $s .= "'".addslashes($value)."',";\r
-                       }\r
-                       $this->javascript .= 'f'.$name.'.setItems(['.substr($s, 0, -1)."]);\n";\r
-               }\r
-               \r
-               /*\r
-               * Creates a Combo-box field\r
-               * @param string $name field name\r
-               * @param int $w width\r
-               * @param int $h height\r
-               * @param array $values array containing the list of values.\r
-               * @param string $prop properties. Possible values are (http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf): <ul><li>rect: Position and size of field on page.</li><li>borderStyle: Rectangle border appearance.</li><li>strokeColor: Color of bounding rectangle.</li><li>lineWidth: Width of the edge of the surrounding rectangle.</li><li>rotation: Rotation of field in 90-degree increments.</li><li>fillColor: Background color of field (gray, transparent, RGB, or CMYK).</li><li>userName: Short description of field that appears on mouse-over.</li><li>readonly: Whether the user may change the field contents.</li><li>doNotScroll: Whether text fields may scroll.</li><li>display: Whether visible or hidden on screen or in print.</li><li>textFont: Text font.</li><li>textColor: Text color.</li><li>textSize: Text size.</li><li>richText: Rich text.</li><li>richValue: Text.</li><li>comb: Text comb format.</li><li>multiline: Text multiline.</li><li>charLimit: Text limit to number of characters.</li><li>fileSelect: Text file selection format.</li><li>password: Text password format.</li><li>alignment: Text layout in text fields.</li><li>buttonAlignX: X alignment of icon on button face.</li><li>buttonAlignY: Y alignment of icon on button face.</li><li>buttonFitBounds: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleHow: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleWhen: Relative scaling of an icon to fit inside a button face.</li><li>highlight: Appearance of a button when pushed.</li><li>style: Glyph style for checkbox and radio buttons.</li><li>numItems: Number of items in a combo box or list box.</li><li>editable: Whether the user can type in a combo box.</li><li>multipleSelection: Whether multiple list box items may be selected.</li></ul>\r
-               * @access public\r
-               * @author Denis Van Nuffelen, Nicola Asuni\r
-               * @since 2.1.002 (2008-02-12)\r
-               */\r
-               public function ComboBox($name, $w, $h, $values, $prop=array()) {\r
-                       $this->_addfield('combobox', $name, $this->x, $this->y, $w, $h, $prop);\r
-                       $s = '';\r
-                       foreach ($values as $value) {\r
-                               $s .= "'".addslashes($value)."',";\r
-                       }\r
-                       $this->javascript .= 'f'.$name.'.setItems(['.substr($s, 0, -1)."]);\n";\r
-               }\r
-               \r
-               /*\r
-               * Creates a CheckBox field\r
-               * @param string $name field name\r
-               * @param int $w width\r
-               * @param boolean $checked define the initial state (default = false).\r
-               * @param string $prop properties. Possible values are (http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf): <ul><li>rect: Position and size of field on page.</li><li>borderStyle: Rectangle border appearance.</li><li>strokeColor: Color of bounding rectangle.</li><li>lineWidth: Width of the edge of the surrounding rectangle.</li><li>rotation: Rotation of field in 90-degree increments.</li><li>fillColor: Background color of field (gray, transparent, RGB, or CMYK).</li><li>userName: Short description of field that appears on mouse-over.</li><li>readonly: Whether the user may change the field contents.</li><li>doNotScroll: Whether text fields may scroll.</li><li>display: Whether visible or hidden on screen or in print.</li><li>textFont: Text font.</li><li>textColor: Text color.</li><li>textSize: Text size.</li><li>richText: Rich text.</li><li>richValue: Text.</li><li>comb: Text comb format.</li><li>multiline: Text multiline.</li><li>charLimit: Text limit to number of characters.</li><li>fileSelect: Text file selection format.</li><li>password: Text password format.</li><li>alignment: Text layout in text fields.</li><li>buttonAlignX: X alignment of icon on button face.</li><li>buttonAlignY: Y alignment of icon on button face.</li><li>buttonFitBounds: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleHow: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleWhen: Relative scaling of an icon to fit inside a button face.</li><li>highlight: Appearance of a button when pushed.</li><li>style: Glyph style for checkbox and radio buttons.</li><li>numItems: Number of items in a combo box or list box.</li><li>editable: Whether the user can type in a combo box.</li><li>multipleSelection: Whether multiple list box items may be selected.</li></ul>\r
-               * @access public\r
-               * @author Denis Van Nuffelen, Nicola Asuni\r
-               * @since 2.1.002 (2008-02-12)\r
-               */\r
-               public function CheckBox($name, $w, $checked=false, $prop=array()) {\r
-                       $prop['value'] = ($checked ? 'Yes' : 'Off');\r
-                       if (!isset($prop['strokeColor'])) {\r
-                               $prop['strokeColor'] = 'black';\r
-                       }\r
-                       $this->_addfield('checkbox', $name, $this->x, $this->y, $w, $w, $prop);\r
-               }\r
-               \r
-               /*\r
-               * Creates a button field\r
-               * @param string $name field name\r
-               * @param int $w width\r
-               * @param int $h height\r
-               * @param string $caption caption.\r
-               * @param string $action action triggered by the button (JavaScript code).\r
-               * @param string $prop properties. Possible values are (http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf): <ul><li>rect: Position and size of field on page.</li><li>borderStyle: Rectangle border appearance.</li><li>strokeColor: Color of bounding rectangle.</li><li>lineWidth: Width of the edge of the surrounding rectangle.</li><li>rotation: Rotation of field in 90-degree increments.</li><li>fillColor: Background color of field (gray, transparent, RGB, or CMYK).</li><li>userName: Short description of field that appears on mouse-over.</li><li>readonly: Whether the user may change the field contents.</li><li>doNotScroll: Whether text fields may scroll.</li><li>display: Whether visible or hidden on screen or in print.</li><li>textFont: Text font.</li><li>textColor: Text color.</li><li>textSize: Text size.</li><li>richText: Rich text.</li><li>richValue: Text.</li><li>comb: Text comb format.</li><li>multiline: Text multiline.</li><li>charLimit: Text limit to number of characters.</li><li>fileSelect: Text file selection format.</li><li>password: Text password format.</li><li>alignment: Text layout in text fields.</li><li>buttonAlignX: X alignment of icon on button face.</li><li>buttonAlignY: Y alignment of icon on button face.</li><li>buttonFitBounds: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleHow: Relative scaling of an icon to fit inside a button face.</li><li>buttonScaleWhen: Relative scaling of an icon to fit inside a button face.</li><li>highlight: Appearance of a button when pushed.</li><li>style: Glyph style for checkbox and radio buttons.</li><li>numItems: Number of items in a combo box or list box.</li><li>editable: Whether the user can type in a combo box.</li><li>multipleSelection: Whether multiple list box items may be selected.</li></ul>\r
-               * @access public\r
-               * @author Denis Van Nuffelen, Nicola Asuni\r
-               * @since 2.1.002 (2008-02-12)\r
-               */\r
-               public function Button($name, $w, $h, $caption, $action, $prop=array()) {\r
-                       if (!isset($prop['strokeColor'])) {\r
-                               $prop['strokeColor'] = 'black';\r
-                       }\r
-                       if (!isset($prop['borderStyle'])) {\r
-                               $prop['borderStyle'] = 'beveled';\r
-                       }\r
-                       $this->_addfield('button', $name, $this->x, $this->y, $w, $h, $prop);\r
-                       $this->javascript .= 'f'.$name.".buttonSetCaption('".addslashes($caption)."');\n";\r
-                       $this->javascript .= 'f'.$name.".setAction('MouseUp','".addslashes($action)."');\n";\r
-                       $this->javascript .= 'f'.$name.".highlight='push';\n";\r
-                       $this->javascript .= 'f'.$name.".print=false;\n";\r
-               }\r
-               \r
-               // END JAVASCRIPT - FORMS ------------------------------\r
-               \r
-               /*\r
-               * Enable Write permissions for PDF Reader.
-               * WARNING: This works only using the Adobe private key with the setSignature() method.\r
-               * @access protected\r
-               * @author Nicola Asuni\r
-               * @since 2.9.000 (2008-03-26)\r
-               */\r
-               protected function _putuserrights() {
-                       if ((!$this->sign) OR (isset($this->signature_data['cert_type']) AND ($this->signature_data['cert_type'] > 0))) {\r
-                               return;\r
-                       }\r
-                       $this->_out('/Perms');\r
-                       $this->_out('<<');\r
-                       $this->_out('/UR3');\r
-                       $this->_out('<<');
-                       $this->_out('/Type/Sig');
-                       $this->_out('/Filter/Adobe.PPKLite');
-                       $this->_out('/SubFilter/adbe.pkcs7.detached');
-                       $this->_out('/ByteRange[0 ********** ********** **********]');
-                       $this->_out('/Contents<>'.str_repeat(' ', $this->signature_max_lenght));
-                       if ($this->ur) {
-                               $this->_out('/Reference');
-                               $this->_out('[');
-                               $this->_out('<<');
-                               $this->_out('/Type/SigRef');
-                               $this->_out('/TransformMethod/UR3');\r
-                               $this->_out('/TransformParams');\r
-                               $this->_out('<<');\r
-                               $this->_out('/Type/TransformParams');\r
-                               $this->_out('/V/2.2');\r
-                               if (!$this->empty_string($this->ur_document)) {\r
-                                       $this->_out('/Document['.$this->ur_document.']');\r
-                               }\r
-                               if (!$this->empty_string($this->ur_annots)) {\r
-                                       $this->_out('/Annots['.$this->ur_annots.']');\r
-                               }\r
-                               if (!$this->empty_string($this->ur_form)) {\r
-                                       $this->_out('/Form['.$this->ur_form.']');\r
-                               }\r
-                               if (!$this->empty_string($this->ur_signature)) {\r
-                                       $this->_out('/Signature['.$this->ur_signature.']');\r
-                               }                       \r
-                               $this->_out('>>');\r
-                               $this->_out('>>');\r
-                               $this->_out(']');
-                       }
-                       $this->_out('/M '.$this->_datastring('D:'.date('YmdHisO')));\r
-                       $this->_out('>>');\r
-                       $this->_out('>>');\r
-               }\r
-               
-               /*\r
-               * Add certification signature (DocMDP)\r
-               * @access protected\r
-               * @author Nicola Asuni\r
-               * @since 4.6.008 (2009-05-07)\r
-               */\r
-               protected function _putcertification() {
-                       if ((!$this->sign) OR (isset($this->signature_data['cert_type']) AND ($this->signature_data['cert_type'] <= 0))) {\r
-                               return;\r
-                       }\r
-                       $this->_out('/Perms');\r
-                       $this->_out('<<');\r
-                       $this->_out('/DocMDP');\r
-                       $this->_out('<<');
-                       $this->_out('/Type/Sig');
-                       $this->_out('/Filter/Adobe.PPKLite');
-                       $this->_out('/SubFilter/adbe.pkcs7.detached');
-                       $this->_out('/ByteRange[0 ********** ********** **********]');
-                       $this->_out('/Contents<>'.str_repeat(' ', $this->signature_max_lenght));
-                       $this->_out('/Reference');
-                       $this->_out('[');
-                       $this->_out('<<');
-                       $this->_out('/Type/SigRef');
-                       $this->_out('/TransformMethod/DocMDP');\r
-                       $this->_out('/TransformParams');\r
-                       $this->_out('<<');\r
-                       $this->_out('/Type/TransformParams');\r
-                       $this->_out('/V/1.2');\r
-                       $this->_out('/P '.$this->signature_data['cert_type'].'');\r
-                       $this->_out('>>');\r
-                       $this->_out('>>');\r
-                       $this->_out(']');
-                       $this->_out('/M '.$this->_datastring('D:'.date('YmdHisO')));
-                       if (isset($this->signature_data['info']['Name']) AND !$this->empty_string($this->signature_data['info']['Name'])) {\r
-                               $this->_out('/Name '.$this->_textstring($this->signature_data['info']['Name']).'');\r
+                       $fontsize = 0;
+                       if (!isset($style['text'])) {
+                               $style['text'] = false;
                        }
-                       if (isset($this->signature_data['info']['Location']) AND !$this->empty_string($this->signature_data['info']['Location'])) {\r
-                               $this->_out('/Location '.$this->_textstring($this->signature_data['info']['Location']).'');\r
+                       if ($style['text'] AND isset($style['font'])) {
+                               if (isset($style['fontsize'])) {
+                                       $fontsize = $style['fontsize'];
+                               }
+                               $this->SetFont($style['font'], '', $fontsize);
                        }
-                       if (isset($this->signature_data['info']['Reason']) AND !$this->empty_string($this->signature_data['info']['Reason'])) {\r
-                               $this->_out('/Reason '.$this->_textstring($this->signature_data['info']['Reason']).'');\r
+                       if (!isset($style['stretchtext'])) {
+                               $style['stretchtext'] = 4;
                        }
-                       if (isset($this->signature_data['info']['ContactInfo']) AND !$this->empty_string($this->signature_data['info']['ContactInfo'])) {\r
-                               $this->_out('/ContactInfo '.$this->_textstring($this->signature_data['info']['ContactInfo']).'');\r
-                       }\r
-                       $this->_out('>>');\r
-                       $this->_out('>>');\r
-               }
-               \r
-               /*\r
-               * Set User's Rights for PDF Reader
-               * WARNING: This works only using the Adobe private key with the setSignature() method!.\r
-               * Check the PDF Reference 8.7.1 Transform Methods, \r
-               * Table 8.105 Entries in the UR transform parameters dictionary\r
-               * @param boolean $enable if true enable user's rights on PDF reader\r
-               * @param string $document Names specifying additional document-wide usage rights for the document. The only defined value is "/FullSave", which permits a user to save the document along with modified form and/or annotation data.\r
-               * @param string $annots Names specifying additional annotation-related usage rights for the document. Valid names in PDF 1.5 and later are /Create/Delete/Modify/Copy/Import/Export, which permit the user to perform the named operation on annotations.\r
-               * @param string $form Names specifying additional form-field-related usage rights for the document. Valid names are: /Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate \r
-               * @param string $signature Names specifying additional signature-related usage rights for the document. The only defined value is /Modify, which permits a user to apply a digital signature to an existing signature form field or clear a signed signature form field.\r
-               * @access public\r
-               * @author Nicola Asuni\r
-               * @since 2.9.000 (2008-03-26)\r
-               */\r
-               public function setUserRights(\r
-                               $enable=true, \r
-                               $document='/FullSave',\r
-                               $annots='/Create/Delete/Modify/Copy/Import/Export',\r
-                               $form='/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate',\r
-                               $signature='/Modify') {\r
-                       $this->ur = $enable;\r
-                       $this->ur_document = $document;\r
-                       $this->ur_annots = $annots;\r
-                       $this->ur_form = $form;\r
-                       $this->ur_signature = $signature;\r
-               }
-               
-               /*\r
-               * Enable document signature (requires the OpenSSL Library).
-               * The digital signature improve document authenticity and integrity and allows o enable extra features on Acrobat Reader.
-               * @param mixed $signing_cert signing certificate (string or filename prefixed with 'file://')
-               * @param mixed $private_key private key (string or filename prefixed with 'file://')
-               * @param string $private_key_password password
-               * @param string $extracerts specifies the name of a file containing a bunch of extra certificates to include in the signature which can for example be used to help the recipient to verify the certificate that you used.\r
-               * @param int $cert_type The access permissions granted for this document. Valid values shall be: 1 = No changes to the document shall be permitted; any change to the document shall invalidate the signature; 2 = Permitted changes shall be filling in forms, instantiating page templates, and signing; other changes shall invalidate the signature; 3 = Permitted changes shall be the same as for 2, as well as annotation creation, deletion, and modification; other changes shall invalidate the signature.
-               * @parm array $info array of option information: Name, Location, Reason, ContactInfo.
-               * @access public\r
-               * @author Nicola Asuni\r
-               * @since 4.6.005 (2009-04-24)\r
-               */\r
-               public function setSignature($signing_cert='', $private_key='', $private_key_password='', $extracerts='', $cert_type=2, $info=array()) {
-                       // to create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.pem -out tcpdf.pem
-                       $this->sign = true;
-                       $this->signature_data = array();
-                       if (strlen($signing_cert) == 0) {
-                               $signing_cert = 'file://'.dirname(__FILE__).'/tcpdf.pem';
+                       // set foreground color
+                       $this->SetDrawColorArray($style['fgcolor']);
+                       $this->SetTextColorArray($style['fgcolor']);
+                       if ($this->empty_string($w) OR ($w <= 0)) {
+                               if ($this->rtl) {
+                                       $w = $this->x - $this->lMargin;
+                               } else {
+                                       $w = $this->w - $this->rMargin - $this->x;
+                               }
                        }
-                       if (strlen($private_key) == 0) {
-                               $private_key = $signing_cert;
+                       if ($this->empty_string($x)) {
+                               $x = $this->GetX();
                        }
-                       $this->signature_data['signcert'] = $signing_cert;
-                       $this->signature_data['privkey'] = $private_key;
-                       $this->signature_data['password'] = $private_key_password;
-                       $this->signature_data['extracerts'] = $extracerts;
-                       $this->signature_data['cert_type'] = $cert_type;
-                       $this->signature_data['info'] = array();\r
-               }
-               \r
-               /*\r
-               * Create a new page group.\r
-               * NOTE: call this function before calling AddPage()
-               * @param int $page starting group page (leave empty for next page).\r
-               * @access public\r
-               * @since 3.0.000 (2008-03-27)\r
-               */\r
-               public function startPageGroup($page='') {
-                       if (empty($page)) {
-                               $page = $this->page + 1;
-                       }\r
-                       $this->newpagegroup[$page] = true;\r
-               }\r
-
-               /**\r
-               * Defines an alias for the total number of pages.
-               * It will be substituted as the document is closed.\r
-               * @param string $alias The alias.\r
-               * @access public\r
-               * @since 1.4\r
-               * @see getAliasNbPages(), PageNo(), Footer()\r
-               */\r
-               public function AliasNbPages($alias='{nb}') {\r
-                       $this->AliasNbPages = $alias;\r
-               }\r
-               \r
-               /**\r
-                * Returns the string alias used for the total number of pages.\r
-         * If the current font is unicode type, the returned string is surrounded by additional curly braces.\r
-                * @return string\r
-                * @access public\r
-                * @since 4.0.018 (2008-08-08)\r
-                * @see AliasNbPages(), PageNo(), Footer()\r
-               */\r
-               public function getAliasNbPages() {
-                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {\r
-                               return '{'.$this->AliasNbPages.'}';\r
-            }\r
-                       return $this->AliasNbPages;\r
-               }
-
-               /**\r
-               * Defines an alias for the page number.
-               * It will be substituted as the document is closed.\r
-               * @param string $alias The alias.\r
-               * @access public\r
-               * @since 4.5.000 (2009-01-02)\r
-               * @see getAliasNbPages(), PageNo(), Footer()\r
-               */\r
-               public function AliasNumPage($alias='{pnb}') {\r
-                       //Define an alias for total number of pages\r
-                       $this->AliasNumPage = $alias;\r
-               }\r
-               \r
-               /**\r
-                * Returns the string alias used for the page number.\r
-         * If the current font is unicode type, the returned string is surrounded by additional curly braces.\r
-                * @return string\r
-                * @access public\r
-                * @since 4.5.000 (2009-01-02)\r
-                * @see AliasNbPages(), PageNo(), Footer()\r
-               */\r
-               public function getAliasNumPage() {
-                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {\r
-                               return '{'.$this->AliasNumPage.'}';\r
-            }\r
-                       return $this->AliasNumPage;\r
-               }
-               \r
-               /*\r
-               * Return the current page in the group.\r
-               * @return current page in the group\r
-               * @access public\r
-               * @since 3.0.000 (2008-03-27)\r
-               */\r
-               public function getGroupPageNo() {\r
-                       return $this->pagegroups[$this->currpagegroup];\r
-               }
-
-               /**\r
-               * Returns the current group page number formatted as a string.
-               * @access public\r
-               * @since 4.3.003 (2008-11-18)
-               * @see PaneNo(), formatPageNumber()\r
-               */
-               public function getGroupPageNoFormatted() {
-                       return $this->formatPageNumber($this->getGroupPageNo());
-        }\r
-               \r
-               /*\r
-                * Return the alias of the current page group\r
-         * If the current font is unicode type, the returned string is surrounded by additional curly braces.\r
-                * (will be replaced by the total number of pages in this group).\r
-                * @return alias of the current page group\r
-                * @access public\r
-                * @since 3.0.000 (2008-03-27)\r
-               */\r
-               public function getPageGroupAlias() {
-                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {\r
-                               return '{'.$this->currpagegroup.'}';\r
-            }\r
-                       return $this->currpagegroup;\r
-               }
-               \r
-               /*\r
-                * Return the alias for the page number on the current page group\r
-         * If the current font is unicode type, the returned string is surrounded by additional curly braces.\r
-                * (will be replaced by the total number of pages in this group).\r
-                * @return alias of the current page group\r
-                * @access public\r
-                * @since 4.5.000 (2009-01-02)\r
-               */\r
-               public function getPageNumGroupAlias() {
-                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {\r
-                               return '{'.str_replace('{nb', '{pnb', $this->currpagegroup).'}';\r
-            }\r
-                       return str_replace('{nb', '{pnb', $this->currpagegroup);\r
-               }
-
-               /**\r
-               * Format the page numbers.
-               * This method can be overriden for custom formats.\r
-               * @param int $num page number
-               * @access protected\r
-               * @since 4.2.005 (2008-11-06)\r
-               */\r
-               protected function formatPageNumber($num) {
-                       return number_format((float)$num, 0, '', '.');
-               }
-
-               /**\r
-               * Format the page numbers on the Table Of Content.
-               * This method can be overriden for custom formats.\r
-               * @param int $num page number
-               * @access protected\r
-               * @since 4.5.001 (2009-01-04)
-               * @see addTOC()\r
-               */\r
-               protected function formatTOCPageNumber($num) {
-                       return number_format((float)$num, 0, '', '.');
-               }
-
-        /**\r
-               * Returns the current page number formatted as a string.
-               * @access public\r
-               * @since 4.2.005 (2008-11-06)
-               * @see PaneNo(), formatPageNumber()\r
-               */\r
-               public function PageNoFormatted() {
-                       return $this->formatPageNumber($this->PageNo());
-        }
-
-        /*\r
-               * Put visibility settings.\r
-               * @access protected\r
-               * @since 3.0.000 (2008-03-27)\r
-               */\r
-               protected function _putocg() {\r
-                       $this->_newobj();\r
-                       $this->n_ocg_print = $this->n;\r
-                       $this->_out('<</Type /OCG /Name '.$this->_textstring('print'));\r
-                       $this->_out('/Usage <</Print <</PrintState /ON>> /View <</ViewState /OFF>>>>>>');\r
-                       $this->_out('endobj');\r
-                       $this->_newobj();\r
-                       $this->n_ocg_view=$this->n;\r
-                       $this->_out('<</Type /OCG /Name '.$this->_textstring('view'));\r
-                       $this->_out('/Usage <</Print <</PrintState /OFF>> /View <</ViewState /ON>>>>>>');\r
-                       $this->_out('endobj');\r
-               }\r
-               \r
-               /*\r
-               * Set the visibility of the successive elements.\r
-               * This can be useful, for instance, to put a background \r
-               * image or color that will show on screen but won't print.\r
-               * @param string $v visibility mode. Legal values are: all, print, screen.\r
-               * @access public\r
-               * @since 3.0.000 (2008-03-27)\r
-               */\r
-               public function setVisibility($v) {\r
-                       if ($this->openMarkedContent) {\r
-                               // close existing open marked-content\r
-                               $this->_out('EMC');\r
-                               $this->openMarkedContent = false;\r
-                       }\r
-                       switch($v) {\r
-                               case 'print': {\r
-                                       $this->_out('/OC /OC1 BDC');\r
-                                       $this->openMarkedContent = true;\r
-                                       break;\r
-                               }\r
-                               case 'screen': {\r
-                                       $this->_out('/OC /OC2 BDC');\r
-                                       $this->openMarkedContent = true;\r
-                                       break;\r
-                               }\r
-                               case 'all': {\r
-                                       $this->_out('');\r
-                                       break;\r
-                               }\r
-                               default: {\r
-                                       $this->Error('Incorrect visibility: '.$v);\r
-                                       break;\r
-                               }\r
-                       }\r
-                       $this->visibility = $v;\r
-               }\r
-               \r
-               /*\r
-               * Add transparency parameters to the current extgstate\r
-               * @param array $params parameters\r
-               * @return the number of extgstates\r
-               * @access protected\r
-               * @since 3.0.000 (2008-03-27)\r
-               */\r
-               protected function addExtGState($parms) {\r
-                       $n = count($this->extgstates) + 1;\r
-                       $this->extgstates[$n]['parms'] = $parms;\r
-                       return $n;\r
-               }\r
-               \r
-               /*\r
-               * Add an extgstate\r
-               * @param array $gs extgstate\r
-               * @access protected\r
-               * @since 3.0.000 (2008-03-27)\r
-               */\r
-               protected function setExtGState($gs) {\r
-                       $this->_out(sprintf('/GS%d gs', $gs));\r
-               }\r
-               \r
-               /*\r
-               * Put extgstates for object transparency\r
-               * @param array $gs extgstate\r
-               * @access protected\r
-               * @since 3.0.000 (2008-03-27)\r
-               */\r
-               protected function _putextgstates() {\r
-                       $ne = count($this->extgstates);\r
-                       for ($i = 1; $i <= $ne; ++$i) {\r
-                               $this->_newobj();\r
-                               $this->extgstates[$i]['n'] = $this->n;\r
-                               $this->_out('<</Type /ExtGState');\r
-                               foreach ($this->extgstates[$i]['parms'] as $k => $v) {\r
-                                       $this->_out('/'.$k.' '.$v);\r
-                               }\r
-                               $this->_out('>>');\r
-                               $this->_out('endobj');\r
-                       }\r
-               }\r
-               \r
-               /*\r
-               * Set alpha for stroking (CA) and non-stroking (ca) operations.\r
-               * @param float $alpha real value from 0 (transparent) to 1 (opaque)\r
-               * @param string $bm blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity\r
-               * @access public\r
-               * @since 3.0.000 (2008-03-27)\r
-               */\r
-               public function setAlpha($alpha, $bm='Normal') {\r
-                       $gs = $this->addExtGState(array('ca' => $alpha, 'CA' => $alpha, 'BM' => '/'.$bm));\r
-                       $this->setExtGState($gs);\r
-               }\r
-\r
-               /*\r
-               * Set the default JPEG compression quality (1-100)\r
-               * @param int $quality JPEG quality, integer between 1 and 100\r
-               * @access public\r
-               * @since 3.0.000 (2008-03-27)\r
-               */\r
-               public function setJPEGQuality($quality) {\r
-                       if (($quality < 1) OR ($quality > 100)) {\r
-                               $quality = 75;\r
-                       }\r
-                       $this->jpeg_quality = intval($quality);\r
-               }\r
-               \r
-               /*\r
-               * Set the default number of columns in a row for HTML tables.\r
-               * @param int $cols number of columns\r
-               * @access public\r
-               * @since 3.0.014 (2008-06-04)\r
-               */\r
-               public function setDefaultTableColumns($cols=4) { \r
-                       $this->default_table_columns = intval($cols); \r
-               }\r
-               \r
-               /*\r
-               * Set the height of the cell (line height) respect the font height.\r
-               * @param int $h cell proportion respect font height (typical value = 1.25).\r
-               * @access public\r
-               * @since 3.0.014 (2008-06-04)\r
-               */\r
-               public function setCellHeightRatio($h) { \r
-                       $this->cell_height_ratio = $h; \r
-               }\r
-               \r
-               /*\r
-               * return the height of cell repect font height.\r
-               * @access public\r
-               * @since 4.0.012 (2008-07-24)\r
-               */\r
-               public function getCellHeightRatio() { \r
-                       return $this->cell_height_ratio; \r
-               }\r
-               \r
-               /*\r
-               * Set the PDF version (check PDF reference for valid values).\r
-               * Default value is 1.t\r
-               * @access public\r
-               * @since 3.1.000 (2008-06-09)\r
-               */\r
-               public function setPDFVersion($version='1.7') { \r
-                       $this->PDFVersion = $version;\r
-               }\r
-               \r
-               /*\r
-               * Set the viewer preferences dictionary controlling the way the document is to be presented on the screen or in print.\r
-               * (see Section 8.1 of PDF reference, "Viewer Preferences").\r
-               * <ul>\r
-               * <li>HideToolbar boolean (Optional) A flag specifying whether to hide the viewer application's tool bars when the document is active. Default value: false.</li>\r
-               * <li>HideMenubar boolean (Optional) A flag specifying whether to hide the viewer application's menu bar when the document is active. Default value: false.</li>\r
-               * <li>HideWindowUI boolean (Optional) A flag specifying whether to hide user interface elements in the document's window (such as scroll bars and navigation controls), leaving only the document's contents displayed. Default value: false.</li>\r
-               * <li>FitWindow boolean (Optional) A flag specifying whether to resize the document's window to fit the size of the first displayed page. Default value: false.</li>\r
-               * <li>CenterWindow boolean (Optional) A flag specifying whether to position the document's window in the center of the screen. Default value: false.</li>\r
-               * <li>DisplayDocTitle boolean (Optional; PDF 1.4) A flag specifying whether the window's title bar should display the document title taken from the Title entry of the document information dictionary (see Section 10.2.1, "Document Information Dictionary"). If false, the title bar should instead display the name of the PDF file containing the document. Default value: false.</li>\r
-               * <li>NonFullScreenPageMode name (Optional) The document's page mode, specifying how to display the document on exiting full-screen mode:<ul><li>UseNone Neither document outline nor thumbnail images visible</li><li>UseOutlines Document outline visible</li><li>UseThumbs Thumbnail images visible</li><li>UseOC Optional content group panel visible</li><ul>This entry is meaningful only if the value of the PageMode entry in the catalog dictionary (see Section 3.6.1, "Document Catalog") is FullScreen; it is ignored otherwise. Default value: UseNone.</li>\r
-               * <li>ViewArea name (Optional; PDF 1.4) The name of the page boundary representing the area of a page to be displayed when viewing the document on the screen. Valid values are (see Section 10.10.1, "Page Boundaries").:<ul><li>MediaBox</li><li>CropBox (default)</li><li>BleedBox</li><li>TrimBox</li><li>ArtBox</li></ul></li>\r
-               * <li>ViewClip name (Optional; PDF 1.4) The name of the page boundary to which the contents of a page are to be clipped when viewing the document on the screen. Valid values are (see Section 10.10.1, "Page Boundaries").:<ul><li>MediaBox</li><li>CropBox (default)</li><li>BleedBox</li><li>TrimBox</li><li>ArtBox</li></ul></li>\r
-               * <li>PrintArea name (Optional; PDF 1.4) The name of the page boundary representing the area of a page to be rendered when printing the document. Valid values are (see Section 10.10.1, "Page Boundaries").:<ul><li>MediaBox</li><li>CropBox (default)</li><li>BleedBox</li><li>TrimBox</li><li>ArtBox</li></ul></li>\r
-               * <li>PrintClip name (Optional; PDF 1.4) The name of the page boundary to which the contents of a page are to be clipped when printing the document. Valid values are (see Section 10.10.1, "Page Boundaries").:<ul><li>MediaBox</li><li>CropBox (default)</li><li>BleedBox</li><li>TrimBox</li><li>ArtBox</li></ul></li>\r
-               * <li>PrintScaling name (Optional; PDF 1.6) The page scaling option to be selected when a print dialog is displayed for this document. Valid values are: <ul><li>None, which indicates that the print dialog should reflect no page scaling</li><li>AppDefault (default), which indicates that applications should use the current print scaling</li><ul></li>\r
-               * <li>Duplex name (Optional; PDF 1.7) The paper handling option to use when printing the file from the print dialog. The following values are valid:<ul><li>Simplex - Print single-sided</li><li>DuplexFlipShortEdge - Duplex and flip on the short edge of the sheet</li><li>DuplexFlipLongEdge - Duplex and flip on the long edge of the sheet</li></ul>Default value: none</li>\r
-               * <li>PickTrayByPDFSize boolean (Optional; PDF 1.7) A flag specifying whether the PDF page size is used to select the input paper tray. This setting influences only the preset values used to populate the print dialog presented by a PDF viewer application. If PickTrayByPDFSize is true, the check box in the print dialog associated with input paper tray is checked. Note: This setting has no effect on Mac OS systems, which do not provide the ability to pick the input tray by size.</li>\r
-               * <li>PrintPageRange array (Optional; PDF 1.7) The page numbers used to initialize the print dialog box when the file is printed. The first page of the PDF file is denoted by 1. Each pair consists of the first and last pages in the sub-range. An odd number of integers causes this entry to be ignored. Negative numbers cause the entire array to be ignored. Default value: as defined by PDF viewer application</li>\r
-               * <li>NumCopies integer (Optional; PDF 1.7) The number of copies to be printed when the print dialog is opened for this file. Supported values are the integers 2 through 5. Values outside this range are ignored. Default value: as defined by PDF viewer application, but typically 1</li>\r
-               * </ul>\r
-               * @param array $preferences array of options.\r
-               * @author Nicola Asuni\r
-               * @access public\r
-               * @since 3.1.000 (2008-06-09)\r
-               */\r
-               public function setViewerPreferences($preferences) { \r
-                       $this->viewer_preferences = $preferences;\r
-               }\r
-               \r
-               /**\r
-               * Paints a linear colour gradient.\r
-               * @param float $x abscissa of the top left corner of the rectangle.\r
-               * @param float $y ordinate of the top left corner of the rectangle.\r
-               * @param float $w width of the rectangle.\r
-               * @param float $h height of the rectangle.\r
-               * @param array $col1 first color (RGB components).\r
-               * @param array $col2 second color (RGB components).\r
-               * @param array $coords array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0).\r
-               * @author Andreas Würmser, Nicola Asuni\r
-               * @since 3.1.000 (2008-06-09)\r
-               * @access public\r
-               */\r
-               public function LinearGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0,0,1,0)) {\r
-                       $this->Clip($x, $y, $w, $h);\r
-                       $this->Gradient(2, $col1, $col2, $coords);\r
-               }\r
-               \r
-               /**\r
-               * Paints a radial colour gradient.\r
-               * @param float $x abscissa of the top left corner of the rectangle.\r
-               * @param float $y ordinate of the top left corner of the rectangle.\r
-               * @param float $w width of the rectangle.\r
-               * @param float $h height of the rectangle.\r
-               * @param array $col1 first color (RGB components).\r
-               * @param array $col2 second color (RGB components).\r
-               * @param array $coords array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined.\r
-               * @author Andreas Würmser, Nicola Asuni\r
-               * @since 3.1.000 (2008-06-09)\r
-               * @access public\r
-               */\r
-               public function RadialGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0.5,0.5,0.5,0.5,1)) {\r
-                       $this->Clip($x, $y, $w, $h);\r
-                       $this->Gradient(3, $col1, $col2, $coords);\r
-               }\r
-               \r
-               /**\r
-               * Paints a coons patch mesh.\r
-               * @param float $x abscissa of the top left corner of the rectangle.\r
-               * @param float $y ordinate of the top left corner of the rectangle.\r
-               * @param float $w width of the rectangle.\r
-               * @param float $h height of the rectangle.\r
-               * @param array $col1 first color (lower left corner) (RGB components).\r
-               * @param array $col2 second color (lower right corner) (RGB components).\r
-               * @param array $col3 third color (upper right corner) (RGB components).\r
-               * @param array $col4 fourth color (upper left corner) (RGB components).\r
-               * @param array $coords <ul><li>for one patch mesh: array(float x1, float y1, .... float x12, float y12): 12 pairs of coordinates (normally from 0 to 1) which specify the Bezier control points that define the patch. First pair is the lower left edge point, next is its right control point (control point 2). Then the other points are defined in the order: control point 1, edge point, control point 2 going counter-clockwise around the patch. Last (x12, y12) is the first edge point's left control point (control point 1).</li><li>for two or more patch meshes: array[number of patches]: arrays with the following keys for each patch: f: where to put that patch (0 = first patch, 1, 2, 3 = right, top and left of precedent patch - I didn't figure this out completely - just try and error ;-) points: 12 pairs of coordinates of the Bezier control points as above for the first patch, 8 pairs of coordinates for the following patches, ignoring the coordinates already defined by the precedent patch (I also didn't figure out the order of these - also: try and see what's happening) colors: must be 4 colors for the first patch, 2 colors for the following patches</li></ul>\r
-               * @param array $coords_min minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0\r
-               * @param array $coords_max maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1\r
-               * @author Andreas Würmser, Nicola Asuni\r
-               * @since 3.1.000 (2008-06-09)\r
-               * @access public\r
-               */\r
-               public function CoonsPatchMesh($x, $y, $w, $h, $col1=array(), $col2=array(), $col3=array(), $col4=array(), $coords=array(0.00,0.0,0.33,0.00,0.67,0.00,1.00,0.00,1.00,0.33,1.00,0.67,1.00,1.00,0.67,1.00,0.33,1.00,0.00,1.00,0.00,0.67,0.00,0.33), $coords_min=0, $coords_max=1) {\r
-                       $this->Clip($x, $y, $w, $h);        \r
-                       $n = count($this->gradients) + 1;\r
-                       $this->gradients[$n]['type'] = 6; //coons patch mesh\r
-                       //check the coords array if it is the simple array or the multi patch array\r
-                       if (!isset($coords[0]['f'])) {\r
-                               //simple array -> convert to multi patch array\r
-                               if (!isset($col1[1])) {\r
-                                       $col1[1] = $col1[2] = $col1[0];\r
-                               }\r
-                               if (!isset($col2[1])) {\r
-                                       $col2[1] = $col2[2] = $col2[0];\r
-                               }\r
-                               if (!isset($col3[1])) {\r
-                                       $col3[1] = $col3[2] = $col3[0];\r
-                               }\r
-                               if (!isset($col4[1])) {\r
-                                       $col4[1] = $col4[2] = $col4[0];\r
-                               }\r
-                               $patch_array[0]['f'] = 0;\r
-                               $patch_array[0]['points'] = $coords;\r
-                               $patch_array[0]['colors'][0]['r'] = $col1[0];\r
-                               $patch_array[0]['colors'][0]['g'] = $col1[1];\r
-                               $patch_array[0]['colors'][0]['b'] = $col1[2];\r
-                               $patch_array[0]['colors'][1]['r'] = $col2[0];\r
-                               $patch_array[0]['colors'][1]['g'] = $col2[1];\r
-                               $patch_array[0]['colors'][1]['b'] = $col2[2];\r
-                               $patch_array[0]['colors'][2]['r'] = $col3[0];\r
-                               $patch_array[0]['colors'][2]['g'] = $col3[1];\r
-                               $patch_array[0]['colors'][2]['b'] = $col3[2];\r
-                               $patch_array[0]['colors'][3]['r'] = $col4[0];\r
-                               $patch_array[0]['colors'][3]['g'] = $col4[1];\r
-                               $patch_array[0]['colors'][3]['b'] = $col4[2];\r
-                       } else {\r
-                               //multi patch array\r
-                               $patch_array = $coords;\r
-                       }\r
-                       $bpcd = 65535; //16 BitsPerCoordinate\r
-                       //build the data stream\r
-                       $this->gradients[$n]['stream'] = '';
-                       $count_patch = count($patch_array);\r
-                       for ($i=0; $i < $count_patch; ++$i) {\r
-                               $this->gradients[$n]['stream'] .= chr($patch_array[$i]['f']); //start with the edge flag as 8 bit\r
-                               $count_points = count($patch_array[$i]['points']);
-                               for ($j=0; $j < $count_points; ++$j) {\r
-                                       //each point as 16 bit\r
-                                       $patch_array[$i]['points'][$j] = (($patch_array[$i]['points'][$j] - $coords_min) / ($coords_max - $coords_min)) * $bpcd;\r
-                                       if ($patch_array[$i]['points'][$j] < 0) {\r
-                                               $patch_array[$i]['points'][$j] = 0;\r
-                                       }\r
-                                       if ($patch_array[$i]['points'][$j] > $bpcd) {\r
-                                               $patch_array[$i]['points'][$j] = $bpcd;\r
-                                       }\r
-                                       $this->gradients[$n]['stream'] .= chr(floor($patch_array[$i]['points'][$j] / 256));\r
-                                       $this->gradients[$n]['stream'] .= chr(floor($patch_array[$i]['points'][$j] % 256));\r
-                               }\r
-                               $count_cols = count($patch_array[$i]['colors']);
-                               for ($j=0; $j < $count_cols; ++$j) {\r
-                                       //each color component as 8 bit\r
-                                       $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['r']);\r
-                                       $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['g']);\r
-                                       $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['b']);\r
-                               }\r
-                       }\r
-                       //paint the gradient\r
-                       $this->_out('/Sh'.$n.' sh');\r
-                       //restore previous Graphic State\r
-                       $this->_out('Q');\r
-               }\r
-               \r
-               /**\r
-               * Set a rectangular clipping area.\r
-               * @param float $x abscissa of the top left corner of the rectangle (or top right corner for RTL mode).\r
-               * @param float $y ordinate of the top left corner of the rectangle.\r
-               * @param float $w width of the rectangle.\r
-               * @param float $h height of the rectangle.\r
-               * @author Andreas Würmser, Nicola Asuni\r
-               * @since 3.1.000 (2008-06-09)\r
-               * @access protected\r
-               */\r
-               protected function Clip($x, $y, $w, $h) {\r
-                       if ($this->rtl) {\r
-                               $x = $this->w - $x - $w;\r
-                       }\r
-                       //save current Graphic State\r
-                       $s = 'q';\r
-                       //set clipping area\r
-                       $s .= sprintf(' %.2F %.2F %.2F %.2F re W n', $x*$this->k, ($this->h-$y)*$this->k, $w*$this->k, -$h*$this->k);\r
-                       //set up transformation matrix for gradient\r
-                       $s .= sprintf(' %.3F 0 0 %.3F %.3F %.3F cm', $w*$this->k, $h*$this->k, $x*$this->k, ($this->h-($y+$h))*$this->k);\r
-                       $this->_out($s);\r
-               }\r
-                               \r
-               /**\r
-               * Output gradient.\r
-               * @param int $type type of gradient.\r
-               * @param array $col1 first color (RGB components).\r
-               * @param array $col2 second color (RGB components).\r
-               * @param array $coords array of coordinates.\r
-               * @author Andreas Würmser, Nicola Asuni\r
-               * @since 3.1.000 (2008-06-09)\r
-               * @access protected\r
-               */\r
-               protected function Gradient($type, $col1, $col2, $coords) {\r
-                       $n = count($this->gradients) + 1;\r
-                       $this->gradients[$n]['type'] = $type;\r
-                       if (!isset($col1[1])) {\r
-                               $col1[1]=$col1[2]=$col1[0];\r
-                       }\r
-                       $this->gradients[$n]['col1'] = sprintf('%.3F %.3F %.3F', ($col1[0]/255), ($col1[1]/255), ($col1[2]/255));\r
-                       if (!isset($col2[1])) {\r
-                               $col2[1] = $col2[2] = $col2[0];\r
-                       }\r
-                       $this->gradients[$n]['col2'] = sprintf('%.3F %.3F %.3F', ($col2[0]/255), ($col2[1]/255), ($col2[2]/255));\r
-                       $this->gradients[$n]['coords'] = $coords;\r
-                       //paint the gradient\r
-                       $this->_out('/Sh'.$n.' sh');\r
-                       //restore previous Graphic State\r
-                       $this->_out('Q');\r
-               }\r
-               \r
-               /**\r
-               * Output shaders.\r
-               * @author Andreas Würmser, Nicola Asuni\r
-               * @since 3.1.000 (2008-06-09)\r
-               * @access protected\r
-               */\r
-               function _putshaders() {\r
-                       foreach ($this->gradients as $id => $grad) {  \r
-                               if (($grad['type'] == 2) OR ($grad['type'] == 3)) {\r
-                                       $this->_newobj();\r
-                                       $this->_out('<<');\r
-                                       $this->_out('/FunctionType 2');\r
-                                       $this->_out('/Domain [0.0 1.0]');\r
-                                       $this->_out('/C0 ['.$grad['col1'].']');\r
-                                       $this->_out('/C1 ['.$grad['col2'].']');\r
-                                       $this->_out('/N 1');\r
-                                       $this->_out('>>');\r
-                                       $this->_out('endobj');\r
-                                       $f1 = $this->n;\r
-                               }\r
-                               $this->_newobj();\r
-                               $this->_out('<<');\r
-                               $this->_out('/ShadingType '.$grad['type']);\r
-                               $this->_out('/ColorSpace /DeviceRGB');\r
-                               if ($grad['type'] == 2) {\r
-                                       $this->_out(sprintf('/Coords [%.3F %.3F %.3F %.3F]', $grad['coords'][0], $grad['coords'][1], $grad['coords'][2], $grad['coords'][3]));\r
-                                       $this->_out('/Function '.$f1.' 0 R');\r
-                                       $this->_out('/Extend [true true] ');\r
-                                       $this->_out('>>');\r
-                               } elseif ($grad['type'] == 3) {\r
-                                       //x0, y0, r0, x1, y1, r1\r
-                                       //at this this time radius of inner circle is 0\r
-                                       $this->_out(sprintf('/Coords [%.3F %.3F 0 %.3F %.3F %.3F]', $grad['coords'][0], $grad['coords'][1], $grad['coords'][2], $grad['coords'][3], $grad['coords'][4]));\r
-                                       $this->_out('/Function '.$f1.' 0 R');\r
-                                       $this->_out('/Extend [true true] ');\r
-                                       $this->_out('>>');\r
-                               } elseif ($grad['type'] == 6) {\r
-                                       $this->_out('/BitsPerCoordinate 16');\r
-                                       $this->_out('/BitsPerComponent 8');\r
-                                       $this->_out('/Decode[0 1 0 1 0 1 0 1 0 1]');\r
-                                       $this->_out('/BitsPerFlag 8');\r
-                                       $this->_out('/Length '.strlen($grad['stream']));\r
-                                       $this->_out('>>');\r
-                                       $this->_putstream($grad['stream']);\r
-                               }\r
-                               $this->_out('endobj');\r
-                               $this->gradients[$id]['id'] = $this->n;\r
-                       }\r
-               }\r
-\r
-               /**\r
-               * Output an arc\r
-               * @author Maxime Delorme, Nicola Asuni\r
-               * @since 3.1.000 (2008-06-09)\r
-               * @access protected\r
-               */\r
-               protected function _outarc($x1, $y1, $x2, $y2, $x3, $y3 ) {\r
-                       $h = $this->h;\r
-                       $this->_out(sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c', $x1*$this->k, ($h-$y1)*$this->k, $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k));\r
-               }\r
-               \r
-               /**\r
-               * Draw the sector of a circle.\r
-               * It can be used for instance to render pie charts.\r
-               * @param float $xc abscissa of the center.\r
-               * @param float $yc ordinate of the center.\r
-               * @param float $r radius.\r
-               * @param float $a start angle (in degrees).\r
-               * @param float $b end angle (in degrees).\r
-               * @param string $style: D, F, FD or DF (draw, fill, fill and draw). Default: FD.\r
-               * @param float $cw: indicates whether to go clockwise (default: true).\r
-               * @param float $o: origin of angles (0 for 3 o'clock, 90 for noon, 180 for 9 o'clock, 270 for 6 o'clock). Default: 90.\r
-               * @author Maxime Delorme, Nicola Asuni\r
-               * @since 3.1.000 (2008-06-09)\r
-               * @access public\r
-               */\r
-               public function PieSector($xc, $yc, $r, $a, $b, $style='FD', $cw=true, $o=90) {\r
-                       if ($this->rtl) {\r
-                               $xc = $this->w - $xc;\r
-                       }\r
-                       if ($cw) {\r
-                               $d = $b;\r
-                               $b = $o - $a;\r
-                               $a = $o - $d;\r
-                       } else {\r
-                               $b += $o;\r
-                               $a += $o;\r
-                       }\r
-                       $a = ($a % 360) + 360;\r
-                       $b = ($b % 360) + 360;\r
-                       if ($a > $b) {\r
-                               $b +=360;\r
-                       }\r
-                       $b = $b / 360 * 2 * M_PI;\r
-                       $a = $a / 360 * 2 * M_PI;\r
-                       $d = $b - $a;\r
-                       if ($d == 0 ) {\r
-                               $d = 2 * M_PI;\r
-                       }\r
-                       $k = $this->k;\r
-                       $hp = $this->h;\r
-                       if ($style=='F') {\r
-                               $op = 'f';\r
-                       } elseif ($style=='FD' or $style=='DF') {\r
-                               $op = 'b';\r
-                       } else {\r
-                               $op = 's';\r
-                       }\r
-                       if (sin($d/2)) {\r
-                               $MyArc = 4/3 * (1 - cos($d/2)) / sin($d/2) * $r;\r
-                       }\r
-                       //first put the center\r
-                       $this->_out(sprintf('%.2F %.2F m', ($xc)*$k, ($hp-$yc)*$k));\r
-                       //put the first point\r
-                       $this->_out(sprintf('%.2F %.2F l', ($xc+$r*cos($a))*$k, (($hp-($yc-$r*sin($a)))*$k)));\r
-                       //draw the arc\r
-                       if ($d < (M_PI/2)) {\r
-                               $this->_outarc($xc+$r*cos($a)+$MyArc*cos(M_PI/2+$a), $yc-$r*sin($a)-$MyArc*sin(M_PI/2+$a), $xc+$r*cos($b)+$MyArc*cos($b-M_PI/2), $yc-$r*sin($b)-$MyArc*sin($b-M_PI/2), $xc+$r*cos($b), $yc-$r*sin($b));\r
-                       } else {\r
-                               $b = $a + $d/4;\r
-                               $MyArc = 4/3*(1-cos($d/8))/sin($d/8)*$r;\r
-                               $this->_outarc($xc+$r*cos($a)+$MyArc*cos(M_PI/2+$a), $yc-$r*sin($a)-$MyArc*sin(M_PI/2+$a), $xc+$r*cos($b)+$MyArc*cos($b-M_PI/2), $yc-$r*sin($b)-$MyArc*sin($b-M_PI/2), $xc+$r*cos($b), $yc-$r*sin($b));\r
-                               $a = $b;\r
-                               $b = $a + $d/4;\r
-                               $this->_outarc($xc+$r*cos($a)+$MyArc*cos(M_PI/2+$a), $yc-$r*sin($a)-$MyArc*sin(M_PI/2+$a), $xc+$r*cos($b)+$MyArc*cos($b-M_PI/2), $yc-$r*sin($b)-$MyArc*sin($b-M_PI/2), $xc+$r*cos($b), $yc-$r*sin($b));\r
-                               $a = $b;\r
-                               $b = $a + $d/4;\r
-                               $this->_outarc($xc+$r*cos($a)+$MyArc*cos(M_PI/2+$a), $yc-$r*sin($a)-$MyArc*sin(M_PI/2+$a), $xc+$r*cos($b)+$MyArc*cos($b-M_PI/2), $yc-$r*sin($b)-$MyArc*sin($b-M_PI/2), $xc+$r*cos($b), $yc-$r*sin($b) );\r
-                               $a = $b;\r
-                               $b = $a + $d/4;\r
-                               $this->_outarc($xc+$r*cos($a)+$MyArc*cos(M_PI/2+$a), $yc-$r*sin($a)-$MyArc*sin(M_PI/2+$a), $xc+$r*cos($b)+$MyArc*cos($b-M_PI/2), $yc-$r*sin($b)-$MyArc*sin($b-M_PI/2), $xc+$r*cos($b), $yc-$r*sin($b));\r
-                       }\r
-                       //terminate drawing\r
-                       $this->_out($op);\r
-               }\r
-               \r
-               /**\r
-               * Embed vector-based Adobe Illustrator (AI) or AI-compatible EPS files.\r
-               * Only vector drawing is supported, not text or bitmap. \r
-               * Although the script was successfully tested with various AI format versions, best results are probably achieved with files that were exported in the AI3 format (tested with Illustrator CS2, Freehand MX and Photoshop CS2).\r
-               * @param string $file Name of the file containing the image.\r
-               * @param float $x Abscissa of the upper-left corner.\r
-               * @param float $y Ordinate of the upper-left corner.\r
-               * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated.\r
-               * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated.\r
-               * @param mixed $link URL or identifier returned by AddLink().\r
-               * @param boolean useBoundingBox specifies whether to position the bounding box (true) or the complete canvas (false) at location (x,y). Default value is true.\r
-               * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>\r
-               * @param string $palign Allows to center or align the image on the current line. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>
-               * @param mixed $border Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>\r
-               * @author Valentin Schmidt, Nicola Asuni\r
-               * @since 3.1.000 (2008-06-09)\r
-               * @access public\r
-               */\r
-               public function ImageEps($file, $x='', $y='', $w=0, $h=0, $link='', $useBoundingBox=true, $align='', $palign='', $border=0) {\r
-                       if ($x === '') {\r
-                               $x = $this->x;\r
-                       }\r
-                       if ($y === '') {\r
-                               $y = $this->y;\r
+                       if ($this->rtl) {
+                               $x = $this->w - $x;
+                       }
+                       if ($this->empty_string($y)) {
+                               $y = $this->GetY();
+                       }
+                       if ($this->empty_string($xres)) {
+                               $xres = 0.4;
+                       }
+                       $fbw = ($arrcode['maxw'] * $xres) + (2 * $style['padding']);
+                       $extraspace = ($this->cell_height_ratio * $fontsize / $this->k) + (2 * $style['padding']);
+                       if ($this->empty_string($h) OR ($h <= 0)) {
+                               $h = 10 + $extraspace;
+                       }
+                       $prev_x = $this->x;
+                       if ($this->checkPageBreak($h, $y)) {
+                               $y = $this->GetY() + $this->cMargin;
+                               if ($this->rtl) {
+                                       $x += ($prev_x - $this->x);
+                               } else {
+                                       $x += ($this->x - $prev_x);
+                               }
+                       }
+                       // maximum bar heigth
+                       $barh = $h - $extraspace;
+                       switch ($style['position']) {
+                               case 'L': { // left
+                                       if ($this->rtl) {
+                                               $xpos = $x - $w;
+                                       } else {
+                                               $xpos = $x;
+                                       }
+                                       break;
+                               }
+                               case 'C': { // center
+                                       $xdiff = (($w - $fbw) / 2);
+                                       if ($this->rtl) {
+                                               $xpos = $x - $w + $xdiff;
+                                       } else {
+                                               $xpos = $x + $xdiff;
+                                       }
+                                       break;
+                               }
+                               case 'R': { // right
+                                       if ($this->rtl) {
+                                               $xpos = $x - $fbw;
+                                       } else {
+                                               $xpos = $x + $w - $fbw;
+                                       }
+                                       break;
+                               }
+                               case 'S': { // stretch
+                                       $fbw = $w;
+                                       $xres = ($w - (2 * $style['padding'])) / $arrcode['maxw'];
+                                       if ($this->rtl) {
+                                               $xpos = $x - $w;
+                                       } else {
+                                               $xpos = $x;
+                                       }
+                                       break;
+                               }
+                       }
+                       $xpos_rect = $xpos;
+                       $xpos = $xpos_rect + $style['padding'];
+                       $xpos_text = $xpos;
+                       // barcode is always printed in LTR direction
+                       $tempRTL = $this->rtl;
+                       $this->rtl = false;
+                       // print background color
+                       if ($style['bgcolor']) {
+                               $this->Rect($xpos_rect, $y, $fbw, $h, $style['border'] ? 'DF' : 'F', '', $style['bgcolor']);
+                       } elseif ($style['border']) {
+                               $this->Rect($xpos_rect, $y, $fbw, $h, 'D');
                        }
-                       $k = $this->k;
-                       $data = file_get_contents($file);\r
-                       if ($data === false) {\r
-                               $this->Error('EPS file not found: '.$file);\r
-                       }\r
-                       $regs = array();\r
-                       // EPS/AI compatibility check (only checks files created by Adobe Illustrator!)\r
-                       preg_match("/%%Creator:([^\r\n]+)/", $data, $regs); # find Creator\r
-                       if (count($regs) > 1) {\r
-                               $version_str = trim($regs[1]); # e.g. "Adobe Illustrator(R) 8.0"\r
-                               if (strpos($version_str, 'Adobe Illustrator') !== false) {\r
-                                       $versexp = explode(' ', $version_str);\r
-                                       $version = (float)array_pop($versexp);\r
-                                       if ($version >= 9) {\r
-                                               $this->Error('This version of Adobe Illustrator file is not supported: '.$file);\r
-                                       }\r
-                               }\r
-                       }\r
-                       // strip binary bytes in front of PS-header\r
-                       $start = strpos($data, '%!PS-Adobe');\r
-                       if ($start > 0) {\r
-                               $data = substr($data, $start);\r
-                       }\r
-                       // find BoundingBox params\r
-                       preg_match("/%%BoundingBox:([^\r\n]+)/", $data, $regs);\r
-                       if (count($regs) > 1) {\r
-                               list($x1, $y1, $x2, $y2) = explode(' ', trim($regs[1]));\r
-                       } else {\r
-                               $this->Error('No BoundingBox found in EPS file: '.$file);\r
-                       }\r
-                       $start = strpos($data, '%%EndSetup');\r
-                       if ($start === false) {\r
-                               $start = strpos($data, '%%EndProlog');\r
-                       }\r
-                       if ($start === false) {\r
-                               $start = strpos($data, '%%BoundingBox');\r
-                       }\r
-                       $data = substr($data, $start);\r
-                       $end = strpos($data, '%%PageTrailer');\r
-                       if ($end===false) {\r
-                               $end = strpos($data, 'showpage');\r
-                       }\r
-                       if ($end) {\r
-                               $data = substr($data, 0, $end);\r
-                       }\r
-                       if ($w > 0) {\r
-                               $scale_x = $w / (($x2 - $x1) / $k);\r
-                               if ($h > 0) {\r
-                                       $scale_y = $h / (($y2 - $y1) / $k);\r
-                               } else {\r
-                                       $scale_y = $scale_x;\r
-                                       $h = ($y2 - $y1) / $k * $scale_y;\r
-                               }\r
-                       } else {\r
-                               if ($h > 0) {\r
-                                       $scale_y = $h / (($y2 - $y1) / $k);\r
-                                       $scale_x = $scale_y;\r
-                                       $w = ($x2-$x1) / $k * $scale_x;\r
-                               } else {\r
-                                       $w = ($x2 - $x1) / $k;\r
-                                       $h = ($y2 - $y1) / $k;\r
-                               }\r
+                       // print bars
+                       if ($arrcode !== false) {
+                               foreach ($arrcode['bcode'] as $k => $v) {
+                                       $bw = ($v['w'] * $xres);
+                                       if ($v['t']) {
+                                               // draw a vertical bar
+                                               $ypos = $y + $style['padding'] + ($v['p'] * $barh / $arrcode['maxh']);
+                                               $this->Rect($xpos, $ypos, $bw, ($v['h'] * $barh  / $arrcode['maxh']), 'F', array(), $style['fgcolor']);
+                                       }
+                                       $xpos += $bw;
+                               }
                        }
-                       // Check whether we need a new page first as this does not fit
-                       if ($this->checkPageBreak($h, $y)) {
-                               $y = $this->GetY() + $this->cMargin;
-                       }\r
-                       // set bottomcoordinates\r
-                       $this->img_rb_y = $y + $h;\r
-                       // set alignment\r
-                       if ($this->rtl) {\r
-                               if ($palign == 'L') {\r
-                                       $ximg = $this->lMargin;\r
-                                       // set right side coordinate\r
-                                       $this->img_rb_x = $ximg + $w;\r
-                               } elseif ($palign == 'C') {\r
-                                       $ximg = ($this->w - $x - $w) / 2;\r
-                                       // set right side coordinate\r
-                                       $this->img_rb_x = $ximg + $w;\r
-                               } else {\r
-                                       $ximg = $this->w - $x - $w;\r
-                                       // set left side coordinate\r
-                                       $this->img_rb_x = $ximg;\r
-                               }\r
-                       } else {\r
-                               if ($palign == 'R') {\r
-                                       $ximg = $this->w - $this->rMargin - $w;\r
-                                       // set left side coordinate\r
-                                       $this->img_rb_x = $ximg;\r
-                               } elseif ($palign == 'C') {\r
-                                       $ximg = ($this->w - $x - $w) / 2;\r
-                                       // set right side coordinate\r
-                                       $this->img_rb_x = $ximg + $w;\r
-                               } else {\r
-                                       $ximg = $x;\r
-                                       // set right side coordinate\r
-                                       $this->img_rb_x = $ximg + $w;\r
-                               }\r
-                       }\r
-                       if ($useBoundingBox) {\r
-                               $dx = $ximg * $k - $x1;\r
-                               $dy = $y * $k - $y1;\r
-                       } else {\r
-                               $dx = $ximg * $k;\r
-                               $dy = $y * $k;\r
-                       }\r
-                       // save the current graphic state\r
-                       $this->_out('q'.$this->epsmarker);\r
-                       // translate\r
-                       $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', 1, 0, 0, 1, $dx, $dy + ($this->hPt - (2 * $y * $k) - ($y2 - $y1))));\r
-                       // scale\r
-                       if (isset($scale_x)) {\r
-                               $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $scale_x, 0, 0, $scale_y, $x1 * (1 - $scale_x), $y2 * (1 - $scale_y)));\r
-                       }\r
-                       // handle pc/unix/mac line endings
-                       preg_match('/[\r\n]+/s', $data, $regs);
-                       $lines = explode($regs[0], $data);\r
-                       $u=0;\r
-                       $cnt = count($lines);\r
-                       for ($i=0; $i < $cnt; ++$i) {\r
-                               $line = $lines[$i];\r
-                               if (($line == '') OR ($line{0} == '%')) {\r
-                                       continue;\r
-                               }\r
-                               $len = strlen($line);\r
-                               $chunks = explode(' ', $line);\r
-                               $cmd = array_pop($chunks);\r
-                               // RGB\r
-                               if (($cmd == 'Xa') OR ($cmd == 'XA')) {\r
-                                       $b = array_pop($chunks); \r
-                                       $g = array_pop($chunks); \r
-                                       $r = array_pop($chunks);\r
-                                       $this->_out(''.$r.' '.$g.' '.$b.' '.($cmd=='Xa'?'rg':'RG')); //substr($line, 0, -2).'rg' -> in EPS (AI8): c m y k r g b rg!\r
-                                       continue;\r
-                               }\r
-                               switch ($cmd) {\r
-                                       case 'm':\r
-                                       case 'l':\r
-                                       case 'v':\r
-                                       case 'y':\r
-                                       case 'c':\r
-                                       case 'k':\r
-                                       case 'K':\r
-                                       case 'g':\r
-                                       case 'G':\r
-                                       case 's':\r
-                                       case 'S':\r
-                                       case 'J':\r
-                                       case 'j':\r
-                                       case 'w':\r
-                                       case 'M':\r
-                                       case 'd':\r
-                                       case 'n':\r
-                                       case 'v': {\r
-                                               $this->_out($line);\r
-                                               break;\r
-                                       }\r
-                                       case 'x': {// custom fill color\r
-                                               list($c,$m,$y,$k) = $chunks;\r
-                                               $this->_out(''.$c.' '.$m.' '.$y.' '.$k.' k');\r
-                                               break;\r
-                                       }\r
-                                       case 'X': { // custom stroke color\r
-                                               list($c,$m,$y,$k) = $chunks;\r
-                                               $this->_out(''.$c.' '.$m.' '.$y.' '.$k.' K');\r
-                                               break;\r
-                                       }\r
-                                       case 'Y':\r
-                                       case 'N':\r
-                                       case 'V':\r
-                                       case 'L':\r
-                                       case 'C': {\r
-                                               $line{$len-1} = strtolower($cmd);\r
-                                               $this->_out($line);\r
-                                               break;\r
-                                       }\r
-                                       case 'b':\r
-                                       case 'B': {\r
-                                               $this->_out($cmd . '*');\r
-                                               break;\r
-                                       }\r
-                                       case 'f':\r
-                                       case 'F': {\r
-                                               if ($u > 0) {\r
-                                                       $isU = false;\r
-                                                       $max = min($i+5, $cnt);\r
-                                                       for ($j=$i+1; $j < $max; ++$j)\r
-                                                         $isU = ($isU OR (($lines[$j] == 'U') OR ($lines[$j] == '*U')));\r
-                                                       if ($isU) {\r
-                                                               $this->_out('f*');\r
-                                                       }\r
-                                               } else {\r
-                                                       $this->_out('f*');\r
-                                               }\r
-                                               break;\r
-                                       }\r
-                                       case '*u': {\r
-                                               ++$u;\r
-                                               break;\r
-                                       }\r
-                                       case '*U': {\r
-                                               --$u;\r
-                                               break;\r
-                                       }\r
-                               }\r
-                       }\r
-                       // restore previous graphic state\r
-                       $this->_out($this->epsmarker.'Q');
-                       if (!empty($border)) {
-                               $bx = $x;
-                               $by = $y;
-                               $this->x = $x;
-                               $this->y = $y;
-                               $this->Cell($w, $h, '', $border, 0, '', 0, '', 0);
-                               $this->x = $bx;
-                               $this->y = $by;
-                       }\r
-                       if ($link) {\r
-                               $this->Link($ximg, $y, $w, $h, $link, 0);\r
-                       }\r
-                       // set pointer to align the successive text/objects\r
-                       switch($align) {\r
-                               case 'T':{\r
-                                       $this->y = $y;\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'M':{\r
-                                       $this->y = $y + round($h/2);\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'B':{\r
-                                       $this->y = $this->img_rb_y;\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'N':{\r
-                                       $this->SetY($this->img_rb_y);\r
-                                       break;\r
-                               }\r
-                               default:{\r
-                                       break;\r
-                               }\r
-                       }\r
-                       $this->endlinex = $this->img_rb_x;\r
-               }\r
-               \r
-               /**\r
-                * Set document barcode.\r
-                * @param string $bc barcode\r
-                * @access public\r
-                */\r
-               public function setBarcode($bc='') {\r
-                       $this->barcode = $bc;\r
-               }\r
-               \r
-               /**\r
-                * Get current barcode.\r
-                * @return string\r
-                * @access public\r
-                * @since 4.0.012 (2008-07-24)\r
-                */\r
-               public function getBarcode() {\r
-                       return $this->barcode;\r
-               }\r
-               \r
-               /**\r
-                * Print a Linear Barcode.\r
-                * @param string $code code to print\r
-                * @param string $type type of barcode.\r
-                * @param int $x x position in user units\r
-                * @param int $y y position in user units\r
-                * @param int $w width in user units\r
-                * @param int $h height in user units\r
-                * @param float $xres width of the smallest bar in user units\r
-                * @param array $style array of options:<ul><li>string $style['position'] barcode position inside the specified width: L = left (default for LTR); C = center; R = right (default for RTL); S = stretch</li><li>boolean $style['border'] if true prints a border around the barcode</li><li>int $style['padding'] padding to leave around the barcode in user units</li><li>array $style['fgcolor'] color array for bars and text</li><li>mixed $style['bgcolor'] color array for background or false for transparent</li><li>boolean $style["text"] boolean if true prints text below the barcode</li><li>string $style['font'] font name for text</li><li>int $style['fontsize'] font size for text</li><li>int $style['stretchtext']: 0 = disabled; 1 = horizontal scaling only if necessary; 2 = forced horizontal scaling; 3 = character spacing only if necessary; 4 = forced character spacing</li></ul>\r
-                * @param string $align Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>\r
-                * @author Nicola Asuni\r
-                * @since 3.1.000 (2008-06-09)\r
-                * @access public\r
-                */\r
-               public function write1DBarcode($code, $type, $x='', $y='', $w='', $h='', $xres=0.4, $style='', $align='') {\r
-                       if ($this->empty_string($code)) {\r
-                               return;\r
+                       // print text
+                       if ($style['text']) {
+                               // print text
+                               $this->x = $xpos_text;
+                               $this->y = $y + $style['padding'] + $barh; 
+                               $this->Cell(($arrcode['maxw'] * $xres), ($this->cell_height_ratio * $fontsize / $this->k), $code, 0, 0, 'C', 0, '', $style['stretchtext']);
                        }
-                       require_once(dirname(__FILE__).'/barcodes.php');
-                       // save current graphic settings
-                       $gvars = $this->getGraphicVars();
-                       // create new barcode object\r
-                       $barcodeobj = new TCPDFBarcode($code, $type);\r
-                       $arrcode = $barcodeobj->getBarcodeArray();\r
-                       if ($arrcode === false) {\r
-                               $this->Error('Error in 1D barcode string');\r
-                       }\r
-                       // set default values\r
-                       if (!isset($style['position'])) {\r
-                               if ($this->rtl) {\r
-                                       $style['position'] = 'R';\r
-                               } else {\r
-                                       $style['position'] = 'L';\r
-                               }\r
-                       }\r
-                       if (!isset($style['padding'])) {\r
-                               $style['padding'] = 0;\r
-                       }\r
-                       if (!isset($style['fgcolor'])) {\r
-                               $style['fgcolor'] = array(0,0,0); // default black\r
-                       }\r
-                       if (!isset($style['bgcolor'])) {\r
-                               $style['bgcolor'] = false; // default transparent\r
-                       }\r
-                       if (!isset($style['border'])) {\r
-                               $style['border'] = false;\r
-                       }\r
-                       if (!isset($style['text'])) {\r
-                               $style['text'] = false;\r
-                               $fontsize = 0;\r
-                       }\r
-                       if ($style['text'] AND isset($style['font'])) {\r
-                               if (isset($style['fontsize'])) {\r
-                                       $fontsize = $style['fontsize'];\r
-                               } else {\r
-                                       $fontsize = 0;\r
-                               }\r
-                               $this->SetFont($style['font'], '', $fontsize);\r
-                       }\r
-                       if (!isset($style['stretchtext'])) {\r
-                               $style['stretchtext'] = 4;\r
-                       }\r
-                       // set foreground color\r
-                       $this->SetDrawColorArray($style['fgcolor']);\r
-                       $this->SetTextColorArray($style['fgcolor']);\r
-                       if ($this->empty_string($w) OR ($w <= 0)) {\r
-                               if ($this->rtl) {\r
-                                       $w = $this->x - $this->lMargin;\r
-                               } else {\r
-                                       $w = $this->w - $this->rMargin - $this->x;\r
-                               }\r
-                       }\r
-                       if ($this->empty_string($x)) {\r
-                               $x = $this->GetX();\r
-                       }\r
-                       if ($this->rtl) {\r
-                               $x = $this->w - $x;\r
-                       }\r
-                       if ($this->empty_string($y)) {\r
-                               $y = $this->GetY();\r
-                       }\r
-                       if ($this->empty_string($xres)) {\r
-                               $xres = 0.4;\r
-                       }\r
-                       $fbw = ($arrcode['maxw'] * $xres) + (2 * $style['padding']);\r
-                       $extraspace = ($this->cell_height_ratio * $fontsize / $this->k) + (2 * $style['padding']);\r
-                       if ($this->empty_string($h) OR ($h <= 0)) {\r
-                               $h = 10 + $extraspace;\r
-                       }\r
-                       if ($this->checkPageBreak($h)) {
-                               $y = $this->y;
-                       }\r
-                       // maximum bar heigth\r
-                       $barh = $h - $extraspace;\r
-                       switch ($style['position']) {\r
-                               case 'L': { // left\r
-                                       if ($this->rtl) {\r
-                                               $xpos = $x - $w;\r
-                                       } else {\r
-                                               $xpos = $x;\r
-                                       }\r
-                                       break;\r
-                               }\r
-                               case 'C': { // center\r
-                                       $xdiff = (($w - $fbw) / 2);\r
-                                       if ($this->rtl) {\r
-                                               $xpos = $x - $w + $xdiff;\r
-                                       } else {\r
-                                               $xpos = $x + $xdiff;\r
-                                       }\r
-                                       break;\r
-                               }\r
-                               case 'R': { // right\r
-                                       if ($this->rtl) {\r
-                                               $xpos = $x - $fbw;\r
-                                       } else {\r
-                                               $xpos = $x + $w - $fbw;\r
-                                       }\r
-                                       break;\r
-                               }\r
-                               case 'S': { // stretch\r
-                                       $fbw = $w;\r
-                                       $xres = ($w - (2 * $style['padding'])) / $arrcode['maxw'];\r
-                                       if ($this->rtl) {\r
-                                               $xpos = $x - $w;\r
-                                       } else {\r
-                                               $xpos = $x;\r
-                                       }\r
-                                       break;\r
-                               }\r
-                       }\r
-                       $xpos_rect = $xpos;\r
-                       $xpos = $xpos_rect + $style['padding'];\r
-                       $xpos_text = $xpos;\r
-                       // barcode is always printed in LTR direction\r
-                       $tempRTL = $this->rtl;\r
-                       $this->rtl = false;\r
-                       // print background color\r
-                       if ($style['bgcolor']) {\r
-                               $this->Rect($xpos_rect, $y, $fbw, $h, 'DF', '', $style['bgcolor']);\r
-                       } elseif ($style['border']) {\r
-                               $this->Rect($xpos_rect, $y, $fbw, $h, 'D');\r
-                       }\r
-                       // print bars\r
-                       if ($arrcode !== false) {\r
-                               foreach ($arrcode['bcode'] as $k => $v) {\r
-                                       $bw = ($v['w'] * $xres);\r
-                                       if ($v['t']) {\r
-                                               // draw a vertical bar\r
-                                               $ypos = $y + $style['padding'] + ($v['p'] * $barh / $arrcode['maxh']);\r
-                                               $this->Rect($xpos, $ypos, $bw, ($v['h'] * $barh  / $arrcode['maxh']), 'F', array(), $style['fgcolor']);\r
-                                       }\r
-                                       $xpos += $bw;\r
-                               }\r
-                       }\r
-                       // print text\r
-                       if ($style['text']) {\r
-                               // print text\r
-                               $this->x = $xpos_text;\r
-                               $this->y = $y + $style['padding'] + $barh; \r
-                               $this->Cell(($arrcode['maxw'] * $xres), ($this->cell_height_ratio * $fontsize / $this->k), $code, 0, 0, 'C', 0, '', $style['stretchtext']);\r
-                       }\r
-                       // restore original direction\r
-                       $this->rtl = $tempRTL;\r
+                       // restore original direction
+                       $this->rtl = $tempRTL;
                        // restore previous settings
-                       $this->setGraphicVars($gvars);\r
-                       // set bottomcoordinates\r
-                       $this->img_rb_y = $y + $h;\r
-                       if ($this->rtl) {\r
-                               // set left side coordinate\r
-                               $this->img_rb_x = ($this->w - $x - $w);\r
-                       } else {\r
-                               // set right side coordinate\r
-                               $this->img_rb_x = $x + $w;\r
-                       }\r
-                       // set pointer to align the successive text/objects\r
-                       switch($align) {\r
-                               case 'T':{\r
-                                       $this->y = $y;\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'M':{\r
-                                       $this->y = $y + round($h/2);\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'B':{\r
-                                       $this->y = $this->img_rb_y;\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'N':{\r
-                                       $this->SetY($this->img_rb_y);\r
-                                       break;\r
-                               }\r
-                               default:{\r
-                                       break;\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               /**\r
-                * This function is DEPRECATED, please use the new write1DBarcode() function.\r
-                * @param int $x x position in user units\r
-                * @param int $y y position in user units\r
-                * @param int $w width in user units\r
-                * @param int $h height position in user units\r
-                * @param string $type type of barcode (I25, C128A, C128B, C128C, C39)\r
-                * @param string $style barcode style\r
-                * @param string $font font for text\r
-                * @param int $xres x resolution\r
-                * @param string $code code to print\r
-                * @deprecated deprecated since version 3.1.000 (2008-06-10)\r
-                * @access public\r
-                * @see write1DBarcode()\r
-                */\r
-               public function writeBarcode($x, $y, $w, $h, $type, $style, $font, $xres, $code) {\r
-                       // convert old settings for the new write1DBarcode() function.\r
-                       $xres = 1 / $xres;\r
-                       $newstyle = array(\r
-                               'position' => 'L',\r
-                               'border' => false,\r
-                               'padding' => 0,\r
-                               'fgcolor' => array(0,0,0),\r
-                               'bgcolor' => false,\r
-                               'text' => true,\r
-                               'font' => $font,\r
-                               'fontsize' => 8,\r
-                               'stretchtext' => 4\r
-                       );\r
-                       if ($style & 1) {\r
-                               $newstyle['border'] = true;\r
-                       }\r
-                       if ($style & 2) {\r
-                               $newstyle['bgcolor'] = false;\r
-                       }\r
-                       if ($style & 4) {\r
-                               $newstyle['position'] = 'C';\r
-                       } elseif ($style & 8) {\r
-                               $newstyle['position'] = 'L';\r
-                       } elseif ($style & 16) {\r
-                               $newstyle['position'] = 'R';\r
-                       }\r
-                       if ($style & 128) {\r
-                               $newstyle['text'] = true;\r
-                       }\r
-                       if ($style & 256) {\r
-                               $newstyle['stretchtext'] = 4;\r
-                       }\r
-                       $this->write1DBarcode($code, $type, $x, $y, $w, $h, $xres, $newstyle, '');\r
-               }
-               
-               /**\r
-                * Print 2D Barcode.\r
-                * @param string $code code to print\r
-                * @param string $type type of barcode.\r
-                * @param int $x x position in user units\r
-                * @param int $y y position in user units\r
-                * @param int $w width in user units\r
-                * @param int $h height in user units\r
-                * @param array $style array of options:<ul><li>boolean $style['border'] if true prints a border around the barcode</li><li>int $style['padding'] padding to leave around the barcode in user units</li><li>array $style['fgcolor'] color array for bars and text</li><li>mixed $style['bgcolor'] color array for background or false for transparent</li></ul>\r
-                * @param string $align Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>\r
-                * @author Nicola Asuni\r
-                * @since 4.5.037 (2009-04-07)\r
-                * @access public\r
-                */\r
-               public function write2DBarcode($code, $type, $x='', $y='', $w='', $h='', $style='', $align='') {\r
-                       if ($this->empty_string($code)) {\r
-                               return;\r
+                       $this->setGraphicVars($gvars);
+                       // set bottomcoordinates
+                       $this->img_rb_y = $y + $h;
+                       if ($this->rtl) {
+                               // set left side coordinate
+                               $this->img_rb_x = ($this->w - $x - $w);
+                       } else {
+                               // set right side coordinate
+                               $this->img_rb_x = $x + $w;
+                       }
+                       // set pointer to align the successive text/objects
+                       switch($align) {
+                               case 'T':{
+                                       $this->y = $y;
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'M':{
+                                       $this->y = $y + round($h/2);
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'B':{
+                                       $this->y = $this->img_rb_y;
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'N':{
+                                       $this->SetY($this->img_rb_y);
+                                       break;
+                               }
+                               default:{
+                                       break;
+                               }
+                       }
+               }
+               
+               /**
+                * This function is DEPRECATED, please use the new write1DBarcode() function.
+                * @param int $x x position in user units
+                * @param int $y y position in user units
+                * @param int $w width in user units
+                * @param int $h height position in user units
+                * @param string $type type of barcode (I25, C128A, C128B, C128C, C39)
+                * @param string $style barcode style
+                * @param string $font font for text
+                * @param int $xres x resolution
+                * @param string $code code to print
+                * @deprecated deprecated since version 3.1.000 (2008-06-10)
+                * @access public
+                * @see write1DBarcode()
+                */
+               public function writeBarcode($x, $y, $w, $h, $type, $style, $font, $xres, $code) {
+                       // convert old settings for the new write1DBarcode() function.
+                       $xres = 1 / $xres;
+                       $newstyle = array(
+                               'position' => 'L',
+                               'border' => false,
+                               'padding' => 0,
+                               'fgcolor' => array(0,0,0),
+                               'bgcolor' => false,
+                               'text' => true,
+                               'font' => $font,
+                               'fontsize' => 8,
+                               'stretchtext' => 4
+                       );
+                       if ($style & 1) {
+                               $newstyle['border'] = true;
+                       }
+                       if ($style & 2) {
+                               $newstyle['bgcolor'] = false;
+                       }
+                       if ($style & 4) {
+                               $newstyle['position'] = 'C';
+                       } elseif ($style & 8) {
+                               $newstyle['position'] = 'L';
+                       } elseif ($style & 16) {
+                               $newstyle['position'] = 'R';
+                       }
+                       if ($style & 128) {
+                               $newstyle['text'] = true;
+                       }
+                       if ($style & 256) {
+                               $newstyle['stretchtext'] = 4;
+                       }
+                       $this->write1DBarcode($code, $type, $x, $y, $w, $h, $xres, $newstyle, '');
+               }
+               
+               /**
+                * Print 2D Barcode.
+                * @param string $code code to print
+                * @param string $type type of barcode.
+                * @param int $x x position in user units
+                * @param int $y y position in user units
+                * @param int $w width in user units
+                * @param int $h height in user units
+                * @param array $style array of options:<ul><li>boolean $style['border'] if true prints a border around the barcode</li><li>int $style['padding'] padding to leave around the barcode in user units</li><li>array $style['fgcolor'] color array for bars and text</li><li>mixed $style['bgcolor'] color array for background or false for transparent</li></ul>
+                * @param string $align Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>
+                * @author Nicola Asuni
+                * @since 4.5.037 (2009-04-07)
+                * @access public
+                */
+               public function write2DBarcode($code, $type, $x='', $y='', $w='', $h='', $style='', $align='') {
+                       if ($this->empty_string($code)) {
+                               return;
                        }
                        require_once(dirname(__FILE__).'/2dbarcodes.php');
                        // save current graphic settings
                        $gvars = $this->getGraphicVars();
-                       // create new barcode object\r
-                       $barcodeobj = new TCPDF2DBarcode($code, $type);\r
-                       $arrcode = $barcodeobj->getBarcodeArray();\r
-                       if ($arrcode === false) {\r
-                               $this->Error('Error in 2D barcode string');\r
-                       }\r
-                       // set default values\r
-                       if (!isset($style['padding'])) {\r
-                               $style['padding'] = 0;\r
-                       }\r
-                       if (!isset($style['fgcolor'])) {\r
-                               $style['fgcolor'] = array(0,0,0); // default black\r
-                       }\r
-                       if (!isset($style['bgcolor'])) {\r
-                               $style['bgcolor'] = false; // default transparent\r
-                       }\r
-                       if (!isset($style['border'])) {\r
-                               $style['border'] = false;\r
-                       }\r
-                       // set foreground color\r
+                       // create new barcode object
+                       $barcodeobj = new TCPDF2DBarcode($code, $type);
+                       $arrcode = $barcodeobj->getBarcodeArray();
+                       if ($arrcode === false) {
+                               $this->Error('Error in 2D barcode string');
+                       }
+                       // set default values
+                       if (!isset($style['padding'])) {
+                               $style['padding'] = 0;
+                       }
+                       if (!isset($style['fgcolor'])) {
+                               $style['fgcolor'] = array(0,0,0); // default black
+                       }
+                       if (!isset($style['bgcolor'])) {
+                               $style['bgcolor'] = false; // default transparent
+                       }
+                       if (!isset($style['border'])) {
+                               $style['border'] = false;
+                       }
+                       // set foreground color
                        $this->SetDrawColorArray($style['fgcolor']);
-                       if ($this->empty_string($x)) {\r
-                               $x = $this->GetX();\r
-                       }\r
-                       if ($this->rtl) {\r
-                               $x = $this->w - $x;\r
-                       }\r
-                       if ($this->empty_string($y)) {\r
-                               $y = $this->GetY();\r
-                       }\r
+                       if ($this->empty_string($x)) {
+                               $x = $this->GetX();
+                       }
+                       if ($this->rtl) {
+                               $x = $this->w - $x;
+                       }
+                       if ($this->empty_string($y)) {
+                               $y = $this->GetY();
+                       }
                        if ($this->empty_string($w) OR ($w <= 0)) {
-                               if ($this->rtl) {\r
-                                       $w = $x - $this->lMargin;\r
-                               } else {\r
-                                       $w = $this->w - $this->rMargin - $x;\r
-                               }\r
+                               if ($this->rtl) {
+                                       $w = $x - $this->lMargin;
+                               } else {
+                                       $w = $this->w - $this->rMargin - $x;
+                               }
                        }
                        if ($this->empty_string($h) OR ($h <= 0)) {
                                // 2d barcodes are square by default
-                               $h = $w;\r
-                       }\r
-                       if ($this->checkPageBreak($h)) {
-                               $y = $this->y;
+                               $h = $w;
+                       }
+                       $prev_x = $this->x;
+                       if ($this->checkPageBreak($h, $y)) {
+                               $y = $this->GetY() + $this->cMargin;
+                               if ($this->rtl) {
+                                       $x += ($prev_x - $this->x);
+                               } else {
+                                       $x += ($this->x - $prev_x);
+                               }
                        }
-                       // calculate barcode size (excluding padding)\r
+                       // calculate barcode size (excluding padding)
                        $bw = $w - (2 * $style['padding']);
                        $bh = $h - (2 * $style['padding']);
                        // calculate starting coordinates
-                       if ($this->rtl) {\r
-                               $xpos = $x - $w;\r
-                       } else {\r
-                               $xpos = $x;\r
-                       }\r
-                       $xpos += $style['padding'];\r
-                       $ypos = $y + $style['padding'];\r
+                       if ($this->rtl) {
+                               $xpos = $x - $w;
+                       } else {
+                               $xpos = $x;
+                       }
+                       $xpos += $style['padding'];
+                       $ypos = $y + $style['padding'];
                        // barcode is always printed in LTR direction
-                       $tempRTL = $this->rtl;\r
+                       $tempRTL = $this->rtl;
                        $this->rtl = false;
-                       // print background color\r
-                       if ($style['bgcolor']) {\r
-                               $this->Rect($x, $y, $w, $h, 'DF', '', $style['bgcolor']);\r
-                       } elseif ($style['border']) {\r
-                               $this->Rect($x, $y, $w, $h, 'D');\r
-                       }\r
-                       // print barcode cells\r
+                       // print background color
+                       if ($style['bgcolor']) {
+                               $this->Rect($x, $y, $w, $h, $style['border'] ? 'DF' : 'F', '', $style['bgcolor']);
+                       } elseif ($style['border']) {
+                               $this->Rect($x, $y, $w, $h, 'D');
+                       }
+                       // print barcode cells
                        if ($arrcode !== false) {
                                $rows = $arrcode['num_rows'];
                                $cols = $arrcode['num_cols'];
                                // calculate dimension of single barcode cell
                                $cw = $bw / $cols;
                                $ch = $bh / $rows;
-                               // for each row\r
+                               // for each row
                                for ($r = 0; $r < $rows; ++$r) {
                                        $xr = $xpos;
-                                       // for each column\r
-                                       for ($c = 0; $c < $cols; ++$c) {\r
-                                               if ($arrcode['bcode'][$r][$c] == 1) {\r
-                                                       // draw a single barcode cell\r
-                                                       $this->Rect($xr, $ypos, $cw, $ch, 'F', array(), $style['fgcolor']);\r
-                                               }\r
+                                       // for each column
+                                       for ($c = 0; $c < $cols; ++$c) {
+                                               if ($arrcode['bcode'][$r][$c] == 1) {
+                                                       // draw a single barcode cell
+                                                       $this->Rect($xr, $ypos, $cw, $ch, 'F', array(), $style['fgcolor']);
+                                               }
                                                $xr += $cw;
                                        }
-                                       $ypos += $ch;\r
-                               }\r
-                       }\r
-                       // restore original direction\r
-                       $this->rtl = $tempRTL;\r
+                                       $ypos += $ch;
+                               }
+                       }
+                       // restore original direction
+                       $this->rtl = $tempRTL;
                        // restore previous settings
-                       $this->setGraphicVars($gvars);\r
-                       // set bottomcoordinates\r
-                       $this->img_rb_y = $y + $h;\r
-                       if ($this->rtl) {\r
-                               // set left side coordinate\r
-                               $this->img_rb_x = ($this->w - $x - $w);\r
-                       } else {\r
-                               // set right side coordinate\r
-                               $this->img_rb_x = $x + $w;\r
-                       }\r
-                       // set pointer to align the successive text/objects\r
-                       switch($align) {\r
-                               case 'T':{\r
-                                       $this->y = $y;\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'M':{\r
-                                       $this->y = $y + round($h/2);\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'B':{\r
-                                       $this->y = $this->img_rb_y;\r
-                                       $this->x = $this->img_rb_x;\r
-                                       break;\r
-                               }\r
-                               case 'N':{\r
-                                       $this->SetY($this->img_rb_y);\r
-                                       break;\r
-                               }\r
-                               default:{\r
-                                       break;\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               /**\r
-                * Returns an array containing current margins:\r
-                * <ul>\r
-                               <li>$ret['left'] = left  margin</li>\r
-                               <li>$ret['right'] = right margin</li>\r
-                               <li>$ret['top'] = top margin</li>\r
-                               <li>$ret['bottom'] = bottom margin</li>\r
-                               <li>$ret['header'] = header margin</li>\r
-                               <li>$ret['footer'] = footer margin</li>\r
-                               <li>$ret['cell'] = cell margin</li>\r
-                * </ul>\r
-                * @return array containing all margins measures \r
-                * @access public\r
-                * @since 3.2.000 (2008-06-23)\r
-                */\r
-               public function getMargins() {\r
-                       $ret = array(\r
-                               'left' => $this->lMargin,\r
-                               'right' => $this->rMargin,\r
-                               'top' => $this->tMargin,\r
-                               'bottom' => $this->bMargin,\r
-                               'header' => $this->header_margin,\r
-                               'footer' => $this->footer_margin,\r
-                               'cell' => $this->cMargin,\r
-                       );\r
-                       return $ret;\r
-               }\r
-               \r
-               /**\r
-                * Returns an array containing original margins:\r
-                * <ul>\r
-                               <li>$ret['left'] = left  margin</li>\r
-                               <li>$ret['right'] = right margin</li>\r
-                * </ul>\r
-                * @return array containing all margins measures \r
-                * @access public\r
-                * @since 4.0.012 (2008-07-24)\r
-                */\r
-               public function getOriginalMargins() {\r
-                       $ret = array(\r
-                               'left' => $this->original_lMargin,\r
-                               'right' => $this->original_rMargin\r
-                       );\r
-                       return $ret;\r
-               }\r
-               \r
-               /**\r
-                * Returns the current font size.\r
+                       $this->setGraphicVars($gvars);
+                       // set bottomcoordinates
+                       $this->img_rb_y = $y + $h;
+                       if ($this->rtl) {
+                               // set left side coordinate
+                               $this->img_rb_x = ($this->w - $x - $w);
+                       } else {
+                               // set right side coordinate
+                               $this->img_rb_x = $x + $w;
+                       }
+                       // set pointer to align the successive text/objects
+                       switch($align) {
+                               case 'T':{
+                                       $this->y = $y;
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'M':{
+                                       $this->y = $y + round($h/2);
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'B':{
+                                       $this->y = $this->img_rb_y;
+                                       $this->x = $this->img_rb_x;
+                                       break;
+                               }
+                               case 'N':{
+                                       $this->SetY($this->img_rb_y);
+                                       break;
+                               }
+                               default:{
+                                       break;
+                               }
+                       }
+               }
+               
+               /**
+                * Returns an array containing current margins:
+                * <ul>
+                               <li>$ret['left'] = left  margin</li>
+                               <li>$ret['right'] = right margin</li>
+                               <li>$ret['top'] = top margin</li>
+                               <li>$ret['bottom'] = bottom margin</li>
+                               <li>$ret['header'] = header margin</li>
+                               <li>$ret['footer'] = footer margin</li>
+                               <li>$ret['cell'] = cell margin</li>
+                * </ul>
+                * @return array containing all margins measures 
+                * @access public
+                * @since 3.2.000 (2008-06-23)
+                */
+               public function getMargins() {
+                       $ret = array(
+                               'left' => $this->lMargin,
+                               'right' => $this->rMargin,
+                               'top' => $this->tMargin,
+                               'bottom' => $this->bMargin,
+                               'header' => $this->header_margin,
+                               'footer' => $this->footer_margin,
+                               'cell' => $this->cMargin,
+                       );
+                       return $ret;
+               }
+               
+               /**
+                * Returns an array containing original margins:
+                * <ul>
+                               <li>$ret['left'] = left  margin</li>
+                               <li>$ret['right'] = right margin</li>
+                * </ul>
+                * @return array containing all margins measures 
+                * @access public
+                * @since 4.0.012 (2008-07-24)
+                */
+               public function getOriginalMargins() {
+                       $ret = array(
+                               'left' => $this->original_lMargin,
+                               'right' => $this->original_rMargin
+                       );
+                       return $ret;
+               }
+               
+               /**
+                * Returns the current font size.
                 * @return current font size
-                * @access public\r
-                * @since 3.2.000 (2008-06-23)\r
-                */\r
-               public function getFontSize() {\r
-                       return $this->FontSize;\r
-               }\r
-               \r
-               /**\r
-                * Returns the current font size in points unit.\r
+                * @access public
+                * @since 3.2.000 (2008-06-23)
+                */
+               public function getFontSize() {
+                       return $this->FontSize;
+               }
+               
+               /**
+                * Returns the current font size in points unit.
                 * @return current font size in points unit
-                * @access public\r
-                * @since 3.2.000 (2008-06-23)\r
-                */\r
-               public function getFontSizePt() {\r
-                       return $this->FontSizePt;\r
+                * @access public
+                * @since 3.2.000 (2008-06-23)
+                */
+               public function getFontSizePt() {
+                       return $this->FontSizePt;
                }
 
-               /**\r
-                * Returns the current font family name.\r
+               /**
+                * Returns the current font family name.
                 * @return string current font family name
-                * @access public\r
-                * @since 4.3.008 (2008-12-05)\r
-                */\r
-               public function getFontFamily() {\r
-                       return $this->FontFamily;\r
-               }\r
-
-               /**\r
-                * Returns the current font style.\r
+                * @access public
+                * @since 4.3.008 (2008-12-05)
+                */
+               public function getFontFamily() {
+                       return $this->FontFamily;
+               }
+
+               /**
+                * Returns the current font style.
                 * @return string current font style
-                * @access public\r
-                * @since 4.3.008 (2008-12-05)\r
-                */\r
-               public function getFontStyle() {\r
-                       return $this->FontStyle;\r
-               }
-               \r
-               /**\r
-                * Prints a cell (rectangular area) with optional borders, background color and html text string. \r
-                * The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.<br />\r
-                * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.\r
-                * @param float $w Cell width. If 0, the cell extends up to the right margin.\r
-                * @param float $h Cell minimum height. The cell extends automatically if needed.\r
-                * @param float $x upper-left corner X coordinate\r
-                * @param float $y upper-left corner Y coordinate\r
-                * @param string $html html text to print. Default value: empty string.\r
-                * @param mixed $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>\r
-                * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right (or left for RTL language)</li><li>1: to the beginning of the next line</li><li>2: below</li></ul>\r
-       Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0.\r
-                * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.\r
-                * @param boolean $reseth if true reset the last cell height (default true).\r
+                * @access public
+                * @since 4.3.008 (2008-12-05)
+                */
+               public function getFontStyle() {
+                       return $this->FontStyle;
+               }
+               
+               /**
+                * Prints a cell (rectangular area) with optional borders, background color and html text string. 
+                * The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.<br />
+                * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
+                * @param float $w Cell width. If 0, the cell extends up to the right margin.
+                * @param float $h Cell minimum height. The cell extends automatically if needed.
+                * @param float $x upper-left corner X coordinate
+                * @param float $y upper-left corner Y coordinate
+                * @param string $html html text to print. Default value: empty string.
+                * @param mixed $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
+                * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right (or left for RTL language)</li><li>1: to the beginning of the next line</li><li>2: below</li></ul>
+       Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0.
+                * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
+                * @param boolean $reseth if true reset the last cell height (default true).
                 * @param string $align Allows to center or align the text. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>
-                * @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width.\r
-                * @access public\r
-                * @uses MultiCell()\r
-                * @see Multicell(), writeHTML()\r
-                */\r
-               public function writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true) {\r
-                       return $this->MultiCell($w, $h, $html, $border, $align, $fill, $ln, $x, $y, $reseth, 0, true, $autopadding, 0);\r
-               }\r
-               \r
-               /**\r
-                * Returns the HTML DOM array.\r
-                * <ul><li>$dom[$key]['tag'] = true if tag, false otherwise;</li><li>$dom[$key]['value'] = tag name or text;</li><li>$dom[$key]['opening'] = true if opening tag, false otherwise;</li><li>$dom[$key]['attribute'] = array of attributes (attribute name is the key);</li><li>$dom[$key]['style'] = array of style attributes (attribute name is the key);</li><li>$dom[$key]['parent'] = id of parent element;</li><li>$dom[$key]['fontname'] = font family name;</li><li>$dom[$key]['fontstyle'] = font style;</li><li>$dom[$key]['fontsize'] = font size in points;</li><li>$dom[$key]['bgcolor'] = RGB array of background color;</li><li>$dom[$key]['fgcolor'] = RGB array of foreground color;</li><li>$dom[$key]['width'] = width in pixels;</li><li>$dom[$key]['height'] = height in pixels;</li><li>$dom[$key]['align'] = text alignment;</li><li>$dom[$key]['cols'] = number of colums in table;</li><li>$dom[$key]['rows'] = number of rows in table;</li></ul>\r
-                * @param string $html html code\r
-                * @return array\r
-                * @access protected\r
-                * @since 3.2.000 (2008-06-20)\r
-                */\r
-               protected function getHtmlDomArray($html) {\r
-                       // remove all unsupported tags (the line below lists all supported tags)\r
-                       $html = strip_tags($html, '<marker/><a><b><blockquote><br><br/><dd><del><div><dl><dt><em><font><h1><h2><h3><h4><h5><h6><hr><i><img><li><ol><p><pre><small><span><strong><sub><sup><table><tablehead><tcpdf><td><th><thead><tr><tt><u><ul>');
+                * @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width.
+                * @access public
+                * @uses MultiCell()
+                * @see Multicell(), writeHTML()
+                */
+               public function writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true) {
+                       return $this->MultiCell($w, $h, $html, $border, $align, $fill, $ln, $x, $y, $reseth, 0, true, $autopadding, 0);
+               }
+               
+               /**
+                * Returns the HTML DOM array.
+                * <ul><li>$dom[$key]['tag'] = true if tag, false otherwise;</li><li>$dom[$key]['value'] = tag name or text;</li><li>$dom[$key]['opening'] = true if opening tag, false otherwise;</li><li>$dom[$key]['attribute'] = array of attributes (attribute name is the key);</li><li>$dom[$key]['style'] = array of style attributes (attribute name is the key);</li><li>$dom[$key]['parent'] = id of parent element;</li><li>$dom[$key]['fontname'] = font family name;</li><li>$dom[$key]['fontstyle'] = font style;</li><li>$dom[$key]['fontsize'] = font size in points;</li><li>$dom[$key]['bgcolor'] = RGB array of background color;</li><li>$dom[$key]['fgcolor'] = RGB array of foreground color;</li><li>$dom[$key]['width'] = width in pixels;</li><li>$dom[$key]['height'] = height in pixels;</li><li>$dom[$key]['align'] = text alignment;</li><li>$dom[$key]['cols'] = number of colums in table;</li><li>$dom[$key]['rows'] = number of rows in table;</li></ul>
+                * @param string $html html code
+                * @return array
+                * @access protected
+                * @since 3.2.000 (2008-06-20)
+                */
+               protected function getHtmlDomArray($html) {
+                       // remove all unsupported tags (the line below lists all supported tags)
+                       $html = strip_tags($html, '<marker/><a><b><blockquote><br><br/><dd><del><div><dl><dt><em><font><form><h1><h2><h3><h4><h5><h6><hr><i><img><input><label><li><ol><option><p><pre><select><small><span><strong><sub><sup><table><tablehead><tcpdf><td><textarea><th><thead><tr><tt><u><ul>');
                        //replace some blank characters
                        $html = preg_replace('/<pre/', '<xre', $html); // preserve pre tag
-                       $html = preg_replace('/<(table|tr|td|th|tcpdf|blockquote|dd|div|dt|h1|h2|h3|h4|h5|h6|br|hr|li|ol|ul|p)([^\>]*)>[\n\r\t]+/', '<\\1\\2>', $html);\r
+                       $html = preg_replace('/<(table|tr|td|th|tcpdf|blockquote|dd|div|dt|form|h1|h2|h3|h4|h5|h6|br|hr|li|ol|ul|p)([^\>]*)>[\n\r\t]+/', '<\\1\\2>', $html);
                        $html = preg_replace('@(\r\n|\r)@', "\n", $html);
-                       $repTable = array("\t" => ' ', "\0" => ' ', "\x0B" => ' ', "\\" => "\\\\");\r
+                       $repTable = array("\t" => ' ', "\0" => ' ', "\x0B" => ' ', "\\" => "\\\\");
                        $html = strtr($html, $repTable);
                        $offset = 0;
                        while (($offset < strlen($html)) AND ($pos = strpos($html, '</pre>', $offset)) !== false) {
                                $html_a = substr($html, 0, $offset);
                                $html_b = substr($html, $offset, ($pos - $offset + 6));
                                while (preg_match("'<xre([^\>]*)>(.*?)\n(.*?)</pre>'si", $html_b)) {
-                                       // preserve newlines on <pre> tag\r
-                                       $html_b = preg_replace("'<xre([^\>]*)>(.*?)\n(.*?)</pre>'si", "<xre\\1>\\2<br />\\3</pre>", $html_b);\r
+                                       // preserve newlines on <pre> tag
+                                       $html_b = preg_replace("'<xre([^\>]*)>(.*?)\n(.*?)</pre>'si", "<xre\\1>\\2<br />\\3</pre>", $html_b);
                                }
                                $html = $html_a.$html_b.substr($html, $pos + 6);
                                $offset = strlen($html_a.$html_b);
                        }
-                       $html = str_replace("\n", ' ', $html);\r
-                       // remove extra spaces from code\r
-                       $html = preg_replace('/[\s]+<\/(table|tr|td|th|ul|ol|li)>/', '</\\1>', $html);\r
+                       $offset = 0;
+                       while (($offset < strlen($html)) AND ($pos = strpos($html, '</textarea>', $offset)) !== false) {
+                               $html_a = substr($html, 0, $offset);
+                               $html_b = substr($html, $offset, ($pos - $offset + 11));
+                               while (preg_match("'<textarea([^\>]*)>(.*?)\n(.*?)</textarea>'si", $html_b)) {
+                                       // preserve newlines on <textarea> tag
+                                       $html_b = preg_replace("'<textarea([^\>]*)>(.*?)\n(.*?)</textarea>'si", "<textarea\\1>\\2<TBR>\\3</textarea>", $html_b);
+                                       $html_b = preg_replace("'<textarea([^\>]*)>(.*?)[\"](.*?)</textarea>'si", "<textarea\\1>\\2''\\3</textarea>", $html_b);
+                               }
+                               $html = $html_a.$html_b.substr($html, $pos + 11);
+                               $offset = strlen($html_a.$html_b);
+                       }
+                       $html = preg_replace("'([\s]*)<option'si", "<option", $html);
+                       $html = preg_replace("'</option>([\s]*)'si", "</option>", $html);
+                       $offset = 0;
+                       while (($offset < strlen($html)) AND ($pos = strpos($html, '</option>', $offset)) !== false) {
+                               $html_a = substr($html, 0, $offset);
+                               $html_b = substr($html, $offset, ($pos - $offset + 9));
+                               while (preg_match("'<option([^\>]*)>(.*?)</option>'si", $html_b)) {
+                                       $html_b = preg_replace("'<option([\s]+)value=\"([^\"]*)\"([^\>]*)>(.*?)</option>'si", "\\2\t\\4\r", $html_b);
+                                       $html_b = preg_replace("'<option([^\>]*)>(.*?)</option>'si", "\\2\r", $html_b);
+                               }
+                               $html = $html_a.$html_b.substr($html, $pos + 9);
+                               $offset = strlen($html_a.$html_b);
+                       }
+                       $html = preg_replace("'<select([^\>]*)>'si", "<select\\1 opt=\"", $html);
+                       $html = preg_replace("'([\s]+)</select>'si", "\" />", $html);
+                       $html = str_replace("\n", ' ', $html);
+                       // restore textarea newlines
+                       $html = str_replace('<TBR>', "\n", $html);
+                       // remove extra spaces from code
+                       $html = preg_replace('/[\s]+<\/(table|tr|td|th|ul|ol|li)>/', '</\\1>', $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|ul|p)>[\s]+</', '</\\1><', $html);
                        $html = preg_replace('/<\/(td|th)>/', '<marker style="font-size:0"/></\\1>', $html);
                        $html = preg_replace('/<\/table>([\s]*)<marker style="font-size:0"\/>/', '</table>', $html);
                        $html = preg_replace('/<img/', ' <img', $html);
-                       $html = preg_replace('/<img([^\>]*)>/xi', '<img\\1><span></span>', $html);
+                       $html = preg_replace('/<img([^\>]*)>/xi', '<img\\1><span><marker style="font-size:0"/></span>', $html);
                        $html = preg_replace('/<xre/', '<pre', $html); // restore pre tag
+                       $html = preg_replace('/<textarea([^\>]*)>/xi', '<textarea\\1 value="', $html);
+                       $html = preg_replace('/<\/textarea>/', '" />', $html);
                        // trim string
                        $html = preg_replace('/^[\s]+/', '', $html);
-                       $html = preg_replace('/[\s]+$/', '', $html);\r
-                       // pattern for generic tag\r
-                       $tagpattern = '/(<[^>]+>)/';\r
-                       // explodes the string\r
-                       $a = preg_split($tagpattern, $html, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\r
-                       // count elements\r
-                       $maxel = count($a);\r
+                       $html = preg_replace('/[\s]+$/', '', $html);
+                       // pattern for generic tag
+                       $tagpattern = '/(<[^>]+>)/';
+                       // explodes the string
+                       $a = preg_split($tagpattern, $html, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
+                       // count elements
+                       $maxel = count($a);
                        $elkey = 0;
-                       $key = 0;\r
-                       // create an array of elements\r
-                       $dom = array();\r
-                       $dom[$key] = array();\r
-                       // set first void element\r
-                       $dom[$key]['tag'] = false;\r
-                       $dom[$key]['value'] = '';\r
-                       $dom[$key]['parent'] = 0;\r
-                       $dom[$key]['fontname'] = $this->FontFamily;\r
-                       $dom[$key]['fontstyle'] = $this->FontStyle;\r
-                       $dom[$key]['fontsize'] = $this->FontSizePt;\r
-                       $dom[$key]['bgcolor'] = false;\r
-                       $dom[$key]['fgcolor'] = $this->fgcolor;\r
+                       $key = 0;
+                       // create an array of elements
+                       $dom = array();
+                       $dom[$key] = array();
+                       // set first void element
+                       $dom[$key]['tag'] = false;
+                       $dom[$key]['value'] = '';
+                       $dom[$key]['parent'] = 0;
+                       $dom[$key]['fontname'] = $this->FontFamily;
+                       $dom[$key]['fontstyle'] = $this->FontStyle;
+                       $dom[$key]['fontsize'] = $this->FontSizePt;
+                       $dom[$key]['bgcolor'] = false;
+                       $dom[$key]['fgcolor'] = $this->fgcolor;
                        $dom[$key]['align'] = '';
                        $dom[$key]['listtype'] = '';
-                       $thead = false; // true when we are inside the THEAD tag\r
-                       ++$key;\r
-                       $level = array();\r
-                       array_push($level, 0); // root\r
-                       while ($elkey < $maxel) {\r
-                               $dom[$key] = array();\r
+                       $dom[$key]['text-indent'] = 0;
+                       $thead = false; // true when we are inside the THEAD tag
+                       ++$key;
+                       $level = array();
+                       array_push($level, 0); // root
+                       while ($elkey < $maxel) {
+                               $dom[$key] = array();
                                $element = $a[$elkey];
-                               $dom[$key]['elkey'] = $elkey;\r
-                               if (preg_match($tagpattern, $element)) {\r
-                                       // html tag\r
-                                       $element = substr($element, 1, -1);\r
-                                       // get tag name\r
-                                       preg_match('/[\/]?([a-zA-Z0-9]*)/', $element, $tag);\r
+                               $dom[$key]['elkey'] = $elkey;
+                               if (preg_match($tagpattern, $element)) {
+                                       // html tag
+                                       $element = substr($element, 1, -1);
+                                       // get tag name
+                                       preg_match('/[\/]?([a-zA-Z0-9]*)/', $element, $tag);
                                        $tagname = strtolower($tag[1]);
                                        // check if we are inside a table header
                                        if ($tagname == 'thead') {
@@ -10984,33 +12743,33 @@ if (!class_exists('TCPDF', false)) {
                                        }
                                        $dom[$key]['tag'] = true;
                                        $dom[$key]['value'] = $tagname;
-                                       if ($element{0} == '/') {\r
-                                               // closing html tag\r
-                                               $dom[$key]['opening'] = false;\r
-                                               $dom[$key]['parent'] = end($level);\r
-                                               array_pop($level);\r
-                                               $dom[$key]['fontname'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontname'];\r
-                                               $dom[$key]['fontstyle'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontstyle'];\r
-                                               $dom[$key]['fontsize'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontsize'];\r
-                                               $dom[$key]['bgcolor'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['bgcolor'];\r
-                                               $dom[$key]['fgcolor'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fgcolor'];\r
+                                       if ($element{0} == '/') {
+                                               // closing html tag
+                                               $dom[$key]['opening'] = false;
+                                               $dom[$key]['parent'] = end($level);
+                                               array_pop($level);
+                                               $dom[$key]['fontname'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontname'];
+                                               $dom[$key]['fontstyle'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontstyle'];
+                                               $dom[$key]['fontsize'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontsize'];
+                                               $dom[$key]['bgcolor'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['bgcolor'];
+                                               $dom[$key]['fgcolor'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fgcolor'];
                                                $dom[$key]['align'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['align'];
                                                if (isset($dom[($dom[($dom[$key]['parent'])]['parent'])]['listtype'])) {
                                                        $dom[$key]['listtype'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['listtype'];
-                                               }\r
-                                               // set the number of columns in table tag\r
-                                               if (($dom[$key]['value'] == 'tr') AND (!isset($dom[($dom[($dom[$key]['parent'])]['parent'])]['cols']))) {\r
-                                                       $dom[($dom[($dom[$key]['parent'])]['parent'])]['cols'] = $dom[($dom[$key]['parent'])]['cols'];\r
-                                               }\r
-                                               if (($dom[$key]['value'] == 'td') OR ($dom[$key]['value'] == 'th')) {\r
+                                               }
+                                               // set the number of columns in table tag
+                                               if (($dom[$key]['value'] == 'tr') AND (!isset($dom[($dom[($dom[$key]['parent'])]['parent'])]['cols']))) {
+                                                       $dom[($dom[($dom[$key]['parent'])]['parent'])]['cols'] = $dom[($dom[$key]['parent'])]['cols'];
+                                               }
+                                               if (($dom[$key]['value'] == 'td') OR ($dom[$key]['value'] == 'th')) {
                                                        $dom[($dom[$key]['parent'])]['content'] = '';
-                                                       for ($i = ($dom[$key]['parent'] + 1); $i < $key; ++$i) {\r
-                                                               $dom[($dom[$key]['parent'])]['content'] .= $a[$dom[$i]['elkey']];\r
-                                                       }\r
-                                                       $key = $i;\r
+                                                       for ($i = ($dom[$key]['parent'] + 1); $i < $key; ++$i) {
+                                                               $dom[($dom[$key]['parent'])]['content'] .= $a[$dom[$i]['elkey']];
+                                                       }
+                                                       $key = $i;
                                                }
                                                // store header rows on a new table
-                                               if (($dom[$key]['value'] == 'tr') AND ($dom[($dom[$key]['parent'])]['thead'] == true)) {
+                                               if (($dom[$key]['value'] == 'tr') AND ($dom[($dom[$key]['parent'])]['thead'] === true)) {
                                                        if ($this->empty_string($dom[($dom[($dom[$key]['parent'])]['parent'])]['thead'])) {
                                                                $dom[($dom[($dom[$key]['parent'])]['parent'])]['thead'] = $a[$dom[($dom[($dom[$key]['parent'])]['parent'])]['elkey']];
                                                        }
@@ -11020,57 +12779,58 @@ if (!class_exists('TCPDF', false)) {
                                                }
                                                if (($dom[$key]['value'] == 'table') AND (!$this->empty_string($dom[($dom[$key]['parent'])]['thead']))) {
                                                        $dom[($dom[$key]['parent'])]['thead'] .= '</tablehead>';
-                                               }\r
-                                       } else {\r
-                                               // opening html tag\r
-                                               $dom[$key]['opening'] = true;\r
-                                               $dom[$key]['parent'] = end($level);\r
-                                               if (substr($element, -1, 1) != '/') {\r
-                                                       // not self-closing tag\r
-                                                       array_push($level, $key);\r
-                                                       $dom[$key]['self'] = false;\r
-                                               } else {\r
-                                                       $dom[$key]['self'] = true;\r
-                                               }\r
+                                               }
+                                       } else {
+                                               // opening html tag
+                                               $dom[$key]['opening'] = true;
+                                               $dom[$key]['parent'] = end($level);
+                                               if (substr($element, -1, 1) != '/') {
+                                                       // not self-closing tag
+                                                       array_push($level, $key);
+                                                       $dom[$key]['self'] = false;
+                                               } else {
+                                                       $dom[$key]['self'] = true;
+                                               }
                                                // copy some values from parent
-                                               $parentkey = 0;\r
+                                               $parentkey = 0;
                                                if ($key > 0) {
-                                                       $parentkey = $dom[$key]['parent'];\r
-                                                       $dom[$key]['fontname'] = $dom[$parentkey]['fontname'];\r
-                                                       $dom[$key]['fontstyle'] = $dom[$parentkey]['fontstyle'];\r
-                                                       $dom[$key]['fontsize'] = $dom[$parentkey]['fontsize'];\r
-                                                       $dom[$key]['bgcolor'] = $dom[$parentkey]['bgcolor'];\r
-                                                       $dom[$key]['fgcolor'] = $dom[$parentkey]['fgcolor'];\r
+                                                       $parentkey = $dom[$key]['parent'];
+                                                       $dom[$key]['fontname'] = $dom[$parentkey]['fontname'];
+                                                       $dom[$key]['fontstyle'] = $dom[$parentkey]['fontstyle'];
+                                                       $dom[$key]['fontsize'] = $dom[$parentkey]['fontsize'];
+                                                       $dom[$key]['bgcolor'] = $dom[$parentkey]['bgcolor'];
+                                                       $dom[$key]['fgcolor'] = $dom[$parentkey]['fgcolor'];
                                                        $dom[$key]['align'] = $dom[$parentkey]['align'];
-                                                       $dom[$key]['listtype'] = $dom[$parentkey]['listtype'];\r
-                                               }\r
-                                               // get attributes\r
-                                               preg_match_all('/([^=\s]*)=["]?([^"]*)["]?/', $element, $attr_array, PREG_PATTERN_ORDER);\r
-                                               $dom[$key]['attribute'] = array(); // reset attribute array\r
-                                               while (list($id, $name) = each($attr_array[1])) {\r
-                                                       $dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id];\r
-                                               }\r
-                                               // split style attributes\r
-                                               if (isset($dom[$key]['attribute']['style'])) {\r
+                                                       $dom[$key]['listtype'] = $dom[$parentkey]['listtype'];
+                                                       $dom[$key]['text-indent'] = $dom[$parentkey]['text-indent'];
+                                               }
+                                               // get attributes
+                                               preg_match_all('/([^=\s]*)=["]?([^"]*)["]?/', $element, $attr_array, PREG_PATTERN_ORDER);
+                                               $dom[$key]['attribute'] = array(); // reset attribute array
+                                               while (list($id, $name) = each($attr_array[1])) {
+                                                       $dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id];
+                                               }
+                                               // split style attributes
+                                               if (isset($dom[$key]['attribute']['style'])) {
                                                        // get style attributes
-                                                       preg_match_all('/([^;:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER);\r
-                                                       $dom[$key]['style'] = array(); // reset style attribute array\r
-                                                       while (list($id, $name) = each($style_array[1])) {\r
-                                                               $dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]);\r
-                                                       }\r
-                                                       // --- get some style attributes ---\r
-                                                       if (isset($dom[$key]['style']['font-family'])) {\r
-                                                               // font family\r
-                                                               if (isset($dom[$key]['style']['font-family'])) {\r
-                                                                       $fontslist = split(',', strtolower($dom[$key]['style']['font-family']));\r
-                                                                       foreach ($fontslist as $font) {\r
+                                                       preg_match_all('/([^;:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER);
+                                                       $dom[$key]['style'] = array(); // reset style attribute array
+                                                       while (list($id, $name) = each($style_array[1])) {
+                                                               $dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]);
+                                                       }
+                                                       // --- get some style attributes ---
+                                                       if (isset($dom[$key]['style']['font-family'])) {
+                                                               // font family
+                                                               if (isset($dom[$key]['style']['font-family'])) {
+                                                                       $fontslist = preg_split('/[,]/', strtolower($dom[$key]['style']['font-family']));
+                                                                       foreach ($fontslist as $font) {
                                                                                $font = trim(strtolower($font));
-                                                                               if (in_array($font, $this->fontlist) OR in_array($font, $this->fontkeys)) {\r
-                                                                                       $dom[$key]['fontname'] = $font;\r
-                                                                                       break;\r
-                                                                               }\r
-                                                                       }\r
-                                                               }\r
+                                                                               if (in_array($font, $this->fontlist) OR in_array($font, $this->fontkeys)) {
+                                                                                       $dom[$key]['fontname'] = $font;
+                                                                                       break;
+                                                                               }
+                                                                       }
+                                                               }
                                                        }
                                                        // list-style-type
                                                        if (isset($dom[$key]['style']['list-style-type'])) {
@@ -11078,9 +12838,16 @@ if (!class_exists('TCPDF', false)) {
                                                                if ($dom[$key]['listtype'] == 'inherit') {
                                                                        $dom[$key]['listtype'] = $dom[$parentkey]['listtype'];
                                                                }
-                                                       }\r
-                                                       // font size\r
-                                                       if (isset($dom[$key]['style']['font-size'])) {\r
+                                                       }
+                                                       // text-indent
+                                                       if (isset($dom[$key]['style']['text-indent'])) {
+                                                               $dom[$key]['text-indent'] = $this->getHTMLUnitToUnits($dom[$key]['style']['text-indent']);
+                                                               if ($dom[$key]['text-indent'] == 'inherit') {
+                                                                       $dom[$key]['text-indent'] = $dom[$parentkey]['text-indent'];
+                                                               }
+                                                       }
+                                                       // font size
+                                                       if (isset($dom[$key]['style']['font-size'])) {
                                                                $fsize = trim($dom[$key]['style']['font-size']);
                                                                switch ($fsize) {
                                                                        // absolute-size
@@ -11124,14 +12891,14 @@ if (!class_exists('TCPDF', false)) {
                                                                        default: {
                                                                                $dom[$key]['fontsize'] = $this->getHTMLUnitToUnits($fsize, $dom[$parentkey]['fontsize'], 'pt', true);
                                                                        }
-                                                               }\r
-                                                       }\r
-                                                       // font style\r
-                                                       if (isset($dom[$key]['style']['font-weight']) AND (strtolower($dom[$key]['style']['font-weight']{0}) == 'b')) {\r
-                                                               $dom[$key]['fontstyle'] .= 'B';\r
-                                                       }\r
-                                                       if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style']{0}) == 'i')) {\r
-                                                               $dom[$key]['fontstyle'] .= '"I';\r
+                                                               }
+                                                       }
+                                                       // font style
+                                                       if (isset($dom[$key]['style']['font-weight']) AND (strtolower($dom[$key]['style']['font-weight']{0}) == 'b')) {
+                                                               $dom[$key]['fontstyle'] .= 'B';
+                                                       }
+                                                       if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style']{0}) == 'i')) {
+                                                               $dom[$key]['fontstyle'] .= '"I';
                                                        }
                                                        // font color
                                                        if (isset($dom[$key]['style']['color']) AND (!$this->empty_string($dom[$key]['style']['color']))) {
@@ -11154,213 +12921,266 @@ if (!class_exists('TCPDF', false)) {
                                                                                }
                                                                        }
                                                                }
-                                                       }\r
-                                                       // check for width attribute\r
-                                                       if (isset($dom[$key]['style']['width'])) {\r
-                                                               $dom[$key]['width'] = $dom[$key]['style']['width'];\r
-                                                       }\r
-                                                       // check for height attribute\r
-                                                       if (isset($dom[$key]['style']['height'])) {\r
-                                                               $dom[$key]['height'] = $dom[$key]['style']['height'];\r
-                                                       }\r
-                                                       // check for text alignment\r
-                                                       if (isset($dom[$key]['style']['text-align'])) {\r
-                                                               $dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align']{0});\r
-                                                       }
-                                                       // check for border attribute\r
-                                                       if (isset($dom[$key]['style']['border'])) {\r
-                                                               $dom[$key]['attribute']['border'] = $dom[$key]['style']['border'];\r
-                                                       }\r
-                                               }\r
-                                               // check for font tag\r
-                                               if ($dom[$key]['value'] == 'font') {\r
-                                                       // font family\r
-                                                       if (isset($dom[$key]['attribute']['face'])) {\r
-                                                               $fontslist = split(',', strtolower($dom[$key]['attribute']['face']));\r
-                                                               foreach ($fontslist as $font) {\r
-                                                                       $font = trim(strtolower($font));\r
-                                                                       if (in_array($font, $this->fontlist) OR in_array($font, $this->fontkeys)) {\r
-                                                                               $dom[$key]['fontname'] = $font;\r
-                                                                               break;\r
-                                                                       }\r
-                                                               }\r
-                                                       }\r
-                                                       // font size\r
-                                                       if (isset($dom[$key]['attribute']['size'])) {\r
-                                                               if ($key > 0) {\r
-                                                                       if ($dom[$key]['attribute']['size']{0} == '+') {\r
-                                                                               $dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] + intval(substr($dom[$key]['attribute']['size'], 1));\r
-                                                                       } elseif ($dom[$key]['attribute']['size']{0} == '-') {\r
-                                                                               $dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] - intval(substr($dom[$key]['attribute']['size'], 1));\r
-                                                                       } else {\r
-                                                                               $dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']);\r
-                                                                       }\r
-                                                               } else {\r
-                                                                       $dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']);\r
-                                                               }\r
-                                                       }\r
-                                               }
-                                               // force natural alignment for lists\r
+                                                       }
+                                                       // check for width attribute
+                                                       if (isset($dom[$key]['style']['width'])) {
+                                                               $dom[$key]['width'] = $dom[$key]['style']['width'];
+                                                       }
+                                                       // check for height attribute
+                                                       if (isset($dom[$key]['style']['height'])) {
+                                                               $dom[$key]['height'] = $dom[$key]['style']['height'];
+                                                       }
+                                                       // check for text alignment
+                                                       if (isset($dom[$key]['style']['text-align'])) {
+                                                               $dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align']{0});
+                                                       }
+                                                       // check for border attribute
+                                                       if (isset($dom[$key]['style']['border'])) {
+                                                               $dom[$key]['attribute']['border'] = $dom[$key]['style']['border'];
+                                                       }
+                                               }
+                                               // check for font tag
+                                               if ($dom[$key]['value'] == 'font') {
+                                                       // font family
+                                                       if (isset($dom[$key]['attribute']['face'])) {
+                                                               $fontslist = preg_split('/[,]/', strtolower($dom[$key]['attribute']['face']));
+                                                               foreach ($fontslist as $font) {
+                                                                       $font = trim(strtolower($font));
+                                                                       if (in_array($font, $this->fontlist) OR in_array($font, $this->fontkeys)) {
+                                                                               $dom[$key]['fontname'] = $font;
+                                                                               break;
+                                                                       }
+                                                               }
+                                                       }
+                                                       // font size
+                                                       if (isset($dom[$key]['attribute']['size'])) {
+                                                               if ($key > 0) {
+                                                                       if ($dom[$key]['attribute']['size']{0} == '+') {
+                                                                               $dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] + intval(substr($dom[$key]['attribute']['size'], 1));
+                                                                       } elseif ($dom[$key]['attribute']['size']{0} == '-') {
+                                                                               $dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] - intval(substr($dom[$key]['attribute']['size'], 1));
+                                                                       } else {
+                                                                               $dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']);
+                                                                       }
+                                                               } else {
+                                                                       $dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']);
+                                                               }
+                                                       }
+                                               }
+                                               // force natural alignment for lists
                                                if ((($dom[$key]['value'] == 'ul') OR ($dom[$key]['value'] == 'ol') OR ($dom[$key]['value'] == 'dl'))
-                                                       AND (!isset($dom[$key]['align']) OR $this->empty_string($dom[$key]['align']) OR ($dom[$key]['align'] != 'J'))) {\r
-                                                       if ($this->rtl) {\r
-                                                               $dom[$key]['align'] = 'R';\r
-                                                       } else {\r
-                                                               $dom[$key]['align'] = 'L';\r
-                                                       }\r
-                                               }\r
-                                               if (($dom[$key]['value'] == 'small') OR ($dom[$key]['value'] == 'sup') OR ($dom[$key]['value'] == 'sub')) {\r
-                                                       $dom[$key]['fontsize'] = $dom[$key]['fontsize'] * K_SMALL_RATIO;\r
-                                               }\r
-                                               if (($dom[$key]['value'] == 'strong') OR ($dom[$key]['value'] == 'b')) {\r
-                                                       $dom[$key]['fontstyle'] .= 'B';\r
-                                               }\r
-                                               if (($dom[$key]['value'] == 'em') OR ($dom[$key]['value'] == 'i')) {\r
-                                                       $dom[$key]['fontstyle'] .= 'I';\r
-                                               }
-                                               if ($dom[$key]['value'] == 'u') {\r
-                                                       $dom[$key]['fontstyle'] .= 'U';\r
-                                               }
-                                               if ($dom[$key]['value'] == 'del') {\r
-                                                       $dom[$key]['fontstyle'] .= 'D';\r
+                                                       AND (!isset($dom[$key]['align']) OR $this->empty_string($dom[$key]['align']) OR ($dom[$key]['align'] != 'J'))) {
+                                                       if ($this->rtl) {
+                                                               $dom[$key]['align'] = 'R';
+                                                       } else {
+                                                               $dom[$key]['align'] = 'L';
+                                                       }
+                                               }
+                                               if (($dom[$key]['value'] == 'small') OR ($dom[$key]['value'] == 'sup') OR ($dom[$key]['value'] == 'sub')) {
+                                                       $dom[$key]['fontsize'] = $dom[$key]['fontsize'] * K_SMALL_RATIO;
+                                               }
+                                               if (($dom[$key]['value'] == 'strong') OR ($dom[$key]['value'] == 'b')) {
+                                                       $dom[$key]['fontstyle'] .= 'B';
+                                               }
+                                               if (($dom[$key]['value'] == 'em') OR ($dom[$key]['value'] == 'i')) {
+                                                       $dom[$key]['fontstyle'] .= 'I';
+                                               }
+                                               if ($dom[$key]['value'] == 'u') {
+                                                       $dom[$key]['fontstyle'] .= 'U';
+                                               }
+                                               if ($dom[$key]['value'] == 'del') {
+                                                       $dom[$key]['fontstyle'] .= 'D';
                                                }
                                                if (($dom[$key]['value'] == 'pre') OR ($dom[$key]['value'] == 'tt')) {
                                                        $dom[$key]['fontname'] = $this->default_monospaced_font;
-                                               }\r
-                                               if (($dom[$key]['value']{0} == 'h') AND (intval($dom[$key]['value']{1}) > 0) AND (intval($dom[$key]['value']{1}) < 7)) {\r
-                                                       $headsize = (4 - intval($dom[$key]['value']{1})) * 2;\r
-                                                       $dom[$key]['fontsize'] = $dom[0]['fontsize'] + $headsize;\r
-                                                       $dom[$key]['fontstyle'] .= 'B';\r
-                                               }\r
-                                               if (($dom[$key]['value'] == 'table')) {\r
-                                                       $dom[$key]['rows'] = 0; // number of rows\r
+                                               }
+                                               if (($dom[$key]['value']{0} == 'h') AND (intval($dom[$key]['value']{1}) > 0) AND (intval($dom[$key]['value']{1}) < 7)) {
+                                                       $headsize = (4 - intval($dom[$key]['value']{1})) * 2;
+                                                       $dom[$key]['fontsize'] = $dom[0]['fontsize'] + $headsize;
+                                                       $dom[$key]['fontstyle'] .= 'B';
+                                               }
+                                               if (($dom[$key]['value'] == 'table')) {
+                                                       $dom[$key]['rows'] = 0; // number of rows
                                                        $dom[$key]['trids'] = array(); // IDs of TR elements
-                                                       $dom[$key]['thead'] = ''; // table header rows\r
-                                               }\r
-                                               if (($dom[$key]['value'] == 'tr')) {\r
-                                                       $dom[$key]['cols'] = 0;\r
-                                                       // store the number of rows on table element\r
-                                                       ++$dom[($dom[$key]['parent'])]['rows'];\r
-                                                       // store the TR elements IDs on table element\r
+                                                       $dom[$key]['thead'] = ''; // table header rows
+                                               }
+                                               if (($dom[$key]['value'] == 'tr')) {
+                                                       $dom[$key]['cols'] = 0;
+                                                       // store the number of rows on table element
+                                                       ++$dom[($dom[$key]['parent'])]['rows'];
+                                                       // store the TR elements IDs on table element
                                                        array_push($dom[($dom[$key]['parent'])]['trids'], $key);
                                                        if ($thead) {
                                                                $dom[$key]['thead'] = true;
                                                        } else {
                                                                $dom[$key]['thead'] = false;
-                                                       }\r
-                                               }\r
-                                               if (($dom[$key]['value'] == 'th') OR ($dom[$key]['value'] == 'td')) {\r
-                                                       if (isset($dom[$key]['attribute']['colspan'])) {\r
-                                                               $colspan = intval($dom[$key]['attribute']['colspan']);\r
-                                                       } else {\r
-                                                               $colspan = 1;\r
-                                                       }\r
-                                                       $dom[$key]['attribute']['colspan'] = $colspan;\r
-                                                       $dom[($dom[$key]['parent'])]['cols'] += $colspan;\r
-                                               }\r
-                                               // set foreground color attribute\r
-                                               if (isset($dom[$key]['attribute']['color']) AND (!$this->empty_string($dom[$key]['attribute']['color']))) {\r
-                                                       $dom[$key]['fgcolor'] = $this->convertHTMLColorToDec($dom[$key]['attribute']['color']);\r
-                                               }\r
-                                               // set background color attribute\r
-                                               if (isset($dom[$key]['attribute']['bgcolor']) AND (!$this->empty_string($dom[$key]['attribute']['bgcolor']))) {\r
-                                                       $dom[$key]['bgcolor'] = $this->convertHTMLColorToDec($dom[$key]['attribute']['bgcolor']);\r
-                                               }\r
-                                               // check for width attribute\r
-                                               if (isset($dom[$key]['attribute']['width'])) {\r
-                                                       $dom[$key]['width'] = $dom[$key]['attribute']['width'];\r
-                                               }\r
-                                               // check for height attribute\r
-                                               if (isset($dom[$key]['attribute']['height'])) {\r
-                                                       $dom[$key]['height'] = $dom[$key]['attribute']['height'];\r
-                                               }\r
-                                               // check for text alignment\r
-                                               if (isset($dom[$key]['attribute']['align']) AND (!$this->empty_string($dom[$key]['attribute']['align'])) AND ($dom[$key]['value'] !== 'img')) {\r
-                                                       $dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align']{0});\r
-                                               }\r
-                                       } // end opening tag\r
-                               } else {\r
-                                       // text\r
-                                       $dom[$key]['tag'] = false;\r
-                                       $dom[$key]['value'] = stripslashes($this->unhtmlentities($element));\r
-                                       $dom[$key]['parent'] = end($level);\r
-                               }
-                               ++$elkey;\r
-                               ++$key;\r
-                       }\r
-                       return $dom;\r
-               }
-               \r
-               /**\r
+                                                       }
+                                               }
+                                               if (($dom[$key]['value'] == 'th') OR ($dom[$key]['value'] == 'td')) {
+                                                       if (isset($dom[$key]['attribute']['colspan'])) {
+                                                               $colspan = intval($dom[$key]['attribute']['colspan']);
+                                                       } else {
+                                                               $colspan = 1;
+                                                       }
+                                                       $dom[$key]['attribute']['colspan'] = $colspan;
+                                                       $dom[($dom[$key]['parent'])]['cols'] += $colspan;
+                                               }
+                                               // set foreground color attribute
+                                               if (isset($dom[$key]['attribute']['color']) AND (!$this->empty_string($dom[$key]['attribute']['color']))) {
+                                                       $dom[$key]['fgcolor'] = $this->convertHTMLColorToDec($dom[$key]['attribute']['color']);
+                                               }
+                                               // set background color attribute
+                                               if (isset($dom[$key]['attribute']['bgcolor']) AND (!$this->empty_string($dom[$key]['attribute']['bgcolor']))) {
+                                                       $dom[$key]['bgcolor'] = $this->convertHTMLColorToDec($dom[$key]['attribute']['bgcolor']);
+                                               }
+                                               // check for width attribute
+                                               if (isset($dom[$key]['attribute']['width'])) {
+                                                       $dom[$key]['width'] = $dom[$key]['attribute']['width'];
+                                               }
+                                               // check for height attribute
+                                               if (isset($dom[$key]['attribute']['height'])) {
+                                                       $dom[$key]['height'] = $dom[$key]['attribute']['height'];
+                                               }
+                                               // check for text alignment
+                                               if (isset($dom[$key]['attribute']['align']) AND (!$this->empty_string($dom[$key]['attribute']['align'])) AND ($dom[$key]['value'] !== 'img')) {
+                                                       $dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align']{0});
+                                               }
+                                       } // end opening tag
+                               } else {
+                                       // text
+                                       $dom[$key]['tag'] = false;
+                                       $dom[$key]['value'] = stripslashes($this->unhtmlentities($element));
+                                       $dom[$key]['parent'] = end($level);
+                               }
+                               ++$elkey;
+                               ++$key;
+                       }
+                       return $dom;
+               }
+               
+               /**
                 * Allows to preserve some HTML formatting (limited support).<br />
-                * IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting.\r
-                * Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul\r
-                * @param string $html text to display\r
-                * @param boolean $ln if true add a new line after text (default = true)\r
-                * @param int $fill Indicates if the background must be painted (true) or transparent (false).\r
-                * @param boolean $reseth if true reset the last cell height (default false).\r
-                * @param boolean $cell if true add the default cMargin space to each Write (default false).\r
-                * @param string $align Allows to center or align the text. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>\r
-                * @access public\r
-                */\r
+                * IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting.
+                * Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul
+                * @param string $html text to display
+                * @param boolean $ln if true add a new line after text (default = true)
+                * @param int $fill Indicates if the background must be painted (true) or transparent (false).
+                * @param boolean $reseth if true reset the last cell height (default false).
+                * @param boolean $cell if true add the default cMargin space to each Write (default false).
+                * @param string $align Allows to center or align the text. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>
+                * @access public
+                */
                public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='') {
-                       $gvars = $this->getGraphicVars();\r
+                       $gvars = $this->getGraphicVars();
                        // store current values
                        $prevPage = $this->page;
-                       $prevlMargin = $this->lMargin;\r
+                       $prevlMargin = $this->lMargin;
                        $prevrMargin = $this->rMargin;
-                       $curfontname = $this->FontFamily;\r
-                       $curfontstyle = $this->FontStyle;\r
-                       $curfontsize = $this->FontSizePt;       \r
-                       $this->newline = true;\r
-                       $minstartliney = $this->y;\r
-                       $yshift = 0;\r
-                       $startlinepage = $this->page;\r
+                       $curfontname = $this->FontFamily;
+                       $curfontstyle = $this->FontStyle;
+                       $curfontsize = $this->FontSizePt;       
+                       $this->newline = true;
+                       $startlinepage = $this->page;
+                       $minstartliney = $this->y;
+                       $startlinex = $this->x;
+                       $startliney = $this->y;
+                       $yshift = 0;
                        $newline = true;
                        $loop = 0;
                        $curpos = 0;
+                       $this_method_vars = array();
+                       $undo = false;
                        $blocktags = array('blockquote','br','dd','div','dt','h1','h2','h3','h4','h5','h6','hr','li','ol','p','ul','tcpdf');
                        $this->premode = false;
                        if (isset($this->PageAnnots[$this->page])) {
                                $pask = count($this->PageAnnots[$this->page]);
                        } else {
                                $pask = 0;
-                       }\r
-                       if (isset($this->footerlen[$this->page])) {\r
-                               $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page];\r
-                       } else {\r
-                               $this->footerpos[$this->page] = $this->pagelen[$this->page];\r
-                       }
-                       $startlinepos = $this->footerpos[$this->page];\r
-                       $lalign = $align;\r
+                       }
+                       if (isset($this->footerlen[$this->page])) {
+                               $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page];
+                       } else {
+                               $this->footerpos[$this->page] = $this->pagelen[$this->page];
+                       }
+                       $startlinepos = $this->footerpos[$this->page];
+                       $lalign = $align;
                        $plalign = $align;
-                       if ($this->rtl) {\r
-                               $w = $this->x - $this->lMargin;\r
-                       } else {\r
-                               $w = $this->w - $this->rMargin - $this->x;\r
-                       }\r
-                       $w -= (2 * $this->cMargin);\r
-                       if ($cell) {\r
-                               if ($this->rtl) {\r
-                                       $this->x -= $this->cMargin;\r
-                               } else {\r
-                                       $this->x += $this->cMargin;\r
-                               }\r
+                       if ($this->rtl) {
+                               $w = $this->x - $this->lMargin;
+                       } else {
+                               $w = $this->w - $this->rMargin - $this->x;
+                       }
+                       $w -= (2 * $this->cMargin);
+                       if ($cell) {
+                               if ($this->rtl) {
+                                       $this->x -= $this->cMargin;
+                               } else {
+                                       $this->x += $this->cMargin;
+                               }
                        }
                        if ($this->customlistindent >= 0) {
                                $this->listindent = $this->customlistindent;
-                       } else {\r
+                       } else {
                                $this->listindent = $this->GetStringWidth('0000');
-                       }\r
-                       $this->listnum = 0;\r
-                       if (($this->empty_string($this->lasth)) OR ($reseth)) {\r
-                               //set row height\r
-                               $this->lasth = $this->FontSize * $this->cell_height_ratio; \r
-                       }\r
-                       $dom = $this->getHtmlDomArray($html);\r
-                       $maxel = count($dom);\r
-                       $key = 0;\r
-                       while ($key < $maxel) {\r
+                       }
+                       // save previous states
+                       $prev_listnum = $this->listnum;
+                       $prev_listordered = $this->listordered;
+                       $prev_listcount = $this->listcount;
+                       $prev_lispacer = $this->lispacer;
+                       $this->listnum = 0;
+                       $this->listordered = array();
+                       $this->listcount = array();
+                       $this->lispacer = '';
+                       if (($this->empty_string($this->lasth)) OR ($reseth)) {
+                               //set row height
+                               $this->lasth = $this->FontSize * $this->cell_height_ratio; 
+                       }
+                       $dom = $this->getHtmlDomArray($html);
+                       $maxel = count($dom);
+                       $key = 0;
+                       while ($key < $maxel) {
+                               if ($dom[$key]['tag'] AND $dom[$key]['opening'] AND isset($dom[$key]['attribute']['nobr']) AND ($dom[$key]['attribute']['nobr'] == 'true')) {
+                                       if (isset($dom[($dom[$key]['parent'])]['attribute']['nobr']) AND ($dom[($dom[$key]['parent'])]['attribute']['nobr'] == 'true')) {
+                                               $dom[$key]['attribute']['nobr'] = false;
+                                       } else {
+                                               // store current object
+                                               $this->startTransaction();
+                                               // save this method vars
+                                               $this_method_vars['html'] = $html;
+                                               $this_method_vars['ln'] = $ln;
+                                               $this_method_vars['fill'] = $fill;
+                                               $this_method_vars['reseth'] = $reseth;
+                                               $this_method_vars['cell'] = $cell;
+                                               $this_method_vars['align'] = $align;
+                                               $this_method_vars['gvars'] = $gvars;
+                                               $this_method_vars['prevPage'] = $prevPage;
+                                               $this_method_vars['prevlMargin'] = $prevlMargin;
+                                               $this_method_vars['prevrMargin'] = $prevrMargin;
+                                               $this_method_vars['curfontname'] = $curfontname;
+                                               $this_method_vars['curfontstyle'] = $curfontstyle;
+                                               $this_method_vars['curfontsize'] = $curfontsize;
+                                               $this_method_vars['minstartliney'] = $minstartliney;
+                                               $this_method_vars['yshift'] = $yshift;
+                                               $this_method_vars['startlinepage'] = $startlinepage;
+                                               $this_method_vars['startlinepos'] = $startlinepos;
+                                               $this_method_vars['startlinex'] = $startlinex;
+                                               $this_method_vars['startliney'] = $startliney;
+                                               $this_method_vars['newline'] = $newline;
+                                               $this_method_vars['loop'] = $loop;
+                                               $this_method_vars['curpos'] = $curpos;
+                                               $this_method_vars['pask'] = $pask;
+                                               $this_method_vars['lalign'] = $lalign;
+                                               $this_method_vars['plalign'] = $plalign;
+                                               $this_method_vars['w'] = $w;
+                                               $this_method_vars['prev_listnum'] = $prev_listnum;
+                                               $this_method_vars['prev_listordered'] = $prev_listordered;
+                                               $this_method_vars['prev_listcount'] = $prev_listcount;
+                                               $this_method_vars['prev_lispacer'] = $prev_lispacer;
+                                               $this_method_vars['key'] = $key;
+                                               $this_method_vars['dom'] = $dom;
+                                       }
+                               }
                                if ($dom[$key]['tag'] OR ($key == 0)) {
                                        if ((($dom[$key]['value'] == 'table') OR ($dom[$key]['value'] == 'tr')) AND (isset($dom[$key]['align']))) {
                                                $dom[$key]['align'] = ($this->rtl) ? 'R' : 'L';
@@ -11370,6 +13190,7 @@ if (!class_exists('TCPDF', false)) {
                                                AND ($dom[$key]['value'] == 'img')
                                                AND (isset($dom[$key]['attribute']['height']))
                                                AND ($dom[$key]['attribute']['height'] > 0)) {
+                                               
                                                // get image height
                                                $imgh = $this->getHTMLUnitToUnits($dom[$key]['attribute']['height'], $this->lasth, 'px');
                                                if (!$this->InFooter) {
@@ -11377,54 +13198,59 @@ if (!class_exists('TCPDF', false)) {
                                                        $this->checkPageBreak($imgh);
                                                }
                                                if ($this->page > $startlinepage) {
-                                                       // fix lines splitted over two pages
+                                                       // fix line splitted over two pages
                                                        if (isset($this->footerlen[$startlinepage])) {
-                                                               $curpos = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];\r
+                                                               $curpos = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];
                                                        }
                                                        // line to be moved one page forward
                                                        $pagebuff = $this->getPageBuffer($startlinepage);
                                                        $linebeg = substr($pagebuff, $startlinepos, ($curpos - $startlinepos));
                                                        $tstart = substr($pagebuff, 0, $startlinepos);
                                                        $tend = substr($this->getPageBuffer($startlinepage), $curpos);
-                                                       // remove line start from previous page
+                                                       // remove line from previous page
                                                        $this->setPageBuffer($startlinepage, $tstart.''.$tend);
                                                        $pagebuff = $this->getPageBuffer($this->page);
-                                                       $tstart = substr($pagebuff, 0, $this->intmrk[$this->page]);
-                                                       $tend = substr($pagebuff, $this->intmrk[$this->page]);
+                                                       $tstart = substr($pagebuff, 0, $this->cntmrk[$this->page]);
+                                                       $tend = substr($pagebuff, $this->cntmrk[$this->page]);
                                                        // add line start to current page
                                                        $yshift = $minstartliney - $this->y;
                                                        $try = sprintf('1 0 0 1 0 %.3F cm', ($yshift * $this->k));
                                                        $this->setPageBuffer($this->page, $tstart."\nq\n".$try."\n".$linebeg."\nQ\n".$tend);
-                                                       // shift the annotations and links\r
-                                                       if (isset($this->PageAnnots[$startlinepage])) {\r
-                                                               foreach ($this->PageAnnots[$startlinepage] as $pak => $pac) {\r
+                                                       // shift the annotations and links
+                                                       if (isset($this->PageAnnots[$this->page])) {
+                                                               $next_pask = count($this->PageAnnots[$this->page]);
+                                                       } else {
+                                                               $next_pask = 0;
+                                                       }
+                                                       if (isset($this->PageAnnots[$startlinepage])) {
+                                                               foreach ($this->PageAnnots[$startlinepage] as $pak => $pac) {
                                                                        if ($pak >= $pask) {
                                                                                $this->PageAnnots[$this->page][] = $pac;
                                                                                unset($this->PageAnnots[$startlinepage][$pak]);
-                                                                               $npak = count($this->PageAnnots[$this->page]) - 1;\r
-                                                                               $this->PageAnnots[$this->page][$npak]['y'] -= $yshift;\r
-                                                                       }\r
-                                                               }\r
+                                                                               $npak = count($this->PageAnnots[$this->page]) - 1;
+                                                                               $this->PageAnnots[$this->page][$npak]['y'] -= $yshift;                                                                          
+                                                                       }
+                                                               }
+                                                               
                                                        }
-                                                       $startlinepos = $this->intmrk[$this->page];
+                                                       $pask = $next_pask;
+                                                       $startlinepos = $this->cntmrk[$this->page];
                                                        $startlinepage = $this->page;
                                                        $startliney = $this->y;
                                                }
-                                               
-                                               $this->y += (($curfontsize / $this->k) - $imgh);\r
-                                               $minstartliney = min($this->y, $minstartliney);
-                                               
+                                               $this->y += (($curfontsize / $this->k) - $imgh);
+                                               $minstartliney = min($this->y, $minstartliney); 
                                        } elseif (isset($dom[$key]['fontname']) OR isset($dom[$key]['fontstyle']) OR isset($dom[$key]['fontsize'])) {
-                                               // account for different font size\r
-                                               $pfontname = $curfontname;\r
-                                               $pfontstyle = $curfontstyle;\r
-                                               $pfontsize = $curfontsize;\r
-                                               $fontname = isset($dom[$key]['fontname']) ? $dom[$key]['fontname'] : $curfontname;\r
-                                               $fontstyle = isset($dom[$key]['fontstyle']) ? $dom[$key]['fontstyle'] : $curfontstyle;\r
-                                               $fontsize = isset($dom[$key]['fontsize']) ? $dom[$key]['fontsize'] : $curfontsize;\r
+                                               // account for different font size
+                                               $pfontname = $curfontname;
+                                               $pfontstyle = $curfontstyle;
+                                               $pfontsize = $curfontsize;
+                                               $fontname = isset($dom[$key]['fontname']) ? $dom[$key]['fontname'] : $curfontname;
+                                               $fontstyle = isset($dom[$key]['fontstyle']) ? $dom[$key]['fontstyle'] : $curfontstyle;
+                                               $fontsize = isset($dom[$key]['fontsize']) ? $dom[$key]['fontsize'] : $curfontsize;
                                                if (($fontname != $curfontname) OR ($fontstyle != $curfontstyle) OR ($fontsize != $curfontsize)) {
                                                        $this->SetFont($fontname, $fontstyle, $fontsize);
-                                                       $this->lasth = $this->FontSize * $this->cell_height_ratio;\r
+                                                       $this->lasth = $this->FontSize * $this->cell_height_ratio;
                                                        if (is_numeric($fontsize) AND ($fontsize > 0)
                                                                AND is_numeric($curfontsize) AND ($curfontsize > 0)
                                                                AND ($fontsize != $curfontsize) AND (!$this->newline)
@@ -11433,7 +13259,7 @@ if (!class_exists('TCPDF', false)) {
                                                                if ((!$this->newline) AND ($this->page > $startlinepage)) {
                                                                        // fix lines splitted over two pages
                                                                        if (isset($this->footerlen[$startlinepage])) {
-                                                                               $curpos = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];\r
+                                                                               $curpos = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];
                                                                        }
                                                                        // line to be moved one page forward
                                                                        $pagebuff = $this->getPageBuffer($startlinepage);
@@ -11443,110 +13269,118 @@ if (!class_exists('TCPDF', false)) {
                                                                        // remove line start from previous page
                                                                        $this->setPageBuffer($startlinepage, $tstart.''.$tend);
                                                                        $pagebuff = $this->getPageBuffer($this->page);
-                                                                       $tstart = substr($pagebuff, 0, $this->intmrk[$this->page]);
-                                                                       $tend = substr($pagebuff, $this->intmrk[$this->page]);
+                                                                       $tstart = substr($pagebuff, 0, $this->cntmrk[$this->page]);
+                                                                       $tend = substr($pagebuff, $this->cntmrk[$this->page]);
                                                                        // add line start to current page
                                                                        $yshift = $minstartliney - $this->y;
                                                                        $try = sprintf('1 0 0 1 0 %.3F cm', ($yshift * $this->k));
                                                                        $this->setPageBuffer($this->page, $tstart."\nq\n".$try."\n".$linebeg."\nQ\n".$tend);
-                                                                       // shift the annotations and links\r
-                                                                       if (isset($this->PageAnnots[$startlinepage])) {\r
-                                                                               foreach ($this->PageAnnots[$startlinepage] as $pak => $pac) {\r
+                                                                       // shift the annotations and links
+                                                                       if (isset($this->PageAnnots[$this->page])) {
+                                                                               $next_pask = count($this->PageAnnots[$this->page]);
+                                                                       } else {
+                                                                               $next_pask = 0;
+                                                                       }
+                                                                       if (isset($this->PageAnnots[$startlinepage])) {
+                                                                               foreach ($this->PageAnnots[$startlinepage] as $pak => $pac) {
                                                                                        if ($pak >= $pask) {
                                                                                                $this->PageAnnots[$this->page][] = $pac;
                                                                                                unset($this->PageAnnots[$startlinepage][$pak]);
-                                                                                               $npak = count($this->PageAnnots[$this->page]) - 1;\r
-                                                                                               $this->PageAnnots[$this->page][$npak]['y'] -= $yshift;\r
-                                                                                       }\r
-                                                                               }\r
+                                                                                               $npak = count($this->PageAnnots[$this->page]) - 1;
+                                                                                               $this->PageAnnots[$this->page][$npak]['y'] -= $yshift;
+                                                                                       }
+                                                                               }
                                                                        }
+                                                                       $pask = $next_pask;
                                                                }
-                                                               $this->y += (($curfontsize - $fontsize) / $this->k);\r
-                                                               $minstartliney = min($this->y, $minstartliney);\r
-                                                       }\r
-                                                       $curfontname = $fontname;\r
-                                                       $curfontstyle = $fontstyle;\r
-                                                       $curfontsize = $fontsize;\r
-                                               }\r
+                                                               if (($dom[$key]['value'] != 'td') AND ($dom[$key]['value'] != 'th')) {
+                                                                       $this->y += (($curfontsize - $fontsize) / $this->k);
+                                                               }
+                                                               $minstartliney = min($this->y, $minstartliney);
+                                                       }
+                                                       $curfontname = $fontname;
+                                                       $curfontstyle = $fontstyle;
+                                                       $curfontsize = $fontsize;
+                                               }
                                        }
                                        if (($plalign == 'J') AND (in_array($dom[$key]['value'], $blocktags))) {
                                                $plalign = '';
                                        }
                                        // get current position on page buffer
-                                       $curpos = $this->pagelen[$startlinepage];\r
-                                       if (isset($dom[$key]['bgcolor']) AND ($dom[$key]['bgcolor'] !== false)) {\r
-                                               $this->SetFillColorArray($dom[$key]['bgcolor']);\r
-                                               $wfill = true;\r
-                                       } else {\r
-                                               $wfill = $fill | false;\r
-                                       }\r
-                                       if (isset($dom[$key]['fgcolor']) AND ($dom[$key]['fgcolor'] !== false)) {\r
-                                               $this->SetTextColorArray($dom[$key]['fgcolor']);\r
-                                       }\r
-                                       if (isset($dom[$key]['align'])) {\r
-                                               $lalign = $dom[$key]['align'];\r
-                                       }\r
-                                       if ($this->empty_string($lalign)) {\r
-                                               $lalign = $align;\r
-                                       }\r
-                               }\r
-                               // align lines\r
+                                       $curpos = $this->pagelen[$startlinepage];
+                                       if (isset($dom[$key]['bgcolor']) AND ($dom[$key]['bgcolor'] !== false)) {
+                                               $this->SetFillColorArray($dom[$key]['bgcolor']);
+                                               $wfill = true;
+                                       } else {
+                                               $wfill = $fill | false;
+                                       }
+                                       if (isset($dom[$key]['fgcolor']) AND ($dom[$key]['fgcolor'] !== false)) {
+                                               $this->SetTextColorArray($dom[$key]['fgcolor']);
+                                       }
+                                       if (isset($dom[$key]['align'])) {
+                                               $lalign = $dom[$key]['align'];
+                                       }
+                                       if ($this->empty_string($lalign)) {
+                                               $lalign = $align;
+                                       }
+                               }
+                               // align lines
                                if ($this->newline AND (strlen($dom[$key]['value']) > 0) AND ($dom[$key]['value'] != 'td') AND ($dom[$key]['value'] != 'th')) {
-                                       $newline = true;\r
+                                       $newline = true;
                                        // we are at the beginning of a new line
-                                       if (isset($startlinex)) {\r
-                                               $yshift = $minstartliney - $startliney;\r
-                                               if (($yshift > 0) OR ($this->page > $startlinepage)) {\r
-                                                       $yshift = 0;\r
-                                               }\r
-                                               if ((isset($plalign) AND ((($plalign == 'C') OR ($plalign == 'J') OR (($plalign == 'R') AND (!$this->rtl)) OR (($plalign == 'L') AND ($this->rtl))))) OR ($yshift < 0)) {\r
+                                       if (isset($startlinex)) {
+                                               $yshift = $minstartliney - $startliney;
+                                               if (($yshift > 0) OR ($this->page > $startlinepage)) {
+                                                       $yshift = 0;
+                                               }
+                                               if ((isset($plalign) AND ((($plalign == 'C') OR ($plalign == 'J') OR (($plalign == 'R') AND (!$this->rtl)) OR (($plalign == 'L') AND ($this->rtl))))) OR ($yshift < 0)) {
                                                        // the last line must be shifted to be aligned as requested
                                                        $linew = abs($this->endlinex - $startlinex);
-                                                       $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos);\r
-                                                       if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) {\r
-                                                               $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];\r
-                                                               $midpos = min($opentagpos, $this->footerpos[$startlinepage]);\r
+                                                       $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos);
+                                                       if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) {
+                                                               $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];
+                                                               $midpos = min($opentagpos, $this->footerpos[$startlinepage]);
                                                        } elseif (isset($opentagpos)) {
-                                                               $midpos = $opentagpos;\r
-                                                       } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) {\r
-                                                               $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];\r
-                                                               $midpos = $this->footerpos[$startlinepage];\r
-                                                       } else {\r
-                                                               $midpos = 0;\r
-                                                       }\r
-                                                       if ($midpos > 0) {\r
-                                                               $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos));\r
-                                                               $pend = substr($this->getPageBuffer($startlinepage), $midpos);\r
-                                                       } else {\r
-                                                               $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos);\r
-                                                               $pend = '';\r
+                                                               $midpos = $opentagpos;
+                                                       } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) {
+                                                               $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];
+                                                               $midpos = $this->footerpos[$startlinepage];
+                                                       } else {
+                                                               $midpos = 0;
+                                                       }
+                                                       if ($midpos > 0) {
+                                                               $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos));
+                                                               $pend = substr($this->getPageBuffer($startlinepage), $midpos);
+                                                       } else {
+                                                               $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos);
+                                                               $pend = '';
                                                        }
                                                        // calculate shifting amount
                                                        $tw = $w;
-                                                       if ($this->lMargin != $prevlMargin) {\r
+                                                       if ($this->lMargin != $prevlMargin) {
                                                                $tw += ($prevlMargin - $this->lMargin);
-                                                       }\r
-                                                       if ($this->rMargin != $prevrMargin) {\r
+                                                       }
+                                                       if ($this->rMargin != $prevrMargin) {
                                                                $tw += ($prevrMargin - $this->rMargin);
-                                                       }\r
+                                                       }
                                                        $mdiff = abs($tw - $linew);
-                                                       $t_x = 0;\r
-                                                       if ($plalign == 'C') {\r
-                                                               if ($this->rtl) {\r
-                                                                       $t_x = -($mdiff / 2);\r
-                                                               } else {\r
-                                                                       $t_x = ($mdiff / 2);\r
-                                                               }\r
-                                                       } elseif (($plalign == 'R') AND (!$this->rtl)) {\r
-                                                               // right alignment on LTR document\r
-                                                               $t_x = $mdiff;  \r
-                                                       } elseif (($plalign == 'L') AND ($this->rtl)) {\r
-                                                               // left alignment on RTL document\r
-                                                               $t_x = -$mdiff;\r
-                                                       } elseif (($plalign == 'J') AND ($plalign == $lalign)) {\r
+                                                       $t_x = 0;
+                                                       if ($plalign == 'C') {
+                                                               if ($this->rtl) {
+                                                                       $t_x = -($mdiff / 2);
+                                                               } else {
+                                                                       $t_x = ($mdiff / 2);
+                                                               }
+                                                       } elseif (($plalign == 'R') AND (!$this->rtl)) {
+                                                               // right alignment on LTR document
+                                                               $t_x = $mdiff;  
+                                                       } elseif (($plalign == 'L') AND ($this->rtl)) {
+                                                               // left alignment on RTL document
+                                                               $t_x = -$mdiff;
+                                                       } elseif (($plalign == 'J') AND ($plalign == $lalign)) {
                                                                // Justification
-                                                               if ($this->rtl OR $this->tmprtl) {
-                                                                       $t_x = $this->lMargin - $this->endlinex;\r
+                                                               if ($this->isRTLTextDir()) {
+                                                                       $t_x = $this->lMargin - $this->endlinex;
                                                                }
                                                                $no = 0;
                                                                $ns = 0;
@@ -11562,7 +13396,7 @@ if (!class_exists('TCPDF', false)) {
                                                                                $lnstring[1][$kk] = str_replace('#!#OP#!#', '(', $lnstring[1][$kk]);
                                                                                $lnstring[1][$kk] = str_replace('#!#CP#!#', ')', $lnstring[1][$kk]);
                                                                                if ($kk == $maxkk) {
-                                                                                       if ($this->rtl OR $this->tmprtl) {
+                                                                                       if ($this->isRTLTextDir()) {
                                                                                                $tvalue = ltrim($lnstring[1][$kk]);
                                                                                        } else {
                                                                                                $tvalue = rtrim($lnstring[1][$kk]);
@@ -11574,12 +13408,13 @@ if (!class_exists('TCPDF', false)) {
                                                                                $no += substr_count($lnstring[1][$kk], chr(32));
                                                                                $ns += substr_count($tvalue, chr(32));
                                                                        }
-                                                                       if ($this->rtl OR $this->tmprtl) {
-                                                                               $t_x = $this->lMargin - $this->endlinex - (($no - $ns - 1) * $this->GetStringWidth(chr(32)));\r
+                                                                       if ($this->isRTLTextDir()) {
+                                                                               $t_x = $this->lMargin - $this->endlinex - (($no - $ns - 1) * $this->GetStringWidth(chr(32)));
                                                                        }
                                                                        // calculate additional space to add to each space
-                                                                       $spacewidth = (($tw - $linew + (($no - $ns) * $this->GetStringWidth(chr(32)))) / ($ns?$ns:1)) * $this->k;
-                                                                       $spacewidthu = ($tw - $linew + ($no * $this->GetStringWidth(chr(32)))) / ($ns?$ns:1) / $this->FontSize / $this->k;
+                                                                       $spacelen = $this->GetStringWidth(chr(32));
+                                                                       $spacewidth = (($tw - $linew + (($no - $ns) * $spacelen)) / ($ns?$ns:1)) * $this->k;
+                                                                       $spacewidthu = -1000 * ($tw - $linew + ($no * $spacelen)) / ($ns?$ns:1) / $this->FontSize;
                                                                        $nsmax = $ns;
                                                                        $ns = 0;
                                                                        reset($lnstring);
@@ -11588,8 +13423,21 @@ if (!class_exists('TCPDF', false)) {
                                                                        $prev_epsposbeg = 0;
                                                                        global $spacew;
                                                                        while (preg_match('/([0-9\.\+\-]*)[\s](Td|cm|m|l|c|re)[\s]/x', $pmid, $strpiece, PREG_OFFSET_CAPTURE, $offset) == 1) {
-                                                                               if ($this->rtl OR $this->tmprtl) {
-                                                                                       $spacew = ($spacewidth * ($nsmax - $ns));\r
+                                                                               // check if we are inside a string section '[( ... )]'
+                                                                               $stroffset = strpos($pmid, '[(', $offset);
+                                                                               if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) {
+                                                                                       // set offset to the end of string section 
+                                                                                       $offset = strpos($pmid, ')]', $stroffset);
+                                                                                       while (($offset !== false) AND ($pmid{($offset - 1)} == '\\')) {
+                                                                                               $offset = strpos($pmid, ')]', ($offset + 1));
+                                                                                       }
+                                                                                       if ($offset === false) {
+                                                                                               $this->Error('HTML Justification: malformed PDF code.');
+                                                                                       }
+                                                                                       continue;
+                                                                               }
+                                                                               if ($this->isRTLTextDir()) {
+                                                                                       $spacew = ($spacewidth * ($nsmax - $ns));
                                                                                } else {
                                                                                        $spacew = ($spacewidth * $ns);
                                                                                }
@@ -11621,10 +13469,10 @@ if (!class_exists('TCPDF', false)) {
                                                                                                $currentxpos = $xmatches[1];
                                                                                                if (($strcount <= $maxkk) AND ($strpiece[2][0] == 'Td')) {
                                                                                                        if ($strcount == $maxkk) {
-                                                                                                               if ($this->rtl OR $this->tmprtl) {
-                                                                                                                       $tvalue = $lnstring[1][$strcount];\r
-                                                                                                               } else {\r
-                                                                                                                       $tvalue = rtrim($lnstring[1][$strcount]);\r
+                                                                                                               if ($this->isRTLTextDir()) {
+                                                                                                                       $tvalue = $lnstring[1][$strcount];
+                                                                                                               } else {
+                                                                                                                       $tvalue = rtrim($lnstring[1][$strcount]);
                                                                                                                }
                                                                                                        } else {
                                                                                                                $tvalue = $lnstring[1][$strcount];
@@ -11632,8 +13480,8 @@ if (!class_exists('TCPDF', false)) {
                                                                                                        $ns += substr_count($tvalue, chr(32));
                                                                                                        ++$strcount;
                                                                                                }
-                                                                                               if ($this->rtl OR $this->tmprtl) {
-                                                                                                       $spacew = ($spacewidth * ($nsmax - $ns));\r
+                                                                                               if ($this->isRTLTextDir()) {
+                                                                                                       $spacew = ($spacewidth * ($nsmax - $ns));
                                                                                                }
                                                                                                // justify block
                                                                                                $pmid = preg_replace_callback('/([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s]('.$strpiece[2][0].')([\s]*)/x',
@@ -11667,15 +13515,15 @@ if (!class_exists('TCPDF', false)) {
                                                                                                break;
                                                                                        }
                                                                                }
-                                                                               // shift the annotations and links\r
-                                                                               if (isset($this->PageAnnots[$this->page])) {\r
-                                                                                       foreach ($this->PageAnnots[$this->page] as $pak => $pac) {\r
+                                                                               // shift the annotations and links
+                                                                               if (isset($this->PageAnnots[$this->page])) {
+                                                                                       foreach ($this->PageAnnots[$this->page] as $pak => $pac) {
                                                                                                if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) {
                                                                                                        $this->PageAnnots[$this->page][$pak]['x'] += ($spacew / $this->k);
                                                                                                        $this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
-                                                                                                       break;\r
-                                                                                               }\r
-                                                                                       }\r
+                                                                                                       break;
+                                                                                               }
+                                                                                       }
                                                                                }
                                                                        } // end of while
                                                                        // remove markers
@@ -11691,7 +13539,7 @@ if (!class_exists('TCPDF', false)) {
                                                                                                        create_function('$matches', 'global $spacew;
                                                                                                        $matches[1] = str_replace("#!#OP#!#", "(", $matches[1]);
                                                                                                        $matches[1] = str_replace("#!#CP#!#", ")", $matches[1]);
-                                                                                                       return "[(".str_replace(chr(0).chr(32), ") ".(-2830 * $spacew)." (", $matches[1]).")]";'), $pmidtemp);
+                                                                                                       return "[(".str_replace(chr(0).chr(32), ") ".($spacew)." (", $matches[1]).")]";'), $pmidtemp);
                                                                                $this->setPageBuffer($startlinepage, $pstart."\n".$pmid."\n".$pend);
                                                                                $endlinepos = strlen($pstart."\n".$pmid."\n");
                                                                        } else {
@@ -11701,142 +13549,146 @@ if (!class_exists('TCPDF', false)) {
                                                                                $this->setPageBuffer($startlinepage, $pstart."\n".$pmid."\nBT 0 Tw ET\n".$pend);
                                                                                $endlinepos = strlen($pstart."\n".$pmid."\nBT 0 Tw ET\n");
                                                                        }
-                                                               }\r
+                                                               }
                                                        } // end of J
-                                                       if (($t_x != 0) OR ($yshift < 0)) {\r
-                                                               // shift the line\r
-                                                               $trx = sprintf('1 0 0 1 %.3F %.3F cm', ($t_x * $this->k), ($yshift * $this->k));\r
+                                                       if (($t_x != 0) OR ($yshift < 0)) {
+                                                               // shift the line
+                                                               $trx = sprintf('1 0 0 1 %.3F %.3F cm', ($t_x * $this->k), ($yshift * $this->k));
                                                                $this->setPageBuffer($startlinepage, $pstart."\nq\n".$trx."\n".$pmid."\nQ\n".$pend);
-                                                               $endlinepos = strlen($pstart."\nq\n".$trx."\n".$pmid."\nQ\n");\r
-                                                               // shift the annotations and links\r
-                                                               if (isset($this->PageAnnots[$this->page])) {\r
-                                                                       foreach ($this->PageAnnots[$this->page] as $pak => $pac) {\r
-                                                                               if ($pak >= $pask) {\r
-                                                                                       $this->PageAnnots[$this->page][$pak]['x'] += $t_x;\r
-                                                                                       $this->PageAnnots[$this->page][$pak]['y'] -= $yshift;\r
-                                                                               }\r
-                                                                       }\r
-                                                               }\r
-                                                               $this->y -= $yshift;\r
-                                                       }\r
-                                               }\r
+                                                               $endlinepos = strlen($pstart."\nq\n".$trx."\n".$pmid."\nQ\n");
+                                                               // shift the annotations and links
+                                                               if (isset($this->PageAnnots[$this->page])) {
+                                                                       foreach ($this->PageAnnots[$this->page] as $pak => $pac) {
+                                                                               if ($pak >= $pask) {
+                                                                                       $this->PageAnnots[$this->page][$pak]['x'] += $t_x;
+                                                                                       $this->PageAnnots[$this->page][$pak]['y'] -= $yshift;
+                                                                               }
+                                                                       }
+                                                               }
+                                                               $this->y -= $yshift;
+                                                       }
+                                               }
                                        }
                                        $this->newline = false;
                                        $pbrk = $this->checkPageBreak($this->lasth);
-                                       $this->SetFont($fontname, $fontstyle, $fontsize);\r
-                                       if ($wfill) {\r
-                                               $this->SetFillColorArray($this->bgcolor);\r
-                                       }\r
-                                       $startlinex = $this->x;\r
-                                       $startliney = $this->y;\r
-                                       $minstartliney = $this->y;\r
-                                       $startlinepage = $this->page;\r
-                                       if (isset($endlinepos) AND (!$pbrk)) {\r
-                                               $startlinepos = $endlinepos;\r
-                                               unset($endlinepos);\r
-                                       } else {\r
-                                               if (isset($this->footerlen[$this->page])) {\r
-                                                       $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page];\r
+                                       $this->SetFont($fontname, $fontstyle, $fontsize);
+                                       if ($wfill) {
+                                               $this->SetFillColorArray($this->bgcolor);
+                                       }
+                                       $startlinex = $this->x;
+                                       $startliney = $this->y;
+                                       $minstartliney = $this->y;
+                                       $startlinepage = $this->page;
+                                       if (isset($endlinepos) AND (!$pbrk)) {
+                                               $startlinepos = $endlinepos;
+                                               unset($endlinepos);
+                                       } else {
+                                               if (isset($this->footerlen[$this->page])) {
+                                                       $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page];
                                                } else {
-                                                       $this->footerpos[$this->page] = $this->pagelen[$this->page];\r
+                                                       $this->footerpos[$this->page] = $this->pagelen[$this->page];
                                                }
-                                               $startlinepos = $this->footerpos[$this->page];\r
-                                       }\r
+                                               $startlinepos = $this->footerpos[$this->page];
+                                       }
                                        $plalign = $lalign;
                                        if (isset($this->PageAnnots[$this->page])) {
                                                $pask = count($this->PageAnnots[$this->page]);
                                        } else {
                                                $pask = 0;
-                                       }\r
-                               }\r
-                               if (isset($opentagpos)) {\r
-                                       unset($opentagpos);\r
-                               }\r
-                               if ($dom[$key]['tag']) {\r
+                                       }
+                               }
+                               if (isset($opentagpos)) {
+                                       unset($opentagpos);
+                               }
+                               if ($dom[$key]['tag']) {
                                        if ($dom[$key]['opening']) {
+                                               // get text indentation (if any)
+                                               if (isset($dom[$key]['text-indent']) AND in_array($dom[$key]['value'], array('blockquote','dd','div','dt','h1','h2','h3','h4','h5','h6','li','ol','p','ul','table','tr','td'))) {
+                                                       $this->textindent = $dom[$key]['text-indent'];
+                                               }
                                                if ($dom[$key]['value'] == 'table') {
-                                                       if ($this->rtl) {\r
-                                                               $wtmp = $this->x - $this->lMargin;\r
-                                                       } else {\r
-                                                               $wtmp = $this->w - $this->rMargin - $this->x;\r
+                                                       if ($this->rtl) {
+                                                               $wtmp = $this->x - $this->lMargin;
+                                                       } else {
+                                                               $wtmp = $this->w - $this->rMargin - $this->x;
                                                        }
                                                        $wtmp -= (2 * $this->cMargin);
-                                                       // calculate cell width\r
-                                                       if (isset($dom[$key]['width'])) {\r
-                                                               $table_width = $this->getHTMLUnitToUnits($dom[$key]['width'], $wtmp, 'px');\r
-                                                       } else {\r
-                                                               $table_width = $wtmp;\r
-                                                       }
-                                               }\r
-                                               // table content is handled in a special way\r
-                                               if (($dom[$key]['value'] == 'td') OR ($dom[$key]['value'] == 'th')) {\r
-                                                       $trid = $dom[$key]['parent'];\r
-                                                       $table_el = $dom[$trid]['parent'];\r
-                                                       if (!isset($dom[$table_el]['cols'])) {\r
-                                                               $dom[$table_el]['cols'] = $trid['cols'];\r
-                                                       }
-                                                       $oldmargin = $this->cMargin;\r
-                                                       if (isset($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'])) {\r
-                                                               $currentcmargin = $this->getHTMLUnitToUnits($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'], 1, 'px');\r
-                                                       } else {\r
-                                                               $currentcmargin = 0;            \r
-                                                       }\r
-                                                       $this->cMargin = $currentcmargin;\r
-                                                       if (isset($dom[($dom[$trid]['parent'])]['attribute']['cellspacing'])) {\r
-                                                               $cellspacing = $this->getHTMLUnitToUnits($dom[($dom[$trid]['parent'])]['attribute']['cellspacing'], 1, 'px');\r
-                                                       } else {\r
-                                                               $cellspacing = 0;\r
-                                                       }\r
-                                                       if ($this->rtl) {\r
-                                                               $cellspacingx = -$cellspacing;\r
-                                                       } else {\r
-                                                               $cellspacingx = $cellspacing;\r
-                                                       }\r
-                                                       $colspan = $dom[$key]['attribute']['colspan'];\r
+                                                       // calculate cell width
+                                                       if (isset($dom[$key]['width'])) {
+                                                               $table_width = $this->getHTMLUnitToUnits($dom[$key]['width'], $wtmp, 'px');
+                                                       } else {
+                                                               $table_width = $wtmp;
+                                                       }
+                                               }
+                                               // table content is handled in a special way
+                                               if (($dom[$key]['value'] == 'td') OR ($dom[$key]['value'] == 'th')) {
+                                                       $trid = $dom[$key]['parent'];
+                                                       $table_el = $dom[$trid]['parent'];
+                                                       if (!isset($dom[$table_el]['cols'])) {
+                                                               $dom[$table_el]['cols'] = $trid['cols'];
+                                                       }
+                                                       $oldmargin = $this->cMargin;
+                                                       if (isset($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'])) {
+                                                               $currentcmargin = $this->getHTMLUnitToUnits($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'], 1, 'px');
+                                                       } else {
+                                                               $currentcmargin = 0;            
+                                                       }
+                                                       $this->cMargin = $currentcmargin;
+                                                       if (isset($dom[($dom[$trid]['parent'])]['attribute']['cellspacing'])) {
+                                                               $cellspacing = $this->getHTMLUnitToUnits($dom[($dom[$trid]['parent'])]['attribute']['cellspacing'], 1, 'px');
+                                                       } else {
+                                                               $cellspacing = 0;
+                                                       }
+                                                       if ($this->rtl) {
+                                                               $cellspacingx = -$cellspacing;
+                                                       } else {
+                                                               $cellspacingx = $cellspacing;
+                                                       }
+                                                       $colspan = $dom[$key]['attribute']['colspan'];
                                                        $wtmp = ($colspan * ($table_width / $dom[$table_el]['cols']));
-                                                       if (isset($dom[$key]['width'])) {\r
-                                                               $cellw = $this->getHTMLUnitToUnits($dom[$key]['width'], $wtmp, 'px');\r
-                                                       } else {\r
-                                                               $cellw = $wtmp;\r
+                                                       if (isset($dom[$key]['width'])) {
+                                                               $cellw = $this->getHTMLUnitToUnits($dom[$key]['width'], $table_width, 'px');
+                                                       } else {
+                                                               $cellw = $wtmp;
                                                        }
                                                        if (isset($dom[$key]['height'])) {
-                                                               // minimum cell height\r
-                                                               $cellh = $this->getHTMLUnitToUnits($dom[$key]['height'], 0, 'px');\r
-                                                       } else {\r
-                                                               $cellh = 0;\r
-                                                       }\r
+                                                               // minimum cell height
+                                                               $cellh = $this->getHTMLUnitToUnits($dom[$key]['height'], 0, 'px');
+                                                       } else {
+                                                               $cellh = 0;
+                                                       }
                                                        $cellw -= $cellspacing;
-                                                       if (isset($dom[$key]['content'])) {\r
-                                                               $cell_content = $dom[$key]['content'];\r
-                                                       } else {\r
-                                                               $cell_content = '&nbsp;';\r
-                                                       }\r
-                                                       $tagtype = $dom[$key]['value'];\r
-                                                       $parentid = $key;\r
-                                                       while (($key < $maxel) AND (!(($dom[$key]['tag']) AND (!$dom[$key]['opening']) AND ($dom[$key]['value'] == $tagtype) AND ($dom[$key]['parent'] == $parentid)))) {\r
-                                                               // move $key index forward\r
-                                                               ++$key;\r
-                                                       }\r
-                                                       if (!isset($dom[$trid]['startpage'])) {\r
-                                                               $dom[$trid]['startpage'] = $this->page;\r
-                                                       } else {\r
-                                                               $this->setPage($dom[$trid]['startpage']);\r
-                                                       }\r
-                                                       if (!isset($dom[$trid]['starty'])) {\r
-                                                               $dom[$trid]['starty'] = $this->y;\r
-                                                       } else {\r
-                                                               $this->y = $dom[$trid]['starty'];\r
-                                                       }
-                                                       if (!isset($dom[$trid]['startx'])) {\r
-                                                               $dom[$trid]['startx'] = $this->x;\r
-                                                       }\r
-                                                       $this->x += ($cellspacingx / 2);                                                \r
-                                                       if (isset($dom[$parentid]['attribute']['rowspan'])) {\r
-                                                               $rowspan = intval($dom[$parentid]['attribute']['rowspan']);\r
-                                                       } else {\r
-                                                               $rowspan = 1;\r
-                                                       }\r
-                                                       // skip row-spanned cells started on the previous rows\r
+                                                       if (isset($dom[$key]['content'])) {
+                                                               $cell_content = $dom[$key]['content'];
+                                                       } else {
+                                                               $cell_content = '&nbsp;';
+                                                       }
+                                                       $tagtype = $dom[$key]['value'];
+                                                       $parentid = $key;
+                                                       while (($key < $maxel) AND (!(($dom[$key]['tag']) AND (!$dom[$key]['opening']) AND ($dom[$key]['value'] == $tagtype) AND ($dom[$key]['parent'] == $parentid)))) {
+                                                               // move $key index forward
+                                                               ++$key;
+                                                       }
+                                                       if (!isset($dom[$trid]['startpage'])) {
+                                                               $dom[$trid]['startpage'] = $this->page;
+                                                       } else {
+                                                               $this->setPage($dom[$trid]['startpage']);
+                                                       }
+                                                       if (!isset($dom[$trid]['starty'])) {
+                                                               $dom[$trid]['starty'] = $this->y;
+                                                       } else {
+                                                               $this->y = $dom[$trid]['starty'];
+                                                       }
+                                                       if (!isset($dom[$trid]['startx'])) {
+                                                               $dom[$trid]['startx'] = $this->x;
+                                                       }
+                                                       $this->x += ($cellspacingx / 2);                                                
+                                                       if (isset($dom[$parentid]['attribute']['rowspan'])) {
+                                                               $rowspan = intval($dom[$parentid]['attribute']['rowspan']);
+                                                       } else {
+                                                               $rowspan = 1;
+                                                       }
+                                                       // skip row-spanned cells started on the previous rows
                                                        if (isset($dom[$table_el]['rowspans'])) {
                                                                $rsk = 0;
                                                                $rskmax = count($dom[$table_el]['rowspans']);
@@ -11855,12 +13707,12 @@ if (!class_exists('TCPDF', false)) {
                                                                                        $rsstartx += $dl;
                                                                                        $rsendx += $dl;
                                                                                }
-                                                                       }\r
+                                                                       }
                                                                        if  (($trwsp['rowspan'] > 0)
                                                                                AND ($rsstartx > ($this->x - $cellspacing - $currentcmargin - $this->feps))
                                                                                AND ($rsstartx < ($this->x + $cellspacing + $currentcmargin + $this->feps))
                                                                                AND (($trwsp['starty'] < ($this->y - $this->feps)) OR ($trwsp['startpage'] < $this->page))) {
-                                                                               // set the starting X position of the current cell\r
+                                                                               // set the starting X position of the current cell
                                                                                $this->x = $rsendx + $cellspacingx;
                                                                                if (($trwsp['rowspan'] == 1)
                                                                                        AND (isset($dom[$trid]['endy']))
@@ -11870,111 +13722,111 @@ if (!class_exists('TCPDF', false)) {
                                                                                        $dom[$table_el]['rowspans'][$rsk]['endy'] = max($dom[$trid]['endy'], $trwsp['endy']);
                                                                                        $dom[$trid]['endy'] = $dom[$table_el]['rowspans'][$rsk]['endy'];
                                                                                }
-                                                                               $rsk = 0;\r
+                                                                               $rsk = 0;
                                                                        } else {
                                                                                ++$rsk;
-                                                                       }\r
-                                                               }\r
-                                                       }\r
-                                                       // add rowspan information to table element\r
-                                                       if ($rowspan > 1) {\r
-                                                               if (isset($this->footerlen[$this->page])) {\r
-                                                                       $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page];\r
+                                                                       }
+                                                               }
+                                                       }
+                                                       // add rowspan information to table element
+                                                       if ($rowspan > 1) {
+                                                               if (isset($this->footerlen[$this->page])) {
+                                                                       $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page];
                                                                } else {
-                                                                       $this->footerpos[$this->page] = $this->pagelen[$this->page];\r
+                                                                       $this->footerpos[$this->page] = $this->pagelen[$this->page];
                                                                }
-                                                               $trintmrkpos = $this->footerpos[$this->page];\r
-                                                               $trsid = array_push($dom[$table_el]['rowspans'], array('trid' => $trid, 'rowspan' => $rowspan, 'mrowspan' => $rowspan, 'colspan' => $colspan, 'startpage' => $this->page, 'startx' => $this->x, 'starty' => $this->y, 'intmrkpos' => $trintmrkpos));\r
-                                                       }\r
-                                                       $cellid = array_push($dom[$trid]['cellpos'], array('startx' => $this->x));\r
-                                                       if ($rowspan > 1) {\r
-                                                               $dom[$trid]['cellpos'][($cellid - 1)]['rowspanid'] = ($trsid - 1);\r
-                                                       }\r
-                                                       // push background colors\r
-                                                       if (isset($dom[$parentid]['bgcolor']) AND ($dom[$parentid]['bgcolor'] !== false)) {\r
-                                                               $dom[$trid]['cellpos'][($cellid - 1)]['bgcolor'] = $dom[$parentid]['bgcolor'];\r
+                                                               $trintmrkpos = $this->footerpos[$this->page];
+                                                               $trsid = array_push($dom[$table_el]['rowspans'], array('trid' => $trid, 'rowspan' => $rowspan, 'mrowspan' => $rowspan, 'colspan' => $colspan, 'startpage' => $this->page, 'startx' => $this->x, 'starty' => $this->y, 'intmrkpos' => $trintmrkpos));
+                                                       }
+                                                       $cellid = array_push($dom[$trid]['cellpos'], array('startx' => $this->x));
+                                                       if ($rowspan > 1) {
+                                                               $dom[$trid]['cellpos'][($cellid - 1)]['rowspanid'] = ($trsid - 1);
+                                                       }
+                                                       // push background colors
+                                                       if (isset($dom[$parentid]['bgcolor']) AND ($dom[$parentid]['bgcolor'] !== false)) {
+                                                               $dom[$trid]['cellpos'][($cellid - 1)]['bgcolor'] = $dom[$parentid]['bgcolor'];
                                                        }
                                                        $prevLastH = $this->lasth;
-                                                       // ****** write the cell content ******\r
+                                                       // ****** write the cell content ******
                                                        $this->MultiCell($cellw, $cellh, $cell_content, false, $lalign, false, 2, '', '', true, 0, true);
                                                        $this->lasth = $prevLastH;
-                                                       $this->cMargin = $oldmargin;\r
-                                                       $dom[$trid]['cellpos'][($cellid - 1)]['endx'] = $this->x;\r
+                                                       $this->cMargin = $oldmargin;
+                                                       $dom[$trid]['cellpos'][($cellid - 1)]['endx'] = $this->x;
                                                        // update the end of row position
                                                        if ($rowspan <= 1) {
-                                                               if (isset($dom[$trid]['endy'])) {\r
-                                                                       if ($this->page == $dom[$trid]['endpage']) {\r
-                                                                               $dom[$trid]['endy'] = max($this->y, $dom[$trid]['endy']);\r
-                                                                       } elseif ($this->page > $dom[$trid]['endpage']) {\r
-                                                                               $dom[$trid]['endy'] = $this->y;\r
-                                                                       }\r
-                                                               } else {\r
-                                                                       $dom[$trid]['endy'] = $this->y;\r
+                                                               if (isset($dom[$trid]['endy'])) {
+                                                                       if ($this->page == $dom[$trid]['endpage']) {
+                                                                               $dom[$trid]['endy'] = max($this->y, $dom[$trid]['endy']);
+                                                                       } elseif ($this->page > $dom[$trid]['endpage']) {
+                                                                               $dom[$trid]['endy'] = $this->y;
+                                                                       }
+                                                               } else {
+                                                                       $dom[$trid]['endy'] = $this->y;
                                                                }
-                                                               if (isset($dom[$trid]['endpage'])) {\r
-                                                                       $dom[$trid]['endpage'] = max($this->page, $dom[$trid]['endpage']);\r
-                                                               } else {\r
-                                                                       $dom[$trid]['endpage'] = $this->page;\r
+                                                               if (isset($dom[$trid]['endpage'])) {
+                                                                       $dom[$trid]['endpage'] = max($this->page, $dom[$trid]['endpage']);
+                                                               } else {
+                                                                       $dom[$trid]['endpage'] = $this->page;
                                                                }                                                               
                                                        } else {
-                                                               // account for row-spanned cells\r
-                                                               $dom[$table_el]['rowspans'][($trsid - 1)]['endx'] = $this->x;\r
-                                                               $dom[$table_el]['rowspans'][($trsid - 1)]['endy'] = $this->y;\r
-                                                               $dom[$table_el]['rowspans'][($trsid - 1)]['endpage'] = $this->page;\r
-                                                       }\r
+                                                               // account for row-spanned cells
+                                                               $dom[$table_el]['rowspans'][($trsid - 1)]['endx'] = $this->x;
+                                                               $dom[$table_el]['rowspans'][($trsid - 1)]['endy'] = $this->y;
+                                                               $dom[$table_el]['rowspans'][($trsid - 1)]['endpage'] = $this->page;
+                                                       }
                                                        if (isset($dom[$table_el]['rowspans'])) {
-                                                               // update endy and endpage on rowspanned cells\r
-                                                               foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) {\r
+                                                               // update endy and endpage on rowspanned cells
+                                                               foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) {
                                                                        if ($trwsp['rowspan'] > 0) {
                                                                                if (isset($dom[$trid]['endpage'])) {
                                                                                        if ($trwsp['endpage'] == $dom[$trid]['endpage']) {
-                                                                                               $dom[$table_el]['rowspans'][$k]['endy'] = max($dom[$trid]['endy'], $trwsp['endy']);\r
+                                                                                               $dom[$table_el]['rowspans'][$k]['endy'] = max($dom[$trid]['endy'], $trwsp['endy']);
                                                                                        } elseif ($trwsp['endpage'] < $dom[$trid]['endpage']) {
-                                                                                               $dom[$table_el]['rowspans'][$k]['endy'] = $dom[$trid]['endy'];\r
-                                                                                               $dom[$table_el]['rowspans'][$k]['endpage'] = $dom[$trid]['endpage'];\r
+                                                                                               $dom[$table_el]['rowspans'][$k]['endy'] = $dom[$trid]['endy'];
+                                                                                               $dom[$table_el]['rowspans'][$k]['endpage'] = $dom[$trid]['endpage'];
                                                                                        } else {
-                                                                                               $dom[$trid]['endy'] = $this->pagedim[$dom[$trid]['endpage']]['hk'] - $this->pagedim[$dom[$trid]['endpage']]['bm'];\r
-                                                                                       }\r
-                                                                               }\r
-                                                                       }\r
-                                                               }\r
-                                                       }\r
-                                                       $this->x += ($cellspacingx / 2);                                                        \r
-                                               } else {\r
-                                                       // opening tag (or self-closing tag)\r
+                                                                                               $dom[$trid]['endy'] = $this->pagedim[$dom[$trid]['endpage']]['hk'] - $this->pagedim[$dom[$trid]['endpage']]['bm'];
+                                                                                       }
+                                                                               }
+                                                                       }
+                                                               }
+                                                       }
+                                                       $this->x += ($cellspacingx / 2);
+                                               } else {
+                                                       // opening tag (or self-closing tag)
                                                        if (!isset($opentagpos)) {
-                                                               if (!$this->InFooter) {\r
-                                                                       if (isset($this->footerlen[$this->page])) {\r
-                                                                               $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page];\r
-                                                                       } else {\r
-                                                                               $this->footerpos[$this->page] = $this->pagelen[$this->page];\r
+                                                               if (!$this->InFooter) {
+                                                                       if (isset($this->footerlen[$this->page])) {
+                                                                               $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page];
+                                                                       } else {
+                                                                               $this->footerpos[$this->page] = $this->pagelen[$this->page];
                                                                        }
                                                                        $opentagpos = $this->footerpos[$this->page];
-                                                               }\r
-                                                       }\r
-                                                       $this->openHTMLTagHandler($dom, $key, $cell);\r
-                                               }\r
-                                       } else {\r
-                                               // closing tag\r
-                                               $this->closeHTMLTagHandler($dom, $key, $cell);\r
-                                       }\r
-                               } elseif (strlen($dom[$key]['value']) > 0) {\r
-                                       // print list-item\r
-                                       if (!$this->empty_string($this->lispacer)) {\r
-                                               $this->SetFont($pfontname, $pfontstyle, $pfontsize);\r
-                                               $this->lasth = $this->FontSize * $this->cell_height_ratio;\r
+                                                               }
+                                                       }
+                                                       $this->openHTMLTagHandler($dom, $key, $cell);
+                                               }
+                                       } else {
+                                               // closing tag
+                                               $this->closeHTMLTagHandler($dom, $key, $cell);
+                                       }
+                               } elseif (strlen($dom[$key]['value']) > 0) {
+                                       // print list-item
+                                       if (!$this->empty_string($this->lispacer)) {
+                                               $this->SetFont($pfontname, $pfontstyle, $pfontsize);
+                                               $this->lasth = $this->FontSize * $this->cell_height_ratio;
                                                $minstartliney = $this->y;
-                                               $this->putHtmlListBullet($this->listnum, $this->lispacer, $pfontsize);\r
-                                               $this->SetFont($curfontname, $curfontstyle, $curfontsize);\r
-                                               $this->lasth = $this->FontSize * $this->cell_height_ratio;\r
-                                               if (is_numeric($pfontsize) AND ($pfontsize > 0) AND is_numeric($curfontsize) AND ($curfontsize > 0) AND ($pfontsize != $curfontsize)) {\r
-                                                       $this->y += (($pfontsize - $curfontsize) / $this->k);\r
-                                                       $minstartliney = min($this->y, $minstartliney);\r
-                                               }\r
-                                       }\r
-                                       // text\r
+                                               $this->putHtmlListBullet($this->listnum, $this->lispacer, $pfontsize);
+                                               $this->SetFont($curfontname, $curfontstyle, $curfontsize);
+                                               $this->lasth = $this->FontSize * $this->cell_height_ratio;
+                                               if (is_numeric($pfontsize) AND ($pfontsize > 0) AND is_numeric($curfontsize) AND ($curfontsize > 0) AND ($pfontsize != $curfontsize)) {
+                                                       $this->y += (($pfontsize - $curfontsize) / $this->k);
+                                                       $minstartliney = min($this->y, $minstartliney);
+                                               }
+                                       }
+                                       // text
                                        $this->htmlvspace = 0;
-                                       if ((!$this->premode) AND ($this->rtl OR $this->tmprtl)) {
+                                       if ((!$this->premode) AND $this->isRTLTextDir()) {
                                                // reverse spaces order
                                                $len1 = strlen($dom[$key]['value']);
                                                $lsp = $len1 - strlen(ltrim($dom[$key]['value']));
@@ -11990,39 +13842,45 @@ if (!class_exists('TCPDF', false)) {
                                                $dom[$key]['value'] = $tmpstr;
                                        }
                                        if ($newline) {
-                                               if (!$this->premode) {\r
-                                                       if (($this->rtl OR $this->tmprtl)) {
+                                               if (!$this->premode) {
+                                                       if ($this->isRTLTextDir()) {
                                                                $dom[$key]['value'] = rtrim($dom[$key]['value']);
-                                                       } else {\r
-                                                               $dom[$key]['value'] = ltrim($dom[$key]['value']);\r
+                                                       } else {
+                                                               $dom[$key]['value'] = ltrim($dom[$key]['value']);
                                                        }
-                                               }\r
+                                               }
                                                $newline = false;
-                                               $firstblock = true;\r
+                                               $firstblock = true;
                                        } else {
                                                $firstblock = false;
                                        }
-                                       $strrest = '';\r
-                                       if (!empty($this->HREF) AND (isset($this->HREF['url']))) {\r
-                                               // HTML <a> Link\r
-                                               $strrest = $this->addHtmlLink($this->HREF['url'], $dom[$key]['value'], $wfill, true, $this->HREF['color'], $this->HREF['style']);\r
-                                       } else {\r
-                                               $ctmpmargin = $this->cMargin;\r
-                                               $this->cMargin = 0;\r
-                                               // ****** write only until the end of the line and get the rest ******\r
-                                               $strrest = $this->Write($this->lasth, $dom[$key]['value'], '', $wfill, '', false, 0, true, $firstblock);\r
-                                               $this->cMargin = $ctmpmargin;\r
-                                       }\r
-                                       if (strlen($strrest) > 0) {\r
-                                               // store the remaining string on the previous $key position\r
-                                               $this->newline = true;\r
-                                               if ($cell) {\r
-                                                       if ($this->rtl) {\r
-                                                               $this->x -= $this->cMargin;\r
-                                                       } else {\r
-                                                               $this->x += $this->cMargin;\r
-                                                       }\r
-                                               }\r
+                                       $strrest = '';
+                                       if (!empty($this->HREF) AND (isset($this->HREF['url']))) {
+                                               // HTML <a> 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 {
+                                                       $this->x += $this->textindent;
+                                               }
+                                               // ****** 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
+                                               $this->newline = true;
+                                               if ($cell) {
+                                                       if ($this->rtl) {
+                                                               $this->x -= $this->cMargin;
+                                                       } else {
+                                                               $this->x += $this->cMargin;
+                                                       }
+                                               }
                                                if ($strrest == $dom[$key]['value']) {
                                                        // used to avoid infinite loop
                                                        ++$loop;
@@ -12032,117 +13890,137 @@ if (!class_exists('TCPDF', false)) {
                                                $dom[$key]['value'] = ltrim($strrest);
                                                if ($loop < 3) {
                                                        --$key;
-                                               }\r
+                                               }
                                        } else {
                                                $loop = 0;
-                                       }\r
-                               }\r
-                               ++$key;\r
-                       } // end for each $key\r
-                       // align the last line\r
-                       if (isset($startlinex)) {\r
-                               $yshift = $minstartliney - $startliney;\r
-                               if (($yshift > 0) OR ($this->page > $startlinepage)) {\r
-                                       $yshift = 0;\r
-                               }\r
-                               if ((isset($plalign) AND ((($plalign == 'C') OR ($plalign == 'J') OR (($plalign == 'R') AND (!$this->rtl)) OR (($plalign == 'L') AND ($this->rtl))))) OR ($yshift < 0)) {\r
-                                       // the last line must be shifted to be aligned as requested\r
-                                       $linew = abs($this->endlinex - $startlinex);\r
-                                       $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos);\r
-                                       if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) {\r
-                                               $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];\r
-                                               $midpos = min($opentagpos, $this->footerpos[$startlinepage]);\r
-                                       } elseif (isset($opentagpos)) {\r
-                                               $midpos = $opentagpos;\r
-                                       } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) {\r
-                                               $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];\r
-                                               $midpos = $this->footerpos[$startlinepage];\r
-                                       } else {\r
-                                               $midpos = 0;\r
-                                       }\r
-                                       if ($midpos > 0) {\r
-                                               $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos));\r
-                                               $pend = substr($this->getPageBuffer($startlinepage), $midpos);\r
-                                       } else {\r
-                                               $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos);\r
-                                               $pend = '';\r
-                                       }       \r
-                                       // calculate shifting amount\r
+                                       }
+                               }
+                               ++$key;
+                               if (isset($dom[$key]['tag']) AND $dom[$key]['tag'] AND (!isset($dom[$key]['opening']) OR !$dom[$key]['opening']) AND isset($dom[($dom[$key]['parent'])]['attribute']['nobr']) AND ($dom[($dom[$key]['parent'])]['attribute']['nobr'] == 'true')) {
+                                       if ((!$undo) AND ($this->start_transaction_page == ($this->numpages - 1))) {
+                                               // restore previous object
+                                               $this->rollbackTransaction(true);
+                                               // restore previous values
+                                               foreach ($this_method_vars as $vkey => $vval) {
+                                                       $$vkey = $vval;
+                                               }
+                                               // add a page
+                                               $this->AddPage();
+                                               $undo = true; // avoid infinite loop
+                                       } else {
+                                               $undo = false;
+                                       }
+                               }
+                       } // end for each $key
+                       // align the last line
+                       if (isset($startlinex)) {
+                               $yshift = $minstartliney - $startliney;
+                               if (($yshift > 0) OR ($this->page > $startlinepage)) {
+                                       $yshift = 0;
+                               }
+                               if ((isset($plalign) AND ((($plalign == 'C') OR ($plalign == 'J') OR (($plalign == 'R') AND (!$this->rtl)) OR (($plalign == 'L') AND ($this->rtl))))) OR ($yshift < 0)) {
+                                       // the last line must be shifted to be aligned as requested
+                                       $linew = abs($this->endlinex - $startlinex);
+                                       $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos);
+                                       if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) {
+                                               $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];
+                                               $midpos = min($opentagpos, $this->footerpos[$startlinepage]);
+                                       } elseif (isset($opentagpos)) {
+                                               $midpos = $opentagpos;
+                                       } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) {
+                                               $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];
+                                               $midpos = $this->footerpos[$startlinepage];
+                                       } else {
+                                               $midpos = 0;
+                                       }
+                                       if ($midpos > 0) {
+                                               $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos));
+                                               $pend = substr($this->getPageBuffer($startlinepage), $midpos);
+                                       } else {
+                                               $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos);
+                                               $pend = '';
+                                       }       
+                                       // calculate shifting amount
                                        $tw = $w;
-                                       if ($this->lMargin != $prevlMargin) {\r
+                                       if ($this->lMargin != $prevlMargin) {
                                                $tw += ($prevlMargin - $this->lMargin);
-                                       }\r
-                                       if ($this->rMargin != $prevrMargin) {\r
+                                       }
+                                       if ($this->rMargin != $prevrMargin) {
                                                $tw += ($prevrMargin - $this->rMargin);
-                                       }\r
-                                       $mdiff = abs($tw - $linew);\r
-                                       if ($plalign == 'C') {\r
-                                               if ($this->rtl) {\r
-                                                       $t_x = -($mdiff / 2);\r
-                                               } else {\r
-                                                       $t_x = ($mdiff / 2);\r
-                                               }\r
-                                       } elseif (($plalign == 'R') AND (!$this->rtl)) {\r
-                                               // right alignment on LTR document\r
-                                               $t_x = $mdiff;\r
-                                       } elseif (($plalign == 'L') AND ($this->rtl)) {\r
-                                               // left alignment on RTL document\r
-                                               $t_x = -$mdiff;\r
-                                       } else {\r
-                                               $t_x = 0;\r
-                                       }
-                                       if (($t_x != 0) OR ($yshift < 0)) {\r
-                                               // shift the line\r
+                                       }
+                                       $mdiff = abs($tw - $linew);
+                                       if ($plalign == 'C') {
+                                               if ($this->rtl) {
+                                                       $t_x = -($mdiff / 2);
+                                               } else {
+                                                       $t_x = ($mdiff / 2);
+                                               }
+                                       } elseif (($plalign == 'R') AND (!$this->rtl)) {
+                                               // right alignment on LTR document
+                                               $t_x = $mdiff;
+                                       } elseif (($plalign == 'L') AND ($this->rtl)) {
+                                               // left alignment on RTL document
+                                               $t_x = -$mdiff;
+                                       } else {
+                                               $t_x = 0;
+                                       }
+                                       if (($t_x != 0) OR ($yshift < 0)) {
+                                               // shift the line
                                                $trx = sprintf('1 0 0 1 %.3F %.3F cm', ($t_x * $this->k), ($yshift * $this->k));
                                                $this->setPageBuffer($startlinepage, $pstart."\nq\n".$trx."\n".$pmid."\nQ\n".$pend);
                                                $endlinepos = strlen($pstart."\nq\n".$trx."\n".$pmid."\nQ\n");
-                                               // shift the annotations and links\r
-                                               if (isset($this->PageAnnots[$this->page])) {\r
-                                                       foreach ($this->PageAnnots[$this->page] as $pak => $pac) {\r
-                                                               if ($pak >= $pask) {\r
-                                                                       $this->PageAnnots[$this->page][$pak]['x'] += $t_x;\r
-                                                                       $this->PageAnnots[$this->page][$pak]['y'] -= $yshift;\r
-                                                               }\r
-                                                       }\r
-                                               }\r
-                                               $this->y -= $yshift;\r
-                                       }\r
-                               }\r
-                       }\r
-                       if ($ln AND (!($cell AND ($dom[$key-1]['value'] == 'table')))) {\r
-                               $this->Ln($this->lasth);\r
-                       }\r
+                                               // shift the annotations and links
+                                               if (isset($this->PageAnnots[$this->page])) {
+                                                       foreach ($this->PageAnnots[$this->page] as $pak => $pac) {
+                                                               if ($pak >= $pask) {
+                                                                       $this->PageAnnots[$this->page][$pak]['x'] += $t_x;
+                                                                       $this->PageAnnots[$this->page][$pak]['y'] -= $yshift;
+                                                               }
+                                                       }
+                                               }
+                                               $this->y -= $yshift;
+                                       }
+                               }
+                       }
+                       if ($ln AND (!($cell AND ($dom[$key-1]['value'] == 'table')))) {
+                               $this->Ln($this->lasth);
+                       }
                        // restore previous values
                        $this->setGraphicVars($gvars);
                        if ($this->page > $prevPage) {
-                               $this->lMargin = $this->pagedim[$this->page]['olm'];\r
+                               $this->lMargin = $this->pagedim[$this->page]['olm'];
                                $this->rMargin = $this->pagedim[$this->page]['orm'];
-                       }\r
-                       unset($dom);\r
-               }\r
-               \r
-               /**\r
-                * Process opening tags.\r
-                * @param array $dom html dom array \r
-                * @param int $key current element id\r
-                * @param boolean $cell if true add the default cMargin space to each new line (default false).\r
-                * @access protected\r
-                */\r
-               protected function openHTMLTagHandler(&$dom, $key, $cell=false) {\r
-                       $tag = $dom[$key];\r
+                       }
+                       // restore previous list state
+                       $this->listnum = $prev_listnum;
+                       $this->listordered = $prev_listordered;
+                       $this->listcount = $prev_listcount;
+                       $this->lispacer = $prev_lispacer;
+                       unset($dom);
+               }
+               
+               /**
+                * Process opening tags.
+                * @param array $dom html dom array 
+                * @param int $key current element id
+                * @param boolean $cell if true add the default cMargin space to each new line (default false).
+                * @access protected
+                */
+               protected function openHTMLTagHandler(&$dom, $key, $cell=false) {
+                       $tag = $dom[$key];
                        $parent = $dom[($dom[$key]['parent'])];
-                       $firstorlast = ($key == 1);\r
-                       // check for text direction attribute\r
-                       if (isset($tag['attribute']['dir'])) {\r
-                               $this->tmprtl = $tag['attribute']['dir'] == 'rtl' ? 'R' : 'L';\r
-                       } else {\r
-                               $this->tmprtl = false;\r
-                       }\r
-                       //Opening tag\r
-                       switch($tag['value']) {\r
+                       $firstorlast = ($key == 1);
+                       // check for text direction attribute
+                       if (isset($tag['attribute']['dir'])) {
+                               $this->setTempRTL($tag['attribute']['dir']);
+                       } else {
+                               $this->tmprtl = false;
+                       }
+                       //Opening tag
+                       switch($tag['value']) {
                                case 'table': {
                                        $cp = 0;
-                                       $cs = 0;\r
+                                       $cs = 0;
                                        $dom[$key]['rowspans'] = array();
                                        if (!$this->empty_string($dom[$key]['thead'])) {
                                                // set table header
@@ -12153,55 +14031,55 @@ if (!class_exists('TCPDF', false)) {
                                                }
                                        }
                                        if (isset($tag['attribute']['cellpadding'])) {
-                                               $cp = $this->getHTMLUnitToUnits($tag['attribute']['cellpadding'], 1, 'px');\r
-                                               $this->oldcMargin = $this->cMargin;\r
-                                               $this->cMargin = $cp;\r
+                                               $cp = $this->getHTMLUnitToUnits($tag['attribute']['cellpadding'], 1, 'px');
+                                               $this->oldcMargin = $this->cMargin;
+                                               $this->cMargin = $cp;
                                        }
                                        if (isset($tag['attribute']['cellspacing'])) {
-                                               $cs = $this->getHTMLUnitToUnits($tag['attribute']['cellspacing'], 1, 'px');\r
-                                       }
-                                       $this->checkPageBreak((2 * $cp) + (2 * $cs) + $this->lasth);\r
-                                       break;\r
-                               }\r
-                               case 'tr': {\r
-                                       // array of columns positions\r
-                                       $dom[$key]['cellpos'] = array();\r
-                                       break;\r
-                               }\r
-                               case 'hr': {\r
-                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);\r
-                                       $this->htmlvspace = 0;\r
+                                               $cs = $this->getHTMLUnitToUnits($tag['attribute']['cellspacing'], 1, 'px');
+                                       }
+                                       $this->checkPageBreak((2 * $cp) + (2 * $cs) + $this->lasth);
+                                       break;
+                               }
+                               case 'tr': {
+                                       // array of columns positions
+                                       $dom[$key]['cellpos'] = array();
+                                       break;
+                               }
+                               case 'hr': {
+                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);
+                                       $this->htmlvspace = 0;
                                        $wtmp = $this->w - $this->lMargin - $this->rMargin;
-                                       if ((isset($tag['attribute']['width'])) AND ($tag['attribute']['width'] != '')) {\r
-                                               $hrWidth = $this->getHTMLUnitToUnits($tag['attribute']['width'], $wtmp, 'px');\r
-                                       } else {\r
-                                               $hrWidth = $wtmp;\r
-                                       }\r
-                                       $x = $this->GetX();\r
-                                       $y = $this->GetY();\r
-                                       $prevlinewidth = $this->GetLineWidth();\r
-                                       $this->Line($x, $y, $x + $hrWidth, $y);\r
-                                       $this->SetLineWidth($prevlinewidth);\r
-                                       $this->addHTMLVertSpace(1, $cell, '', !isset($dom[($key + 1)]), $tag['value'], false);\r
-                                       break;\r
-                               }\r
+                                       if ((isset($tag['attribute']['width'])) AND ($tag['attribute']['width'] != '')) {
+                                               $hrWidth = $this->getHTMLUnitToUnits($tag['attribute']['width'], $wtmp, 'px');
+                                       } else {
+                                               $hrWidth = $wtmp;
+                                       }
+                                       $x = $this->GetX();
+                                       $y = $this->GetY();
+                                       $prevlinewidth = $this->GetLineWidth();
+                                       $this->Line($x, $y, $x + $hrWidth, $y);
+                                       $this->SetLineWidth($prevlinewidth);
+                                       $this->addHTMLVertSpace(1, $cell, '', !isset($dom[($key + 1)]), $tag['value'], false);
+                                       break;
+                               }
                                case 'a': {
-                                       if (array_key_exists('href', $tag['attribute'])) {\r
+                                       if (array_key_exists('href', $tag['attribute'])) {
                                                $this->HREF['url'] = $tag['attribute']['href'];
                                        }
                                        $this->HREF['color'] = $this->htmlLinkColorArray;
                                        $this->HREF['style'] = $this->htmlLinkFontStyle;
                                        if (array_key_exists('style', $tag['attribute'])) {
                                                // get style attributes
-                                               preg_match_all('/([^;:\s]*):([^;]*)/', $tag['attribute']['style'], $style_array, PREG_PATTERN_ORDER);\r
-                                               $astyle = array();\r
-                                               while (list($id, $name) = each($style_array[1])) {\r
+                                               preg_match_all('/([^;:\s]*):([^;]*)/', $tag['attribute']['style'], $style_array, PREG_PATTERN_ORDER);
+                                               $astyle = array();
+                                               while (list($id, $name) = each($style_array[1])) {
                                                        $name = strtolower($name);
-                                                       $astyle[$name] = trim($style_array[2][$id]);\r
+                                                       $astyle[$name] = trim($style_array[2][$id]);
                                                }
                                                if (isset($astyle['color'])) {
                                                        $this->HREF['color'] = $this->convertHTMLColorToDec($astyle['color']);
-                                               }\r
+                                               }
                                                if (isset($astyle['text-decoration'])) {
                                                        $this->HREF['style'] = '';
                                                        $decors = explode(' ', strtolower($astyle['text-decoration']));
@@ -12216,57 +14094,57 @@ if (!class_exists('TCPDF', false)) {
                                                                }
                                                        }
                                                }
-                                       }               \r
-                                       break;\r
-                               }\r
-                               case 'img': {\r
-                                       if (isset($tag['attribute']['src'])) {\r
-                                               // replace relative path with real server path\r
-                                               if ($tag['attribute']['src'][0] == '/') {\r
-                                                       $tag['attribute']['src'] = $_SERVER['DOCUMENT_ROOT'].$tag['attribute']['src'];\r
-                                               }\r
+                                       }               
+                                       break;
+                               }
+                               case 'img': {
+                                       if (isset($tag['attribute']['src'])) {
+                                               // replace relative path with real server path
+                                               if (($tag['attribute']['src'][0] == '/') AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
+                                                       $tag['attribute']['src'] = $_SERVER['DOCUMENT_ROOT'].$tag['attribute']['src'];
+                                               }
                                                $tag['attribute']['src'] = urldecode($tag['attribute']['src']);
-                                               $tag['attribute']['src'] = str_replace(K_PATH_URL, K_PATH_MAIN, $tag['attribute']['src']);\r
-                                               if (!isset($tag['attribute']['width'])) {\r
-                                                       $tag['attribute']['width'] = 0;\r
-                                               }\r
-                                               if (!isset($tag['attribute']['height'])) {\r
-                                                       $tag['attribute']['height'] = 0;\r
-                                               }\r
+                                               $tag['attribute']['src'] = str_replace(K_PATH_URL, K_PATH_MAIN, $tag['attribute']['src']);
+                                               if (!isset($tag['attribute']['width'])) {
+                                                       $tag['attribute']['width'] = 0;
+                                               }
+                                               if (!isset($tag['attribute']['height'])) {
+                                                       $tag['attribute']['height'] = 0;
+                                               }
                                                //if (!isset($tag['attribute']['align'])) {
                                                        // the only alignment supported is "bottom"
-                                                       // further development is required for other modes.\r
-                                                       $tag['attribute']['align'] = 'bottom';\r
-                                               //} \r
-                                               switch($tag['attribute']['align']) {\r
-                                                       case 'top': {\r
-                                                               $align = 'T';\r
-                                                               break;\r
-                                                       }\r
-                                                       case 'middle': {\r
-                                                               $align = 'M';\r
-                                                               break;\r
-                                                       }\r
-                                                       case 'bottom': {\r
-                                                               $align = 'B';\r
-                                                               break;\r
-                                                       }\r
-                                                       default: {\r
-                                                               $align = 'B';\r
-                                                               break;\r
-                                                       }\r
-                                               }\r
-                                               $fileinfo = pathinfo($tag['attribute']['src']);\r
-                                               if (isset($fileinfo['extension']) AND (!$this->empty_string($fileinfo['extension']))) {\r
-                                                       $type = strtolower($fileinfo['extension']);\r
+                                                       // further development is required for other modes.
+                                                       $tag['attribute']['align'] = 'bottom';
+                                               //} 
+                                               switch($tag['attribute']['align']) {
+                                                       case 'top': {
+                                                               $align = 'T';
+                                                               break;
+                                                       }
+                                                       case 'middle': {
+                                                               $align = 'M';
+                                                               break;
+                                                       }
+                                                       case 'bottom': {
+                                                               $align = 'B';
+                                                               break;
+                                                       }
+                                                       default: {
+                                                               $align = 'B';
+                                                               break;
+                                                       }
+                                               }
+                                               $fileinfo = pathinfo($tag['attribute']['src']);
+                                               if (isset($fileinfo['extension']) AND (!$this->empty_string($fileinfo['extension']))) {
+                                                       $type = strtolower($fileinfo['extension']);
                                                }
                                                $prevy = $this->y;
                                                $xpos = $this->GetX();
                                                if (isset($dom[($key - 1)]) AND ($dom[($key - 1)]['value'] == ' ')) {
-                                                       if ($this->rtl) {\r
-                                                               $xpos += $this->GetStringWidth(' ');\r
-                                                       } else {\r
-                                                               $xpos -= $this->GetStringWidth(' ');\r
+                                                       if ($this->rtl) {
+                                                               $xpos += $this->GetStringWidth(' ');
+                                                       } else {
+                                                               $xpos -= $this->GetStringWidth(' ');
                                                        }
                                                }
                                                $imglink = '';
@@ -12279,193 +14157,400 @@ if (!class_exists('TCPDF', false)) {
                                                                $this->SetLink($imglink, 0, $page);
                                                        }
                                                }
-                                               $border = 0;
-                                               if (isset($tag['attribute']['border']) AND !empty($tag['attribute']['border'])) {
-                                                       // currently only support 1 (frame) or a combination of 'LTRB'
-                                                       $border = $tag['attribute']['border'];\r
+                                               $border = 0;
+                                               if (isset($tag['attribute']['border']) AND !empty($tag['attribute']['border'])) {
+                                                       // currently only support 1 (frame) or a combination of 'LTRB'
+                                                       $border = $tag['attribute']['border'];
+                                               }
+                                               $iw = '';
+                                               if (isset($tag['attribute']['width'])) {
+                                                       $iw = $this->getHTMLUnitToUnits($tag['attribute']['width'], 1, 'px', false);
+                                               }
+                                               $ih = '';
+                                               if (isset($tag['attribute']['height'])) {
+                                                       $ih = $this->getHTMLUnitToUnits($tag['attribute']['height'], 1, 'px', false);
+                                               }
+                                               if (($type == 'eps') OR ($type == 'ai')) {
+                                                       $this->ImageEps($tag['attribute']['src'], $xpos, $this->GetY(), $iw, $ih, $imglink, true, $align, '', $border);
+                                               } else {
+                                                       $this->Image($tag['attribute']['src'], $xpos, $this->GetY(), $iw, $ih, '', $imglink, $align, false, 300, '', false, false, $border);
+                                               }
+                                               switch($align) {
+                                                       case 'T': {
+                                                               $this->y = $prevy;
+                                                               break;
+                                                       }
+                                                       case 'M': {
+                                                               $this->y = (($this->img_rb_y + $prevy - ($tag['fontsize'] / $this->k)) / 2) ;
+                                                               break;
+                                                       }
+                                                       case 'B': {
+                                                               $this->y = $this->img_rb_y - ($tag['fontsize'] / $this->k);
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                                       break;
+                               }
+                               case 'dl': {
+                                       ++$this->listnum;
+                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], false);
+                                       break;
+                               }
+                               case 'dt': {
+                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);
+                                       break;
+                               }
+                               case 'dd': {
+                                       if ($this->rtl) {
+                                               $this->rMargin += $this->listindent;
+                                       } else {
+                                               $this->lMargin += $this->listindent;
+                                       }
+                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);
+                                       break;
+                               }
+                               case 'ul':
+                               case 'ol': {
+                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], false);
+                                       $this->htmlvspace = 0;
+                                       ++$this->listnum;
+                                       if ($tag['value'] == 'ol') {
+                                               $this->listordered[$this->listnum] = true;
+                                       } else {
+                                               $this->listordered[$this->listnum] = false;
+                                       }
+                                       if (isset($tag['attribute']['start'])) {
+                                               $this->listcount[$this->listnum] = intval($tag['attribute']['start']) - 1;
+                                       } else {
+                                               $this->listcount[$this->listnum] = 0;
+                                       }
+                                       if ($this->rtl) {
+                                               $this->rMargin += $this->listindent;
+                                       } else {
+                                               $this->lMargin += $this->listindent;
+                                       }
+                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], false);
+                                       $this->htmlvspace = 0;
+                                       break;
+                               }
+                               case 'li': {
+                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);
+                                       if ($this->listordered[$this->listnum]) {
+                                               // ordered item
+                                               if (isset($parent['attribute']['type']) AND !$this->empty_string($parent['attribute']['type'])) {
+                                                       $this->lispacer = $parent['attribute']['type'];
+                                               } elseif (isset($parent['listtype']) AND !$this->empty_string($parent['listtype'])) {
+                                                       $this->lispacer = $parent['listtype'];
+                                               } elseif (isset($this->lisymbol) AND !$this->empty_string($this->lisymbol)) {
+                                                       $this->lispacer = $this->lisymbol;
+                                               } else {
+                                                       $this->lispacer = '#';
+                                               }
+                                               ++$this->listcount[$this->listnum];
+                                               if (isset($tag['attribute']['value'])) {
+                                                       $this->listcount[$this->listnum] = intval($tag['attribute']['value']);
+                                               }
+                                       } else {
+                                               // unordered item
+                                               if (isset($parent['attribute']['type']) AND !$this->empty_string($parent['attribute']['type'])) {
+                                                       $this->lispacer = $parent['attribute']['type'];
+                                               } elseif (isset($parent['listtype']) AND !$this->empty_string($parent['listtype'])) {
+                                                       $this->lispacer = $parent['listtype'];
+                                               } elseif (isset($this->lisymbol) AND !$this->empty_string($this->lisymbol)) {
+                                                       $this->lispacer = $this->lisymbol;
+                                               } else {
+                                                       $this->lispacer = '!';
+                                               }
+                                       }
+                                       break;
+                               }
+                               case 'blockquote': {
+                                       if ($this->rtl) {
+                                               $this->rMargin += $this->listindent;
+                                       } else {
+                                               $this->lMargin += $this->listindent;
+                                       }
+                                       $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], false);
+                                       break;
+                               }
+                               case 'br': {
+                                       $this->Ln('', $cell);
+                                       break;
+                               }
+                               case 'div': {
+                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);
+                                       break;
+                               }
+                               case 'p': {
+                                       $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], false);
+                                       break;
+                               }
+                               case 'pre': {
+                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);
+                                       $this->premode = true;
+                                       break;
+                               }
+                               case 'sup': {
+                                       $this->SetXY($this->GetX(), $this->GetY() - ((0.7 * $this->FontSizePt) / $this->k));
+                                       break;
+                               }
+                               case 'sub': {
+                                       $this->SetXY($this->GetX(), $this->GetY() + ((0.3 * $this->FontSizePt) / $this->k));
+                                       break;
+                               }
+                               case 'h1': 
+                               case 'h2': 
+                               case 'h3': 
+                               case 'h4': 
+                               case 'h5': 
+                               case 'h6': {
+                                       $this->addHTMLVertSpace(1, $cell, ($tag['fontsize'] * 1.5) / $this->k, $firstorlast, $tag['value'], false);
+                                       break;
+                               }
+                               // Form fields (since 4.8.000 - 2009-09-07)
+                               case 'form': {
+                                       if (isset($tag['attribute']['action'])) {
+                                               $this->form_action = $tag['attribute']['action'];
+                                       } else {
+                                               $this->form_action = K_PATH_URL.$_SERVER['SCRIPT_NAME'];
+                                       }
+                                       if (isset($tag['attribute']['enctype'])) {
+                                               $this->form_enctype = $tag['attribute']['enctype'];
+                                       } else {
+                                               $this->form_enctype = 'application/x-www-form-urlencoded';
+                                       }
+                                       if (isset($tag['attribute']['method'])) {
+                                               $this->form_mode = $tag['attribute']['method'];
+                                       } else {
+                                               $this->form_mode = 'post';
+                                       }
+                                       break;
+                               }
+                               case 'input': {
+                                       if (isset($tag['attribute']['name']) AND !$this->empty_string($tag['attribute']['name'])) {
+                                               $name = $tag['attribute']['name'];
+                                       } else {
+                                               break;
+                                       }
+                                       $prop = array();
+                                       $opt = array();
+                                       if (isset($tag['attribute']['value']) AND !$this->empty_string($tag['attribute']['value'])) {
+                                               $value = $tag['attribute']['value'];
+                                       }
+                                       if (isset($tag['attribute']['maxlength']) AND !$this->empty_string($tag['attribute']['maxlength'])) {
+                                               $opt['maxlen'] = intval($tag['attribute']['value']);
+                                       }
+                                       $h = $this->FontSize * $this->cell_height_ratio;
+                                       if (isset($tag['attribute']['size']) AND !$this->empty_string($tag['attribute']['size'])) {
+                                               $w = intval($tag['attribute']['size']) * $this->GetStringWidth(chr(32)) * 2;
+                                       } else {
+                                               $w = $h;
+                                       }
+                                       if (isset($tag['attribute']['checked']) AND (($tag['attribute']['checked'] == 'checked') OR ($tag['attribute']['checked'] == 'true'))) {
+                                               $checked = true;
+                                       } else {
+                                               $checked = false;
+                                       }
+                                       switch ($tag['attribute']['type']) {
+                                               case 'text': {
+                                                       if (isset($value)) {
+                                                               $opt['v'] = $value;
+                                                       }
+                                                       $this->TextField($name, $w, $h, $prop, $opt, '', '', false);
+                                                       break;
+                                               }
+                                               case 'password': {
+                                                       if (isset($value)) {
+                                                               $opt['v'] = $value;
+                                                       }
+                                                       $prop['password'] = 'true';
+                                                       $this->TextField($name, $w, $h, $prop, $opt, '', '', false);
+                                                       break;
+                                               }
+                                               case 'checkbox': {
+                                                       $this->CheckBox($name, $w, $checked, $prop, $opt, $value, '', '', false);
+                                                       break;
+                                               }
+                                               case 'radio': {
+                                                       $this->RadioButton($name, $w, $prop, $opt, $value, $checked, '', '', false);
+                                                       break;
+                                               }
+                                               case 'submit': {
+                                                       $w = $this->GetStringWidth($value) * 1.5;
+                                                       $h *= 1.6;
+                                                       $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255));
+                                                       $action = array();
+                                                       $action['S'] = 'SubmitForm';
+                                                       $action['F'] = $this->form_action;
+                                                       if ($this->form_enctype != 'FDF') {
+                                                               $action['Flags'] = array('ExportFormat');
+                                                       }
+                                                       if ($this->form_mode == 'get') {
+                                                               $action['Flags'] = array('GetMethod');
+                                                       }
+                                                       $this->Button($name, $w, $h, $value, $action, $prop, $opt, '', '', false);
+                                                       break;
+                                               }
+                                               case 'reset': {
+                                                       $w = $this->GetStringWidth($value) * 1.5;
+                                                       $h *= 1.6;
+                                                       $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255));
+                                                       $this->Button($name, $w, $h, $value, array('S'=>'ResetForm'), $prop, $opt, '', '', false);
+                                                       break;
                                                }
-                                               $iw = '';
-                                               if (isset($tag['attribute']['width'])) {
-                                                       $iw = $this->getHTMLUnitToUnits($tag['attribute']['width'], 1, 'px', false);
+                                               case 'file': {
+                                                       $prop['fileSelect'] = 'true';
+                                                       $this->TextField($name, $w, $h, $prop, $opt, '', '', false);
+                                                       if (!isset($value)) {
+                                                               $value = '*';
+                                                       }
+                                                       $w = $this->GetStringWidth($value) * 2;
+                                                       $h *= 1.2;
+                                                       $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255));
+                                                       $jsaction = 'var f=this.getField(\''.$name.'\'); f.browseForFileToSubmit();';
+                                                       $this->Button('FB_'.$name, $w, $h, $value, $jsaction, $prop, $opt, '', '', false);
+                                                       break;
+                                               }
+                                               case 'hidden': {
+                                                       if (isset($value)) {
+                                                               $opt['v'] = $value;
+                                                       }
+                                                       $opt['f'] = array('invisible', 'hidden');
+                                                       $this->TextField($name, 0, 0, $prop, $opt, '', '', false);
+                                                       break;
+                                               }
+                                               case 'image': {
+                                                       // THIS TYPE MUST BE FIXED
+                                                       if (isset($tag['attribute']['src']) AND !$this->empty_string($tag['attribute']['src'])) {
+                                                               $img = $tag['attribute']['src'];
+                                                       } else {
+                                                               break;
+                                                       }
+                                                       $value = 'img';
+                                                       //$opt['mk'] = array('i'=>$img, 'tp'=>1, 'if'=>array('sw'=>'A', 's'=>'A', 'fb'=>false));
+                                                       if (isset($tag['attribute']['onclick']) AND !empty($tag['attribute']['onclick'])) {
+                                                               $jsaction = $tag['attribute']['onclick'];
+                                                       } else {
+                                                               $jsaction = '';
+                                                       }
+                                                       $this->Button($name, $w, $h, $value, $jsaction, $prop, $opt, '', '', false);
+                                                       break;
+                                               }
+                                               case 'button': {
+                                                       $w = $this->GetStringWidth($value) * 1.5;
+                                                       $h *= 1.6;
+                                                       $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255));
+                                                       if (isset($tag['attribute']['onclick']) AND !empty($tag['attribute']['onclick'])) {
+                                                               $jsaction = $tag['attribute']['onclick'];
+                                                       } else {
+                                                               $jsaction = '';
+                                                       }
+                                                       $this->Button($name, $w, $h, $value, $jsaction, $prop, $opt, '', '', false);
+                                                       break;
                                                }
-                                               $ih = '';
-                                               if (isset($tag['attribute']['height'])) {
-                                                       $ih = $this->getHTMLUnitToUnits($tag['attribute']['height'], 1, 'px', false);
-                                               }\r
-                                               if (($type == 'eps') OR ($type == 'ai')) {\r
-                                                       $this->ImageEps($tag['attribute']['src'], $xpos, $this->GetY(), $iw, $ih, $imglink, true, $align, '', $border);\r
-                                               } else {\r
-                                                       $this->Image($tag['attribute']['src'], $xpos, $this->GetY(), $iw, $ih, '', $imglink, $align, false, 300, '', false, false, $border);\r
-                                               }
-                                               switch($align) {\r
-                                                       case 'T': {\r
-                                                               $this->y = $prevy;\r
-                                                               break;\r
-                                                       }\r
-                                                       case 'M': {\r
-                                                               $this->y = (($this->img_rb_y + $prevy - ($tag['fontsize'] / $this->k)) / 2) ;\r
-                                                               break;\r
-                                                       }\r
-                                                       case 'B': {\r
-                                                               $this->y = $this->img_rb_y - ($tag['fontsize'] / $this->k);\r
-                                                               break;\r
-                                                       }\r
-                                               }\r
-                                       }\r
-                                       break;\r
-                               }\r
-                               case 'dl': {\r
-                                       ++$this->listnum;
-                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], false);\r
-                                       break;\r
-                               }\r
-                               case 'dt': {\r
-                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);\r
-                                       break;\r
-                               }\r
-                               case 'dd': {\r
-                                       if ($this->rtl) {\r
-                                               $this->rMargin += $this->listindent;\r
-                                       } else {\r
-                                               $this->lMargin += $this->listindent;\r
-                                       }\r
-                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);\r
-                                       break;\r
-                               }\r
-                               case 'ul':\r
-                               case 'ol': {
-                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], false);
-                                       $this->htmlvspace = 0;\r
-                                       ++$this->listnum;\r
-                                       if ($tag['value'] == 'ol') {\r
-                                               $this->listordered[$this->listnum] = true;\r
-                                       } else {\r
-                                               $this->listordered[$this->listnum] = false;\r
                                        }
-                                       if (isset($tag['attribute']['start'])) {
-                                               $this->listcount[$this->listnum] = intval($tag['attribute']['start']) - 1;
-                                       } else {\r
-                                               $this->listcount[$this->listnum] = 0;
-                                       }\r
-                                       if ($this->rtl) {\r
-                                               $this->rMargin += $this->listindent;\r
-                                       } else {\r
-                                               $this->lMargin += $this->listindent;\r
+                                       break;
+                               }
+                               case 'textarea': {
+                                       $prop = array();
+                                       $opt = array();
+                                       if (isset($tag['attribute']['name']) AND !$this->empty_string($tag['attribute']['name'])) {
+                                               $name = $tag['attribute']['name'];
+                                       } else {
+                                               break;
                                        }
-                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], false);
-                                       $this->htmlvspace = 0;\r
-                                       break;\r
-                               }\r
-                               case 'li': {
-                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);
-                                       if ($this->listordered[$this->listnum]) {
-                                               // ordered item
-                                               if (isset($parent['attribute']['type']) AND !$this->empty_string($parent['attribute']['type'])) {
-                                                       $this->lispacer = $parent['attribute']['type'];
-                                               } elseif (isset($parent['listtype']) AND !$this->empty_string($parent['listtype'])) {
-                                                       $this->lispacer = $parent['listtype'];
-                                               } elseif (isset($this->lisymbol) AND !$this->empty_string($this->lisymbol)) {
-                                                       $this->lispacer = $this->lisymbol;
-                                               } else {
-                                                       $this->lispacer = '#';
+                                       if (isset($tag['attribute']['value']) AND !$this->empty_string($tag['attribute']['value'])) {
+                                               $opt['v'] = $tag['attribute']['value'];
+                                       }
+                                       if (isset($tag['attribute']['cols']) AND !$this->empty_string($tag['attribute']['cols'])) {
+                                               $w = intval($tag['attribute']['cols']) * $this->GetStringWidth(chr(32)) * 2;
+                                       } else {
+                                               $w = 40;
+                                       }
+                                       if (isset($tag['attribute']['rows']) AND !$this->empty_string($tag['attribute']['rows'])) {
+                                               $h = intval($tag['attribute']['rows']) * $this->FontSize * $this->cell_height_ratio;
+                                       } else {
+                                               $h = 10;
+                                       }
+                                       $prop['multiline'] = 'true';
+                                       $this->TextField($name, $w, $h, $prop, $opt, '', '', false);
+                                       break;
+                               }
+                               case 'select': {
+                                       $h = $this->FontSize * $this->cell_height_ratio;
+                                       if (isset($tag['attribute']['size']) AND !$this->empty_string($tag['attribute']['size'])) {
+                                               $h *= ($tag['attribute']['size'] + 1);
+                                       }
+                                       $prop = array();
+                                       $opt = array();
+                                       if (isset($tag['attribute']['name']) AND !$this->empty_string($tag['attribute']['name'])) {
+                                               $name = $tag['attribute']['name'];
+                                       } else {
+                                               break;
+                                       }
+                                       $w = 0;
+                                       if (isset($tag['attribute']['opt']) AND !$this->empty_string($tag['attribute']['opt'])) {
+                                               $options = explode ("\r", $tag['attribute']['opt']);
+                                               $values = array();
+                                               foreach ($options as $val) {
+                                                       if (strpos($val, "\t") !== false) {
+                                                               $opts = explode("\t", $val);
+                                                               $values[] = $opts;
+                                                               $w = max($w, $this->GetStringWidth($opts[1]));
+                                                       } else {
+                                                               $values[] = $val;
+                                                               $w = max($w, $this->GetStringWidth($val));
+                                                       }
                                                }
-                                               ++$this->listcount[$this->listnum];\r
-                                               if (isset($tag['attribute']['value'])) {\r
-                                                       $this->listcount[$this->listnum] = intval($tag['attribute']['value']);\r
-                                               }\r
                                        } else {
-                                               // unordered item
-                                               if (isset($parent['attribute']['type']) AND !$this->empty_string($parent['attribute']['type'])) {
-                                                       $this->lispacer = $parent['attribute']['type'];
-                                               } elseif (isset($parent['listtype']) AND !$this->empty_string($parent['listtype'])) {
-                                                       $this->lispacer = $parent['listtype'];
-                                               } elseif (isset($this->lisymbol) AND !$this->empty_string($this->lisymbol)) {
-                                                       $this->lispacer = $this->lisymbol;
-                                               } else {
-                                                       $this->lispacer = '!';
-                                               }\r
-                                       }\r
-                                       break;\r
-                               }\r
-                               case 'blockquote': {\r
-                                       if ($this->rtl) {\r
-                                               $this->rMargin += $this->listindent;\r
-                                       } else {\r
-                                               $this->lMargin += $this->listindent;\r
-                                       }\r
-                                       $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], false);\r
-                                       break;\r
-                               }\r
-                               case 'br': {
-                                       $this->Ln('', $cell);\r
-                                       break;\r
-                               }\r
-                               case 'div': {\r
-                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);\r
-                                       break;\r
-                               }\r
-                               case 'p': {\r
-                                       $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], false);\r
-                                       break;\r
-                               }
-                               case 'pre': {\r
-                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], false);
-                                       $this->premode = true;\r
-                                       break;\r
-                               }\r
-                               case 'sup': {\r
-                                       $this->SetXY($this->GetX(), $this->GetY() - ((0.7 * $this->FontSizePt) / $this->k));\r
-                                       break;\r
-                               }\r
-                               case 'sub': {\r
-                                       $this->SetXY($this->GetX(), $this->GetY() + ((0.3 * $this->FontSizePt) / $this->k));\r
-                                       break;\r
-                               }\r
-                               case 'h1': \r
-                               case 'h2': \r
-                               case 'h3': \r
-                               case 'h4': \r
-                               case 'h5': \r
-                               case 'h6': {\r
-                                       $this->addHTMLVertSpace(1, $cell, ($tag['fontsize'] * 1.5) / $this->k, $firstorlast, $tag['value'], false);\r
-                                       break;\r
+                                               break;
+                                       }
+                                       $w *= 2;
+                                       if (isset($tag['attribute']['multiple']) AND ($tag['attribute']['multiple']='multiple')) {
+                                               $prop['multipleSelection'] = 'true';
+                                               $this->ListBox($name, $w, $h, $values, $prop, $opt, '', '', false);
+                                       } else {
+                                               $this->ComboBox($name, $w, $h, $values, $prop, $opt, '', '', false);
+                                       }
+                                       break;
                                }
                                case 'tcpdf': {
                                        // NOT HTML: used to call TCPDF methods
-                                       if (isset($tag['attribute']['method'])) {\r
+                                       if (isset($tag['attribute']['method'])) {
                                                $tcpdf_method = $tag['attribute']['method'];
                                                if (method_exists($this, $tcpdf_method)) {
                                                        if (isset($tag['attribute']['params']) AND (!empty($tag['attribute']['params']))) {
-                                                               eval('$params = array('.$tag['attribute']['params'].');');
+                                                               eval('$params = array('.$this->unhtmlentities($tag['attribute']['params']).');');
                                                                call_user_func_array(array($this, $tcpdf_method), $params);
                                                        } else {
                                                                $this->$tcpdf_method();
                                                        }
                                                        $this->newline = true;
-                                               }\r
-                                       }
-                               }\r
-                               default: {\r
-                                       break;\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               /**\r
-                * Process closing tags.\r
-                * @param array $dom html dom array \r
-                * @param int $key current element id\r
-                * @param boolean $cell if true add the default cMargin space to each new line (default false).\r
-                * @access protected\r
-                */\r
-               protected function closeHTMLTagHandler(&$dom, $key, $cell=false) {\r
-                       $tag = $dom[$key];\r
+                                               }
+                                       }
+                               }
+                               default: {
+                                       break;
+                               }
+                       }
+               }
+               
+               /**
+                * Process closing tags.
+                * @param array $dom html dom array 
+                * @param int $key current element id
+                * @param boolean $cell if true add the default cMargin space to each new line (default false).
+                * @access protected
+                */
+               protected function closeHTMLTagHandler(&$dom, $key, $cell=false) {
+                       $tag = $dom[$key];
                        $parent = $dom[($dom[$key]['parent'])];
                        $firstorlast = ((!isset($dom[($key + 1)])) OR ((!isset($dom[($key + 2)])) AND ($dom[($key + 1)]['value'] == 'marker')));
-                       $in_table_head = false;\r
-                       //Closing tag\r
-                       switch($tag['value']) {\r
-                               case 'tr': {\r
+                       $in_table_head = false;
+                       //Closing tag
+                       switch($tag['value']) {
+                               case 'tr': {
                                        $table_el = $dom[($dom[$key]['parent'])]['parent'];
                                        if(!isset($parent['endy'])) {
                                                $dom[($dom[$key]['parent'])]['endy'] = $this->y;
@@ -12474,66 +14559,66 @@ if (!class_exists('TCPDF', false)) {
                                        if(!isset($parent['endpage'])) {
                                                $dom[($dom[$key]['parent'])]['endpage'] = $this->page;
                                                $parent['endpage'] = $this->page;
-                                       }\r
-                                       // update row-spanned cells\r
-                                       if (isset($dom[$table_el]['rowspans'])) {\r
-                                               foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) {\r
-                                                       $dom[$table_el]['rowspans'][$k]['rowspan'] -= 1;\r
-                                                       if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) {\r
-                                                               if ($dom[$table_el]['rowspans'][$k]['endpage'] == $parent['endpage']) {\r
-                                                                       $dom[($dom[$key]['parent'])]['endy'] = max($dom[$table_el]['rowspans'][$k]['endy'], $parent['endy']);\r
-                                                               } elseif ($dom[$table_el]['rowspans'][$k]['endpage'] > $parent['endpage']) {\r
-                                                                       $dom[($dom[$key]['parent'])]['endy'] = $dom[$table_el]['rowspans'][$k]['endy'];\r
-                                                                       $dom[($dom[$key]['parent'])]['endpage'] = $dom[$table_el]['rowspans'][$k]['endpage'];\r
-                                                               }\r
-                                                       }\r
+                                       }
+                                       // update row-spanned cells
+                                       if (isset($dom[$table_el]['rowspans'])) {
+                                               foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) {
+                                                       $dom[$table_el]['rowspans'][$k]['rowspan'] -= 1;
+                                                       if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) {
+                                                               if ($dom[$table_el]['rowspans'][$k]['endpage'] == $parent['endpage']) {
+                                                                       $dom[($dom[$key]['parent'])]['endy'] = max($dom[$table_el]['rowspans'][$k]['endy'], $parent['endy']);
+                                                               } elseif ($dom[$table_el]['rowspans'][$k]['endpage'] > $parent['endpage']) {
+                                                                       $dom[($dom[$key]['parent'])]['endy'] = $dom[$table_el]['rowspans'][$k]['endy'];
+                                                                       $dom[($dom[$key]['parent'])]['endpage'] = $dom[$table_el]['rowspans'][$k]['endpage'];
+                                                               }
+                                                       }
                                                }
                                                // report new endy and endpage to the rowspanned cells
-                                               foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) {\r
-                                                       if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) {\r
+                                               foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) {
+                                                       if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) {
                                                                $dom[$table_el]['rowspans'][$k]['endpage'] = max($dom[$table_el]['rowspans'][$k]['endpage'], $dom[($dom[$key]['parent'])]['endpage']);
                                                                $dom[($dom[$key]['parent'])]['endpage'] = $dom[$table_el]['rowspans'][$k]['endpage'];
                                                                $dom[$table_el]['rowspans'][$k]['endy'] = max($dom[$table_el]['rowspans'][$k]['endy'], $dom[($dom[$key]['parent'])]['endy']);
-                                                               $dom[($dom[$key]['parent'])]['endy'] = $dom[$table_el]['rowspans'][$k]['endy'];\r
-                                                       }\r
+                                                               $dom[($dom[$key]['parent'])]['endy'] = $dom[$table_el]['rowspans'][$k]['endy'];
+                                                       }
                                                }
                                                // update remaining rowspanned cells
-                                               foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) {\r
-                                                       if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) {\r
+                                               foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) {
+                                                       if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) {
                                                                $dom[$table_el]['rowspans'][$k]['endpage'] = $dom[($dom[$key]['parent'])]['endpage'];
-                                                               $dom[$table_el]['rowspans'][$k]['endy'] = $dom[($dom[$key]['parent'])]['endy'];\r
-                                                       }\r
-                                               }\r
-                                       }\r
-                                       $this->setPage($dom[($dom[$key]['parent'])]['endpage']);\r
-                                       $this->y = $dom[($dom[$key]['parent'])]['endy'];                                        \r
-                                       if (isset($dom[$table_el]['attribute']['cellspacing'])) {\r
-                                               $cellspacing = $this->getHTMLUnitToUnits($dom[$table_el]['attribute']['cellspacing'], 1, 'px');\r
-                                               $this->y += $cellspacing;\r
-                                       }                               \r
-                                       $this->Ln(0, $cell);\r
+                                                               $dom[$table_el]['rowspans'][$k]['endy'] = $dom[($dom[$key]['parent'])]['endy'];
+                                                       }
+                                               }
+                                       }
+                                       $this->setPage($dom[($dom[$key]['parent'])]['endpage']);
+                                       $this->y = $dom[($dom[$key]['parent'])]['endy'];
+                                       if (isset($dom[$table_el]['attribute']['cellspacing'])) {
+                                               $cellspacing = $this->getHTMLUnitToUnits($dom[$table_el]['attribute']['cellspacing'], 1, 'px');
+                                               $this->y += $cellspacing;
+                                       }                               
+                                       $this->Ln(0, $cell);
                                        $this->x = $parent['startx'];
                                        // account for booklet mode
                                        if ($this->page > $parent['startpage']) {
                                                if (($this->rtl) AND ($this->pagedim[$this->page]['orm'] != $this->pagedim[$parent['startpage']]['orm'])) {
-                                                       $this->x += ($this->pagedim[$this->page]['orm'] - $this->pagedim[$parent['startpage']]['orm']);
+                                                       $this->x -= ($this->pagedim[$this->page]['orm'] - $this->pagedim[$parent['startpage']]['orm']);
                                                } elseif ((!$this->rtl) AND ($this->pagedim[$this->page]['olm'] != $this->pagedim[$parent['startpage']]['olm'])) {
                                                        $this->x += ($this->pagedim[$this->page]['olm'] - $this->pagedim[$parent['startpage']]['olm']);
                                                }
-                                       }\r
-                                       break;\r
+                                       }
+                                       break;
                                }
                                case 'tablehead':
                                        // closing tag used for the thead part
-                                       $in_table_head = true;\r
-                               case 'table': {\r
-                                       // draw borders\r
-                                       $table_el = $parent;\r
-                                       if ((isset($table_el['attribute']['border']) AND ($table_el['attribute']['border'] > 0)) \r
-                                               OR (isset($table_el['style']['border']) AND ($table_el['style']['border'] > 0))) {\r
-                                                       $border = 1;\r
-                                       } else {\r
-                                               $border = 0;\r
+                                       $in_table_head = true;
+                               case 'table': {
+                                       // draw borders
+                                       $table_el = $parent;
+                                       if ((isset($table_el['attribute']['border']) AND ($table_el['attribute']['border'] > 0)) 
+                                               OR (isset($table_el['style']['border']) AND ($table_el['style']['border'] > 0))) {
+                                                       $border = 1;
+                                       } else {
+                                               $border = 0;
                                        }
                                        // fix bottom line alignment of last line before page break
                                        foreach ($dom[($dom[$key]['parent'])]['trids'] as $j => $trkey) {
@@ -12563,46 +14648,46 @@ if (!class_exists('TCPDF', false)) {
                                                }
                                                $prevtrkey = $trkey;
                                                $table_el = $dom[($dom[$key]['parent'])];
-                                       }\r
-                                       // for each row\r
-                                       foreach ($table_el['trids'] as $j => $trkey) {\r
+                                       }
+                                       // for each row
+                                       foreach ($table_el['trids'] as $j => $trkey) {
                                                $parent = $dom[$trkey];
-                                               // for each cell on the row\r
-                                               foreach ($parent['cellpos'] as $k => $cellpos) {\r
-                                                       if (isset($cellpos['rowspanid']) AND ($cellpos['rowspanid'] >= 0)) {\r
-                                                               $cellpos['startx'] = $table_el['rowspans'][($cellpos['rowspanid'])]['startx'];\r
-                                                               $cellpos['endx'] = $table_el['rowspans'][($cellpos['rowspanid'])]['endx'];\r
-                                                               $endy = $table_el['rowspans'][($cellpos['rowspanid'])]['endy'];\r
-                                                               $startpage = $table_el['rowspans'][($cellpos['rowspanid'])]['startpage'];\r
-                                                               $endpage = $table_el['rowspans'][($cellpos['rowspanid'])]['endpage'];\r
-                                                       } else {\r
-                                                               $endy = $parent['endy'];\r
-                                                               $startpage = $parent['startpage'];\r
-                                                               $endpage = $parent['endpage'];\r
-                                                       }
-                                                       if ($endpage > $startpage) {\r
-                                                               // design borders around HTML cells.\r
-                                                               for ($page=$startpage; $page <= $endpage; ++$page) {\r
-                                                                       $this->setPage($page);\r
-                                                                       if ($page == $startpage) {\r
+                                               // for each cell on the row
+                                               foreach ($parent['cellpos'] as $k => $cellpos) {
+                                                       if (isset($cellpos['rowspanid']) AND ($cellpos['rowspanid'] >= 0)) {
+                                                               $cellpos['startx'] = $table_el['rowspans'][($cellpos['rowspanid'])]['startx'];
+                                                               $cellpos['endx'] = $table_el['rowspans'][($cellpos['rowspanid'])]['endx'];
+                                                               $endy = $table_el['rowspans'][($cellpos['rowspanid'])]['endy'];
+                                                               $startpage = $table_el['rowspans'][($cellpos['rowspanid'])]['startpage'];
+                                                               $endpage = $table_el['rowspans'][($cellpos['rowspanid'])]['endpage'];
+                                                       } else {
+                                                               $endy = $parent['endy'];
+                                                               $startpage = $parent['startpage'];
+                                                               $endpage = $parent['endpage'];
+                                                       }
+                                                       if ($endpage > $startpage) {
+                                                               // design borders around HTML cells.
+                                                               for ($page=$startpage; $page <= $endpage; ++$page) {
+                                                                       $this->setPage($page);
+                                                                       if ($page == $startpage) {
                                                                                $this->y = $parent['starty']; // put cursor at the beginning of row on the first page
                                                                                $ch = $this->getPageHeight() - $parent['starty'] - $this->getBreakMargin();
-                                                                               $cborder = $this->getBorderMode($border, $position='start');\r
-                                                                       } elseif ($page == $endpage) {\r
-                                                                               $this->y = $this->tMargin; // put cursor at the beginning of last page\r
+                                                                               $cborder = $this->getBorderMode($border, $position='start');
+                                                                       } elseif ($page == $endpage) {
+                                                                               $this->y = $this->tMargin; // put cursor at the beginning of last page
                                                                                $ch = $endy - $this->tMargin;
-                                                                               $cborder = $this->getBorderMode($border, $position='end');\r
-                                                                       } else {\r
-                                                                               $this->y = $this->tMargin; // put cursor at the beginning of the current page\r
+                                                                               $cborder = $this->getBorderMode($border, $position='end');
+                                                                       } else {
+                                                                               $this->y = $this->tMargin; // put cursor at the beginning of the current page
                                                                                $ch = $this->getPageHeight() - $this->tMargin - $this->getBreakMargin();
-                                                                               $cborder = $this->getBorderMode($border, $position='middle');\r
-                                                                       }\r
-                                                                       if (isset($cellpos['bgcolor']) AND ($cellpos['bgcolor']) !== false) {\r
-                                                                               $this->SetFillColorArray($cellpos['bgcolor']);\r
-                                                                               $fill = true;\r
-                                                                       } else {\r
-                                                                               $fill = false;\r
-                                                                       }\r
+                                                                               $cborder = $this->getBorderMode($border, $position='middle');
+                                                                       }
+                                                                       if (isset($cellpos['bgcolor']) AND ($cellpos['bgcolor']) !== false) {
+                                                                               $this->SetFillColorArray($cellpos['bgcolor']);
+                                                                               $fill = true;
+                                                                       } else {
+                                                                               $fill = false;
+                                                                       }
                                                                        $cw = abs($cellpos['endx'] - $cellpos['startx']);
                                                                        $this->x = $cellpos['startx'];
                                                                        // account for margin changes
@@ -12612,30 +14697,30 @@ if (!class_exists('TCPDF', false)) {
                                                                                } elseif ((!$this->rtl) AND ($this->pagedim[$page]['lm'] != $this->pagedim[$startpage]['olm'])) {
                                                                                        $this->x += ($this->pagedim[$page]['olm'] - $this->pagedim[$startpage]['olm']);
                                                                                }
-                                                                       }\r
-                                                                       // design a cell around the text\r
+                                                                       }
+                                                                       // design a cell around the text
                                                                        $ccode = $this->FillColor."\n".$this->getCellCode($cw, $ch, '', $cborder, 1, '', $fill, '', 0, true);
                                                                        if ($cborder OR $fill) {
-                                                                               $pagebuff = $this->getPageBuffer($this->page);\r
-                                                                               $pstart = substr($pagebuff, 0, $this->intmrk[$this->page]);\r
-                                                                               $pend = substr($pagebuff, $this->intmrk[$this->page]);\r
-                                                                               $this->setPageBuffer($this->page, $pstart.$ccode."\n".$pend);\r
+                                                                               $pagebuff = $this->getPageBuffer($this->page);
+                                                                               $pstart = substr($pagebuff, 0, $this->intmrk[$this->page]);
+                                                                               $pend = substr($pagebuff, $this->intmrk[$this->page]);
+                                                                               $this->setPageBuffer($this->page, $pstart.$ccode."\n".$pend);
                                                                                $this->intmrk[$this->page] += strlen($ccode."\n");
-                                                                       }\r
-                                                               }\r
+                                                                       }
+                                                               }
                                                        } else {
-                                                               $this->setPage($startpage);\r
-                                                               if (isset($cellpos['bgcolor']) AND ($cellpos['bgcolor']) !== false) {\r
-                                                                       $this->SetFillColorArray($cellpos['bgcolor']);\r
-                                                                       $fill = true;\r
-                                                               } else {\r
-                                                                       $fill = false;\r
-                                                               }\r
-                                                               $this->x = $cellpos['startx'];\r
+                                                               $this->setPage($startpage);
+                                                               if (isset($cellpos['bgcolor']) AND ($cellpos['bgcolor']) !== false) {
+                                                                       $this->SetFillColorArray($cellpos['bgcolor']);
+                                                                       $fill = true;
+                                                               } else {
+                                                                       $fill = false;
+                                                               }
+                                                               $this->x = $cellpos['startx'];
                                                                $this->y = $parent['starty'];
                                                                $cw = abs($cellpos['endx'] - $cellpos['startx']);
-                                                               $ch = $endy - $parent['starty'];\r
-                                                               // design a cell around the text\r
+                                                               $ch = $endy - $parent['starty'];
+                                                               // design a cell around the text
                                                                $ccode = $this->FillColor."\n".$this->getCellCode($cw, $ch, '', $border, 1, '', $fill, '', 0, true);
                                                                if ($border OR $fill) {
                                                                        if (end($this->transfmrk[$this->page]) !== false) {
@@ -12646,19 +14731,19 @@ if (!class_exists('TCPDF', false)) {
                                                                        } else {
                                                                                $pagemark = &$this->intmrk[$this->page];
                                                                        }
-                                                                       $pagebuff = $this->getPageBuffer($this->page);\r
-                                                                       $pstart = substr($pagebuff, 0, $pagemark);\r
-                                                                       $pend = substr($pagebuff, $pagemark);\r
-                                                                       $this->setPageBuffer($this->page, $pstart.$ccode."\n".$pend);\r
+                                                                       $pagebuff = $this->getPageBuffer($this->page);
+                                                                       $pstart = substr($pagebuff, 0, $pagemark);
+                                                                       $pend = substr($pagebuff, $pagemark);
+                                                                       $this->setPageBuffer($this->page, $pstart.$ccode."\n".$pend);
                                                                        $pagemark += strlen($ccode."\n");
-                                                               }                                       \r
-                                                       }\r
-                                               }                                       \r
-                                               if (isset($table_el['attribute']['cellspacing'])) {\r
-                                                       $cellspacing = $this->getHTMLUnitToUnits($table_el['attribute']['cellspacing'], 1, 'px');\r
-                                                       $this->y += $cellspacing;\r
-                                               }                               \r
-                                               $this->Ln(0, $cell);\r
+                                                               }                                       
+                                                       }
+                                               }                                       
+                                               if (isset($table_el['attribute']['cellspacing'])) {
+                                                       $cellspacing = $this->getHTMLUnitToUnits($table_el['attribute']['cellspacing'], 1, 'px');
+                                                       $this->y += $cellspacing;
+                                               }                               
+                                               $this->Ln(0, $cell);
                                                $this->x = $parent['startx'];
                                                if ($endpage > $startpage) {
                                                        if (($this->rtl) AND ($this->pagedim[$endpage]['orm'] != $this->pagedim[$startpage]['orm'])) {
@@ -12666,12 +14751,12 @@ if (!class_exists('TCPDF', false)) {
                                                        } elseif ((!$this->rtl) AND ($this->pagedim[$endpage]['olm'] != $this->pagedim[$startpage]['olm'])) {
                                                                $this->x += ($this->pagedim[$endpage]['olm'] - $this->pagedim[$startpage]['olm']);
                                                        }
-                                               }\r
-                                       }\r
+                                               }
+                                       }
                                        if (!$in_table_head) {
                                                // we are not inside a thead section
-                                               if (isset($parent['cellpadding'])) {\r
-                                                       $this->cMargin = $this->oldcMargin;\r
+                                               if (isset($parent['cellpadding'])) {
+                                                       $this->cMargin = $this->oldcMargin;
                                                }
                                                $this->lasth = $this->FontSize * $this->cell_height_ratio;
                                                if (isset($this->theadMargins['top'])) {
@@ -12682,116 +14767,122 @@ if (!class_exists('TCPDF', false)) {
                                                // reset table header
                                                $this->thead = '';
                                                $this->theadMargins = array();
-                                       }\r
-                                       break;\r
-                               }\r
-                               case 'a': {\r
-                                       $this->HREF = '';\r
-                                       break;\r
-                               }\r
-                               case 'sup': {\r
-                                       $this->SetXY($this->GetX(), $this->GetY() + ((0.7 * $parent['fontsize']) / $this->k));\r
-                                       break;\r
-                               }\r
-                               case 'sub': {\r
-                                       $this->SetXY($this->GetX(), $this->GetY() - ((0.3 * $parent['fontsize'])/$this->k));\r
-                                       break;\r
-                               }\r
-                               case 'div': {\r
-                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], true);\r
-                                       break;\r
-                               }\r
-                               case 'blockquote': {\r
-                                       if ($this->rtl) {\r
-                                               $this->rMargin -= $this->listindent;\r
-                                       } else {\r
-                                               $this->lMargin -= $this->listindent;\r
-                                       }\r
-                                       $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], true);\r
-                                       break;\r
-                               }\r
-                               case 'p': {\r
-                                       $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], true);\r
-                                       break;\r
-                               }
-                               case 'pre': {\r
+                                       }
+                                       break;
+                               }
+                               case 'a': {
+                                       $this->HREF = '';
+                                       break;
+                               }
+                               case 'sup': {
+                                       $this->SetXY($this->GetX(), $this->GetY() + ((0.7 * $parent['fontsize']) / $this->k));
+                                       break;
+                               }
+                               case 'sub': {
+                                       $this->SetXY($this->GetX(), $this->GetY() - ((0.3 * $parent['fontsize'])/$this->k));
+                                       break;
+                               }
+                               case 'div': {
+                                       $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], true);
+                                       break;
+                               }
+                               case 'blockquote': {
+                                       if ($this->rtl) {
+                                               $this->rMargin -= $this->listindent;
+                                       } else {
+                                               $this->lMargin -= $this->listindent;
+                                       }
+                                       $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], true);
+                                       break;
+                               }
+                               case 'p': {
+                                       $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], true);
+                                       break;
+                               }
+                               case 'pre': {
                                        $this->addHTMLVertSpace(1, $cell, '', $firstorlast, $tag['value'], true);
-                                       $this->premode = false;\r
-                                       break;\r
-                               }\r
-                               case 'dl': {\r
-                                       --$this->listnum;\r
-                                       if ($this->listnum <= 0) {\r
-                                               $this->listnum = 0;\r
-                                               $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], true);\r
-                                       }\r
-                                       break;\r
-                               }\r
-                               case 'dt': {\r
+                                       $this->premode = false;
+                                       break;
+                               }
+                               case 'dl': {
+                                       --$this->listnum;
+                                       if ($this->listnum <= 0) {
+                                               $this->listnum = 0;
+                                               $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], true);
+                                       }
+                                       break;
+                               }
+                               case 'dt': {
+                                       $this->lispacer = '';
+                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], true);
+                                       break;
+                               }
+                               case 'dd': {
+                                       $this->lispacer = '';
+                                       if ($this->rtl) {
+                                               $this->rMargin -= $this->listindent;
+                                       } else {
+                                               $this->lMargin -= $this->listindent;
+                                       }
+                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], true);
+                                       break;
+                               }
+                               case 'ul':
+                               case 'ol': {
+                                       --$this->listnum;
                                        $this->lispacer = '';
-                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], true);\r
-                                       break;\r
-                               }\r
-                               case 'dd': {\r
-                                       $this->lispacer = '';\r
-                                       if ($this->rtl) {\r
-                                               $this->rMargin -= $this->listindent;\r
-                                       } else {\r
-                                               $this->lMargin -= $this->listindent;\r
-                                       }
-                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], true);\r
-                                       break;\r
-                               }\r
-                               case 'ul':\r
-                               case 'ol': {\r
-                                       --$this->listnum;\r
-                                       $this->lispacer = '';\r
-                                       if ($this->rtl) {\r
-                                               $this->rMargin -= $this->listindent;\r
-                                       } else {\r
-                                               $this->lMargin -= $this->listindent;\r
-                                       }\r
-                                       if ($this->listnum <= 0) {\r
-                                               $this->listnum = 0;\r
-                                               $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], true);\r
-                                       }\r
-                                       $this->lasth = $this->FontSize * $this->cell_height_ratio;\r
-                                       break;\r
-                               }\r
-                               case 'li': {\r
+                                       if ($this->rtl) {
+                                               $this->rMargin -= $this->listindent;
+                                       } else {
+                                               $this->lMargin -= $this->listindent;
+                                       }
+                                       if ($this->listnum <= 0) {
+                                               $this->listnum = 0;
+                                               $this->addHTMLVertSpace(2, $cell, '', $firstorlast, $tag['value'], true);
+                                       }
+                                       $this->lasth = $this->FontSize * $this->cell_height_ratio;
+                                       break;
+                               }
+                               case 'li': {
                                        $this->lispacer = '';
-                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], true);\r
-                                       break;\r
-                               }\r
-                               case 'h1': \r
-                               case 'h2': \r
-                               case 'h3': \r
-                               case 'h4': \r
-                               case 'h5': \r
-                               case 'h6': {\r
-                                       $this->addHTMLVertSpace(1, $cell, ($parent['fontsize'] * 1.5) / $this->k, $firstorlast, $tag['value'], true);\r
-                                       break;\r
-                               }\r
-                               default : {\r
-                                       break;\r
-                               }\r
-                       }\r
-                       $this->tmprtl = false;\r
-               }\r
-               \r
-               /**\r
-                * Add vertical spaces if needed.\r
-                * @param int $n number of spaces to add\r
-                * @param boolean $cell if true add the default cMargin space to each new line (default false).\r
+                                       $this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], true);
+                                       break;
+                               }
+                               case 'h1': 
+                               case 'h2': 
+                               case 'h3': 
+                               case 'h4': 
+                               case 'h5': 
+                               case 'h6': {
+                                       $this->addHTMLVertSpace(1, $cell, ($parent['fontsize'] * 1.5) / $this->k, $firstorlast, $tag['value'], true);
+                                       break;
+                               }
+                               // Form fields (since 4.8.000 - 2009-09-07)
+                               case 'form': {
+                                       $this->form_action = '';
+                                       $this->form_enctype = 'application/x-www-form-urlencoded';
+                                       break;
+                               }
+                               default : {
+                                       break;
+                               }
+                       }
+                       $this->tmprtl = false;
+               }
+               
+               /**
+                * Add vertical spaces if needed.
+                * @param int $n number of spaces to add
+                * @param boolean $cell if true add the default cMargin space to each new line (default false).
                 * @param string $h The height of the break. By default, the value equals the height of the last printed cell.
                 * @param boolean $firstorlast if true do not print additional empty lines.
                 * @param string $tag HTML tag to which this space will be applied
-                * @param boolean $closing true if this space will be applied to a closing tag, false otherwise\r
-                * @access protected\r
-                */\r
-               protected function addHTMLVertSpace($n, $cell=false, $h='', $firstorlast=false, $tag='', $closing=false) {\r
+                * @param boolean $closing true if this space will be applied to a closing tag, false otherwise
+                * @access protected
+                */
+               protected function addHTMLVertSpace($n, $cell=false, $h='', $firstorlast=false, $tag='', $closing=false) {
                        if ($firstorlast) {
-                               $this->Ln(0, $cell);\r
+                               $this->Ln(0, $cell);
                                $this->htmlvspace = 0;
                                return;
                        }
@@ -12801,23 +14892,23 @@ if (!class_exists('TCPDF', false)) {
                        if (isset($this->tagvspaces[$tag][intval($closing)]['h'])) {
                                $h = $this->tagvspaces[$tag][intval($closing)]['h'];
                        }
-                       if (is_string($h)) {\r
-                               $vsize = $n * $this->lasth;\r
-                       } else {\r
-                               $vsize = $n * $h;\r
-                       }\r
-                       if ($vsize > $this->htmlvspace) {\r
-                               $this->Ln(($vsize - $this->htmlvspace), $cell);\r
-                               $this->htmlvspace = $vsize;\r
-                       }\r
-               }\r
-               \r
-               /**\r
-                * Set the default bullet to be used as LI bullet symbol\r
-                * @param string $symbol character or string to be used (legal values are: '' = automatic, '!' = auto bullet, '#' = auto numbering, 'disc', 'disc', 'circle', 'square', '1', 'decimal', 'decimal-leading-zero', 'i', 'lower-roman', 'I', 'upper-roman', 'a', 'lower-alpha', 'lower-latin', 'A', 'upper-alpha', 'upper-latin', 'lower-greek')\r
+                       if (is_string($h)) {
+                               $vsize = $n * $this->lasth;
+                       } else {
+                               $vsize = $n * $h;
+                       }
+                       if ($vsize > $this->htmlvspace) {
+                               $this->Ln(($vsize - $this->htmlvspace), $cell);
+                               $this->htmlvspace = $vsize;
+                       }
+               }
+               
+               /**
+                * Set the default bullet to be used as LI bullet symbol
+                * @param string $symbol character or string to be used (legal values are: '' = automatic, '!' = auto bullet, '#' = auto numbering, 'disc', 'disc', 'circle', 'square', '1', 'decimal', 'decimal-leading-zero', 'i', 'lower-roman', 'I', 'upper-roman', 'a', 'lower-alpha', 'lower-latin', 'A', 'upper-alpha', 'upper-latin', 'lower-greek')
                 * @access public
-                * @since 4.0.028 (2008-09-26)\r
-                */\r
+                * @since 4.0.028 (2008-09-26)
+                */
                public function setLIsymbol($symbol='!') {
                        $symbol = strtolower($symbol);
                        switch ($symbol) {
@@ -12847,32 +14938,32 @@ if (!class_exists('TCPDF', false)) {
                                default : {
                                        $this->lisymbol = '';
                                }
-                       }\r
+                       }
                }
-               \r
-               /**\r
-               * Set the booklet mode for double-sided pages.\r
-               * @param boolean $booklet true set the booklet mode on, fals eotherwise.\r
-               * @param float $inner Inner page margin.\r
+               
+               /**
+               * Set the booklet mode for double-sided pages.
+               * @param boolean $booklet true set the booklet mode on, fals eotherwise.
+               * @param float $inner Inner page margin.
                * @param float $outer Outer page margin.
-               * @access public\r
-               * @since 4.2.000 (2008-10-29)\r
-               */\r
-               public function SetBooklet($booklet=true, $inner=-1, $outer=-1) {\r
+               * @access public
+               * @since 4.2.000 (2008-10-29)
+               */
+               public function SetBooklet($booklet=true, $inner=-1, $outer=-1) {
                        $this->booklet = $booklet;
-                       if ($inner >= 0) {\r
-                               $this->lMargin = $inner;\r
+                       if ($inner >= 0) {
+                               $this->lMargin = $inner;
+                       }
+                       if ($outer >= 0) {
+                               $this->rMargin = $outer;
                        }
-                       if ($outer >= 0) {\r
-                               $this->rMargin = $outer;\r
-                       }\r
                }
-               \r
-               /**\r
-               * Swap the left and right margins.\r
+               
+               /**
+               * Swap the left and right margins.
                * @param boolean $reverse if true swap left and right margins.
-               * @access protected\r
-               * @since 4.2.000 (2008-10-29)\r
+               * @access protected
+               * @since 4.2.000 (2008-10-29)
                */
                protected function swapMargins($reverse=true) {
                        if ($reverse) {
@@ -12886,55 +14977,55 @@ if (!class_exists('TCPDF', false)) {
                        }
                }
 
-               /**\r
+               /**
                * Set the vertical spaces for HTML tags.
                * The array must have the following structure (example):
                * $tagvs = array('h1' => array(0 => array('h' => '', 'n' => 2), 1 => array('h' => 1.3, 'n' => 1)));
                * The first array level contains the tag names,
                * the second level contains 0 for opening tags or 1 for closing tags,
                * the third level contains the vertical space unit (h) and the number spaces to add (n).
-               * If the h parameter is not specified, default values are used.\r
+               * If the h parameter is not specified, default values are used.
                * @param array $tagvs array of tags and relative vertical spaces.
-               * @access public\r
-               * @since 4.2.001 (2008-10-30)\r
-               */\r
+               * @access public
+               * @since 4.2.001 (2008-10-30)
+               */
                public function setHtmlVSpace($tagvs) {
                        $this->tagvspaces = $tagvs;
                }
 
-        /**\r
+        /**
                * Set custom width for list indentation.
                * @param float $width width of the indentation. Use negative value to disable it.
                * @access public
-               * @since 4.2.007 (2008-11-12)\r
-               */\r
+               * @since 4.2.007 (2008-11-12)
+               */
                public function setListIndentWidth($width) {
                        return $this->customlistindent = floatval($width);
         }
 
-        /**\r
+        /**
                * Set the top/bottom cell sides to be open or closed when the cell cross the page.
                * @param boolean $isopen if true keeps the top/bottom border open for the cell sides that cross the page.
                * @access public
-               * @since 4.2.010 (2008-11-14)\r
-               */\r
+               * @since 4.2.010 (2008-11-14)
+               */
                public function setOpenCell($isopen) {
                        $this->opencell = $isopen;
         }
 
-        /**\r
+        /**
                * Set the color and font style for HTML links.
                * @param array $color RGB array of colors
                * @param string $fontstyle additional font styles to add
                * @access public
-               * @since 4.4.003 (2008-12-09)\r
-               */\r
+               * @since 4.4.003 (2008-12-09)
+               */
                public function setHtmlLinksStyle($color=array(0,0,255), $fontstyle='U') {
                        $this->htmlLinkColorArray = $color;
                        $this->htmlLinkFontStyle = $fontstyle;
         }
 
-        /**\r
+        /**
                * convert html string containing value and unit of measure to user's units or points.
                * @param string $htmlval string containing values and unit
                * @param string $refsize reference value in points
@@ -12942,7 +15033,7 @@ if (!class_exists('TCPDF', false)) {
                * @param boolean $point if true returns points, otherwise returns value in user's units
                * @return float value in user's unit or point if $points=true
                * @access public
-               * @since 4.4.004 (2008-12-10)\r
+               * @since 4.4.004 (2008-12-10)
                */
         public function getHTMLUnitToUnits($htmlval, $refsize=1, $defaultunit='px', $points=false) {
                        $supportedunits = array('%', 'em', 'ex', 'px', 'in', 'cm', 'mm', 'pc', 'pt');
@@ -13011,12 +15102,12 @@ if (!class_exists('TCPDF', false)) {
                        return $retval;
                }
 
-               /**\r
+               /**
                * Returns the Roman representation of an integer number
                * @param int number to convert
                * @return string roman representation of the specified number
                * @access public
-               * @since 4.4.004 (2008-12-10)\r
+               * @since 4.4.004 (2008-12-10)
                */
                public function intToRoman($number) {
                        $roman = '';
@@ -13075,13 +15166,13 @@ if (!class_exists('TCPDF', false)) {
                        return $roman;
                }
 
-               /**\r
+               /**
                * Output an HTML list bullet or ordered item symbol
                * @param int $listdepth list nesting level
                * @param string $listtype type of list
                * @param float $size current font size
                * @access protected
-               * @since 4.4.004 (2008-12-10)\r
+               * @since 4.4.004 (2008-12-10)
                */
                protected function putHtmlListBullet($listdepth, $listtype='', $size=10) {
                    $size /= $this->k;
@@ -13089,7 +15180,7 @@ if (!class_exists('TCPDF', false)) {
                    $color = $this->fgcolor;
                    $width = 0;
                    $textitem = '';
-                   $tmpx = $this->x;           \r
+                   $tmpx = $this->x;           
                        $lspace = $this->GetStringWidth('  ');
                        if ($listtype == '!') {
                                // set default list type for unordered list
@@ -13111,10 +15202,10 @@ if (!class_exists('TCPDF', false)) {
                                        $fill .= 'D';
                                        $r = $size / 6;
                                        $lspace += (2 * $r);
-                                       if ($this->rtl) {\r
-                                               $this->x = $this->w - $this->x - $lspace;\r
-                                       } else {\r
-                                               $this->x -= $lspace;\r
+                                       if ($this->rtl) {
+                                               $this->x = $this->w - $this->x - $lspace;
+                                       } else {
+                                               $this->x -= $lspace;
                                        }
                                        $this->Circle(($this->x + $r), ($this->y + ($this->lasth / 2)), $r, 0, 360, $fill, array('color'=>$color), $color, 8);
                                        break;
@@ -13122,10 +15213,10 @@ if (!class_exists('TCPDF', false)) {
                                case 'square': {
                                        $l = $size / 3;
                                        $lspace += $l;
-                                       if ($this->rtl) {\r
-                                               $this->x = $this->w - $this->x - $lspace;\r
-                                       } else {\r
-                                               $this->x -= $lspace;\r
+                                       if ($this->rtl) {
+                                               $this->x = $this->w - $this->x - $lspace;
+                                       } else {
+                                               $this->x -= $lspace;
                                        }
                                        $this->Rect($this->x, ($this->y + (($this->lasth - $l)/ 2)), $l, $l, 'F', array(), $color);
                                        break;
@@ -13202,47 +15293,47 @@ if (!class_exists('TCPDF', false)) {
                        }
                        if (!$this->empty_string($textitem)) {
                                // print ordered item
-                               if ($this->rtl) {\r
-                                       $textitem = '.'.$textitem;\r
-                               } else {\r
-                                       $textitem = $textitem.'.';\r
+                               if ($this->rtl) {
+                                       $textitem = '.'.$textitem;
+                               } else {
+                                       $textitem = $textitem.'.';
                                }
                                $lspace += $this->GetStringWidth($textitem);
-                               if ($this->rtl) {\r
-                                       $this->x += $lspace;\r
-                               } else {\r
-                                       $this->x -= $lspace;\r
+                               if ($this->rtl) {
+                                       $this->x += $lspace;
+                               } else {
+                                       $this->x -= $lspace;
                                }
                                $this->Write($this->lasth, $textitem, '', false, '', false, 0, false);
                        }
-                       $this->x = $tmpx;\r
+                       $this->x = $tmpx;
                        $this->lispacer = '';
                }
 
-        /**\r
+        /**
                * Returns current graphic variables as array.
                * @return array graphic variables
-               * @access protected\r
-               * @since 4.2.010 (2008-11-14)\r
-               */\r
+               * @access protected
+               * @since 4.2.010 (2008-11-14)
+               */
                protected function getGraphicVars() {
                        $grapvars = array(
-                               'FontFamily' => $this->FontFamily,\r
-                               'FontStyle' => $this->FontStyle,\r
-                               'FontSizePt' => $this->FontSizePt,\r
-                               'rMargin' => $this->rMargin,\r
-                               'lMargin' => $this->lMargin,\r
+                               'FontFamily' => $this->FontFamily,
+                               'FontStyle' => $this->FontStyle,
+                               'FontSizePt' => $this->FontSizePt,
+                               'rMargin' => $this->rMargin,
+                               'lMargin' => $this->lMargin,
                                'cMargin' => $this->cMargin,
-                               'LineWidth' => $this->LineWidth,\r
-                               'linestyleWidth' => $this->linestyleWidth,\r
-                               'linestyleCap' => $this->linestyleCap,\r
-                               'linestyleJoin' => $this->linestyleJoin,\r
-                               'linestyleDash' => $this->linestyleDash,\r
-                               'DrawColor' => $this->DrawColor,\r
-                               'FillColor' => $this->FillColor,\r
-                               'TextColor' => $this->TextColor,\r
+                               'LineWidth' => $this->LineWidth,
+                               'linestyleWidth' => $this->linestyleWidth,
+                               'linestyleCap' => $this->linestyleCap,
+                               'linestyleJoin' => $this->linestyleJoin,
+                               'linestyleDash' => $this->linestyleDash,
+                               'DrawColor' => $this->DrawColor,
+                               'FillColor' => $this->FillColor,
+                               'TextColor' => $this->TextColor,
                                'ColorFlag' => $this->ColorFlag,
-                               'bgcolor' => $this->bgcolor,\r
+                               'bgcolor' => $this->bgcolor,
                                'fgcolor' => $this->fgcolor,
                                'htmlvspace' => $this->htmlvspace,
                                'lasth' => $this->lasth
@@ -13250,57 +15341,57 @@ if (!class_exists('TCPDF', false)) {
                        return $grapvars;
                }
 
-        /**\r
+        /**
                * Set graphic variables.
                * @param $gvars array graphic variables
-               * @access protected\r
-               * @since 4.2.010 (2008-11-14)\r
-               */\r
+               * @access protected
+               * @since 4.2.010 (2008-11-14)
+               */
                protected function setGraphicVars($gvars) {
-                       $this->FontFamily = $gvars['FontFamily'];\r
-                       $this->FontStyle = $gvars['FontStyle'];\r
-                       $this->FontSizePt = $gvars['FontSizePt'];\r
-                       $this->rMargin = $gvars['rMargin'];\r
-                       $this->lMargin = $gvars['lMargin'];\r
+                       $this->FontFamily = $gvars['FontFamily'];
+                       $this->FontStyle = $gvars['FontStyle'];
+                       $this->FontSizePt = $gvars['FontSizePt'];
+                       $this->rMargin = $gvars['rMargin'];
+                       $this->lMargin = $gvars['lMargin'];
                        $this->cMargin = $gvars['cMargin'];
-                       $this->LineWidth = $gvars['LineWidth'];\r
-                       $this->linestyleWidth = $gvars['linestyleWidth'];\r
-                       $this->linestyleCap = $gvars['linestyleCap'];\r
-                       $this->linestyleJoin = $gvars['linestyleJoin'];\r
-                       $this->linestyleDash = $gvars['linestyleDash'];\r
-                       $this->DrawColor = $gvars['DrawColor'];\r
-                       $this->FillColor = $gvars['FillColor'];\r
-                       $this->TextColor = $gvars['TextColor'];\r
+                       $this->LineWidth = $gvars['LineWidth'];
+                       $this->linestyleWidth = $gvars['linestyleWidth'];
+                       $this->linestyleCap = $gvars['linestyleCap'];
+                       $this->linestyleJoin = $gvars['linestyleJoin'];
+                       $this->linestyleDash = $gvars['linestyleDash'];
+                       $this->DrawColor = $gvars['DrawColor'];
+                       $this->FillColor = $gvars['FillColor'];
+                       $this->TextColor = $gvars['TextColor'];
                        $this->ColorFlag = $gvars['ColorFlag'];
-                       $this->bgcolor = $gvars['bgcolor'];\r
+                       $this->bgcolor = $gvars['bgcolor'];
                        $this->fgcolor = $gvars['fgcolor'];
                        $this->htmlvspace = $gvars['htmlvspace'];
                        //$this->lasth = $gvars['lasth'];
-                       $this->_out(''.$this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor.' '.$this->FillColor.'');\r
-                       if (!$this->empty_string($this->FontFamily)) {\r
-                               $this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt);\r
+                       $this->_out(''.$this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor.' '.$this->FillColor.'');
+                       if (!$this->empty_string($this->FontFamily)) {
+                               $this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt);
                        }
                }
 
-               /**\r
-               * Returns a temporary filename for caching object on filesystem.\r
-               * @param string $prefix prefix to add to filename\r
-               * return string filename.\r
+               /**
+               * Returns a temporary filename for caching object on filesystem.
+               * @param string $prefix prefix to add to filename
+               * return string filename.
                * @access protected
-               * @since 4.5.000 (2008-12-31)\r
-               */\r
-               protected function getObjFilename($name) {\r
-                       return tempnam(K_PATH_CACHE, $name.'_');\r
+               * @since 4.5.000 (2008-12-31)
+               */
+               protected function getObjFilename($name) {
+                       return tempnam(K_PATH_CACHE, $name.'_');
                }
 
-        /**\r
+        /**
                * Writes data to a temporary file on filesystem.
                * @param string $file file name
                * @param mixed $data data to write on file
                * @param boolean $append if true append data, false replace.
-               * @access protected\r
-               * @since 4.5.000 (2008-12-31)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2008-12-31)
+               */
                protected function writeDiskCache($filename, $data, $append=false) {
                        if ($append) {
                                $fmode = 'ab+';
@@ -13322,23 +15413,23 @@ if (!class_exists('TCPDF', false)) {
                        }
                }
 
-        /**\r
+        /**
                * Read data from a temporary file on filesystem.
                * @param string $file file name
                * @return mixed retrieved data
-               * @access protected\r
-               * @since 4.5.000 (2008-12-31)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2008-12-31)
+               */
                protected function readDiskCache($filename) {
                        return file_get_contents($filename);
                }
 
-               /**\r
+               /**
                * Set buffer content (always append data).
                * @param string $data data
-               * @access protected\r
-               * @since 4.5.000 (2009-01-02)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2009-01-02)
+               */
                protected function setBuffer($data) {
                        $this->bufferlen += strlen($data);
                        if ($this->diskcache) {
@@ -13351,12 +15442,12 @@ if (!class_exists('TCPDF', false)) {
                        }
                }
 
-        /**\r
+        /**
                * Get buffer content.
                * @return string buffer content
-               * @access protected\r
-               * @since 4.5.000 (2009-01-02)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2009-01-02)
+               */
                protected function getBuffer() {
                        if ($this->diskcache) {
                                return $this->readDiskCache($this->buffer);
@@ -13365,14 +15456,14 @@ if (!class_exists('TCPDF', false)) {
                        }
                }
 
-        /**\r
+        /**
                * Set page buffer content.
                * @param int $page page number
                * @param string $data page data
                * @param boolean $append if true append data, false replace.
-               * @access protected\r
-               * @since 4.5.000 (2008-12-31)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2008-12-31)
+               */
                protected function setPageBuffer($page, $data, $append=false) {
                        if ($this->diskcache) {
                                if (!isset($this->pages[$page])) {
@@ -13393,13 +15484,13 @@ if (!class_exists('TCPDF', false)) {
                        }
                }
 
-        /**\r
+        /**
                * Get page buffer content.
                * @param int $page page number
                * @return string page buffer content or false in case of error
-               * @access protected\r
-               * @since 4.5.000 (2008-12-31)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2008-12-31)
+               */
                protected function getPageBuffer($page) {
                        if ($this->diskcache) {
                                return $this->readDiskCache($this->pages[$page]);
@@ -13409,13 +15500,13 @@ if (!class_exists('TCPDF', false)) {
                        return false;
                }
 
-        /**\r
+        /**
                * Set image buffer content.
                * @param string $image image key
                * @param array $data image data
-               * @access protected\r
-               * @since 4.5.000 (2008-12-31)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2008-12-31)
+               */
                protected function setImageBuffer($image, $data) {
                        if ($this->diskcache) {
                                if (!isset($this->images[$image])) {
@@ -13431,14 +15522,14 @@ if (!class_exists('TCPDF', false)) {
                        ++$this->numimages;
                }
 
-        /**\r
+        /**
                * Set image buffer content.
                * @param string $image image key
                * @param string $key image sub-key
                * @param array $data image data
-               * @access protected\r
-               * @since 4.5.000 (2008-12-31)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2008-12-31)
+               */
                protected function setImageSubBuffer($image, $key, $data) {
                        if (!isset($this->images[$image])) {
                                $this->setImageBuffer($image, array());
@@ -13452,13 +15543,13 @@ if (!class_exists('TCPDF', false)) {
                        }
                }
 
-        /**\r
-               * Get page buffer content.
+        /**
+               * Get image buffer content.
                * @param string $image image key
                * @return string image buffer content or false in case of error
-               * @access protected\r
-               * @since 4.5.000 (2008-12-31)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2008-12-31)
+               */
                protected function getImageBuffer($image) {
                        if ($this->diskcache AND isset($this->images[$image])) {
                                return unserialize($this->readDiskCache($this->images[$image]));
@@ -13468,13 +15559,13 @@ if (!class_exists('TCPDF', false)) {
                        return false;
                }
 
-               /**\r
+               /**
                * Set font buffer content.
                * @param string $font font key
                * @param array $data font data
-               * @access protected\r
-               * @since 4.5.000 (2009-01-02)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2009-01-02)
+               */
                protected function setFontBuffer($font, $data) {
                        if ($this->diskcache) {
                                if (!isset($this->fonts[$font])) {
@@ -13489,14 +15580,14 @@ if (!class_exists('TCPDF', false)) {
                        }
                }
 
-        /**\r
+        /**
                * Set font buffer content.
                * @param string $font font key
                * @param string $key font sub-key
                * @param array $data font data
-               * @access protected\r
-               * @since 4.5.000 (2009-01-02)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2009-01-02)
+               */
                protected function setFontSubBuffer($font, $key, $data) {
                        if (!isset($this->fonts[$font])) {
                                $this->setFontBuffer($font, array());
@@ -13510,13 +15601,13 @@ if (!class_exists('TCPDF', false)) {
                        }
                }
 
-        /**\r
+        /**
                * Get font buffer content.
                * @param string $font font key
                * @return string font buffer content or false in case of error
-               * @access protected\r
-               * @since 4.5.000 (2009-01-02)\r
-               */\r
+               * @access protected
+               * @since 4.5.000 (2009-01-02)
+               */
                protected function getFontBuffer($font) {
                        if ($this->diskcache AND isset($this->fonts[$font])) {
                                return unserialize($this->readDiskCache($this->fonts[$font]));
@@ -13526,14 +15617,14 @@ if (!class_exists('TCPDF', false)) {
                        return false;
                }
 
-        /**\r
+        /**
                * Move a page to a previous position.
                * @param int $frompage number of the source page
                * @param int $topage number of the destination page (must be less than $frompage)
                * @return true in case of success, false in case of error.
-               * @access public\r
-               * @since 4.5.000 (2009-01-02)\r
-               */\r
+               * @access public
+               * @since 4.5.000 (2009-01-02)
+               */
                public function movePage($frompage, $topage) {
                        if (($frompage > $this->numpages) OR ($frompage <= $topage)) {
                                return false;
@@ -13664,13 +15755,13 @@ if (!class_exists('TCPDF', false)) {
                        return true;
                }
 
-        /**\r
+        /**
                * Remove the specified page.
                * @param int $page page to remove
                * @return true in case of success, false in case of error.
-               * @access public\r
-               * @since 4.6.004 (2009-04-23)\r
-               */\r
+               * @access public
+               * @since 4.6.004 (2009-04-23)
+               */
                public function deletePage($page) {
                        if ($page > $this->numpages) {
                                return false;
@@ -13801,19 +15892,20 @@ if (!class_exists('TCPDF', false)) {
                        return true;
                }
 
-               /**\r
+               /**
                * Output a Table of Content Index (TOC).
                * 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).
-               * @param string $filler string used to fill the space between text and page number.\r
-               * @access public\r
-               * @author Nicola Asuni\r
-               * @since 4.5.000 (2009-01-02)\r
-               */\r
-               public function addTOC($page='', $numbersfont='', $filler='.') {\r
+               * @param string $filler string used to fill the space between text and page number.
+               * @param string $toc_name name to use for TOC bookmark.
+               * @access public
+               * @author Nicola Asuni
+               * @since 4.5.000 (2009-01-02)
+               */
+               public function addTOC($page='', $numbersfont='', $filler='.', $toc_name='TOC') {
                        $fontsize = $this->FontSizePt;
-                       $fontfamily = $this->FontFamily;\r
+                       $fontfamily = $this->FontFamily;
                        $fontstyle = $this->FontStyle;
                        $w = $this->w - $this->lMargin - $this->rMargin;
                        $spacer = $this->GetStringWidth(' ') * 4;
@@ -13863,8 +15955,8 @@ if (!class_exists('TCPDF', false)) {
                                } else {
                                        // placemark to be replaced with the correct number
                                        $pagenum = '{#'.($outline['p']).'}';
-                                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {\r
-                                               $pagenum = '{'.$pagenum.'}';\r
+                                       if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {
+                                               $pagenum = '{'.$pagenum.'}';
                                    }
                                }
                                $numwidth = $this->GetStringWidth($pagenum);
@@ -13885,8 +15977,7 @@ if (!class_exists('TCPDF', false)) {
                                } else {
                                        $pagenum = ' '.$rowfill.$gap.$pagenum;
                                }
-                               // write the number\r
-                               //$this->SetX($x_start);
+                               // write the number
                                $this->Cell($tw, 0, $pagenum, 0, 1, $alignnum, 0, $link, 0);
                                $this->SetX($x_start);
                                $this->lMargin = $lmargin;
@@ -13902,13 +15993,13 @@ if (!class_exists('TCPDF', false)) {
                                                // update page numbers
                                                $k = '{#'.$n.'}';
                                                $ku = '{'.$k.'}';
-                                               $alias_a = $this->_escape($k);\r
-                                               $alias_au = $this->_escape('{'.$k.'}');\r
-                                               if ($this->isunicode) {\r
-                                                       $alias_b = $this->_escape($this->UTF8ToLatin1($k));\r
-                                                       $alias_bu = $this->_escape($this->UTF8ToLatin1($ku));\r
-                                                       $alias_c = $this->_escape($this->utf8StrRev($k, false, $this->tmprtl));\r
-                                                       $alias_cu = $this->_escape($this->utf8StrRev($ku, false, $this->tmprtl));\r
+                                               $alias_a = $this->_escape($k);
+                                               $alias_au = $this->_escape('{'.$k.'}');
+                                               if ($this->isunicode) {
+                                                       $alias_b = $this->_escape($this->UTF8ToLatin1($k));
+                                                       $alias_bu = $this->_escape($this->UTF8ToLatin1($ku));
+                                                       $alias_c = $this->_escape($this->utf8StrRev($k, false, $this->tmprtl));
+                                                       $alias_cu = $this->_escape($this->utf8StrRev($ku, false, $this->tmprtl));
                                                }
                                                if ($n >= $page) {
                                                        $np = $n + $numpages;
@@ -13928,14 +16019,14 @@ if (!class_exists('TCPDF', false)) {
                                                        $ns = $sfill.' '.$ns;
                                                        $nu = $sfillu.' '.$nu;
                                                }
-                                               $nu = $this->UTF8ToUTF16BE($nu, false);\r
-                                               $temppage = str_replace($alias_au, $nu, $temppage);\r
-                                               if ($this->isunicode) {\r
-                                                       $temppage = str_replace($alias_bu, $nu, $temppage);\r
-                                                       $temppage = str_replace($alias_cu, $nu, $temppage);\r
-                                                       $temppage = str_replace($alias_b, $ns, $temppage);\r
-                                                       $temppage = str_replace($alias_c, $ns, $temppage);\r
-                                               }\r
+                                               $nu = $this->UTF8ToUTF16BE($nu, false);
+                                               $temppage = str_replace($alias_au, $nu, $temppage);
+                                               if ($this->isunicode) {
+                                                       $temppage = str_replace($alias_bu, $nu, $temppage);
+                                                       $temppage = str_replace($alias_cu, $nu, $temppage);
+                                                       $temppage = str_replace($alias_b, $ns, $temppage);
+                                                       $temppage = str_replace($alias_c, $ns, $temppage);
+                                               }
                                                $temppage = str_replace($alias_a, $ns, $temppage);
                                        }
                                        // save changes
@@ -13943,30 +16034,33 @@ if (!class_exists('TCPDF', false)) {
                                }
                                // move pages
                                for ($i = 0; $i < $numpages; ++$i) {
+                                       $this->Bookmark($toc_name, 0, 0, $page_last);
                                        $this->movePage($page_last, $page);
                                }
                        }
-                       $this->SetFont($fontfamily, $fontstyle, $fontsize);\r
+                       $this->SetFont($fontfamily, $fontstyle, $fontsize);
                }
 
-               /**\r
+               /**
                * Stores a copy of the current TCPDF object used for undo operation.
-               * @access public\r
-               * @since 4.5.029 (2009-03-19)\r
+               * @access public
+               * @since 4.5.029 (2009-03-19)
                */
                public function startTransaction() {
                        if (isset($this->objcopy)) {
                                // remove previous copy
                                $this->commitTransaction();
                        }
+                       // record current page number
+                       $this->start_transaction_page = $this->page;
                        // clone current object
                        $this->objcopy = $this->objclone($this);
                }
 
-               /**\r
+               /**
                * Delete the copy of the current TCPDF object used for undo operation.
-               * @access public\r
-               * @since 4.5.029 (2009-03-19)\r
+               * @access public
+               * @since 4.5.029 (2009-03-19)
                */
                public function commitTransaction() {
                        if (isset($this->objcopy)) {
@@ -13975,13 +16069,14 @@ if (!class_exists('TCPDF', false)) {
                        }
                }
 
-               /**\r
+               /**
                * This method allows to undo the latest transaction by returning the latest saved TCPDF object with startTransaction().
-               * @return TCPDF object.\r
-               * @access public\r
-               * @since 4.5.029 (2009-03-19)\r
+               * @param boolean $self if true restores current class object to previous state without the need of reassignment via the returned value.
+               * @return TCPDF object.
+               * @access public
+               * @since 4.5.029 (2009-03-19)
                */
-               public function rollbackTransaction() {
+               public function rollbackTransaction($self=false) {
                        if (isset($this->objcopy)) {
                                if (isset($this->objcopy->diskcache) AND $this->objcopy->diskcache) {
                                        // truncate files to previous values
@@ -13992,6 +16087,12 @@ if (!class_exists('TCPDF', false)) {
                                        }
                                }
                                $this->_destroy(true, true);
+                               if ($self) {
+                                       $objvars = get_object_vars($this->objcopy);
+                                       foreach ($objvars as $key => $value) {
+                                               $this->$key = $value;
+                                       }
+                               }
                                return $this->objcopy;
                        }
                        return $this;
@@ -14018,10 +16119,10 @@ if (!class_exists('TCPDF', false)) {
                public function empty_string($str) {
                        return (is_null($str) OR (is_string($str) AND (strlen($str) == 0)));
                }
-               \r
-       } // END OF TCPDF CLASS\r
-}\r
-//============================================================+\r
-// END OF FILE\r
-//============================================================+\r
+               
+       } // END OF TCPDF CLASS
+}
+//============================================================+
+// END OF FILE
+//============================================================+
 ?>
index 4258aa77b53b0bdf04af0e53c95d0d61a235b64e..ed863a2a369df4ea85780b34b9400a40b2937e6d 100644 (file)
-<?php\r
-//============================================================+\r
-// File name   : unicode_data.php\r
-// Begin       : 2008-01-01\r
-// Last Update : 2008-11-17\r
-// License     : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)\r
-//     ----------------------------------------------------------------------------\r
-//  Copyright (C) 2002-2009  Nicola Asuni - Tecnick.com S.r.l.\r
-//     \r
-//     This program is free software: you can redistribute it and/or modify\r
-//     it under the terms of the GNU Lesser General Public License as published by\r
-//     the Free Software Foundation, either version 2.1 of the License, or\r
-//     (at your option) any later version.\r
-//     \r
+<?php
+//============================================================+
+// File name   : unicode_data.php
+// Begin       : 2008-01-01
+// Last Update : 2009-08-17
+// License     : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
+//     ----------------------------------------------------------------------------
+//  Copyright (C) 2002-2009  Nicola Asuni - Tecnick.com S.r.l.
+//     
+//     This program is free software: you can redistribute it and/or modify
+//     it under the terms of the GNU Lesser General Public License as published by
+//     the Free Software Foundation, either version 2.1 of the License, or
+//     (at your option) any later version.
+//     
 //     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-//     GNU Lesser General Public License for more details.\r
-//     \r
-//     You should have received a copy of the GNU Lesser General Public License\r
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
-//     \r
-//     See LICENSE.TXT file for more information.\r
-//  ----------------------------------------------------------------------------\r
-//\r
-// Description : Unicode Include file for TCPDF.\r
-//\r
-// Author: Nicola Asuni\r
-//\r
-// (c) Copyright:\r
-//               Nicola Asuni\r
-//               Tecnick.com s.r.l.\r
-//               Via Della Pace, 11\r
-//               09044 Quartucciu (CA)\r
-//               ITALY\r
-//               www.tecnick.com\r
-//               info@tecnick.com\r
-//============================================================+\r
-// THANKS TO\r
-// Efthimios Mavrogeorgiadis\r
-// Saleh AlMatrafe\r
-\r
-/**\r
- * Unicode Include file for TCPDF.\r
- * @author Nicola Asuni\r
- * @copyright 2004-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\r
- * @package com.tecnick.tcpdf\r
- * @link http://www.tcpdf.org\r
- * @license http://www.gnu.org/copyleft/lesser.html LGPL\r
- * @since 2.1.000 (2008-01-08)\r
-*/\r
-\r
-/**\r
-* Left-to-Right Mark\r
-*/\r
-define('K_LRM', 8206);\r
-/**\r
-* Right-to-Left Mark\r
-*/\r
-define('K_RLM', 8207);\r
-/**\r
-* Left-to-Right Embedding\r
-*/\r
-define('K_LRE', 8234);\r
-/**\r
-* Right-to-Left Embedding\r
-*/\r
-define('K_RLE', 8235);\r
-/**\r
-* Pop Directional Format\r
-*/\r
-define('K_PDF', 8236);\r
-/**\r
-* Left-to-Right Override\r
-*/\r
-define('K_LRO', 8237);\r
-/**\r
-* Right-to-Left Override\r
-*/\r
-define('K_RLO', 8238);\r
-\r
-/*\r
- * Pattern to test RTL (Righ-To-Left) strings using regular expressions.\r
- */\r
-define('K_RE_PATTERN_RTL', "/(\r
-         \xD6\xBE                                             # R\r
-       | \xD7[\x80\x83\x86\x90-\xAA\xB0-\xB4]                 # R\r
-       | \xDF[\x80-\xAA\xB4\xB5\xBA]                          # R\r
-       | \xE2\x80\x8F                                         # R\r
-       | \xEF\xAC[\x9D\x9F\xA0-\xA8\xAA-\xB6\xB8-\xBC\xBE]    # R\r
-       | \xEF\xAD[\x80\x81\x83\x84\x86-\x8F]                  # R\r
-       | \xF0\x90\xA0[\x80-\x85\x88\x8A-\xB5\xB7\xB8\xBC\xBF] # R\r
-       | \xF0\x90\xA4[\x80-\x99]                              # R\r
-       | \xF0\x90\xA8[\x80\x90-\x93\x95-\x97\x99-\xB3]        # R\r
-       | \xF0\x90\xA9[\x80-\x87\x90-\x98]                     # R\r
-       | \xE2\x80[\xAB\xAE]                                   # RLE & RLO\r
-       )/x");\r
-\r
-/*\r
- * Pattern to test Arabic strings using regular expressions.\r
- * source: http://www.w3.org/International/questions/qa-forms-utf-8\r
- */\r
-define("K_RE_PATTERN_ARABIC", "/(\r
-                 \xD8[\x80-\x83\x8B\x8D\x9B\x9E\x9F\xA1-\xBA]  # AL\r
-               | \xD9[\x80-\x8A\xAD-\xAF\xB1-\xBF]             # AL\r
-               | \xDA[\x80-\xBF]                               # AL\r
-               | \xDB[\x80-\x95\x9D\xA5\xA6\xAE\xAF\xBA-\xBF]  # AL\r
-               | \xDC[\x80-\x8D\x90\x92-\xAF]                  # AL\r
-               | \xDD[\x8D-\xAD]                               # AL\r
-               | \xDE[\x80-\xA5\xB1]                           # AL\r
-               | \xEF\xAD[\x90-\xBF]                           # AL\r
-               | \xEF\xAE[\x80-\xB1]                           # AL\r
-               | \xEF\xAF[\x93-\xBF]                           # AL\r
-               | \xEF[\xB0-\xB3][\x80-\xBF]                    # AL\r
-               | \xEF\xB4[\x80-\xBD]                           # AL\r
-               | \xEF\xB5[\x90-\xBF]                           # AL\r
-               | \xEF\xB6[\x80-\x8F\x92-\xBF]                  # AL\r
-               | \xEF\xB7[\x80-\x87\xB0-\xBC]                  # AL\r
-               | \xEF\xB9[\xB0-\xB4\xB6-\xBF]                  # AL\r
-               | \xEF\xBA[\x80-\xBF]                           # AL\r
-               | \xEF\xBB[\x80-\xBC]                           # AL\r
-               | \xD9[\xA0-\xA9\xAB\xAC]                       # AN\r
-               )/x");\r
-\r
-/**\r
- * Array of unicode types\r
+//     but WITHOUT ANY WARRANTY; without even the implied warranty of
+//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//     GNU Lesser General Public License for more details.
+//     
+//     You should have received a copy of the GNU Lesser General Public License
+//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//     
+//     See LICENSE.TXT file for more information.
+//  ----------------------------------------------------------------------------
+//
+// Description : Unicode Include file for TCPDF.
+//
+// Author: Nicola Asuni
+//
+// (c) Copyright:
+//               Nicola Asuni
+//               Tecnick.com s.r.l.
+//               Via Della Pace, 11
+//               09044 Quartucciu (CA)
+//               ITALY
+//               www.tecnick.com
+//               info@tecnick.com
+//============================================================+
+// THANKS TO
+// Efthimios Mavrogeorgiadis
+// Saleh AlMatrafe
+
+/**
+ * Unicode Include file for TCPDF.
+ * @author Nicola Asuni
+ * @copyright 2004-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
+ * @package com.tecnick.tcpdf
+ * @link http://www.tcpdf.org
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL
+ * @since 2.1.000 (2008-01-08)
+*/
+
+/**
+* Left-to-Right Mark
+*/
+define('K_LRM', 8206);
+/**
+* Right-to-Left Mark
+*/
+define('K_RLM', 8207);
+/**
+* Left-to-Right Embedding
+*/
+define('K_LRE', 8234);
+/**
+* Right-to-Left Embedding
+*/
+define('K_RLE', 8235);
+/**
+* Pop Directional Format
+*/
+define('K_PDF', 8236);
+/**
+* Left-to-Right Override
+*/
+define('K_LRO', 8237);
+/**
+* Right-to-Left Override
+*/
+define('K_RLO', 8238);
+
+/*
+ * Pattern to test RTL (Righ-To-Left) strings using regular expressions.
+ */
+define('K_RE_PATTERN_RTL', "/(
+         \xD6\xBE                                             # R
+       | \xD7[\x80\x83\x86\x90-\xAA\xB0-\xB4]                 # R
+       | \xDF[\x80-\xAA\xB4\xB5\xBA]                          # R
+       | \xE2\x80\x8F                                         # R
+       | \xEF\xAC[\x9D\x9F\xA0-\xA8\xAA-\xB6\xB8-\xBC\xBE]    # R
+       | \xEF\xAD[\x80\x81\x83\x84\x86-\x8F]                  # R
+       | \xF0\x90\xA0[\x80-\x85\x88\x8A-\xB5\xB7\xB8\xBC\xBF] # R
+       | \xF0\x90\xA4[\x80-\x99]                              # R
+       | \xF0\x90\xA8[\x80\x90-\x93\x95-\x97\x99-\xB3]        # R
+       | \xF0\x90\xA9[\x80-\x87\x90-\x98]                     # R
+       | \xE2\x80[\xAB\xAE]                                   # RLE & RLO
+       )/x");
+
+/*
+ * Pattern to test Arabic strings using regular expressions.
+ * source: http://www.w3.org/International/questions/qa-forms-utf-8
+ */
+define("K_RE_PATTERN_ARABIC", "/(
+                 \xD8[\x80-\x83\x8B\x8D\x9B\x9E\x9F\xA1-\xBA]  # AL
+               | \xD9[\x80-\x8A\xAD-\xAF\xB1-\xBF]             # AL
+               | \xDA[\x80-\xBF]                               # AL
+               | \xDB[\x80-\x95\x9D\xA5\xA6\xAE\xAF\xBA-\xBF]  # AL
+               | \xDC[\x80-\x8D\x90\x92-\xAF]                  # AL
+               | \xDD[\x8D-\xAD]                               # AL
+               | \xDE[\x80-\xA5\xB1]                           # AL
+               | \xEF\xAD[\x90-\xBF]                           # AL
+               | \xEF\xAE[\x80-\xB1]                           # AL
+               | \xEF\xAF[\x93-\xBF]                           # AL
+               | \xEF[\xB0-\xB3][\x80-\xBF]                    # AL
+               | \xEF\xB4[\x80-\xBD]                           # AL
+               | \xEF\xB5[\x90-\xBF]                           # AL
+               | \xEF\xB6[\x80-\x8F\x92-\xBF]                  # AL
+               | \xEF\xB7[\x80-\x87\xB0-\xBC]                  # AL
+               | \xEF\xB9[\xB0-\xB4\xB6-\xBF]                  # AL
+               | \xEF\xBA[\x80-\xBF]                           # AL
+               | \xEF\xBB[\x80-\xBC]                           # AL
+               | \xD9[\xA0-\xA9\xAB\xAC]                       # AN
+               )/x");
+
+/**
+ * Array of unicode types
  */
-global $unicode;\r
-$unicode = array(\r
+global $unicode;
+$unicode = array(
 0=>'BN',
 1=>'BN',
 2=>'BN',
@@ -17846,16 +17846,16 @@ $unicode = array(
 983040=>'L',
 1048573=>'L',
 1048576=>'L',
-1114109=>'L'\r
-);\r
-\r
-/**\r
- * Mirror unicode characters.\r
- * For information on bidi mirroring, see UAX #9: Bidirectional Algorithm, \r
- * at http://www.unicode.org/unicode/reports/tr9/\r
+1114109=>'L'
+);
+
+/**
+ * Mirror unicode characters.
+ * For information on bidi mirroring, see UAX #9: Bidirectional Algorithm, 
+ * at http://www.unicode.org/unicode/reports/tr9/
  */
-global $unicode_mirror;\r
-$unicode_mirror = array (\r
+global $unicode_mirror;
+$unicode_mirror = array (
 0x0028=>0x0029,
 0x0029=>0x0028,
 0x003C=>0x003E,
@@ -18207,14 +18207,14 @@ $unicode_mirror = array (
 0xFF5F=>0xFF60,
 0xFF60=>0xFF5F,
 0xFF62=>0xFF63,
-0xFF63=>0xFF62);\r
-\r
-/**\r
- * Arabic shape subtitutions\r
- * char code=>isolated, final, initial, medial\r
+0xFF63=>0xFF62);
+
+/**
+ * Arabic shape subtitutions
+ * char code=>isolated, final, initial, medial
  */
-global $unicode_arlet;\r
-$unicode_arlet = array(\r
+global $unicode_arlet;
+$unicode_arlet = array(
 1569=>array(65152),
 1570=>array(65153, 65154, 65153, 65154),
 1571=>array(65155, 65156, 65155, 65156),
@@ -18290,38 +18290,38 @@ $unicode_arlet = array(
 1740=>array(64508, 64509, 64510, 64511),
 1744=>array(64484, 64485, 64486, 64487),
 1746=>array(64430, 64431),
-1747=>array(64432, 64433)\r
-);\r
-\r
-/**\r
- * Arabic laa letter\r
- * char code=>isolated, final, initial, medial\r
+1747=>array(64432, 64433)
+);
+
+/**
+ * Arabic laa letter
+ * char code=>isolated, final, initial, medial
  */
-global $laa_array;\r
-$laa_array = array (\r
+global $laa_array;
+$laa_array = array (
 1570 =>array(65269, 65270, 65269, 65270),
 1571 =>array(65271, 65272, 65271, 65272),
 1573 =>array(65273, 65274, 65273, 65274),
-1575 =>array(65275, 65276, 65275, 65276)\r
-);\r
-\r
-/**\r
- * Array of character substitutions for sequences of two diacritics symbols starting with SHADDA (0651 HEX, 1617 DEC).\r
- * Combining characters that can occur with Shadda (U0651) are placed in UE586-UE594. \r
- * Putting the combining mark and shadda in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner.\r
- * second NSM char code=>substitution char\r
+1575 =>array(65275, 65276, 65275, 65276)
+);
+
+/**
+ * Array of character substitutions for sequences of two diacritics symbols starting with SHADDA (0651 HEX, 1617 DEC).
+ * Combining characters that can occur with Shadda (U0651) are placed in UE586-UE594. 
+ * Putting the combining mark and shadda in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner.
+ * second NSM char code=>substitution char
  */
-global $diacritics;\r
-$diacritics = array (\r
-1612=>64606, # Shadda + Dammatan\r
-1613=>64607, # Shadda + Kasratan\r
-1614=>64608, # Shadda + Fatha\r
-1615=>64609, # Shadda + Damma\r
-1616=>64610  # Shadda + Kasra\r
-);\r
+global $diacritics;
+$diacritics = array (
+1612=>64606, # Shadda + Dammatan
+1613=>64607, # Shadda + Kasratan
+1614=>64608, # Shadda + Fatha
+1615=>64609, # Shadda + Damma
+1616=>64610  # Shadda + Kasra
+);
 
-/**\r
- * Array of character substitutions from UTF-8 unicode to latin1\r
+/**
+ * Array of character substitutions from UTF-8 unicode to latin1
  */
 global $utf8tolatin;
 $utf8tolatin = array (
@@ -18353,8 +18353,8 @@ $utf8tolatin = array (
 8482=>153, # trademark
 382=>158   # zcaron2
 );
-\r
-//============================================================+\r
-// END OF FILE\r
-//============================================================+\r
+
+//============================================================+
+// END OF FILE
+//============================================================+
 ?>