Fix layar API
Fix layar API
Add current time/timing period to heading of panel to change those settings

file:a/about.php -> file:b/about.php
--- a/about.php
+++ b/about.php
@@ -1,10 +1,11 @@
 <?php
-include('common.inc.php');
-include_header("About","about")
+include ('common.inc.php');
+include_header("About", "about")
 ?>
 <p>
 Busness Time - An ACT bus timetable webapp<br />
-Based on the maxious-canberra-transit-feed (<a href="cbrfeed.zip">download</a>, last updated <?php echo date("F d Y.", @filemtime('cbrfeed.zip')); ?>)<br />
+Based on the maxious-canberra-transit-feed (<a href="cbrfeed.zip">download</a>, last updated <?php
+echo date("F d Y.", @filemtime('cbrfeed.zip')); ?>)<br />
 Source code for the transit feed and this site @ <a href="http://maxious.lambdacomplex.org/git">http://maxious.lambdacomplex.org/git</a><br />
 Uses jQuery Mobile, PHP, Ruby, Python, Google Transit Feed Specification tools, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service<br />
 <br />

--- a/aws/awsStartup.sh
+++ b/aws/awsStartup.sh
@@ -1,10 +1,11 @@
 #!/bin/bash
 #this script should be run from a fresh git checkout from http://maxious.lambdacomplex.org
 #ami base must have yum install lighttpd-fastcgi, git, tomcat6 
-#screen php-cli php-gd tomcat6-webapps tomcat6-admin-webapps
+#screen php-cli php-gd tomcat6-webapps tomcat6-admin-webapps svn maven2
 #http://www.how2forge.org/installing-lighttpd-with-php5-and-mysql-support-on-fedora-12
 
 cp -rfv /tmp/busui/* /var/www
+cp /root/aws.php /tmp/
 chcon -h system_u:object_r:httpd_sys_content_t /var/www
 chcon -R -h root:object_r:httpd_sys_content_t /var/www/*
 chcon -R -t httpd_sys_content_rw_t /var/www/staticmaplite/cache

--- a/aws/fastcgi.conf
+++ b/aws/fastcgi.conf

--- a/aws/modules.conf
+++ b/aws/modules.conf

--- a/aws/php.ini
+++ b/aws/php.ini

--- a/aws/rc.local
+++ b/aws/rc.local

--- /dev/null
+++ b/common-geo.inc.php
@@ -1,1 +1,146 @@
-
+<?php
+// SELECT array_to_string(array(SELECT REPLACE(name_2006, ',', '\,') as name FROM suburbs order by name), ',')
+$suburbs = explode(",", "Acton,Ainslie,Amaroo,Aranda,Banks,Barton,Belconnen,Bonner,Bonython,Braddon,Bruce,Calwell,Campbell,Chapman,Charnwood,Chifley,Chisholm,City,Conder,Cook,Curtin,Deakin,Dickson,Downer,Duffy,Dunlop,Evatt,Fadden,Farrer,Fisher,Florey,Flynn,Forrest,Franklin,Fraser,Fyshwick,Garran,Gilmore,Giralang,Gordon,Gowrie,Greenway,Griffith,Gungahlin,Hackett,Hall,Harrison,Hawker,Higgins,Holder,Holt,Hughes,Hume,Isaacs,Isabella Plains,Kaleen,Kambah,Kingston,Latham,Lawson,Lyneham,Lyons,Macarthur,Macgregor,Macquarie,Mawson,McKellar,Melba,Mitchell,Monash,Narrabundah,Ngunnawal,Nicholls,Oaks Estate,O'Connor,O'Malley,Oxley,Page,Palmerston,Parkes,Pearce,Phillip,Pialligo,Red Hill,Reid,Richardson,Rivett,Russell,Scullin,Spence,Stirling,Symonston,Tharwa,Theodore,Torrens,Turner,Wanniassa,Waramanga,Watson,Weetangera,Weston,Yarralumla");
+function staticmap($mapPoints, $zoom = 0, $markerImage = "iconb", $collapsible = true)
+{
+	$width = 300;
+	$height = 300;
+	$metersperpixel[9] = 305.492 * $width;
+	$metersperpixel[10] = 152.746 * $width;
+	$metersperpixel[11] = 76.373 * $width;
+	$metersperpixel[12] = 38.187 * $width;
+	$metersperpixel[13] = 19.093 * $width;
+	$metersperpixel[14] = 9.547 * $width;
+	$metersperpixel[15] = 4.773 * $width;
+	$metersperpixel[16] = 2.387 * $width;
+	// $metersperpixel[17]=1.193*$width;
+	$center = "";
+	$markers = "";
+	$minlat = 999;
+	$minlon = 999;
+	$maxlat = 0;
+	$maxlon = 0;
+	if (sizeof($mapPoints) < 1) return "map error";
+	if (sizeof($mapPoints) === 1) {
+		if ($zoom == 0) $zoom = 14;
+		$markers.= "{$mapPoints[0][0]},{$mapPoints[0][1]},$markerimage";
+		$center = "{$mapPoints[0][0]},{$mapPoints[0][1]}";
+	}
+	else {
+		foreach ($mapPoints as $index => $mapPoint) {
+			$markers.= $mapPoint[0] . "," . $mapPoint[1] . "," . $markerImage . ($index + 1);
+			if ($index + 1 != sizeof($mapPoints)) $markers.= "|";
+			if ($mapPoint[0] < $minlat) $minlat = $mapPoint[0];
+			if ($mapPoint[0] > $maxlat) $maxlat = $mapPoint[0];
+			if ($mapPoint[1] < $minlon) $minlon = $mapPoint[1];
+			if ($mapPoint[1] > $maxlon) $maxlon = $mapPoint[1];
+			$totalLat+= $mapPoint[0];
+			$totalLon+= $mapPoint[1];
+		}
+		if ($zoom == 0) {
+			$mapwidthinmeters = distance($minlat, $minlon, $minlat, $maxlon);
+			foreach (array_reverse($metersperpixel, true) as $zoomLevel => $maxdistance) {
+				if ($zoom == 0 && $mapwidthinmeters < ($maxdistance + 50)) $zoom = $zoomLevel;
+			}
+		}
+		$center = $totalLat / sizeof($mapPoints) . "," . $totalLon / sizeof($mapPoints);
+	}
+	$output = "";
+	if ($collapsible) $output.= '<div data-role="collapsible" data-collapsed="true"><h3>Open Map...</h3>';
+	$output.= '<center><img src="' . curPageURL() . 'staticmaplite/staticmap.php?center=' . $center . '&zoom=' . $zoom . '&size=' . $width . 'x' . $height . '&maptype=mapnik&markers=' . $markers . '" width=' . $width . ' height=' . $height . '></center>';
+	if ($collapsible) $output.= '</div>';
+	return $output;
+}
+function distance($lat1, $lng1, $lat2, $lng2)
+{
+	$pi80 = M_PI / 180;
+	$lat1*= $pi80;
+	$lng1*= $pi80;
+	$lat2*= $pi80;
+	$lng2*= $pi80;
+	$r = 6372.797; // mean radius of Earth in km
+	$dlat = $lat2 - $lat1;
+	$dlng = $lng2 - $lng1;
+	$a = sin($dlat / 2) * sin($dlat / 2) + cos($lat1) * cos($lat2) * sin($dlng / 2) * sin($dlng / 2);
+	$c = 2 * atan2(sqrt($a) , sqrt(1 - $a));
+	$km = $r * $c;
+	return $km * 1000;
+}
+function decodePolylineToArray($encoded)
+{
+	// source: http://latlongeeks.com/forum/viewtopic.php?f=4&t=5
+	$length = strlen($encoded);
+	$index = 0;
+	$points = array();
+	$lat = 0;
+	$lng = 0;
+	while ($index < $length) {
+		// Temporary variable to hold each ASCII byte.
+		$b = 0;
+		// The encoded polyline consists of a latitude value followed by a
+		// longitude value.  They should always come in pairs.  Read the
+		// latitude value first.
+		$shift = 0;
+		$result = 0;
+		do {
+			// The `ord(substr($encoded, $index++))` statement returns the ASCII
+			//  code for the character at $index.  Subtract 63 to get the original
+			// value. (63 was added to ensure proper ASCII characters are displayed
+			// in the encoded polyline string, which is `human` readable)
+			$b = ord(substr($encoded, $index++)) - 63;
+			// AND the bits of the byte with 0x1f to get the original 5-bit `chunk.
+			// Then left shift the bits by the required amount, which increases
+			// by 5 bits each time.
+			// OR the value into $results, which sums up the individual 5-bit chunks
+			// into the original value.  Since the 5-bit chunks were reversed in
+			// order during encoding, reading them in this way ensures proper
+			// summation.
+			$result|= ($b & 0x1f) << $shift;
+			$shift+= 5;
+		}
+		// Continue while the read byte is >= 0x20 since the last `chunk`
+		// was not OR'd with 0x20 during the conversion process. (Signals the end)
+		while ($b >= 0x20);
+		// Check if negative, and convert. (All negative values have the last bit
+		// set)
+		$dlat = (($result & 1) ? ~($result >> 1) : ($result >> 1));
+		// Compute actual latitude since value is offset from previous value.
+		$lat+= $dlat;
+		// The next values will correspond to the longitude for this point.
+		$shift = 0;
+		$result = 0;
+		do {
+			$b = ord(substr($encoded, $index++)) - 63;
+			$result|= ($b & 0x1f) << $shift;
+			$shift+= 5;
+		} while ($b >= 0x20);
+		$dlng = (($result & 1) ? ~($result >> 1) : ($result >> 1));
+		$lng+= $dlng;
+		// The actual latitude and longitude values were multiplied by
+		// 1e5 before encoding so that they could be converted to a 32-bit
+		// integer representation. (With a decimal accuracy of 5 places)
+		// Convert back to original values.
+		$points[] = array(
+			$lat * 1e-5,
+			$lng * 1e-5
+		);
+	}
+	return $points;
+}
+function geocode($query, $giveOptions)
+{
+	global $cloudmadeAPIkey;
+	$url = "http://geocoding.cloudmade.com/$cloudmadeAPIkey/geocoding/v2/find.js?query=" . urlencode($query) . "&bbox=-35.5,149.00,-35.15,149.1930&return_location=true&bbox_only=true";
+	$contents = json_decode(getPage($url));
+	if ($giveOptions) return $contents->features;
+	elseif (isset($contents->features[0]->centroid)) return $contents->features[0]->centroid->coordinates[0] . "," . $contents->features[0]->centroid->coordinates[1];
+	else return "";
+}
+function reverseGeocode($lat, $lng)
+{
+	global $cloudmadeAPIkey;
+	$url = "http://geocoding.cloudmade.com/$cloudmadeAPIkey/geocoding/v2/find.js?around=" . $lat . "," . $lng . "&distance=closest&object_type=road";
+	$contents = json_decode(getPage($url));
+	return $contents->features[0]->properties->name;
+}
+?>

--- /dev/null
+++ b/common-net.inc.php
@@ -1,1 +1,23 @@
-
+<?php
+function getPage($url)
+{
+	debug($url, "json");
+	$ch = curl_init($url);
+	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+	curl_setopt($ch, CURLOPT_HEADER, 0);
+	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
+	$page = curl_exec($ch);
+	if (curl_errno($ch)) echo "<font color=red> Database temporarily unavailable: " . curl_errno($ch) . " " . curl_error($ch) . "</font><br>";
+	curl_close($ch);
+	debug(print_r($page,true),"json");
+	return $page;
+}
+function curPageURL()
+{
+	$isHTTPS = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on");
+	$port = (isset($_SERVER["SERVER_PORT"]) && ((!$isHTTPS && $_SERVER["SERVER_PORT"] != "80") || ($isHTTPS && $_SERVER["SERVER_PORT"] != "443")));
+	$port = ($port) ? ':' . $_SERVER["SERVER_PORT"] : '';
+	$url = ($isHTTPS ? 'https://' : 'http://') . $_SERVER["SERVER_NAME"] . $port . htmlentities(dirname($_SERVER['PHP_SELF']) , ENT_QUOTES) . "/";
+	return $url;
+}
+?>

--- /dev/null
+++ b/common-template.inc.php
@@ -1,1 +1,150 @@
+<?php
+function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false)
+{
+	echo '
+<!DOCTYPE html> 
+<html> 
+	<head> 
+	<title>' . $pageTitle . '</title>';
+	if (isDebugServer()) echo '<link rel="stylesheet"  href="css/jquery-mobile-1.0a3.css" />
+         <script type="text/javascript" src="js/jquery-1.5.js"></script>
+        <script type="text/javascript" src="js/jquery-mobile-1.0a3.js"></script>';
+	else echo '<link rel="stylesheet"  href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.css" />
+        <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.js"></script>
+        <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.js"></script>';
+	echo '
+<link rel="stylesheet"  href="css/jquery.ui.datepicker.mobile.css" />
+	<script> 
+		//reset type=date inputs to text
+		$( document ).bind( "mobileinit", function(){
+			$.mobile.page.prototype.options.degradeInputs.date = true;
+		});	
+	</script> 
+	<script src="js/jQuery.ui.datepicker.js"></script> 
+	<script src="js/jquery.ui.datepicker.mobile.js"></script> 
+     <style type="text/css">
+     .ui-navbar {
+     width: 100%;
+     }
+     .ui-btn-inner {
+        white-space: normal !important;
+     }
+     .ui-li-heading {
+        white-space: normal !important;
+     }
+    .ui-listview-filter {
+        margin: 0 !important;
+     }
+     .ui-icon-navigation {
+        background-image: url(css/images/113-navigation.png);
+        background-position: 1px 0;
+     }
+    #footer {
+        text-size: 0.75em;
+        text-align: center;
+    }
+    body {
+        background-color: #F0F0F0;
+    }
+</style>
+<meta name="apple-mobile-web-app-capable" content="yes" />
+ <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+ <link rel="apple-touch-startup-image" href="startup.png" />
+ <link rel="apple-touch-icon" href="apple-touch-icon.png" />';
+	if ($geolocate) {
+		echo "<script>
 
+function success(position) {
+$('#geolocate').val(position.coords.latitude+','+position.coords.longitude);
+$.ajax({ url: \"common.inc.php?geolocate=yes&lat=\"+position.coords.latitude+\"&lon=\"+position.coords.longitude });
+$('#here').click(function(event) { $('#geolocate').val(doAJAXrequestForGeolocSessionHere()); return false;});
+$('#here').show();
+}
+function error(msg) {
+ console.log(msg);
+}
+
+if (navigator.geolocation) {
+  navigator.geolocation.getCurrentPosition(success, error);
+}
+
+</script> ";
+	}
+	echo '</head>
+<body>
+ ';
+	if (isMetricsOn()) {
+		require_once ('owa/owa_env.php');
+		require_once (OWA_DIR . 'owa_php.php');
+		$owa = new owa_php();
+		global $owaSiteID;
+		$owa->setSiteId($owaSiteID);
+		$owa->setPageTitle($pageTitle);
+		$owa->setPageType($pageType);
+		$owa->trackPageView();
+		$owa->placeHelperPageTags();
+	}
+	if ($opendiv) {
+		echo '<div data-role="page"> 
+ <script>
+$(document).ready(function ()
+{
+    document.title = "' . $pageTitle . '";
+});
+</script>
+	<div data-role="header"> 
+		<h1>' . $pageTitle . '</h1>
+	</div><!-- /header -->
+        <div data-role="content"> ';
+	}
+}
+function include_footer()
+{
+	if ($geolocate && isset($_SESSION['lat'])) {
+		echo "<script>
+        $('#here').click(function(event) { $('#geolocate').val(doAJAXrequestForGeolocSessionHere()); return false;});
+$('#here').show();
+</script>";
+	}
+	echo '<div id="footer"><a href="about.php">About/Contact Us</a>&nbsp;<a href="feedback.php">Feedback/Bug Report</a></a>';
+	echo '</div>';
+}
+function timePlaceSettings($geolocate = false)
+{
+	global $service_periods;
+	$geoerror = false;
+	if ($geolocate == true) {
+		$geoerror = !isset($_SESSION['lat']) || !isset($_SESSION['lat']) || $_SESSION['lat'] == "" || $_SESSION['lon'] == "";
+	}
+	if ($geoerror) {
+		echo '<div class="error">Sorry, but your location could not currently be detected.
+        Please allow location permission, wait for your location to be detected,
+        or enter an address/co-ordinates in the box below.</div>';
+	}
+	echo '<div data-role="collapsible" data-collapsed="' . !$geoerror . '">
+        <h3>Change Time/Place (' . $_SESSION['time'] . ' '.ucwords(service_period()).')...</h3>
+        <form action="" method="post">
+        <div class="ui-body"> 
+		<div data-role="fieldcontain">
+	            <label for="geolocate"> Current Location: </label>
+			<input type="text" id="geolocate" name="geolocate" value="' . (isset($_SESSION['lat']) && isset($_SESSION['lon']) ? $_SESSION['lat'] . "," . $_SESSION['lon'] : "Enter co-ordinates or address here") . '"/> <a href="#" style="display:none" name="here" id="here"/>Here?</a>
+	        </div>
+    		<div data-role="fieldcontain">
+		        <label for="time"> Time: </label>
+		    	<input type="time" name="time" id="time" value="' . (isset($_SESSION['time']) ? $_SESSION['time'] : date("H:i")) . '"/> <a href="#" name="currentTime" id="currentTime"/>Current Time?</a>
+	        </div>
+		<div data-role="fieldcontain">
+		    <label for="service_period"> Service Period:  </label>
+			<select name="service_period">';
+	foreach ($service_periods as $service_period) {
+		echo "<option value=\"$service_period\"" . (service_period() === $service_period ? "SELECTED" : "") . '>' . ucwords($service_period) . '</option>';
+	}
+	echo '</select>
+			<a href="#" style="display:none" name="currentPeriod" id="currentPeriod"/>Current Period?</a>
+		</div>
+		
+		<input type="submit" value="Update"/>
+                </form>
+            </div></div>';
+}
+?>

--- /dev/null
+++ b/common-transit.inc.php
@@ -1,1 +1,73 @@
-
+<?php
+$service_periods = Array(
+	'sunday',
+	'saturday',
+	'weekday'
+);
+function service_period()
+{
+	if (isset($_SESSION['service_period'])) return $_SESSION['service_period'];
+	switch (date('w')) {
+	case 0:
+		return 'sunday';
+	case 6:
+		return 'saturday';
+	default:
+		return 'weekday';
+	}
+}
+function midnight_seconds()
+{
+	// from http://www.perturb.org/display/Perlfunc__Seconds_Since_Midnight.html
+	if (isset($_SESSION['time'])) {
+		$time = strtotime($_SESSION['time']);
+		return (date("G", $time) * 3600) + (date("i", $time) * 60) + date("s", $time);
+	}
+	return (date("G") * 3600) + (date("i") * 60) + date("s");
+}
+function midnight_seconds_to_time($seconds)
+{
+	if ($seconds > 0) {
+		$midnight = mktime(0, 0, 0, date("n") , date("j") , date("Y"));
+		return date("h:ia", $midnight + $seconds);
+	}
+	else {
+		return "";
+	}
+}
+function viaPoints($tripid, $stopid, $timingPointsOnly = false)
+{
+	global $APIurl;
+	$url = $APIurl . "/json/tripstoptimes?trip=" . $tripid;
+	$json = json_decode(getPage($url));
+	debug(print_r($json, true));
+	$stops = $json[0];
+	$times = $json[1];
+	$foundStop = false;
+	$viaPoints = Array();
+	foreach ($stops as $key => $row) {
+		if ($foundStop) {
+			if (!$timingPointsOnly || !startsWith($row[5], "Wj")) {
+				$viaPoints[] = Array(
+					"id" => $row[0],
+					"name" => $row[1],
+					"time" => $times[$key]
+				);
+			}
+		}
+		else {
+			if ($row[0] == $stopid) $foundStop = true;
+		}
+	}
+	return $viaPoints;
+}
+function viaPointNames($tripid, $stopid)
+{
+	$points = viaPoints($tripid, $stopid, true);
+	$pointNames = Array();
+	foreach ($points as $point) {
+		$pointNames[] = $point['name'];
+	}
+	return implode(", ", $pointNames);
+}
+?>

--- a/common.inc.php
+++ b/common.inc.php
@@ -1,470 +1,154 @@
 <?php
 date_default_timezone_set('Australia/ACT');
 $APIurl = "http://localhost:8765";
-$cloudmadeAPIkey="daa03470bb8740298d4b10e3f03d63e6";
-$googleMapsAPIkey="ABQIAAAA95XYXN0cki3Yj_Sb71CFvBTPaLd08ONybQDjcH_VdYtHHLgZvRTw2INzI_m17_IoOUqH3RNNmlTk1Q";
+$cloudmadeAPIkey = "daa03470bb8740298d4b10e3f03d63e6";
+$googleMapsAPIkey = "ABQIAAAA95XYXN0cki3Yj_Sb71CFvBTPaLd08ONybQDjcH_VdYtHHLgZvRTw2INzI_m17_IoOUqH3RNNmlTk1Q";
 $otpAPIurl = 'http://localhost:8080/opentripplanner-api-webapp/';
-if (isDebug()) error_reporting(E_ALL ^ E_NOTICE);
-
-// SELECT array_to_string(array(SELECT REPLACE(name_2006, ',', '\,') as name FROM suburbs order by name), ',')
-$suburbs = explode(",","Acton,Ainslie,Amaroo,Aranda,Banks,Barton,Belconnen,Bonner,Bonython,Braddon,Bruce,Calwell,Campbell,Chapman,Charnwood,Chifley,Chisholm,City,Conder,Cook,Curtin,Deakin,Dickson,Downer,Duffy,Dunlop,Evatt,Fadden,Farrer,Fisher,Florey,Flynn,Forrest,Franklin,Fraser,Fyshwick,Garran,Gilmore,Giralang,Gordon,Gowrie,Greenway,Griffith,Gungahlin,Hackett,Hall,Harrison,Hawker,Higgins,Holder,Holt,Hughes,Hume,Isaacs,Isabella Plains,Kaleen,Kambah,Kingston,Latham,Lawson,Lyneham,Lyons,Macarthur,Macgregor,Macquarie,Mawson,McKellar,Melba,Mitchell,Monash,Narrabundah,Ngunnawal,Nicholls,Oaks Estate,O'Connor,O'Malley,Oxley,Page,Palmerston,Parkes,Pearce,Phillip,Pialligo,Red Hill,Reid,Richardson,Rivett,Russell,Scullin,Spence,Stirling,Symonston,Tharwa,Theodore,Torrens,Turner,Wanniassa,Waramanga,Watson,Weetangera,Weston,Yarralumla");
-
- // you have to open the session to be able to modify or remove it 
+$owaSiteID = 'fe5b819fa8c424a99ff0764d955d23f3';
+//$debugOkay = Array("session","json","phperror","other");
+$debugOkay = Array(
+	"session",
+	"json",
+	"phperror",
+	"other"
+);
+if (isDebug("phperror")) error_reporting(E_ALL ^ E_NOTICE);
+include_once ("common-geo.inc.php");
+include_once ("common-net.inc.php");
+include_once ("common-template.inc.php");
+include_once ("common-transit.inc.php");
+// you have to open the session to be able to modify or remove it
 session_start();
- if (isset($_REQUEST['service_period'])) $_SESSION['service_period'] = filter_var($_REQUEST['service_period'],FILTER_SANITIZE_STRING);
- if (isset($_REQUEST['time'])) $_SESSION['time'] = filter_var($_REQUEST['time'],FILTER_SANITIZE_STRING);
- if (isset($_REQUEST['geolocate'])) {
-    $contents = geocode(var_filter($_REQUEST['geolocate'],FILTER_SANITIZE_URL),true);
-    if (isset($contents[0]->centroid)) {
-        $session['lat'] = $contents[0]->centroid->coordinates[0];
-        $session['lon'] = $contents[0]->centroid->coordinates[1];
-    }
-    else {
-        $session['lat'] = "";
-        $session['lon'] = "";
-    }
- }
-//print_r ($_SESSION);
-function isDebug()
+if (isset($_REQUEST['service_period'])) {
+	$_SESSION['service_period'] = filter_var($_REQUEST['service_period'], FILTER_SANITIZE_STRING);
+}
+if (isset($_REQUEST['time'])) {
+	$_SESSION['time'] = filter_var($_REQUEST['time'], FILTER_SANITIZE_STRING);
+}
+if (isset($_REQUEST['geolocate'])) {
+   
+	$geocoded = false;
+	if (isset($_REQUEST['lat']) && isset($_REQUEST['lon'])) {
+		$_SESSION['lat'] = trim(filter_var($_REQUEST['lat'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION));
+		$_SESSION['lon'] = trim(filter_var($_REQUEST['lon'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION));
+	}
+	else {
+	 $geolocate = filter_var($_REQUEST['geolocate'], FILTER_SANITIZE_URL);
+	 echo $_REQUEST['geolocate'];
+   	 if (startsWith($geolocate, "-")) {
+		  $locateparts = explode(",",$geolocate);
+		  $_SESSION['lat'] = $locateparts[0];
+			$_SESSION['lon'] =$locateparts[1];
+		} else {
+		$contents = geocode($geolocate, true);
+		print_r($contents);
+		if (isset($contents[0]->centroid)) {
+			$geocoded = true;
+			$_SESSION['lat'] = $contents[0]->centroid->coordinates[0];
+			$_SESSION['lon'] = $contents[0]->centroid->coordinates[1];
+		}
+		else {
+			$_SESSION['lat'] = "";
+			$_SESSION['lon'] = "";
+		}
+		}
+	}
+	if ($_SESSION['lat'] != "" && isMetricsOn()) {
+		// Create a new Instance of the tracker
+		$owa = new owa_php($config);
+		// Set the ID of the site being tracked
+		$owa->setSiteId($owaSiteID);
+		// Create a new event object
+		$event = $owa->makeEvent();
+		// Set the Event Type, in this case a "video_play"
+		$event->setEventType('geolocate');
+		// Set a property
+		$event->set('lat', $_SESSION['lat']);
+		$event->set('lon', $_SESSION['lon']);
+		$event->set('geocoded', $geocoded);
+		// Track the event
+		$owa->trackEvent($event);
+	}
+}
+debug(print_r($_SESSION, true) , "session");
+function isDebugServer()
 {
-    return $_SERVER['SERVER_NAME'] == "10.0.1.154" || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" || !$_SERVER['SERVER_NAME'];
+	return $_SERVER['SERVER_NAME'] == "10.0.1.154" || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" || !$_SERVER['SERVER_NAME'];
 }
-
+function isDebug($debugReason = "other")
+{
+	global $debugOkay;
+	return in_array($debugReason, $debugOkay, false) && isDebugServer();
+}
 function isMetricsOn()
 {
-    return true;
+	return !isDebugServer();
 }
-
-function debug($msg) {
-    if (isDebug()) echo "<!-- $msg -->";
+function debug($msg, $debugReason = "other")
+{
+	if (isDebug($debugReason)) echo "\n<!-- " . date(DATE_RFC822) . "\n $msg -->\n";
 }
-function isFastDevice() {
-    $fastDevices = Array("Mozilla/5.0 (X11;", "Mozilla/5.0 (Windows;", "Mozilla/5.0 (iP", "Mozilla/5.0 (Linux; U; Android", "Mozilla/4.0 (compatible; MSIE");
-    $slowDevices = Array("J2ME","MIDP","Opera/","Mozilla/2.0 (compatible;","Mozilla/3.0 (compatible;");
-    return true;
+function isFastDevice()
+{
+	$ua = $_SERVER['HTTP_USER_AGENT'];
+	$fastDevices = Array(
+		"Mozilla/5.0 (X11;",
+		"Mozilla/5.0 (Windows;",
+		"Mozilla/5.0 (iP",
+		"Mozilla/5.0 (Linux; U; Android",
+		"Mozilla/4.0 (compatible; MSIE"
+	);
+	$slowDevices = Array(
+		"J2ME",
+		"MIDP",
+		"Opera/",
+		"Mozilla/2.0 (compatible;",
+		"Mozilla/3.0 (compatible;"
+	);
+	return true;
 }
-
-function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false) {
-    echo '
-<!DOCTYPE html> 
-<html> 
-	<head> 
-	<title>'.$pageTitle.'</title>';
-         if (isDebug()) echo '<link rel="stylesheet"  href="css/jquery-mobile-1.0a3.css" />
-         <script type="text/javascript" src="js/jquery-1.5.js"></script>
-        <script type="text/javascript" src="js/jquery-mobile-1.0a3.js"></script>';
-         else echo '<link rel="stylesheet"  href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.css" />
-        <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.js"></script>
-        <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.js"></script>';
-echo '
-<link rel="stylesheet"  href="css/jquery.ui.datepicker.mobile.css" />
-	<script> 
-		//reset type=date inputs to text
-		$( document ).bind( "mobileinit", function(){
-			$.mobile.page.prototype.options.degradeInputs.date = true;
-		});	
-	</script> 
-	<script src="js/jQuery.ui.datepicker.js"></script> 
-	<script src="js/jquery.ui.datepicker.mobile.js"></script> 
-     <style type="text/css">
-     .ui-navbar {
-     width: 100%;
-     }
-     .ui-btn-inner {
-        white-space: normal !important;
-     }
-     .ui-li-heading {
-        white-space: normal !important;
-     }
-    .ui-listview-filter {
-        margin: 0 !important;
-     }
-    #footer {
-        text-size: 0.75em;
-        text-align: center;
-    }
-    body {
-        background-color: #F0F0F0;
-    }
-</style>
-<meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="apple-mobile-web-app-status-bar-style" content="black" />
- <link rel="apple-touch-startup-image" href="startup.png" />
- <link rel="apple-touch-icon" href="apple-touch-icon.png" />';
- if ($geolocate) {
-echo "<script>
-
-function success(position) {
-$('#geolocate').val(position.coords.latitude+','+position.coords.longitude);
-// setCookie('geolocate',position.coords.latitude+','+position.coords.longitude,1);
-$('#here').click(function(event) { $('#geolocate').val(doAJAXrequestForGeolocSessionHere()); return false;});
-$('#here').show();
+function array_flatten($a, $f = array())
+{
+	if (!$a || !is_array($a)) return '';
+	foreach ($a as $k => $v) {
+		if (is_array($v)) $f = array_flatten($v, $f);
+		else $f[$k] = $v;
+	}
+	return $f;
 }
-function error(msg) {
- console.log(msg);
-}
-
-if (navigator.geolocation) {
-  navigator.geolocation.getCurrentPosition(success, error);
-}
-
-</script> ";
- }
-echo '</head>
-<body>
- ';
-     if (isMetricsOn()) {
-    require_once('owa/owa_env.php');
-    require_once(OWA_DIR.'owa_php.php');
-    $owa = new owa_php();
-    $owa->setSiteId('bus.lambdacomplex.org');
-    $owa->setPageTitle($pageTitle);
-    $owa->setPageType($pageType);
-    $owa->trackPageView();
-   $owa->placeHelperPageTags();
-    }
-
-if ($opendiv)  {
-    echo '<div data-role="page"> 
- <script>
-$(document).ready(function ()
-{
-    document.title = "'.$pageTitle.'";
-});
-</script>
-	<div data-role="header"> 
-		<h1>'.$pageTitle.'</h1>
-	</div><!-- /header -->
-        <div data-role="content"> ';
-}
-}
-function include_footer()
-{
-    if ($geolocate && isset($_SESSION['lat'])) {
-        echo "<script>
-        $('#here').click(function(event) { $('#geolocate').val(doAJAXrequestForGeolocSessionHere()); return false;});
-$('#here').show();
-</script>";
-    }
-    echo '<div id="footer"><a href="about.php">About/Contact Us</a>&nbsp;<a href="feedback.php">Feedback/Bug Report</a></a>';
-    echo '</div>';
-}
-
-$service_periods = Array ('sunday','saturday','weekday');
-
-function service_period()
-{
-if (isset($_SESSION['service_period'])) return $_SESSION['service_period'];
-
-switch (date('w')){
-
-case 0:
-	return 'sunday';
-case 6:
-	return 'saturday';
-default:
-	return 'weekday';
-}	
-}
-
 function remove_spaces($string)
 {
-    return str_replace(' ','',$string);
+	return str_replace(' ', '', $string);
 }
-
-function midnight_seconds()
+function object2array($object)
 {
-// from http://www.perturb.org/display/Perlfunc__Seconds_Since_Midnight.html
-if (isset($_SESSION['time'])) {
-        $time = strtotime($_SESSION['time']);
-        return (date("G",$time) * 3600) + (date("i",$time) * 60) + date("s",$time);
-    }
-   return (date("G") * 3600) + (date("i") * 60) + date("s");
+	if (is_object($object)) {
+		foreach ($object as $key => $value) {
+			$array[$key] = $value;
+		}
+	}
+	else {
+		$array = $object;
+	}
+	return $array;
 }
-
-function midnight_seconds_to_time($seconds)
+function startsWith($haystack, $needle, $case = true)
 {
-if ($seconds > 0) {
-	$midnight = mktime (0, 0, 0, date("n"), date("j"), date("Y"));
-	return date("h:ia",$midnight+$seconds);
-} else {
-return "";
+	if ($case) {
+		return (strcmp(substr($haystack, 0, strlen($needle)) , $needle) === 0);
+	}
+	return (strcasecmp(substr($haystack, 0, strlen($needle)) , $needle) === 0);
 }
+function endsWith($haystack, $needle, $case = true)
+{
+	if ($case) {
+		return (strcmp(substr($haystack, strlen($haystack) - strlen($needle)) , $needle) === 0);
+	}
+	return (strcasecmp(substr($haystack, strlen($haystack) - strlen($needle)) , $needle) === 0);
 }
-function getPage($url)
+function bracketsMeanNewLine($input)
 {
-    debug($url);
-    $ch = curl_init($url);
-curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
-curl_setopt( $ch, CURLOPT_HEADER, 0 );
-          curl_setopt($ch,CURLOPT_TIMEOUT,30); 
-$page = curl_exec($ch);
- if(curl_errno($ch)) echo "<font color=red> Database temporarily unavailable: ".curl_errno($ch)." ".curl_error($ch)."</font>";
-curl_close($ch);
-return $page;
-}
-function array_flatten($a,$f=array()){
-  if(!$a||!is_array($a))return '';
-  foreach($a as $k=>$v){
-    if(is_array($v))$f=array_flatten($v,$f);
-    else $f[$k]=$v;
-  }
-  return $f;
-}
-
-function staticmap($mapPoints, $zoom = 0, $markerImage = "iconb")
-{
-$width = 300;
-$height = 300;
-$metersperpixel[9]=305.492*$width;
-$metersperpixel[10]=152.746*$width;
-$metersperpixel[11]=76.373*$width;
-$metersperpixel[12]=38.187*$width;
-$metersperpixel[13]=19.093*$width;
-$metersperpixel[14]=9.547*$width;
-$metersperpixel[15]=4.773*$width;
-$metersperpixel[16]=2.387*$width;
-// $metersperpixel[17]=1.193*$width;
-$center = "";
-$markers = "";
-$minlat = 999;
-$minlon = 999;
-$maxlat = 0;
-$maxlon = 0;
-
-    if (sizeof($mapPoints) < 1) return "map error";
-    if (sizeof($mapPoints) === 1) {
-         if ($zoom == 0) $zoom = 14;
-            $markers .= "{$mapPoints[0][0]},{$mapPoints[0][1]},$markerimage";
-            $center = "{$mapPoints[0][0]},{$mapPoints[0][1]}";        
-    } else {
-        foreach ($mapPoints as $index => $mapPoint) {
-            $markers .= $mapPoint[0].",".$mapPoint[1].",".$markerImage.($index+1);
-            if ($index+1 != sizeof($mapPoints)) $markers .= "|";
-            if ($mapPoint[0] < $minlat) $minlat = $mapPoint[0];
-            if ($mapPoint[0] > $maxlat) $maxlat = $mapPoint[0];
-            if ($mapPoint[1] < $minlon) $minlon = $mapPoint[1];
-            if ($mapPoint[1] > $maxlon) $maxlon = $mapPoint[1];
-            $totalLat += $mapPoint[0];
-            $totalLon += $mapPoint[1];
-        }
-        if ($zoom == 0) {
-            $mapwidthinmeters = distance($minlat,$minlon,$minlat,$maxlon);
-            foreach (array_reverse($metersperpixel,true) as $zoomLevel => $maxdistance)
-            {
-                if ($zoom == 0 && $mapwidthinmeters < ($maxdistance + 50)) $zoom = $zoomLevel;
-            }
-        }
-       $center = $totalLat/sizeof($mapPoints).",".$totalLon/sizeof($mapPoints);
-    }
-    $output = "";
-   if(basename($_SERVER['PHP_SELF']) != "tripPlanner.php") $output .= '<div data-role="collapsible" data-collapsed="true"><h3>Open Map...</h3>';
-    $output .= '<center><img src="staticmaplite/staticmap.php?center='.$center.'&zoom='.$zoom.'&size='.$width.'x'.$height.'&maptype=mapnik&markers='.$markers.'" width='.$width.' height='.$height.'></center>';
-   if(basename($_SERVER['PHP_SELF']) != "tripPlanner.php") $output .= '</div>';
-    return $output;
-}
-
-function distance($lat1, $lng1, $lat2, $lng2)
-{
-	$pi80 = M_PI / 180;
-	$lat1 *= $pi80;
-	$lng1 *= $pi80;
-	$lat2 *= $pi80;
-	$lng2 *= $pi80;
-
-	$r = 6372.797; // mean radius of Earth in km
-	$dlat = $lat2 - $lat1;
-	$dlng = $lng2 - $lng1;
-	$a = sin($dlat / 2) * sin($dlat / 2) + cos($lat1) * cos($lat2) * sin($dlng / 2) * sin($dlng / 2);
-	$c = 2 * atan2(sqrt($a), sqrt(1 - $a));
-	$km = $r * $c;
-
-	return $km * 1000;
-}
-
-function decodePolylineToArray($encoded)
-{
-// source: http://latlongeeks.com/forum/viewtopic.php?f=4&t=5
-  $length = strlen($encoded);
-  $index = 0;
-  $points = array();
-  $lat = 0;
-  $lng = 0;
-
-  while ($index < $length)
-  {
-    // Temporary variable to hold each ASCII byte.
-    $b = 0;
-
-    // The encoded polyline consists of a latitude value followed by a
-    // longitude value.  They should always come in pairs.  Read the
-    // latitude value first.
-    $shift = 0;
-    $result = 0;
-    do
-    {
-      // The `ord(substr($encoded, $index++))` statement returns the ASCII
-      //  code for the character at $index.  Subtract 63 to get the original
-      // value. (63 was added to ensure proper ASCII characters are displayed
-      // in the encoded polyline string, which is `human` readable)
-      $b = ord(substr($encoded, $index++)) - 63;
-
-      // AND the bits of the byte with 0x1f to get the original 5-bit `chunk.
-      // Then left shift the bits by the required amount, which increases
-      // by 5 bits each time.
-      // OR the value into $results, which sums up the individual 5-bit chunks
-      // into the original value.  Since the 5-bit chunks were reversed in
-      // order during encoding, reading them in this way ensures proper
-      // summation.
-      $result |= ($b & 0x1f) << $shift;
-      $shift += 5;
-    }
-    // Continue while the read byte is >= 0x20 since the last `chunk`
-    // was not OR'd with 0x20 during the conversion process. (Signals the end)
-    while ($b >= 0x20);
-
-    // Check if negative, and convert. (All negative values have the last bit
-    // set)
-    $dlat = (($result & 1) ? ~($result >> 1) : ($result >> 1));
-
-    // Compute actual latitude since value is offset from previous value.
-    $lat += $dlat;
-
-    // The next values will correspond to the longitude for this point.
-    $shift = 0;
-    $result = 0;
-    do
-    {
-      $b = ord(substr($encoded, $index++)) - 63;
-      $result |= ($b & 0x1f) << $shift;
-      $shift += 5;
-    }
-    while ($b >= 0x20);
-
-    $dlng = (($result & 1) ? ~($result >> 1) : ($result >> 1));
-    $lng += $dlng;
-
-    // The actual latitude and longitude values were multiplied by
-    // 1e5 before encoding so that they could be converted to a 32-bit
-    // integer representation. (With a decimal accuracy of 5 places)
-    // Convert back to original values.
-    $points[] = array($lat * 1e-5, $lng * 1e-5);
-  }
-
-  return $points;
-}
-
-function object2array($object) {
-    if (is_object($object)) {
-        foreach ($object as $key => $value) {
-            $array[$key] = $value;
-        }
-    }
-    else {
-        $array = $object;
-    }
-    return $array;
-}
-
-function geocode($query, $giveOptions) {
-    global $cloudmadeAPIkey;
-       $url = "http://geocoding.cloudmade.com/$cloudmadeAPIkey/geocoding/v2/find.js?query=".$query."&bbox=-35.5,149.00,-35.15,149.1930&return_location=true&bbox_only=true";
-      $contents = json_decode(getPage($url));
-      if ($giveOptions) return $contents->features;
-      elseif (isset($contents->features[0]->centroid)) return $contents->features[0]->centroid->coordinates[0].",".$contents->features[0]->centroid->coordinates[1];
-      else return "";
-}
-
-function reverseGeocode($lat,$lng) {
-    global $cloudmadeAPIkey;
-       $url = "http://geocoding.cloudmade.com/$cloudmadeAPIkey/geocoding/v2/find.js?around=".$lat.",".$lng."&distance=closest&object_type=road";
-      $contents = json_decode(getPage($url));
-      return $contents->features[0]->properties->name;
-}
-
-function startsWith($haystack,$needle,$case=true) {
-    if($case){return (strcmp(substr($haystack, 0, strlen($needle)),$needle)===0);}
-    return (strcasecmp(substr($haystack, 0, strlen($needle)),$needle)===0);
-}
-
-function endsWith($haystack,$needle,$case=true) {
-    if($case){return (strcmp(substr($haystack, strlen($haystack) - strlen($needle)),$needle)===0);}
-    return (strcasecmp(substr($haystack, strlen($haystack) - strlen($needle)),$needle)===0);
-}
-function bracketsMeanNewLine($input) {
-    return str_replace(")","</small>",str_replace("(","<br><small>",$input));
-}
-
-function viaPoints($tripid,$stopid, $timingPointsOnly = false) {
-    global $APIurl;
-    $url = $APIurl."/json/tripstoptimes?trip=".$tripid;
-
-$json = json_decode(getPage($url));
-debug(print_r($json,true));
-$stops = $json[0];
-$times = $json[1];
-$foundStop = false;
-$viaPoints = Array();
-foreach ($stops as $key => $row)
-{
-    if ($foundStop) {
-        if (!$timingPointsOnly || !startsWith($row[5],"Wj") ) {
-            $viaPoints[] = Array("id" => $row[0], "name" => $row[1], "time" => $times[$key]);
-        }
-    } else {
-        if ($row[0] == $stopid) $foundStop = true;
-    }
-}
-    return $viaPoints;
-}
-
-function viaPointNames($tripid,$stopid) {
-    $points = viaPoints($tripid,$stopid,true);
-    $pointNames = Array();
-    foreach ($points as $point) {
-        $pointNames[] = $point['name'];
-    }
-    return implode(", ",$pointNames);
-}
-
-function timePlaceSettings($geolocate = false) {
-    global $service_periods;
-    $geoerror = false;
-    if ($geolocate == true) {
-       $geoerror = !isset($_SESSION['lat']) || !isset($_SESSION['lat'])
-       || $_SESSION['lat'] == "" || $_SESSION['lon'] == "";
-    }
-    if ($geoerror) {
-        echo '<div class="error">Sorry, but your location could not currently be detected.
-        Please allow location permission, wait for your location to be detected,
-        or enter an address/co-ordinates in the box below.</div>';
-    }
-    echo '<div data-role="collapsible" data-collapsed="'.!$geoerror.'">
-        <h3>Change Time/Place...</h3>
-        <form action="" method="post">
-        <div class="ui-body"> 
-		<div data-role="fieldcontain">
-	            <label for="geolocate"> Current Location: </label>
-			<input type="text" id="geolocate" name="geolocate" value="Enter co-ordinates or address here"/> <a href="#" style="display:none" name="here" id="here"/>Here?</a>
-	        </div>
-    		<div data-role="fieldcontain">
-		        <label for="time"> Time: </label>
-		    	<input type="time" name="time" id="time" value="'. ($_SESSION['time'] ? $_SESSION['time'] : date("H:m")).'"/> <a href="#" name="currentTime" id="currentTime"/>Current Time?</a>
-	        </div>
-		<div data-role="fieldcontain">
-		    <label for="service_period"> Service Period:  </label>
-			<select name="service_period">';
-
-			   foreach ($service_periods as $service_period) {
-			    echo "<option value=\"$service_period\"".(service_period() === $service_period ? "SELECTED" : "").'>'.ucwords($service_period).'</option>';
-			   }
-			echo '</select>
-			<a href="#" style="display:none" name="currentPeriod" id="currentPeriod"/>Current Period?</a>
-		</div>
-		
-		<input type="submit" value="Update"/>
-                </form>
-            </div></div>';
+	return str_replace(")", "</small>", str_replace("(", "<br><small>", $input));
 }
 ?>
 

 Binary files a/css/images/113-navigation.png and b/css/images/113-navigation.png differ
 Binary files a/css/images/ajax-loader.png and b/css/images/ajax-loader.png differ
 Binary files a/css/images/form-check-off.png and b/css/images/form-check-off.png differ
 Binary files a/css/images/form-check-on.png and b/css/images/form-check-on.png differ
 Binary files a/css/images/form-radio-off.png and b/css/images/form-radio-off.png differ
 Binary files a/css/images/form-radio-on.png and b/css/images/form-radio-on.png differ
 Binary files a/css/images/icon-search-black.png and b/css/images/icon-search-black.png differ
 Binary files a/css/images/icons-18-black.png and b/css/images/icons-18-black.png differ
 Binary files a/css/images/icons-18-white.png and b/css/images/icons-18-white.png differ
 Binary files a/css/images/icons-36-black.png and b/css/images/icons-36-black.png differ
 Binary files a/css/images/icons-36-white.png and b/css/images/icons-36-white.png differ
 Binary files /dev/null and b/css/images/time.png differ
--- a/css/jquery-mobile-1.0a3.css
+++ b/css/jquery-mobile-1.0a3.css

--- a/css/jquery.ui.datepicker.mobile.css
+++ b/css/jquery.ui.datepicker.mobile.css

--- a/feedback.php
+++ b/feedback.php
@@ -1,18 +1,51 @@
 <?php
-include('common.inc.php');
-include_header("Feedback","feedback")
+include ('common.inc.php');
+include_header("Feedback", "feedback");
+function sendEmail($topic, $message)
+{
+	$address = "maxious@lambdacomplex.org";
+	if (file_exists("/tmp/aws.php")) {
+		include_once ('ses.php');
+		include_once ("/tmp/aws.php");
+		$con = new SimpleEmailService($accessKey, $secretKey);
+		//$con->verifyEmailAddress($address);
+		//$con->listVerifiedEmailAddresses();
+		$m = new SimpleEmailServiceMessage();
+		$m->addTo($address);
+		$m->setFrom($address);
+		$m->setSubject($topic);
+		$m->setMessageFromString($message);
+		$con->sendEmail($m);
+	}
+	else {
+		// In case any of our lines are larger than 70 characters, we should use wordwrap()
+		$message = wordwrap($message, 70);
+		// Send
+		mail($address, $topic, $message);
+	}
+}
 ?>
 <h3>Add/Move/Delete a Bus Stop Location</h3>
 StopID:
 or StopCode:
+<small> if you click on feedback from a stop page, these will get filled in automatically. else describe the location/street of the stop <input type="text" name="stoplocation" /> </small>
 
 Suggested Stop Location (lat/long or words):
+<small> if your device supports javascript, you can pick a location from the map above</small>
+
+Submit!
 
 <h3>Bug Report/Feedback</h3>
+Please leave feedback about bugs/errors or general suggestions about improvements that could be made to the way the data is presented!
+<textarea id="feedback">
+</textarea>
 <textarea id="extrainfo">
     Referrer URL
     User Agent
     User host/IP
+    Server host/IP
     Current date/time
     Dump of $_SESSION
 </textarea>
+
+Submit!

file:a/index.php -> file:b/index.php
--- a/index.php
+++ b/index.php
@@ -1,13 +1,13 @@
-<?php 
-include('common.inc.php');
-include_header("bus.lambdacomplex.org","index",false, true)
+<?php
+include ('common.inc.php');
+include_header("bus.lambdacomplex.org", "index", false, true)
 ?>
 <div data-role="page">
 	<div data-role="content">
 			<div id="jqm-homeheader">
 	    	<center><h3>busness time</h3><br><small>Canberra Bus Timetables and Trip Planner</small></center>
 	</div> 
-	    <a href="tripPlanner.php" data-role="button">Launch Trip Planner...</a>
+	    <a href="tripPlanner.php" data-role="button" data-icon="navigation">Launch Trip Planner...</a>
             <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b">
                 <li data-role="list-divider">Timetables - Stops</li>
                 <li><a href="stopList.php">Major (Timing Point) Stops</a></li>

--- a/js/jQuery.ui.datepicker.js
+++ b/js/jQuery.ui.datepicker.js

--- a/js/jquery-1.5.js
+++ b/js/jquery-1.5.js

--- a/js/jquery-mobile-1.0a3.js
+++ b/js/jquery-mobile-1.0a3.js

--- a/js/jquery.effects.core.js
+++ b/js/jquery.effects.core.js

--- a/js/jquery.ui.autocomplete.js
+++ b/js/jquery.ui.autocomplete.js

--- a/js/jquery.ui.datepicker.mobile.js
+++ b/js/jquery.ui.datepicker.mobile.js

--- a/js/jquery.ui.position.js
+++ b/js/jquery.ui.position.js

--- a/js/jquery.ui.widget.js
+++ b/js/jquery.ui.widget.js

--- a/layar_api.php
+++ b/layar_api.php
@@ -1,58 +1,66 @@
 <?php
-include('common.inc.php');
+include ('common.inc.php');
 $output = Array();
 $output['hotspots'] = Array();
 $output['layer'] = "canberrabusstops";
-
 $max_page = 10;
 $max_results = 50;
-$page_start = 0+$_REQUEST['pageKey'];
-$page_end = $max_page+$_REQUEST['pageKey'];
-
-$url = $APIurl."/json/neareststops?lat={$_REQUEST['lat']}&lon={$_REQUEST['lon']}&limit=50";
+$page_start = 0 + filter_var($_REQUEST['pageKey'], FILTER_SANITIZE_NUMBER_INT);
+$page_end = $max_page + filter_var($_REQUEST['pageKey'], FILTER_SANITIZE_NUMBER_INT);
+$lat = filter_var($_REQUEST['lat'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
+$lon = filter_var($_REQUEST['lon'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
+$url = $APIurl . "/json/neareststops?lat=$lat&lon=$lon&limit=50";
 $contents = json_decode(getPage($url));
-debug(print_r($contents,true));
+debug(print_r($contents, true));
 $stopNum = 0;
-foreach ($contents as $row)
-{
-    $stopNum++;
-    if ($stopNum > $page_start && $stopNum <= $page_end) {
-        $hotspot = Array();
-        $hotspot['id'] = $row[0];
-        $hotspot['title'] = $row[1];
-        $hotspot['type'] = 0;
-        $hotspot['lat'] = floor($row[2]*1000000);
-        $hotspot['lon'] = floor($row[3]*1000000);
-        $hotspot['distance'] = distance($row[2], $row[3], $_REQUEST['lat'], $_REQUEST['lon']);
-        if (!isset($_REQUEST['radius']) || $hotspot['distance'] < $_REQUEST['radius']) {
-            $hotspot['actions'] = Array(Array("label" => 'View more trips/information', 'uri' => 'http://bus.lambdacomplex.org/'.'stop.php?stopid='.$row[0]));
-            $url = $APIurl."/json/stoptrips?stop=".$row[0]."&time=".midnight_seconds()."&service_period=".service_period();
-            $trips = json_decode(getPage($url));
-            debug(print_r($trips,true));
-            foreach ($trips as $key => $row)
-            {
-                if ($key < 3) {
-                    $hotspot['line'.strval($key+2)]= $row[1][1] .' @ ' .midnight_seconds_to_time($row[0]);
-                }
-            }
-            if (sizeof($trips) == 0) $hotspot['line2'] = 'No trips in the near future.';
-            $output['hotspots'][] = $hotspot;
-        }
-    }
+foreach ($contents as $row) {
+    
+	$stopNum++;
+	if ($stopNum > $page_start && $stopNum <= $page_end) {
+            
+		$hotspot = Array();
+		$hotspot['id'] = $row[0];
+		$hotspot['title'] = $row[1];
+		$hotspot['type'] = 0;
+		$hotspot['lat'] = floor($row[2] * 1000000);
+		$hotspot['lon'] = floor($row[3] * 1000000);
+		$hotspot['distance'] = distance($row[2], $row[3], $_REQUEST['lat'], $_REQUEST['lon']);
+		if (!isset($_REQUEST['radius']) || $hotspot['distance'] < $radius) {
+                    
+			$hotspot['actions'] = Array(
+				Array(
+					"label" => 'View more trips/information',
+					'uri' => 'http://bus.lambdacomplex.org/' . 'stop.php?stopid=' . $row[0]
+				)
+			);
+			$url = $APIurl . "/json/stoptrips?stop=" . $row[0] . "&time=" . midnight_seconds() . "&service_period=" . service_period() . "&limit=4&time_range=" . strval(90 * 60);
+			$trips = json_decode(getPage($url));
+			debug(print_r($trips, true));
+			foreach ($trips as $key => $row) {
+				if ($key < 3) {
+					$hotspot['line' . strval($key + 2) ] = $row[1][1] . ' @ ' . midnight_seconds_to_time($row[0]);
+				}
+			}
+			if (sizeof($trips) == 0) $hotspot['line2'] = 'No trips in the near future.';
+			$output['hotspots'][] = $hotspot;
+		}
+	}
 }
 if (sizeof($hotspot) > 0) {
-    $output['errorString'] = 'ok';
-    $output['errorCode'] = 0;
-    } else {
-    $output['errorString'] = 'no results, try increasing range';
-    $output['errorCode'] = 21;
+	$output['errorString'] = 'ok';
+	$output['errorCode'] = 0;
+}
+else {
+	$output['errorString'] = 'no results, try increasing range';
+	$output['errorCode'] = 21;
 }
 if ($page_end >= $max_results || sizeof($hotspot) < $max_page) {
- $output["morePages"] = false;
- $output["nextPageKey"] = null;
-} else {
- $output["morePages"] = true;
- $output["nextPageKey"] = $page_end;    
+	$output["morePages"] = false;
+	$output["nextPageKey"] = null;
+}
+else {
+	$output["morePages"] = true;
+	$output["nextPageKey"] = $page_end;
 }
 echo json_encode($output);
 ?>

--- /dev/null
+++ b/myway_api.json.php
@@ -1,1 +1,125 @@
+<?php
+function cleanString($subject)
+{
+	$subject = str_replace("&nbsp;", " ", $subject);
+	$subject = str_replace("&", "&amp;", $subject);
+	$subject = preg_replace('/[^\r\n\t\x20-\x7E\xA0-\xFF]/', '', $subject);
+	$subject = str_replace("  ", " ", $subject);
+	return trim($subject);
+}
+$return = Array();
+/*if (file_exists("mywayresponse.txt")) {
+	@$fh = fopen("mywayresponse.txt", 'r');
+	if ($fh) {
+		$pageHTML = fread($fh, filesize("mywayresponse.txt"));
+		fclose($fh);
+	}
+}*/
+//set POST variables
+$url = 'https://www.action.act.gov.au/ARTS/use_Funcs.asp';
+$field_mapping = Array(
+	"card_number" => "SRNO",
+	"DOBmonth" => "month",
+	"DOBday" => "day",
+	"DOByear" => "year",
+	"secret_answer" => "pwrd",
+	"button" => "button"
+);
+foreach (Array(
+	"card_number",
+	"DOBday",
+	"DOBmonth",
+	"DOByear"
+) as $field_name) {
+	if (isset($_REQUEST[$field_name])) {
+		$fields[$field_name] = filter_var($_REQUEST[$field_name], FILTER_SANITIZE_NUMBER_INT);
+	}
+	else {
+		$return["error"][] = $field_name. " parameter invalid or unspecified";
+	}
+}
+if (isset($_REQUEST['secret_answer'])) {
+	$fields['secret_answer'] = filter_var($_REQUEST['secret_answer'], FILTER_SANITIZE_STRING, Array(
+		FILTER_FLAG_NO_ENCODE_QUOTES,
+		FILTER_FLAG_STRIP_HIGH,
+		FILTER_FLAG_STRIP_LOW
+	));
+}
+else {
+	$return["error"][] = "secret_answer parameter invalid or unspecified";
+}
+$fields['button'] = 'Submit';
+$fields_string = "";
+//url-ify the data for the POST
+foreach ($fields as $key => $value) {
+	if (sizeof($value) === 0) $return['error'][] = $key . " parameter invalid or unspecified";
+	$fields_string.= $field_mapping[$key] . '=' . $value . '&';
+}
+$fields_string = rtrim($fields_string, '&');
+if (!isset($return['error'])) {
+	//open connection
+	$ch = curl_init();
+	//set the url, number of POST vars, POST data
+	curl_setopt($ch, CURLOPT_URL, $url);
+	curl_setopt($ch, CURLOPT_POST, count($fields));
+	curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
+	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+	curl_setopt($ch, CURLOPT_HEADER, 0);
+	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
+	//execute post
+	$pageHTML = curl_exec($ch);
+	if (curl_errno($ch)) $return["error"][] = "Network error " . curl_errno($ch) . " " . curl_error($ch) . " " . $url . $fields_string;
+	//close connection
+	curl_close($ch);
+}
 
+if (!isset($return['error'])) {
+	include_once ('simple_html_dom.php');
+	$page = str_get_html($pageHTML);
+	$pageAlerts = $page->find(".smartCardAlert");
+	if (sizeof($pageAlerts) > 0) {
+		$return['error'][] = $pageAlerts[0]->plaintext;
+	}
+	if (!isset($return['error'])) {
+		$tableNum = 0;
+		$tableName = Array(
+			1 => "myway_carddetails",
+			2 => "myway_transactions"
+		);
+		foreach ($page->find("table") as $table) {
+			$tableNum++;
+			$tableColumns = Array();
+			$tableColumnNum = 0;
+			foreach ($table->find("th") as $th) {
+				$tableColumns[$tableColumnNum] = cleanString($th->plaintext);
+				$tableColumnNum++;
+			}
+			$tableRowNum = 0;
+			foreach ($table->find("tr") as $tr) {
+				$tableColumnNum = 0;
+				foreach ($tr->find("td") as $td) {
+					if ($tableNum == 1) $return[$tableName[$tableNum]][$tableColumns[$tableColumnNum]] = cleanString($td->plaintext);
+					else $return[$tableName[$tableNum]][$tableRowNum][$tableColumns[$tableColumnNum]] = cleanString($td->plaintext);
+					$tableColumnNum++;
+				}
+				$tableRowNum++;
+			}
+		}
+	}
+}
+if (sizeof($return) == 0) {
+$return['error'][] = "No data extracted from MyWay website - API may be out of date";
+}
+
+header('Content-Type: text/javascript; charset=utf8');
+// header('Access-Control-Allow-Origin: http://bus.lambdacomplex.org/');
+header('Access-Control-Max-Age: 3628800');
+header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
+if (isset($_GET['callback'])) {
+	$json = '(' . json_encode($return) . ');'; //must wrap in parens and end with semicolon
+	print_r($_GET['callback'] . $json); //callback is prepended for json-p
+	
+}
+else echo json_encode($return);
+?>
+

file:b/mywaybalance.php (new)
--- /dev/null
+++ b/mywaybalance.php
@@ -1,1 +1,63 @@
-
+<?php
+include ('common.inc.php');
+include_header("MyWay Balance", "mywayBalance");
+$return = Array();
+function printBalance($cardNumber, $date, $pwrd)
+{
+	global $return;
+	$return = json_decode(getPage(curPageURL() . "/myway_api.json.php?card_number=$cardNumber&DOBday={$date[0]}&DOBmonth={$date[1]}&DOByear={$date[2]}&secret_answer=$pwrd"), true);
+    
+        if (isset($return['error'])) {
+            echo "<font color=red>" . var_dump($return['error']) . "</font>";
+        } else {
+		echo "<h2>Balance: " . $return['myway_carddetails']['Card Balance'] . "</h2>";
+		echo '<ul data-role="listview" data-inset="true"><li data-role="list-divider"> Recent Transactions </li>';
+		foreach ($return['myway_transactions'] as $transaction) {
+			echo "<li><b>" . $transaction["Date / Time"] . "</b>";
+                        echo "<br><small>" . $transaction["TX Reference No / Type"]. "</small>";
+                        echo '<p class="ui-li-aside">'.$transaction["TX Amount"].'</p>';
+			echo "</li>";
+		}
+		echo "</ul>";
+	}
+}
+if (isset($_REQUEST['card_number']) && isset($_REQUEST['date']) && isset($_REQUEST['secret_answer'])) {
+	$cardNumber = $_REQUEST['card_number'];
+	$date = explode("/", $_REQUEST['date']);
+	$pwrd = $_REQUEST['secret_answer'];
+	if ($_REQUEST['remember'] == true) {
+		$_COOKIE['card_number'] = $cardNumber;
+		$_COOKIE['date'] = $date;
+		$_COOKIE['secret_answer'] = $pwrd;
+	}
+	printBalance($cardNumber, $date, $pwrd);
+}
+else if (isset($_COOKIE['card_number']) && isset($_COOKIE['date']) && isset($_COOKIE['secret_answer'])) {
+	$cardNumber = $_COOKIE['card_number'];
+	$date = explode("/", $_COOKIE['date']);
+	$pwrd = $_COOKIE['secret_answer'];
+	printBalance($cardNumber, $date, $pwrd);
+}
+else {
+	$date = (isset($_REQUEST['date']) ? filter_var($_REQUEST['date'], FILTER_SANITIZE_STRING) : date("m/d/Y"));
+	echo '<form action="" method="post">
+    <div data-role="fieldcontain">
+        <label for="card_number">Card number</label>
+        <input type="text" name="card_number" id="card_number" value="' . $card_number . '"  />
+    </div>
+    <div data-role="fieldcontain">
+        <label for="date"> Date of birth </label>
+        <input type="text" name="date" id="date" value="' . $date . '"  />
+    </div>
+        <div data-role="fieldcontain">
+        <label for="secret_answer"> Secret question answer </label>
+        <input type="text" name="secret_answer" id="secret_answer" value="' . $secret_answer . '"  />
+    </div>
+        <div data-role="fieldcontain">
+        <label for="remember"> Remember these details? </label>
+        <input type="checkbox" name="remember" id="remember"  checked="yes"  />
+    </div>
+        <input type="submit" value="Go!"></form>';
+}
+include_footer();
+?>

--- a/routeList.php
+++ b/routeList.php
@@ -1,7 +1,7 @@
 <?php
-include('common.inc.php');
-include_header("Routes","routeList");
-echo'
+include ('common.inc.php');
+include_header("Routes", "routeList");
+echo '
 		<div data-role="navbar"> 
 			<ul> 
 				<li><a href="routeList.php">By Final Destination...</a></li> 
@@ -12,80 +12,72 @@
                 </div>
 	';
 echo '  <ul data-role="listview"  data-inset="true">';
-$url = $APIurl."/json/routes";
+$url = $APIurl . "/json/routes";
 $contents = json_decode(getPage($url));
-debug(print_r($contents,true));
-
-function printRoutes($routes){
-	foreach($routes as $row) {
-				echo  '<li>'.$row[1].' <a href="trip.php?routeid='.$row[0].'">'.$row[2]." (".ucwords($row[3]).")</a></li>\n";
-			}
+function printRoutes($routes)
+{
+	foreach ($routes as $row) {
+		echo '<li>' . $row[1] . ' <a href="trip.php?routeid=' . $row[0] . '">' . $row[2] . " (" . ucwords($row[3]) . ")</a></li>\n";
+	}
 }
-
 if ($_REQUEST['bynumber']) {
 	$routeSeries = Array();
 	$seriesRange = Array();
 	foreach ($contents as $key => $row) {
-		foreach (explode(" ",$row[1]) as $routeNumber ) {
-			$seriesNum = substr($routeNumber, 0, -1)."0";
+		foreach (explode(" ", $row[1]) as $routeNumber) {
+			$seriesNum = substr($routeNumber, 0, -1) . "0";
 			if ($seriesNum == "0") $seriesNum = $routeNumber;
-			$finalDigit = substr($routeNumber, sizeof($routeNumber)-1, 1);
+			$finalDigit = substr($routeNumber, sizeof($routeNumber) - 1, 1);
 			if (isset($seriesRange[$seriesNum])) {
-				if ($finalDigit < $seriesRange[$seriesNum]['max'])
-					$seriesRange[$seriesNum]['max'] = $routeNumber;
-				if ($finalDigit > $seriesRange[$seriesNum]['min'])
-					$seriesRange[$seriesNum]['min'] = $routeNumber;
-			} else {
+				if ($finalDigit < $seriesRange[$seriesNum]['max']) $seriesRange[$seriesNum]['max'] = $routeNumber;
+				if ($finalDigit > $seriesRange[$seriesNum]['min']) $seriesRange[$seriesNum]['min'] = $routeNumber;
+			}
+			else {
 				$seriesRange[$seriesNum]['max'] = $routeNumber;
 				$seriesRange[$seriesNum]['min'] = $routeNumber;
 			}
-			$routeSeries[$seriesNum][$seriesNum."-".$row[1]."-".$row[0]]  = $row;
+			$routeSeries[$seriesNum][$seriesNum . "-" . $row[1] . "-" . $row[0]] = $row;
 		}
 	}
 	ksort($routeSeries);
 	ksort($seriesRange);
-		echo '<div class="noscriptnav"> Go to route numbers: ';
-		foreach ($seriesRange as $series => $range) 
-		{
-		  if ($range['min'] == $range['max']) echo "<a href=\"#$series\">$series</a>&nbsp;"; 
-		  else  echo "<a href=\"#$series\">{$range['min']}-{$range['max']}</a>&nbsp;"; 
-		}
-		echo "</div>
+	echo '<div class="noscriptnav"> Go to route numbers: ';
+	foreach ($seriesRange as $series => $range) {
+		if ($range['min'] == $range['max']) echo "<a href=\"#$series\">$series</a>&nbsp;";
+		else echo "<a href=\"#$series\">{$range['min']}-{$range['max']}</a>&nbsp;";
+	}
+	echo "</div>
 			<script>
 		$('.noscriptnav').hide();
 			</script>";
-	foreach ($routeSeries as $series => $routes)
-	{
-		echo '<a name="'.$series.'"></a>';
-		if ($series <= 9) echo '<li>'.$series."<ul>\n";
+	foreach ($routeSeries as $series => $routes) {
+		echo '<a name="' . $series . '"></a>';
+		if ($series <= 9) echo '<li>' . $series . "<ul>\n";
 		else echo "<li>{$seriesRange[$series]['min']}-{$seriesRange[$series]['max']}<ul>\n";
-			printRoutes($routes);
+		printRoutes($routes);
 		echo "</ul></li>\n";
 	}
-} else {
+}
+else {
 	foreach ($contents as $key => $row) {
-	    $routeDestinations[$row[2]][]  = $row;
+		$routeDestinations[$row[2]][] = $row;
 	}
 	echo '<div class="noscriptnav"> Go to Destination: ';
-		foreach(ksort($routeDestinations) as $destination => $routes) 
-		{ 
-		   echo "<a href=\"#$destination\">$destination</a>&nbsp;"; 
-		}
-		echo "</div>
+	foreach (ksort($routeDestinations) as $destination => $routes) {
+		echo "<a href=\"#$destination\">$destination</a>&nbsp;";
+	}
+	echo "</div>
 			<script>
 		$('.noscriptnav').hide();
 			</script>";
-	foreach ($routeDestinations as $destination => $routes)
-	{
-		echo '<a name="'.$destination.'"></a>';
-		echo '<li>'.$destination."... <ul>\n";
+	foreach ($routeDestinations as $destination => $routes) {
+		echo '<a name="' . $destination . '"></a>';
+		echo '<li>' . $destination . "... <ul>\n";
 		printRoutes($routes);
 		echo "</ul></li>\n";
 	}
 }
 echo "</ul>\n";
-
-
 include_footer();
 ?>
 

--- a/schedule_viewer.py
+++ b/schedule_viewer.py
@@ -32,6 +32,7 @@
 import simplejson
 import socket
 import time
+import datetime
 import transitfeed
 from transitfeed import util
 import urllib
@@ -95,6 +96,8 @@
           float(stop.stop_lon), stop.location_type, stop.stop_code, stop.zone_id)
 
 class ScheduleRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
+  cache = {}
+  
   def do_GET(self):
     scheme, host, path, x, params, fragment = urlparse.urlparse(self.path)
     parsed_params = {}
@@ -114,7 +117,7 @@
       handler_name = 'handle_json_GET_%s' % m.group(1)
       handler = getattr(self, handler_name, None)
       if callable(handler):
-        return self.handle_json_wrapper_GET(handler, parsed_params)
+        return self.handle_json_wrapper_GET(handler, parsed_params, handler_name)
 
     # Restrict allowable file names to prevent relative path attacks etc
     m = re.match(r'/file/([a-z0-9_-]{1,64}\.?[a-z0-9_-]{1,64})$', path)
@@ -243,11 +246,22 @@
     patterns.sort()
     return patterns
 
-  def handle_json_wrapper_GET(self, handler, parsed_params):
+  def handle_json_wrapper_GET(self, handler, parsed_params, handler_name):
     """Call handler and output the return value in JSON."""
     schedule = self.server.schedule
-    result = handler(parsed_params)
-    content = ResultEncoder().encode(result)
+    # round times to nearest 100 seconds
+    if "time" in parsed_params:
+      parsed_params['time'] = int(round(float(parsed_params['time']),-2))
+    paramkey = tuple(sorted(parsed_params.items()))
+    if handler_name in self.cache and paramkey in self.cache[handler_name] :
+      print ("Cache hit for ",handler_name," params ",parsed_params)
+    else:
+      print ("Cache miss for ",handler_name," params ",parsed_params)
+      result = handler(parsed_params)
+      if not handler_name in self.cache:
+        self.cache[handler_name] = {}
+      self.cache[handler_name][paramkey] = ResultEncoder().encode(result)
+    content = self.cache[handler_name][paramkey]
     self.send_response(200)
     self.send_header('Content-Type', 'text/plain')
     self.send_header('Content-Length', str(len(content)))
@@ -272,7 +286,7 @@
     schedule = self.server.schedule
     route = schedule.GetRoute(params.get('route', None))
     return [transitfeed.Route._FIELD_NAMES, route.GetFieldValuesTuple()]
-    
+  
   def handle_json_GET_routetrips(self, params):
     """ Get a trip for a route_id (preferablly the next one) """
     schedule = self.server.schedule
@@ -280,7 +294,12 @@
     result = []
     for t in schedule.GetTripList():
       if t.route_id == query:
-        result.append ( (t.GetStartTime(), t.trip_id) )
+        try:
+          starttime = t.GetStartTime()  
+        except:
+          print "Error for GetStartTime of trip #" + t.trip_id + sys.exc_info()[0]
+        else:
+            result.append ( (starttime, t.trip_id) )
     return sorted(result, key=lambda trip: trip[0])
   
   def handle_json_GET_triprows(self, params):
@@ -330,14 +349,54 @@
         points.append((stop.stop_lat, stop.stop_lon))
     return points
 
+#
+# GeoPo Encode in Python
+# @author : Shintaro Inagaki
+# @param location (Dictionary) [lat (Float), lng (Float), scale(Int)]
+# @return geopo (String)
+#
+     
   def handle_json_GET_neareststops(self, params):
     """Return a list of the nearest 'limit' stops to 'lat', 'lon'"""
     schedule = self.server.schedule
     lat = float(params.get('lat'))
     lon = float(params.get('lon'))
-    limit = int(params.get('limit'))
-    stops = schedule.GetNearestStops(lat=lat, lon=lon, n=limit)
-    return [StopToTuple(s) for s in stops]
+    limit = int(params.get('limit',5))
+    scale = int(params.get('scale',5)) # 5 = neighbourhood ~ 1km, 4= town 5 by 7km
+    stops = []
+    
+    # 64characters (number + big and small letter + hyphen + underscore)
+    chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"
+
+    geopo = ""
+
+    # Change a degree measure to a decimal number
+    lat = (lat + 90.0) / 180 * 8 ** 10 # 90.0 is forced FLOAT type when lat is INT
+    lon = (lon + 180.0) / 360 * 8 ** 10 # 180.0 is same
+
+       # Compute a GeoPo code from head and concatenate
+    for i in range(scale):
+            order = int(lat / (8 ** (9 - i)) % 8) + int(lon / (8 ** (9 - i)) % 8) * 8
+            geopo = geopo + chars[order]
+
+    
+    for s in schedule.GetStopList():
+      if s.stop_code.find(geopo) != -1:
+        stops.append(s)
+        
+    if scale == 5:
+      return [StopToTuple(s) for s in stops]
+    else:
+      dist_stop_list = []
+      for s in stops:
+      # TODO: Use util.ApproximateDistanceBetweenStops?
+        dist = (s.stop_lat - lat)**2 + (s.stop_lon - lon)**2
+        if len(dist_stop_list) < limit:
+          bisect.insort(dist_stop_list, (dist, s))
+        elif dist < dist_stop_list[-1][0]:
+          bisect.insort(dist_stop_list, (dist, s))
+          dist_stop_list.pop()  # Remove stop with greatest distance
+      return [StopToTuple(s) for dist, s in dist_stop_list]
 
   def handle_json_GET_boundboxstops(self, params):
     """Return a list of up to 'limit' stops within bounding box with 'n','e'
@@ -407,22 +466,71 @@
       if s.stop_id.lower() == query:
         return StopToTuple(s)
     return []
+  def handle_json_GET_stoproutes(self, params):
+    """Given a stop_id return all routes to visit the stop."""
+    schedule = self.server.schedule
+    stop = schedule.GetStop(params.get('stop', None))
+    service_period = params.get('service_period', None)
+    trips = stop.GetTrips(schedule)
+    result = {}
+    for trip in trips:
+      route = schedule.GetRoute(trip.route_id)
+      if not trip.route_short_name+route.route_long_name in result:
+        result[trip.route_short_name+route.route_long_name] = (route.route_id, route.route_short_name, route.route_long_name, trip.trip_id)
+    return result
+    
+  def handle_json_GET_stopalltrips(self, params):
+    """Given a stop_id return all trips to visit the stop."""
+    schedule = self.server.schedule
+    stop = schedule.GetStop(params.get('stop', None))
+    service_period = params.get('service_period', None)
+    time_trips = stop.GetStopTimeTrips(schedule)
+    result = []
+    for time, (trip, index), tp in time_trips:
+      headsign = None
+      # Find the most recent headsign from the StopTime objects
+      for stoptime in trip.GetStopTimes()[index::-1]:
+        if stoptime.stop_headsign:
+          headsign = stoptime.stop_headsign
+          break
+      # If stop_headsign isn't found, look for a trip_headsign
+      if not headsign:
+        headsign = trip.trip_headsign
+      route = schedule.GetRoute(trip.route_id)
+      trip_name = ''
+      if route.route_short_name:
+        trip_name += route.route_short_name
+      if route.route_long_name:
+        if len(trip_name):
+          trip_name += " - "
+        trip_name += route.route_long_name
+      if service_period == None or trip.service_id == service_period:
+        result.append((time, (trip.trip_id, trip_name, trip.service_id), tp))
+    return result
 
   def handle_json_GET_stoptrips(self, params):
     """Given a stop_id and time in seconds since midnight return the next
     trips to visit the stop."""
     schedule = self.server.schedule
     stop = schedule.GetStop(params.get('stop', None))
-    time = int(params.get('time', 0))
+    requested_time = int(params.get('time', 0))
+    limit = int(params.get('limit', 15))
     service_period = params.get('service_period', None)
-    time_trips = stop.GetStopTimeTrips(schedule)
-    time_trips.sort()  # OPT: use bisect.insort to make this O(N*ln(N)) -> O(N)
-    # Keep the first 15 after param 'time'.
-    # Need make a tuple to find correct bisect point
-    time_trips = time_trips[bisect.bisect_left(time_trips, (time, 0)):]
-    time_trips = time_trips[:15]
+    time_range = int(params.get('time_range', 24*60*60))
+    
+    
+    filtered_time_trips = []
+    for trip, index in stop._GetTripIndex(schedule):
+      tripstarttime = trip.GetStartTime()
+      if tripstarttime > requested_time and tripstarttime < (requested_time + time_range):
+        time, stoptime, tp = trip.GetTimeInterpolatedStops()[index]
+        if time > requested_time and time < (requested_time + time_range):
+          bisect.insort(filtered_time_trips, (time, (trip, index), tp))
+    
     result = []
-    for time, (trip, index), tp in time_trips:
+    for time, (trip, index), tp in filtered_time_trips:
+      if len(result) > limit:
+        break
       headsign = None
       # Find the most recent headsign from the StopTime objects
       for stoptime in trip.GetStopTimes()[index::-1]:
@@ -566,12 +674,13 @@
 
   if options.key and os.path.isfile(options.key):
     options.key = open(options.key).read().strip()
-
+  
   schedule = transitfeed.Schedule(problem_reporter=transitfeed.ProblemReporter())
   print 'Loading data from feed "%s"...' % options.feed_filename
   print '(this may take a few minutes for larger cities)'
+  t0 = datetime.datetime.now()
   schedule.Load(options.feed_filename)
-
+  print ("Loaded in", (datetime.datetime.now() - t0).seconds , "seconds")
   server = StoppableHTTPServer(server_address=('', options.port),
                                RequestHandlerClass=RequestHandlerClass)
   server.key = options.key
@@ -579,6 +688,8 @@
   server.file_dir = options.file_dir
   server.host = options.host
   server.feed_path = options.feed_filename
+  
+
 
   print ("To view, point your browser at http://localhost:%d/" %
          (server.server_port))

file:b/ses.php (new)
--- /dev/null
+++ b/ses.php
@@ -1,1 +1,704 @@
-
+<?php
+/**
+*
+* Copyright (c) 2011, Dan Myers.
+* Parts copyright (c) 2008, Donovan Schonknecht.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright
+*   notice, this list of conditions and the following disclaimer in the
+*   documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*
+* This is a modified BSD license (the third clause has been removed).
+* The BSD license may be found here:
+* http://www.opensource.org/licenses/bsd-license.php
+*
+* Amazon Simple Email Service is a trademark of Amazon.com, Inc. or its affiliates.
+*
+* SimpleEmailService is based on Donovan Schonknecht's Amazon S3 PHP class, found here:
+* http://undesigned.org.za/2007/10/22/amazon-s3-php-class
+*
+*/
+
+/**
+* Amazon SimpleEmailService PHP class
+*
+* @link http://sourceforge.net/projects/php-aws-ses/
+* version 0.8.1
+*
+*/
+class SimpleEmailService
+{
+	protected $__accessKey; // AWS Access key
+	protected $__secretKey; // AWS Secret key
+	protected $__host;
+
+	public function getAccessKey() { return $this->__accessKey; }
+	public function getSecretKey() { return $this->__secretKey; }
+	public function getHost() { return $this->__host; }
+
+	protected $__verifyHost = 1;
+	protected $__verifyPeer = 1;
+
+	// verifyHost and verifyPeer determine whether curl verifies ssl certificates.
+	// It may be necessary to disable these checks on certain systems.
+	// These only have an effect if SSL is enabled.
+	public function verifyHost() { return $this->__verifyHost; }
+	public function enableVerifyHost($enable = true) { $this->__verifyHost = $enable; }
+
+	public function verifyPeer() { return $this->__verifyPeer; }
+	public function enableVerifyPeer($enable = true) { $this->__verifyPeer = $enable; }
+
+	/**
+	* Constructor
+	*
+	* @param string $accessKey Access key
+	* @param string $secretKey Secret key
+	* @return void
+	*/
+	public function __construct($accessKey = null, $secretKey = null, $host = 'email.us-east-1.amazonaws.com') {
+		if ($accessKey !== null && $secretKey !== null) {
+			$this->setAuth($accessKey, $secretKey);
+		}
+		$this->__host = $host;
+	}
+
+	/**
+	* Set AWS access key and secret key
+	*
+	* @param string $accessKey Access key
+	* @param string $secretKey Secret key
+	* @return void
+	*/
+	public function setAuth($accessKey, $secretKey) {
+		$this->__accessKey = $accessKey;
+		$this->__secretKey = $secretKey;
+	}
+
+	/**
+	* Lists the email addresses that have been verified and can be used as the 'From' address
+	* 
+	* @return An array containing two items: a list of verified email addresses, and the request id.
+	*/
+	public function listVerifiedEmailAddresses() {
+		$rest = new SimpleEmailServiceRequest($this, 'GET');
+		$rest->setParameter('Action', 'ListVerifiedEmailAddresses');
+
+		$rest = $rest->getResponse();
+		if($rest->error === false && $rest->code !== 200) {
+			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
+		}
+		if($rest->error !== false) {
+			$this->__triggerError('listVerifiedEmailAddresses', $rest->error);
+			return false;
+		}
+
+		$response = array();
+		if(!isset($rest->body)) {
+			return $response;
+		}
+
+		$addresses = array();
+		foreach($rest->body->ListVerifiedEmailAddressesResult->VerifiedEmailAddresses->member as $address) {
+			$addresses[] = (string)$address;
+		}
+
+		$response['Addresses'] = $addresses;
+		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
+
+		return $response;
+	}
+
+	/**
+	* Requests verification of the provided email address, so it can be used
+	* as the 'From' address when sending emails through SimpleEmailService.
+	*
+	* After submitting this request, you should receive a verification email
+	* from Amazon at the specified address containing instructions to follow.
+	*
+	* @param string email The email address to get verified
+	* @return The request id for this request.
+	*/
+	public function verifyEmailAddress($email) {
+		$rest = new SimpleEmailServiceRequest($this, 'POST');
+		$rest->setParameter('Action', 'VerifyEmailAddress');
+		$rest->setParameter('EmailAddress', $email);
+
+		$rest = $rest->getResponse();
+		if($rest->error === false && $rest->code !== 200) {
+			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
+		}
+		if($rest->error !== false) {
+			$this->__triggerError('verifyEmailAddress', $rest->error);
+			return false;
+		}
+
+		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
+		return $response;
+	}
+
+	/**
+	* Removes the specified email address from the list of verified addresses.
+	*
+	* @param string email The email address to remove
+	* @return The request id for this request.
+	*/
+	public function deleteVerifiedEmailAddress($email) {
+		$rest = new SimpleEmailServiceRequest($this, 'DELETE');
+		$rest->setParameter('Action', 'DeleteVerifiedEmailAddress');
+		$rest->setParameter('EmailAddress', $email);
+
+		$rest = $rest->getResponse();
+		if($rest->error === false && $rest->code !== 200) {
+			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
+		}
+		if($rest->error !== false) {
+			$this->__triggerError('deleteVerifiedEmailAddress', $rest->error);
+			return false;
+		}
+
+		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
+		return $response;
+	}
+
+	/**
+	* Retrieves information on the current activity limits for this account.
+	* See http://docs.amazonwebservices.com/ses/latest/APIReference/API_GetSendQuota.html
+	*
+	* @return An array containing information on this account's activity limits.
+	*/
+	public function getSendQuota() {
+		$rest = new SimpleEmailServiceRequest($this, 'GET');
+		$rest->setParameter('Action', 'GetSendQuota');
+
+		$rest = $rest->getResponse();
+		if($rest->error === false && $rest->code !== 200) {
+			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
+		}
+		if($rest->error !== false) {
+			$this->__triggerError('getSendQuota', $rest->error);
+			return false;
+		}
+
+		$response = array();
+		if(!isset($rest->body)) {
+			return $response;
+		}
+
+		$response['Max24HourSend'] = (string)$rest->body->GetSendQuotaResult->Max24HourSend;
+		$response['MaxSendRate'] = (string)$rest->body->GetSendQuotaResult->MaxSendRate;
+		$response['SentLast24Hours'] = (string)$rest->body->GetSendQuotaResult->SentLast24Hours;
+		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
+
+		return $response;
+	}
+
+	/**
+	* Retrieves statistics for the last two weeks of activity on this account.
+	* See http://docs.amazonwebservices.com/ses/latest/APIReference/API_GetSendStatistics.html
+	*
+	* @return An array of activity statistics.  Each array item covers a 15-minute period.
+	*/
+	public function getSendStatistics() {
+		$rest = new SimpleEmailServiceRequest($this, 'GET');
+		$rest->setParameter('Action', 'GetSendStatistics');
+
+		$rest = $rest->getResponse();
+		if($rest->error === false && $rest->code !== 200) {
+			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
+		}
+		if($rest->error !== false) {
+			$this->__triggerError('getSendStatistics', $rest->error);
+			return false;
+		}
+
+		$response = array();
+		if(!isset($rest->body)) {
+			return $response;
+		}
+
+		$datapoints = array();
+		foreach($rest->body->GetSendStatisticsResult->SendDataPoints->member as $datapoint) {
+			$p = array();
+			$p['Bounces'] = (string)$datapoint->Bounces;
+			$p['Complaints'] = (string)$datapoint->Complaints;
+			$p['DeliveryAttempts'] = (string)$datapoint->DeliveryAttempts;
+			$p['Rejects'] = (string)$datapoint->Rejects;
+			$p['Timestamp'] = (string)$datapoint->Timestamp;
+
+			$datapoints[] = $p;
+		}
+
+		$response['SendDataPoints'] = $datapoints;
+		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
+
+		return $response;
+	}
+
+
+	/**
+	* Given a SimpleEmailServiceMessage object, submits the message to the service for sending.
+	*
+	* @return An array containing the unique identifier for this message and a separate request id.
+	*         Returns false if the provided message is missing any required fields.
+	*/
+	public function sendEmail($sesMessage) {
+		if(!$sesMessage->validate()) {
+			return false;
+		}
+
+		$rest = new SimpleEmailServiceRequest($this, 'POST');
+		$rest->setParameter('Action', 'SendEmail');
+
+		$i = 1;
+		foreach($sesMessage->to as $to) {
+			$rest->setParameter('Destination.ToAddresses.member.'.$i, $to);
+			$i++;
+		}
+
+		if(is_array($sesMessage->cc)) {
+			$i = 1;
+			foreach($sesMessage->cc as $cc) {
+				$rest->setParameter('Destination.CcAddresses.member.'.$i, $cc);
+				$i++;
+			}
+		}
+
+		if(is_array($sesMessage->bcc)) {
+			$i = 1;
+			foreach($sesMessage->bcc as $bcc) {
+				$rest->setParameter('Destination.BccAddresses.member.'.$i, $bcc);
+				$i++;
+			}
+		}
+
+		if(is_array($sesMessage->replyto)) {
+			$i = 1;
+			foreach($sesMessage->replyto as $replyto) {
+				$rest->setParameter('ReplyToAddresses.member.'.$i, $replyto);
+				$i++;
+			}
+		}
+
+		$rest->setParameter('Source', $sesMessage->from);
+
+		if($sesMessage->returnpath != null) {
+			$rest->setParameter('ReturnPath', $sesMessage->returnpath);
+		}
+
+		if($sesMessage->subject != null && strlen($sesMessage->subject) > 0) {
+			$rest->setParameter('Message.Subject.Data', $sesMessage->subject);
+			if($sesMessage->subjectCharset != null && strlen($sesMessage->subjectCharset) > 0) {
+				$rest->setParameter('Message.Subject.Charset', $sesMessage->subjectCharset);
+			}
+		}
+
+
+		if($sesMessage->messagetext != null && strlen($sesMessage->messagetext) > 0) {
+			$rest->setParameter('Message.Body.Text.Data', $sesMessage->messagetext);
+			if($sesMessage->messageTextCharset != null && strlen($sesMessage->messageTextCharset) > 0) {
+				$rest->setParameter('Message.Body.Text.Charset', $sesMessage->messageTextCharset);
+			}
+		}
+
+		if($sesMessage->messagehtml != null && strlen($sesMessage->messagehtml) > 0) {
+			$rest->setParameter('Message.Body.Html.Data', $sesMessage->messagehtml);
+			if($sesMessage->messageHtmlCharset != null && strlen($sesMessage->messageHtmlCharset) > 0) {
+				$rest->setParameter('Message.Body.Html.Charset', $sesMessage->messageHtmlCharset);
+			}
+		}
+
+		$rest = $rest->getResponse();
+		if($rest->error === false && $rest->code !== 200) {
+			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
+		}
+		if($rest->error !== false) {
+			$this->__triggerError('sendEmail', $rest->error);
+			return false;
+		}
+
+		$response['MessageId'] = (string)$rest->body->SendEmailResult->MessageId;
+		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
+		return $response;
+	}
+
+	/**
+	* Trigger an error message
+	*
+	* @internal Used by member functions to output errors
+	* @param array $error Array containing error information
+	* @return string
+	*/
+	public function __triggerError($functionname, $error)
+	{
+		if($error == false) {
+			trigger_error(sprintf("SimpleEmailService::%s(): Encountered an error, but no description given", $functionname), E_USER_WARNING);
+		}
+		else if(isset($error['curl']) && $error['curl'])
+		{
+			trigger_error(sprintf("SimpleEmailService::%s(): %s %s", $functionname, $error['code'], $error['message']), E_USER_WARNING);
+		}
+		else if(isset($error['Error']))
+		{
+			$e = $error['Error'];
+			$message = sprintf("SimpleEmailService::%s(): %s - %s: %s\nRequest Id: %s\n", $functionname, $e['Type'], $e['Code'], $e['Message'], $error['RequestId']);
+			trigger_error($message, E_USER_WARNING);
+		}
+	}
+
+	/**
+	* Callback handler for 503 retries.
+	*
+	* @internal Used by SimpleDBRequest to call the user-specified callback, if set
+	* @param $attempt The number of failed attempts so far
+	* @return The retry delay in microseconds, or 0 to stop retrying.
+	*/
+	public function __executeServiceTemporarilyUnavailableRetryDelay($attempt)
+	{
+		if(is_callable($this->__serviceUnavailableRetryDelayCallback)) {
+			$callback = $this->__serviceUnavailableRetryDelayCallback;
+			return $callback($attempt);
+		}
+		return 0;
+	}
+}
+
+final class SimpleEmailServiceRequest
+{
+	private $ses, $verb, $parameters = array();
+	public $response;
+
+	/**
+	* Constructor
+	*
+	* @param string $ses The SimpleEmailService object making this request
+	* @param string $action action
+	* @param string $verb HTTP verb
+	* @return mixed
+	*/
+	function __construct($ses, $verb) {
+		$this->ses = $ses;
+		$this->verb = $verb;
+		$this->response = new STDClass;
+		$this->response->error = false;
+	}
+
+	/**
+	* Set request parameter
+	*
+	* @param string  $key Key
+	* @param string  $value Value
+	* @param boolean $replace Whether to replace the key if it already exists (default true)
+	* @return void
+	*/
+	public function setParameter($key, $value, $replace = true) {
+		if(!$replace && isset($this->parameters[$key]))
+		{
+			$temp = (array)($this->parameters[$key]);
+			$temp[] = $value;
+			$this->parameters[$key] = $temp;
+		}
+		else
+		{
+			$this->parameters[$key] = $value;
+		}
+	}
+
+	/**
+	* Get the response
+	*
+	* @return object | false
+	*/
+	public function getResponse() {
+
+		$params = array();
+		foreach ($this->parameters as $var => $value)
+		{
+			if(is_array($value))
+			{
+				foreach($value as $v)
+				{
+					$params[] = $var.'='.$this->__customUrlEncode($v);
+				}
+			}
+			else
+			{
+				$params[] = $var.'='.$this->__customUrlEncode($value);
+			}
+		}
+
+		sort($params, SORT_STRING);
+
+		// must be in format 'Sun, 06 Nov 1994 08:49:37 GMT'
+		$date = gmdate('D, d M Y H:i:s e');
+
+		$query = implode('&', $params);
+
+		$headers = array();
+		$headers[] = 'Date: '.$date;
+		$headers[] = 'Host: '.$this->ses->getHost();
+
+		$auth = 'AWS3-HTTPS AWSAccessKeyId='.$this->ses->getAccessKey();
+		$auth .= ',Algorithm=HmacSHA256,Signature='.$this->__getSignature($date);
+		$headers[] = 'X-Amzn-Authorization: '.$auth;
+
+		$url = 'https://'.$this->ses->getHost().'/';
+
+		// Basic setup
+		$curl = curl_init();
+		curl_setopt($curl, CURLOPT_USERAGENT, 'SimpleEmailService/php');
+
+		curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, ($this->ses->verifyHost() ? 1 : 0));
+		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, ($this->ses->verifyPeer() ? 1 : 0));
+
+		// Request types
+		switch ($this->verb) {
+			case 'GET':
+				$url .= '?'.$query;
+				break;
+			case 'POST':
+				curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $this->verb);
+				curl_setopt($curl, CURLOPT_POSTFIELDS, $query);
+				$headers[] = 'Content-Type: application/x-www-form-urlencoded';
+			break;
+			case 'DELETE':
+				$url .= '?'.$query;
+				curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
+			break;
+			default: break;
+		}
+		curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
+		curl_setopt($curl, CURLOPT_HEADER, false);
+
+		curl_setopt($curl, CURLOPT_URL, $url);
+		curl_setopt($curl, CURLOPT_RETURNTRANSFER, false);
+		curl_setopt($curl, CURLOPT_WRITEFUNCTION, array(&$this, '__responseWriteCallback'));
+		curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
+
+		// Execute, grab errors
+		if (curl_exec($curl)) {
+			$this->response->code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
+		} else {
+			$this->response->error = array(
+				'curl' => true,
+				'code' => curl_errno($curl),
+				'message' => curl_error($curl),
+				'resource' => $this->resource
+			);
+		}
+
+		@curl_close($curl);
+
+		// Parse body into XML
+		if ($this->response->error === false && isset($this->response->body)) {
+			$this->response->body = simplexml_load_string($this->response->body);
+
+			// Grab SES errors
+			if (!in_array($this->response->code, array(200, 201, 202, 204))
+				&& isset($this->response->body->Error)) {
+				$error = $this->response->body->Error;
+				$output = array();
+				$output['curl'] = false;
+				$output['Error'] = array();
+				$output['Error']['Type'] = (string)$error->Type;
+				$output['Error']['Code'] = (string)$error->Code;
+				$output['Error']['Message'] = (string)$error->Message;
+				$output['RequestId'] = (string)$this->response->body->RequestId;
+
+				$this->response->error = $output;
+				unset($this->response->body);
+			}
+		}
+
+		return $this->response;
+	}
+
+	/**
+	* CURL write callback
+	*
+	* @param resource &$curl CURL resource
+	* @param string &$data Data
+	* @return integer
+	*/
+	private function __responseWriteCallback(&$curl, &$data) {
+		$this->response->body .= $data;
+		return strlen($data);
+	}
+
+	/**
+	* Contributed by afx114
+	* URL encode the parameters as per http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?Query_QueryAuth.html
+	* PHP's rawurlencode() follows RFC 1738, not RFC 3986 as required by Amazon. The only difference is the tilde (~), so convert it back after rawurlencode
+	* See: http://www.morganney.com/blog/API/AWS-Product-Advertising-API-Requires-a-Signed-Request.php
+	*
+	* @param string $var String to encode
+	* @return string
+	*/
+	private function __customUrlEncode($var) {
+		return str_replace('%7E', '~', rawurlencode($var));
+	}
+
+	/**
+	* Generate the auth string using Hmac-SHA256
+	*
+	* @internal Used by SimpleDBRequest::getResponse()
+	* @param string $string String to sign
+	* @return string
+	*/
+	private function __getSignature($string) {
+		return base64_encode(hash_hmac('sha256', $string, $this->ses->getSecretKey(), true));
+	}
+}
+
+
+final class SimpleEmailServiceMessage {
+
+	// these are public for convenience only
+	// these are not to be used outside of the SimpleEmailService class!
+	public $to, $cc, $bcc, $replyto;
+	public $from, $returnpath;
+	public $subject, $messagetext, $messagehtml;
+	public $subjectCharset, $messageTextCharset, $messageHtmlCharset;
+
+	function __construct() {
+		$to = array();
+		$cc = array();
+		$bcc = array();
+		$replyto = array();
+
+		$from = null;
+		$returnpath = null;
+
+		$subject = null;
+		$messagetext = null;
+		$messagehtml = null;
+
+		$subjectCharset = null;
+		$messageTextCharset = null;
+		$messageHtmlCharset = null;
+	}
+
+
+	/**
+	* addTo, addCC, addBCC, and addReplyTo have the following behavior:
+	* If a single address is passed, it is appended to the current list of addresses.
+	* If an array of addresses is passed, that array is merged into the current list.
+	*/
+	function addTo($to) {
+		if(!is_array($to)) {
+			$this->to[] = $to;
+		}
+		else {
+			$this->to = array_merge($this->to, $to);
+		}
+	}
+
+	function addCC($cc) {
+		if(!is_array($cc)) {
+			$this->cc[] = $cc;
+		}
+		else {
+			$this->cc = array_merge($this->cc, $cc);
+		}
+	}
+
+	function addBCC($bcc) {
+		if(!is_array($bcc)) {
+			$this->bcc[] = $bcc;
+		}
+		else {
+			$this->bcc = array_merge($this->bcc, $bcc);
+		}
+	}
+
+	function addReplyTo($replyto) {
+		if(!is_array($replyto)) {
+			$this->replyto[] = $replyto;
+		}
+		else {
+			$this->replyto = array_merge($this->replyto, $replyto);
+		}
+	}
+
+	function setFrom($from) {
+		$this->from = $from;
+	}
+
+	function setReturnPath($returnpath) {
+		$this->returnpath = $returnpath;
+	}
+
+	function setSubject($subject) {
+		$this->subject = $subject;
+	}
+
+	function setSubjectCharset($charset) {
+		$this->subjectCharset = $charset;
+	}
+
+	function setMessageFromString($text, $html = null) {
+		$this->messagetext = $text;
+		$this->messagehtml = $html;
+	}
+
+	function setMessageFromFile($textfile, $htmlfile = null) {
+		if(file_exists($textfile) && is_file($textfile) && is_readable($textfile)) {
+			$this->messagetext = file_get_contents($textfile);
+		}
+		if(file_exists($htmlfile) && is_file($htmlfile) && is_readable($htmlfile)) {
+			$this->messagehtml = file_get_contents($htmlfile);
+		}
+	}
+
+	function setMessageFromURL($texturl, $htmlurl = null) {
+		$this->messagetext = file_get_contents($texturl);
+		if($htmlurl !== null) {
+			$this->messagehtml = file_get_contents($htmlurl);
+		}
+	}
+
+	function setMessageCharset($textCharset, $htmlCharset = null) {
+		$this->messageTextCharset = $textCharset;
+		$this->messageHtmlCharset = $htmlCharset;
+	}
+
+	/**
+	* Validates whether the message object has sufficient information to submit a request to SES.
+	* This does not guarantee the message will arrive, nor that the request will succeed;
+	* instead, it makes sure that no required fields are missing.
+	*
+	* This is used internally before attempting a SendEmail or SendRawEmail request,
+	* but it can be used outside of this file if verification is desired.
+	* May be useful if e.g. the data is being populated from a form; developers can generally
+	* use this function to verify completeness instead of writing custom logic.
+	*
+	* @return boolean
+	*/
+	public function validate() {
+		if(count($this->to) == 0)
+			return false;
+		if($this->from == null || strlen($this->from) == 0)
+			return false;
+		if($this->messagetext == null)
+			return false;
+		return true;
+	}
+}
+

--- /dev/null
+++ b/simple_html_dom.php
@@ -1,1 +1,975 @@
-
+<?php

+/*******************************************************************************

+Version: 1.11 ($Rev: 175 $)

+Website: http://sourceforge.net/projects/simplehtmldom/

+Author: S.C. Chen <me578022@gmail.com>

+Acknowledge: Jose Solorzano (https://sourceforge.net/projects/php-html/)

+Contributions by:

+    Yousuke Kumakura (Attribute filters)

+    Vadim Voituk (Negative indexes supports of "find" method)

+    Antcs (Constructor with automatically load contents either text or file/url)

+Licensed under The MIT License

+Redistributions of files must retain the above copyright notice.

+*******************************************************************************/

+

+define('HDOM_TYPE_ELEMENT', 1);

+define('HDOM_TYPE_COMMENT', 2);

+define('HDOM_TYPE_TEXT',    3);

+define('HDOM_TYPE_ENDTAG',  4);

+define('HDOM_TYPE_ROOT',    5);

+define('HDOM_TYPE_UNKNOWN', 6);

+define('HDOM_QUOTE_DOUBLE', 0);

+define('HDOM_QUOTE_SINGLE', 1);

+define('HDOM_QUOTE_NO',     3);

+define('HDOM_INFO_BEGIN',   0);

+define('HDOM_INFO_END',     1);

+define('HDOM_INFO_QUOTE',   2);

+define('HDOM_INFO_SPACE',   3);

+define('HDOM_INFO_TEXT',    4);

+define('HDOM_INFO_INNER',   5);

+define('HDOM_INFO_OUTER',   6);

+define('HDOM_INFO_ENDSPACE',7);

+

+// helper functions

+// -----------------------------------------------------------------------------

+// get html dom form file

+function file_get_html() {

+    $dom = new simple_html_dom;

+    $args = func_get_args();

+    $dom->load(call_user_func_array('file_get_contents', $args), true);

+    return $dom;

+}

+

+// get html dom form string

+function str_get_html($str, $lowercase=true) {

+    $dom = new simple_html_dom;

+    $dom->load($str, $lowercase);

+    return $dom;

+}

+

+// dump html dom tree

+function dump_html_tree($node, $show_attr=true, $deep=0) {

+    $lead = str_repeat('    ', $deep);

+    echo $lead.$node->tag;

+    if ($show_attr && count($node->attr)>0) {

+        echo '(';

+        foreach($node->attr as $k=>$v)

+            echo "[$k]=>\"".$node->$k.'", ';

+        echo ')';

+    }

+    echo "\n";

+

+    foreach($node->nodes as $c)

+        dump_html_tree($c, $show_attr, $deep+1);

+}

+

+// get dom form file (deprecated)

+function file_get_dom() {

+    $dom = new simple_html_dom;

+    $args = func_get_args();

+    $dom->load(call_user_func_array('file_get_contents', $args), true);

+    return $dom;

+}

+

+// get dom form string (deprecated)

+function str_get_dom($str, $lowercase=true) {

+    $dom = new simple_html_dom;

+    $dom->load($str, $lowercase);

+    return $dom;

+}

+

+// simple html dom node

+// -----------------------------------------------------------------------------

+class simple_html_dom_node {

+    public $nodetype = HDOM_TYPE_TEXT;

+    public $tag = 'text';

+    public $attr = array();

+    public $children = array();

+    public $nodes = array();

+    public $parent = null;

+    public $_ = array();

+    private $dom = null;

+

+    function __construct($dom) {

+        $this->dom = $dom;

+        $dom->nodes[] = $this;

+    }

+

+    function __destruct() {

+        $this->clear();

+    }

+

+    function __toString() {

+        return $this->outertext();

+    }

+

+    // clean up memory due to php5 circular references memory leak...

+    function clear() {

+        $this->dom = null;

+        $this->nodes = null;

+        $this->parent = null;

+        $this->children = null;

+    }

+    

+    // dump node's tree

+    function dump($show_attr=true) {

+        dump_html_tree($this, $show_attr);

+    }

+

+    // returns the parent of node

+    function parent() {

+        return $this->parent;

+    }

+

+    // returns children of node

+    function children($idx=-1) {

+        if ($idx===-1) return $this->children;

+        if (isset($this->children[$idx])) return $this->children[$idx];

+        return null;

+    }

+

+    // returns the first child of node

+    function first_child() {

+        if (count($this->children)>0) return $this->children[0];

+        return null;

+    }

+

+    // returns the last child of node

+    function last_child() {

+        if (($count=count($this->children))>0) return $this->children[$count-1];

+        return null;

+    }

+

+    // returns the next sibling of node    

+    function next_sibling() {

+        if ($this->parent===null) return null;

+        $idx = 0;

+        $count = count($this->parent->children);

+        while ($idx<$count && $this!==$this->parent->children[$idx])

+            ++$idx;

+        if (++$idx>=$count) return null;

+        return $this->parent->children[$idx];

+    }

+

+    // returns the previous sibling of node

+    function prev_sibling() {

+        if ($this->parent===null) return null;

+        $idx = 0;

+        $count = count($this->parent->children);

+        while ($idx<$count && $this!==$this->parent->children[$idx])

+            ++$idx;

+        if (--$idx<0) return null;

+        return $this->parent->children[$idx];

+    }

+

+    // get dom node's inner html

+    function innertext() {

+        if (isset($this->_[HDOM_INFO_INNER])) return $this->_[HDOM_INFO_INNER];

+        if (isset($this->_[HDOM_INFO_TEXT])) return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]);

+

+        $ret = '';

+        foreach($this->nodes as $n)

+            $ret .= $n->outertext();

+        return $ret;

+    }

+

+    // get dom node's outer text (with tag)

+    function outertext() {

+        if ($this->tag==='root') return $this->innertext();

+

+        // trigger callback

+        if ($this->dom->callback!==null)

+            call_user_func_array($this->dom->callback, array($this));

+

+        if (isset($this->_[HDOM_INFO_OUTER])) return $this->_[HDOM_INFO_OUTER];

+        if (isset($this->_[HDOM_INFO_TEXT])) return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]);

+

+        // render begin tag

+        $ret = $this->dom->nodes[$this->_[HDOM_INFO_BEGIN]]->makeup();

+

+        // render inner text

+        if (isset($this->_[HDOM_INFO_INNER]))

+            $ret .= $this->_[HDOM_INFO_INNER];

+        else {

+            foreach($this->nodes as $n)

+                $ret .= $n->outertext();

+        }

+

+        // render end tag

+        if(isset($this->_[HDOM_INFO_END]) && $this->_[HDOM_INFO_END]!=0)

+            $ret .= '</'.$this->tag.'>';

+        return $ret;

+    }

+

+    // get dom node's plain text

+    function text() {

+        if (isset($this->_[HDOM_INFO_INNER])) return $this->_[HDOM_INFO_INNER];

+        switch ($this->nodetype) {

+            case HDOM_TYPE_TEXT: return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]);

+            case HDOM_TYPE_COMMENT: return '';

+            case HDOM_TYPE_UNKNOWN: return '';

+        }

+        if (strcasecmp($this->tag, 'script')===0) return '';

+        if (strcasecmp($this->tag, 'style')===0) return '';

+

+        $ret = '';

+        foreach($this->nodes as $n)

+            $ret .= $n->text();

+        return $ret;

+    }

+    

+    function xmltext() {

+        $ret = $this->innertext();

+        $ret = str_ireplace('<![CDATA[', '', $ret);

+        $ret = str_replace(']]>', '', $ret);

+        return $ret;

+    }

+

+    // build node's text with tag

+    function makeup() {

+        // text, comment, unknown

+        if (isset($this->_[HDOM_INFO_TEXT])) return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]);

+

+        $ret = '<'.$this->tag;

+        $i = -1;

+

+        foreach($this->attr as $key=>$val) {

+            ++$i;

+

+            // skip removed attribute

+            if ($val===null || $val===false)

+                continue;

+

+            $ret .= $this->_[HDOM_INFO_SPACE][$i][0];

+            //no value attr: nowrap, checked selected...

+            if ($val===true)

+                $ret .= $key;

+            else {

+                switch($this->_[HDOM_INFO_QUOTE][$i]) {

+                    case HDOM_QUOTE_DOUBLE: $quote = '"'; break;

+                    case HDOM_QUOTE_SINGLE: $quote = '\''; break;

+                    default: $quote = '';

+                }

+                $ret .= $key.$this->_[HDOM_INFO_SPACE][$i][1].'='.$this->_[HDOM_INFO_SPACE][$i][2].$quote.$val.$quote;

+            }

+        }

+        $ret = $this->dom->restore_noise($ret);

+        return $ret . $this->_[HDOM_INFO_ENDSPACE] . '>';

+    }

+

+    // find elements by css selector

+    function find($selector, $idx=null) {

+        $selectors = $this->parse_selector($selector);

+        if (($count=count($selectors))===0) return array();

+        $found_keys = array();

+

+        // find each selector

+        for ($c=0; $c<$count; ++$c) {

+            if (($levle=count($selectors[0]))===0) return array();

+            if (!isset($this->_[HDOM_INFO_BEGIN])) return array();

+

+            $head = array($this->_[HDOM_INFO_BEGIN]=>1);

+

+            // handle descendant selectors, no recursive!

+            for ($l=0; $l<$levle; ++$l) {

+                $ret = array();

+                foreach($head as $k=>$v) {

+                    $n = ($k===-1) ? $this->dom->root : $this->dom->nodes[$k];

+                    $n->seek($selectors[$c][$l], $ret);

+                }

+                $head = $ret;

+            }

+

+            foreach($head as $k=>$v) {

+                if (!isset($found_keys[$k]))

+                    $found_keys[$k] = 1;

+            }

+        }

+

+        // sort keys

+        ksort($found_keys);

+

+        $found = array();

+        foreach($found_keys as $k=>$v)

+            $found[] = $this->dom->nodes[$k];

+

+        // return nth-element or array

+        if (is_null($idx)) return $found;

+		else if ($idx<0) $idx = count($found) + $idx;

+        return (isset($found[$idx])) ? $found[$idx] : null;

+    }

+

+    // seek for given conditions

+    protected function seek($selector, &$ret) {

+        list($tag, $key, $val, $exp, $no_key) = $selector;

+

+        // xpath index

+        if ($tag && $key && is_numeric($key)) {

+            $count = 0;

+            foreach ($this->children as $c) {

+                if ($tag==='*' || $tag===$c->tag) {

+                    if (++$count==$key) {

+                        $ret[$c->_[HDOM_INFO_BEGIN]] = 1;

+                        return;

+                    }

+                }

+            } 

+            return;

+        }

+

+        $end = (!empty($this->_[HDOM_INFO_END])) ? $this->_[HDOM_INFO_END] : 0;

+        if ($end==0) {

+            $parent = $this->parent;

+            while (!isset($parent->_[HDOM_INFO_END]) && $parent!==null) {

+                $end -= 1;

+                $parent = $parent->parent;

+            }

+            $end += $parent->_[HDOM_INFO_END];

+        }

+

+        for($i=$this->_[HDOM_INFO_BEGIN]+1; $i<$end; ++$i) {

+            $node = $this->dom->nodes[$i];

+            $pass = true;

+

+            if ($tag==='*' && !$key) {

+                if (in_array($node, $this->children, true))

+                    $ret[$i] = 1;

+                continue;

+            }

+

+            // compare tag

+            if ($tag && $tag!=$node->tag && $tag!=='*') {$pass=false;}

+            // compare key

+            if ($pass && $key) {

+                if ($no_key) {

+                    if (isset($node->attr[$key])) $pass=false;

+                }

+                else if (!isset($node->attr[$key])) $pass=false;

+            }

+            // compare value

+            if ($pass && $key && $val  && $val!=='*') {

+                $check = $this->match($exp, $val, $node->attr[$key]);

+                // handle multiple class

+                if (!$check && strcasecmp($key, 'class')===0) {

+                    foreach(explode(' ',$node->attr[$key]) as $k) {

+                        $check = $this->match($exp, $val, $k);

+                        if ($check) break;

+                    }

+                }

+                if (!$check) $pass = false;

+            }

+            if ($pass) $ret[$i] = 1;

+            unset($node);

+        }

+    }

+

+    protected function match($exp, $pattern, $value) {

+        switch ($exp) {

+            case '=':

+                return ($value===$pattern);

+            case '!=':

+                return ($value!==$pattern);

+            case '^=':

+                return preg_match("/^".preg_quote($pattern,'/')."/", $value);

+            case '$=':

+                return preg_match("/".preg_quote($pattern,'/')."$/", $value);

+            case '*=':

+                if ($pattern[0]=='/')

+                    return preg_match($pattern, $value);

+                return preg_match("/".$pattern."/i", $value);

+        }

+        return false;

+    }

+

+    protected function parse_selector($selector_string) {

+        // pattern of CSS selectors, modified from mootools

+        $pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is";

+        preg_match_all($pattern, trim($selector_string).' ', $matches, PREG_SET_ORDER);

+        $selectors = array();

+        $result = array();

+        //print_r($matches);

+

+        foreach ($matches as $m) {

+            $m[0] = trim($m[0]);

+            if ($m[0]==='' || $m[0]==='/' || $m[0]==='//') continue;

+            // for borwser grnreated xpath

+            if ($m[1]==='tbody') continue;

+

+            list($tag, $key, $val, $exp, $no_key) = array($m[1], null, null, '=', false);

+            if(!empty($m[2])) {$key='id'; $val=$m[2];}

+            if(!empty($m[3])) {$key='class'; $val=$m[3];}

+            if(!empty($m[4])) {$key=$m[4];}

+            if(!empty($m[5])) {$exp=$m[5];}

+            if(!empty($m[6])) {$val=$m[6];}

+

+            // convert to lowercase

+            if ($this->dom->lowercase) {$tag=strtolower($tag); $key=strtolower($key);}

+            //elements that do NOT have the specified attribute

+            if (isset($key[0]) && $key[0]==='!') {$key=substr($key, 1); $no_key=true;}

+

+            $result[] = array($tag, $key, $val, $exp, $no_key);

+            if (trim($m[7])===',') {

+                $selectors[] = $result;

+                $result = array();

+            }

+        }

+        if (count($result)>0)

+            $selectors[] = $result;

+        return $selectors;

+    }

+

+    function __get($name) {

+        if (isset($this->attr[$name])) return $this->attr[$name];

+        switch($name) {

+            case 'outertext': return $this->outertext();

+            case 'innertext': return $this->innertext();

+            case 'plaintext': return $this->text();

+            case 'xmltext': return $this->xmltext();

+            default: return array_key_exists($name, $this->attr);

+        }

+    }

+

+    function __set($name, $value) {

+        switch($name) {

+            case 'outertext': return $this->_[HDOM_INFO_OUTER] = $value;

+            case 'innertext':

+                if (isset($this->_[HDOM_INFO_TEXT])) return $this->_[HDOM_INFO_TEXT] = $value;

+                return $this->_[HDOM_INFO_INNER] = $value;

+        }

+        if (!isset($this->attr[$name])) {

+            $this->_[HDOM_INFO_SPACE][] = array(' ', '', ''); 

+            $this->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_DOUBLE;

+        }

+        $this->attr[$name] = $value;

+    }

+

+    function __isset($name) {

+        switch($name) {

+            case 'outertext': return true;

+            case 'innertext': return true;

+            case 'plaintext': return true;

+        }

+        //no value attr: nowrap, checked selected...

+        return (array_key_exists($name, $this->attr)) ? true : isset($this->attr[$name]);

+    }

+

+    function __unset($name) {

+        if (isset($this->attr[$name]))

+            unset($this->attr[$name]);

+    }

+

+    // camel naming conventions

+    function getAllAttributes() {return $this->attr;}

+    function getAttribute($name) {return $this->__get($name);}

+    function setAttribute($name, $value) {$this->__set($name, $value);}

+    function hasAttribute($name) {return $this->__isset($name);}

+    function removeAttribute($name) {$this->__set($name, null);}

+    function getElementById($id) {return $this->find("#$id", 0);}

+    function getElementsById($id, $idx=null) {return $this->find("#$id", $idx);}

+    function getElementByTagName($name) {return $this->find($name, 0);}

+    function getElementsByTagName($name, $idx=null) {return $this->find($name, $idx);}

+    function parentNode() {return $this->parent();}

+    function childNodes($idx=-1) {return $this->children($idx);}

+    function firstChild() {return $this->first_child();}

+    function lastChild() {return $this->last_child();}

+    function nextSibling() {return $this->next_sibling();}

+    function previousSibling() {return $this->prev_sibling();}

+}

+

+// simple html dom parser

+// -----------------------------------------------------------------------------

+class simple_html_dom {

+    public $root = null;

+    public $nodes = array();

+    public $callback = null;

+    public $lowercase = false;

+    protected $pos;

+    protected $doc;

+    protected $char;

+    protected $size;

+    protected $cursor;

+    protected $parent;

+    protected $noise = array();

+    protected $token_blank = " \t\r\n";

+    protected $token_equal = ' =/>';

+    protected $token_slash = " />\r\n\t";

+    protected $token_attr = ' >';

+    // use isset instead of in_array, performance boost about 30%...

+    protected $self_closing_tags = array('img'=>1, 'br'=>1, 'input'=>1, 'meta'=>1, 'link'=>1, 'hr'=>1, 'base'=>1, 'embed'=>1, 'spacer'=>1);

+    protected $block_tags = array('root'=>1, 'body'=>1, 'form'=>1, 'div'=>1, 'span'=>1, 'table'=>1);

+    protected $optional_closing_tags = array(

+        'tr'=>array('tr'=>1, 'td'=>1, 'th'=>1),

+        'th'=>array('th'=>1),

+        'td'=>array('td'=>1),

+        'li'=>array('li'=>1),

+        'dt'=>array('dt'=>1, 'dd'=>1),

+        'dd'=>array('dd'=>1, 'dt'=>1),

+        'dl'=>array('dd'=>1, 'dt'=>1),

+        'p'=>array('p'=>1),

+        'nobr'=>array('nobr'=>1),

+    );

+

+    function __construct($str=null) {

+        if ($str) {

+            if (preg_match("/^http:\/\//i",$str) || is_file($str)) 

+                $this->load_file($str); 

+            else

+                $this->load($str);

+        }

+    }

+

+    function __destruct() {

+        $this->clear();

+    }

+

+    // load html from string

+    function load($str, $lowercase=true) {

+        // prepare

+        $this->prepare($str, $lowercase);

+        // strip out comments

+        $this->remove_noise("'<!--(.*?)-->'is");

+        // strip out cdata

+        $this->remove_noise("'<!\[CDATA\[(.*?)\]\]>'is", true);

+        // strip out <style> tags

+        $this->remove_noise("'<\s*style[^>]*[^/]>(.*?)<\s*/\s*style\s*>'is");

+        $this->remove_noise("'<\s*style\s*>(.*?)<\s*/\s*style\s*>'is");

+        // strip out <script> tags

+        $this->remove_noise("'<\s*script[^>]*[^/]>(.*?)<\s*/\s*script\s*>'is");

+        $this->remove_noise("'<\s*script\s*>(.*?)<\s*/\s*script\s*>'is");

+        // strip out preformatted tags

+        $this->remove_noise("'<\s*(?:code)[^>]*>(.*?)<\s*/\s*(?:code)\s*>'is");

+        // strip out server side scripts

+        $this->remove_noise("'(<\?)(.*?)(\?>)'s", true);

+        // strip smarty scripts

+        $this->remove_noise("'(\{\w)(.*?)(\})'s", true);

+

+        // parsing

+        while ($this->parse());

+        // end

+        $this->root->_[HDOM_INFO_END] = $this->cursor;

+    }

+

+    // load html from file

+    function load_file() {

+        $args = func_get_args();

+        $this->load(call_user_func_array('file_get_contents', $args), true);

+    }

+

+    // set callback function

+    function set_callback($function_name) {

+        $this->callback = $function_name;

+    }

+

+    // remove callback function

+    function remove_callback() {

+        $this->callback = null;

+    }

+

+    // save dom as string

+    function save($filepath='') {

+        $ret = $this->root->innertext();

+        if ($filepath!=='') file_put_contents($filepath, $ret);

+        return $ret;

+    }

+

+    // find dom node by css selector

+    function find($selector, $idx=null) {

+        return $this->root->find($selector, $idx);

+    }

+

+    // clean up memory due to php5 circular references memory leak...

+    function clear() {

+        foreach($this->nodes as $n) {$n->clear(); $n = null;}

+        if (isset($this->parent)) {$this->parent->clear(); unset($this->parent);}

+        if (isset($this->root)) {$this->root->clear(); unset($this->root);}

+        unset($this->doc);

+        unset($this->noise);

+    }

+    

+    function dump($show_attr=true) {

+        $this->root->dump($show_attr);

+    }

+

+    // prepare HTML data and init everything

+    protected function prepare($str, $lowercase=true) {

+        $this->clear();

+        $this->doc = $str;

+        $this->pos = 0;

+        $this->cursor = 1;

+        $this->noise = array();

+        $this->nodes = array();

+        $this->lowercase = $lowercase;

+        $this->root = new simple_html_dom_node($this);

+        $this->root->tag = 'root';

+        $this->root->_[HDOM_INFO_BEGIN] = -1;

+        $this->root->nodetype = HDOM_TYPE_ROOT;

+        $this->parent = $this->root;

+        // set the length of content

+        $this->size = strlen($str);

+        if ($this->size>0) $this->char = $this->doc[0];

+    }

+

+    // parse html content

+    protected function parse() {

+        if (($s = $this->copy_until_char('<'))==='')

+            return $this->read_tag();

+

+        // text

+        $node = new simple_html_dom_node($this);

+        ++$this->cursor;

+        $node->_[HDOM_INFO_TEXT] = $s;

+        $this->link_nodes($node, false);

+        return true;

+    }

+

+    // read tag info

+    protected function read_tag() {

+        if ($this->char!=='<') {

+            $this->root->_[HDOM_INFO_END] = $this->cursor;

+            return false;

+        }

+        $begin_tag_pos = $this->pos;

+        $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+

+        // end tag

+        if ($this->char==='/') {

+            $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+            $this->skip($this->token_blank_t);

+            $tag = $this->copy_until_char('>');

+

+            // skip attributes in end tag

+            if (($pos = strpos($tag, ' '))!==false)

+                $tag = substr($tag, 0, $pos);

+

+            $parent_lower = strtolower($this->parent->tag);

+            $tag_lower = strtolower($tag);

+

+            if ($parent_lower!==$tag_lower) {

+                if (isset($this->optional_closing_tags[$parent_lower]) && isset($this->block_tags[$tag_lower])) {

+                    $this->parent->_[HDOM_INFO_END] = 0;

+                    $org_parent = $this->parent;

+

+                    while (($this->parent->parent) && strtolower($this->parent->tag)!==$tag_lower)

+                        $this->parent = $this->parent->parent;

+

+                    if (strtolower($this->parent->tag)!==$tag_lower) {

+                        $this->parent = $org_parent; // restore origonal parent

+                        if ($this->parent->parent) $this->parent = $this->parent->parent;

+                        $this->parent->_[HDOM_INFO_END] = $this->cursor;

+                        return $this->as_text_node($tag);

+                    }

+                }

+                else if (($this->parent->parent) && isset($this->block_tags[$tag_lower])) {

+                    $this->parent->_[HDOM_INFO_END] = 0;

+                    $org_parent = $this->parent;

+

+                    while (($this->parent->parent) && strtolower($this->parent->tag)!==$tag_lower)

+                        $this->parent = $this->parent->parent;

+

+                    if (strtolower($this->parent->tag)!==$tag_lower) {

+                        $this->parent = $org_parent; // restore origonal parent

+                        $this->parent->_[HDOM_INFO_END] = $this->cursor;

+                        return $this->as_text_node($tag);

+                    }

+                }

+                else if (($this->parent->parent) && strtolower($this->parent->parent->tag)===$tag_lower) {

+                    $this->parent->_[HDOM_INFO_END] = 0;

+                    $this->parent = $this->parent->parent;

+                }

+                else

+                    return $this->as_text_node($tag);

+            }

+

+            $this->parent->_[HDOM_INFO_END] = $this->cursor;

+            if ($this->parent->parent) $this->parent = $this->parent->parent;

+

+            $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+            return true;

+        }

+

+        $node = new simple_html_dom_node($this);

+        $node->_[HDOM_INFO_BEGIN] = $this->cursor;

+        ++$this->cursor;

+        $tag = $this->copy_until($this->token_slash);

+

+        // doctype, cdata & comments...

+        if (isset($tag[0]) && $tag[0]==='!') {

+            $node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until_char('>');

+

+            if (isset($tag[2]) && $tag[1]==='-' && $tag[2]==='-') {

+                $node->nodetype = HDOM_TYPE_COMMENT;

+                $node->tag = 'comment';

+            } else {

+                $node->nodetype = HDOM_TYPE_UNKNOWN;

+                $node->tag = 'unknown';

+            }

+

+            if ($this->char==='>') $node->_[HDOM_INFO_TEXT].='>';

+            $this->link_nodes($node, true);

+            $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+            return true;

+        }

+

+        // text

+        if ($pos=strpos($tag, '<')!==false) {

+            $tag = '<' . substr($tag, 0, -1);

+            $node->_[HDOM_INFO_TEXT] = $tag;

+            $this->link_nodes($node, false);

+            $this->char = $this->doc[--$this->pos]; // prev

+            return true;

+        }

+

+        if (!preg_match("/^[\w-:]+$/", $tag)) {

+            $node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until('<>');

+            if ($this->char==='<') {

+                $this->link_nodes($node, false);

+                return true;

+            }

+

+            if ($this->char==='>') $node->_[HDOM_INFO_TEXT].='>';

+            $this->link_nodes($node, false);

+            $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+            return true;

+        }

+

+        // begin tag

+        $node->nodetype = HDOM_TYPE_ELEMENT;

+        $tag_lower = strtolower($tag);

+        $node->tag = ($this->lowercase) ? $tag_lower : $tag;

+

+        // handle optional closing tags

+        if (isset($this->optional_closing_tags[$tag_lower]) ) {

+            while (isset($this->optional_closing_tags[$tag_lower][strtolower($this->parent->tag)])) {

+                $this->parent->_[HDOM_INFO_END] = 0;

+                $this->parent = $this->parent->parent;

+            }

+            $node->parent = $this->parent;

+        }

+

+        $guard = 0; // prevent infinity loop

+        $space = array($this->copy_skip($this->token_blank), '', '');

+

+        // attributes

+        do {

+            if ($this->char!==null && $space[0]==='') break;

+            $name = $this->copy_until($this->token_equal);

+            if($guard===$this->pos) {

+                $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+                continue;

+            }

+            $guard = $this->pos;

+

+            // handle endless '<'

+            if($this->pos>=$this->size-1 && $this->char!=='>') {

+                $node->nodetype = HDOM_TYPE_TEXT;

+                $node->_[HDOM_INFO_END] = 0;

+                $node->_[HDOM_INFO_TEXT] = '<'.$tag . $space[0] . $name;

+                $node->tag = 'text';

+                $this->link_nodes($node, false);

+                return true;

+            }

+

+            // handle mismatch '<'

+            if($this->doc[$this->pos-1]=='<') {

+                $node->nodetype = HDOM_TYPE_TEXT;

+                $node->tag = 'text';

+                $node->attr = array();

+                $node->_[HDOM_INFO_END] = 0;

+                $node->_[HDOM_INFO_TEXT] = substr($this->doc, $begin_tag_pos, $this->pos-$begin_tag_pos-1);

+                $this->pos -= 2;

+                $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+                $this->link_nodes($node, false);

+                return true;

+            }

+

+            if ($name!=='/' && $name!=='') {

+                $space[1] = $this->copy_skip($this->token_blank);

+                $name = $this->restore_noise($name);

+                if ($this->lowercase) $name = strtolower($name);

+                if ($this->char==='=') {

+                    $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+                    $this->parse_attr($node, $name, $space);

+                }

+                else {

+                    //no value attr: nowrap, checked selected...

+                    $node->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_NO;

+                    $node->attr[$name] = true;

+                    if ($this->char!='>') $this->char = $this->doc[--$this->pos]; // prev

+                }

+                $node->_[HDOM_INFO_SPACE][] = $space;

+                $space = array($this->copy_skip($this->token_blank), '', '');

+            }

+            else

+                break;

+        } while($this->char!=='>' && $this->char!=='/');

+

+        $this->link_nodes($node, true);

+        $node->_[HDOM_INFO_ENDSPACE] = $space[0];

+

+        // check self closing

+        if ($this->copy_until_char_escape('>')==='/') {

+            $node->_[HDOM_INFO_ENDSPACE] .= '/';

+            $node->_[HDOM_INFO_END] = 0;

+        }

+        else {

+            // reset parent

+            if (!isset($this->self_closing_tags[strtolower($node->tag)])) $this->parent = $node;

+        }

+        $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+        return true;

+    }

+

+    // parse attributes

+    protected function parse_attr($node, $name, &$space) {

+        $space[2] = $this->copy_skip($this->token_blank);

+        switch($this->char) {

+            case '"':

+                $node->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_DOUBLE;

+                $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+                $node->attr[$name] = $this->restore_noise($this->copy_until_char_escape('"'));

+                $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+                break;

+            case '\'':

+                $node->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_SINGLE;

+                $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+                $node->attr[$name] = $this->restore_noise($this->copy_until_char_escape('\''));

+                $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+                break;

+            default:

+                $node->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_NO;

+                $node->attr[$name] = $this->restore_noise($this->copy_until($this->token_attr));

+        }

+    }

+

+    // link node's parent

+    protected function link_nodes(&$node, $is_child) {

+        $node->parent = $this->parent;

+        $this->parent->nodes[] = $node;

+        if ($is_child)

+            $this->parent->children[] = $node;

+    }

+

+    // as a text node

+    protected function as_text_node($tag) {

+        $node = new simple_html_dom_node($this);

+        ++$this->cursor;

+        $node->_[HDOM_INFO_TEXT] = '</' . $tag . '>';

+        $this->link_nodes($node, false);

+        $this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+        return true;

+    }

+

+    protected function skip($chars) {

+        $this->pos += strspn($this->doc, $chars, $this->pos);

+        $this->char = ($this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+    }

+

+    protected function copy_skip($chars) {

+        $pos = $this->pos;

+        $len = strspn($this->doc, $chars, $pos);

+        $this->pos += $len;

+        $this->char = ($this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+        if ($len===0) return '';

+        return substr($this->doc, $pos, $len);

+    }

+

+    protected function copy_until($chars) {

+        $pos = $this->pos;

+        $len = strcspn($this->doc, $chars, $pos);

+        $this->pos += $len;

+        $this->char = ($this->pos<$this->size) ? $this->doc[$this->pos] : null; // next

+        return substr($this->doc, $pos, $len);

+    }

+

+    protected function copy_until_char($char) {

+        if ($this->char===null) return '';

+

+        if (($pos = strpos($this->doc, $char, $this->pos))===false) {

+            $ret = substr($this->doc, $this->pos, $this->size-$this->pos);

+            $this->char = null;

+            $this->pos = $this->size;

+            return $ret;

+        }

+

+        if ($pos===$this->pos) return '';

+        $pos_old = $this->pos;

+        $this->char = $this->doc[$pos];

+        $this->pos = $pos;

+        return substr($this->doc, $pos_old, $pos-$pos_old);

+    }

+

+    protected function copy_until_char_escape($char) {

+        if ($this->char===null) return '';

+

+        $start = $this->pos;

+        while(1) {

+            if (($pos = strpos($this->doc, $char, $start))===false) {

+                $ret = substr($this->doc, $this->pos, $this->size-$this->pos);

+                $this->char = null;

+                $this->pos = $this->size;

+                return $ret;

+            }

+

+            if ($pos===$this->pos) return '';

+

+            if ($this->doc[$pos-1]==='\\') {

+                $start = $pos+1;

+                continue;

+            }

+

+            $pos_old = $this->pos;

+            $this->char = $this->doc[$pos];

+            $this->pos = $pos;

+            return substr($this->doc, $pos_old, $pos-$pos_old);

+        }

+    }

+

+    // remove noise from html content

+    protected function remove_noise($pattern, $remove_tag=false) {

+        $count = preg_match_all($pattern, $this->doc, $matches, PREG_SET_ORDER|PREG_OFFSET_CAPTURE);

+

+        for ($i=$count-1; $i>-1; --$i) {

+            $key = '___noise___'.sprintf('% 3d', count($this->noise)+100);

+            $idx = ($remove_tag) ? 0 : 1;

+            $this->noise[$key] = $matches[$i][$idx][0];

+            $this->doc = substr_replace($this->doc, $key, $matches[$i][$idx][1], strlen($matches[$i][$idx][0]));

+        }

+

+        // reset the length of content

+        $this->size = strlen($this->doc);

+        if ($this->size>0) $this->char = $this->doc[0];

+    }

+

+    // restore noise to html content

+    function restore_noise($text) {

+        while(($pos=strpos($text, '___noise___'))!==false) {

+            $key = '___noise___'.$text[$pos+11].$text[$pos+12].$text[$pos+13];

+            if (isset($this->noise[$key]))

+                $text = substr($text, 0, $pos).$this->noise[$key].substr($text, $pos+14);

+        }

+        return $text;

+    }

+

+    function __toString() {

+        return $this->root->innertext();

+    }

+

+    function __get($name) {

+        switch($name) {

+            case 'outertext': return $this->root->innertext();

+            case 'innertext': return $this->root->innertext();

+            case 'plaintext': return $this->root->text();

+        }

+    }

+

+    // camel naming conventions

+    function childNodes($idx=-1) {return $this->root->childNodes($idx);}

+    function firstChild() {return $this->root->first_child();}

+    function lastChild() {return $this->root->last_child();}

+    function getElementById($id) {return $this->find("#$id", 0);}

+    function getElementsById($id, $idx=null) {return $this->find("#$id", $idx);}

+    function getElementByTagName($name) {return $this->find($name, 0);}

+    function getElementsByTagName($name, $idx=-1) {return $this->find($name, $idx);}

+    function loadFile() {$args = func_get_args();$this->load(call_user_func_array('file_get_contents', $args), true);}

+}

+?>

--- a/staticmaplite/.gitignore
+++ b/staticmaplite/.gitignore
@@ -1,3 +1,4 @@
 cache/tiles
 cache/map
+cache/maps
 

 Binary files a/staticmaplite/cache/maps/01/14/c6e6e108859a72d2a1788d80dcca.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/01/8e/2802d509249cc647933f722af1ec.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/01/f9/821c0d716435f60c89db9be59878.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/0a/c0/3cac615b707496a2e4626e35d347.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/0f/03/444c437c3e88cc187e5efba943aa.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/11/60/56a2e06ac6336d7962a2c43bb2a5.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/13/54/be1781bb626f8f8d81df528eda69.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/16/6d/a15b2feea5a36c00baaca471b7f6.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/16/e7/c07b8d2d17e32528368a09bef070.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/18/c7/ee45caf9b2c492f515ec9b0757df.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/19/58/f04b3d84f289c7b7e284828f2c2b.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/1a/44/b7d7510ad29915f14b115834fd08.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/1d/3d/6a52b662e1a05de1c2fae3a414fc.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/1d/a6/63336b21f9c6425860f9f89ae435.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/1f/ec/816972efa33287c46f0939766886.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/24/c2/ab8600227da30733cc5c6b07f0d4.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/2c/f7/86a92f478ddd4c93a131aa1b8b6a.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/31/3c/6e31c77abcf6f323115e466aee8b.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/3c/1d/2be4b564c6cb9579c119e66be5d7.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/3c/58/18358a67893fe0690eac2577073b.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/3c/7e/fbccb14edad70ff856053e3819e4.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/3f/10/d71a0fd38365ff65ee4c37af38f8.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/43/3a/a51f781d5c7d3fd086089a0d46b4.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/48/5d/cc06dd33314f96cdd89c46766328.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/4d/f3/9656e77647fbc975f45bd3c2bac2.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/4e/25/07fb22a605dc8197a1df1aeacc99.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/51/ad/dbcbacdfa7135285b30940be177b.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/55/3b/9d6b7ce7526047cf592dedceecad.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/56/90/fd99f1d22e045c7dfac4a7bea20f.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/56/bd/4fc6c29b896724be00820f863e62.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/58/6c/b1289e988a043f9b2925ff42e549.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/5d/61/0611c7a40f9f84cc8bf9129d0a7e.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/5e/e0/1d1a2f5fc95238a0e261c4001a53.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/5e/e6/7af3c78b383c7bcb98877cc40c30.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/5f/ef/32d9f12202c8c6668a1fbb2ec913.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/61/c7/027ef50ab42e608b6ef02daf9264.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/65/e6/082ee13e5d74898885f81ff2f95a.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/66/31/d69d9526356db44824af6c898f65.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/66/43/773a49a7d2031a4e1aaa9953120d.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/69/01/021968fe22ac6651ce199a197528.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/6e/6e/fc8425894abbb3d20a8bade25897.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/6f/c8/216d3fc847b93b4db5cdb0162cc2.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/72/5d/0258befd06578ecb6dd3130f310d.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/76/69/d8978b78792e47c127433477988f.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/77/23/885d104d6d9ee64ec5f2a1d4ef34.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/77/96/d2446c723b282d4ecfa23456ccc7.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/79/ab/8847101e25143f347b89adac1e1d.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/7d/e5/cc3d7eba9178bf509e18e753e5e3.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/83/d5/720b79ddfa2bc1af791af1adba78.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/84/5a/5f67786177291aa989544171e3ec.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/85/b3/e2f068738ae091e4f7cf9157f553.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/89/2e/591185d5c883293331852040e24f.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/89/db/436fa79e64def2a382a85af28765.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/90/fa/9a6781dd5ae140d7e80fcbd577c9.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/91/b8/8b1dab54c4359d3661ef3673c30f.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/93/0c/cf8eca8b078703896b6e60fa6103.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/97/e8/c63b2681ec36695339d80ed8f81b.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/9a/ea/f5faf0bfbcd051d506f3faf62e18.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/9b/07/16fb1e97c918bb532e851692b460.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/9e/92/86932418df93be339bbd05557eaa.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/a0/24/0a52b8fa4fa0b53cbc2ad75a459c.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/a1/28/251455acb51b1d7c93ea91d42a3b.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/a1/cb/8db69baea6e888a2123692abafc6.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/a3/6c/c13a9a0ad2c7a809f37d678c54e5.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/a6/3c/7f3e6e88426f0747ab1c9dd953b5.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/a8/a4/d364fe6255b551b600b02313b5e0.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/ad/25/03a703ae1fcfd0f68f2a98095469.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/ad/42/19cd1638eaafcea8379324ebf627.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/af/d1/53664933ab62c37d2378b6d8f1d6.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/b0/bb/53f6a8831e2e38f9fd6522d33f32.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/b1/8f/233e19f52e6776c6ecf04525b5b5.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/b2/24/8420bebfaee0a5017e1fbf4cdc5b.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/b4/c0/670751b9918e6b15c1aa5ff2e97c.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/ba/c9/1c87d13c65a94bbb45a7885839b6.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/bf/50/4bdb75f3e7cb32e4d23df24d0763.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/bf/ba/a28bcfe43d2448ec459b9e951023.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/c3/f4/cd11c0137a15e970333b7c4a37c8.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/c4/8d/2620bd52e8fe5795b5e5c422e094.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/c7/1a/b029da7ccb7094a67b32a163dedb.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/c7/9c/27a34d1eb4f98196fdd9d5b235e6.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/c9/65/40add4b05293086d00aaf0c2754b.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/c9/f9/42397b76f6af02f1556fd674cfaa.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/ca/c9/40eb0271e462a2fcc65f4fd8df92.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/d0/cc/6d8b7a60aa4833bf75608909b6dc.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/d2/15/d9e640eb3399a663e357634db0a9.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/d3/13/cf28b1109a560b60388240570bb8.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/d3/a1/3f3311bdf5abe32cc98490929b80.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/d9/5a/5f3863ce468bddf58ccee90abc06.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/dd/22/f64a143b942ebdd4056966a490cc.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/dd/33/6f999ab1e77868c186099dfbedf3.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/de/8b/e6b35e79f463f2a89aae8a6a1a92.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/df/c6/89b131d845724aa3c9dd2c4eeae2.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/e1/f1/939816215c6539609199b329241e.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/e4/d3/48f37f83e8009f3686b27f342ff8.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/e7/59/40cc47a13ac8ff1448164d9610b7.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/e9/bd/5d574f687417130963c48e209242.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/ee/61/def7936fe683ac7a240cb11639e7.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/f2/ac/8079be1f2b32dca51e07ae2befda.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/f8/e4/5fe7e7ff1e369deff57a9473b6e0.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/f9/cc/5ea84bb7da5a4624a801d0c588b9.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/fa/9b/56d72c6507db096437a763d30a6a.png and /dev/null differ
 Binary files a/staticmaplite/cache/maps/fe/c6/cacdd714ea904d6b489738b24e49.png and /dev/null differ
file:b/stop.pdf.php (new)
--- /dev/null
+++ b/stop.pdf.php
@@ -1,1 +1,196 @@
+<?php
+include ('common.inc.php');
+$stopid = filter_var($_REQUEST['stopid'], FILTER_SANITIZE_NUMBER_INT);
+$url = $APIurl . "/json/stop?stop_id=" . $stopid;
+$stop = json_decode(getPage($url));
+$html.= '<table><tr><td><br><br> ';
+$url = $APIurl . "/json/stoproutes?stop=" . $stopid . "&time=" . midnight_seconds() . "&service_period=" . service_period();
+$routes = json_decode(getPage($url));
+foreach ($routes as $route) {
+	$html.= '<br> <a href="trip.php?routeid=' . $route[0] . '&stopid=' . $stopid . '">' . $route[1] . ' - ' . $route[2] . '</a>';
+	$viaPoints = viaPointNames($route[3], $stopid);
+	if ($viaPoints != "") $html.= '<br><small>Via: ' . $viaPoints . '</small>';
+	$html.= "<br>";
+}
+$html.= '</td><td>' . staticmap(Array(
+	0 => Array(
+		$stop[2],
+		$stop[3]
+	)
+) , 0, "iconb", false) . "</td></tr>";
+$url = $APIurl . "/json/stoptrips?stop=" . $stopid . "&time=" . midnight_seconds() . "&service_period=" . service_period();
+$trips = json_decode(getPage($url));
+$html.= "</table><br><br><table>";
+$html.= "<thead><tr><th>Route</th><th>Time</th></tr></thead>";
+debug(print_r($trips, true));
+foreach ($trips as $row) {
+	$html.= '<tr><td><a href="trip.php?stopid=' . $stopid . '&tripid=' . $row[1][0] . '">' . $row[1][1] . "</a></td>";
+	$html.= '<td>' . midnight_seconds_to_time($row[0]) . '</td>';
+	$html.= '</tr>';
+}
+$html.= '</table>';
+if (sizeof($trips) == 0) $html.= "<center>No trips in the near future.</center>";
+require_once ('tcpdf/config/lang/eng.php');
+require_once ('tcpdf/tcpdf.php');
+// create new PDF document
+class Custom_TCPDF extends TCPDF
+{
+	var $QRCodeURL;
+	function set_QRCodeURL($url)
+	{
+		$this->QRCodeURL = $url;
+	}
+	/**
+	 * This method is used to render the page header.
+	 * It is automatically called by AddPage() and could be overwritten in your own inherited class.
+	 * @public
+	 */
+	public function Header()
+	{
+		if ($this->header_xobjid < 0) {
+			// start a new XObject Template
+			$this->header_xobjid = $this->startTemplate($this->w, $this->tMargin + 10);
+			$headerfont = $this->getHeaderFont();
+			$headerdata = $this->getHeaderData();
+			$this->y = $this->header_margin;
+			if ($this->rtl) {
+				$this->x = $this->w - $this->original_rMargin;
+			}
+			else {
+				$this->x = $this->original_lMargin - 10;
+			}
+			if (isset($this->QRCodeURL)) {
+				// QRCODE,H : QR-CODE Best error correction
+				$style = array(
+					'border' => 1,
+					'padding' => 0,
+					'fgcolor' => array(
+						0,
+						0,
+						0
+					) ,
+					'bgcolor' => false, //array(255,255,255)
+					'module_width' => 1, // width of a single module in points
+					'module_height' => 1
+					// height of a single module in points
+					
+				);
+				$this->write2DBarcode($this->QRCodeURL, 'QRCODE,H', '', '', 25, 25, $style, 'T');
+				$imgy = 50 + 20;
+			}
+			elseif (($headerdata['logo']) AND ($headerdata['logo'] != K_BLANK_IMAGE)) {
+				$imgtype = $this->getImageFileType(K_PATH_IMAGES . $headerdata['logo']);
+				if (($imgtype == 'eps') OR ($imgtype == 'ai')) {
+					$this->ImageEps(K_PATH_IMAGES . $headerdata['logo'], '', '', $headerdata['logo_width']);
+				}
+				elseif ($imgtype == 'svg') {
+					$this->ImageSVG(K_PATH_IMAGES . $headerdata['logo'], '', '', $headerdata['logo_width']);
+				}
+				else {
+					$this->Image(K_PATH_IMAGES . $headerdata['logo'], '', '', $headerdata['logo_width']);
+				}
+				$imgy = $this->getImageRBY();
+			}
+			else {
+				$imgy = $this->y;
+			}
+			$cell_height = round(($this->cell_height_ratio * $headerfont[2]) / $this->k, 2);
+			// set starting margin for text data cell
+			if ($this->getRTL()) {
+				$header_x = $this->original_rMargin + ($headerdata['logo_width'] * 1.1);
+			}
+			else {
+				$header_x = $this->original_lMargin + ($headerdata['logo_width'] * 1.1);
+			}
+			$cw = $this->w - $this->original_lMargin - $this->original_rMargin - ($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($cw, $cell_height, $headerdata['title'], 0, 1, '', 0, '', 0);
+			// header string
+			$this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]);
+			$this->SetX($header_x);
+			$this->MultiCell($cw, $cell_height, $headerdata['string'], 0, '', 0, 1, '', '', true, 0, false);
+			// print an ending header line
+			//$this->SetLineStyle(array('width' => 0.85 / $this->k, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
+			//$this->SetY((2.835 / $this->k) + max($imgy, $this->y));
+			if ($this->rtl) {
+				$this->SetX($this->original_rMargin);
+			}
+			else {
+				$this->SetX($this->original_lMargin);
+			}
+			//$this->Cell(($this->w - $this->original_lMargin - $this->original_rMargin), 0, '', 'T', 0, 'C');
+			$this->endTemplate();
+		}
+		// print header template
+		$x = 0;
+		$dx = 0;
+		if ($this->booklet AND (($this->page % 2) == 0)) {
+			// adjust margins for booklet mode
+			$dx = ($this->original_lMargin - $this->original_rMargin);
+		}
+		if ($this->rtl) {
+			$x = $this->w + $dx;
+		}
+		else {
+			$x = 0 + $dx;
+		}
+		$this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false);
+	}
+}
+$pdf = new Custom_TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('bus.lambdacomplex.org');
+$pdf->SetTitle($stop[1]);
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, $stop[1] . " Timetable", "Some description of customization like Weekdays, 9am-10am");
+$pdf->set_QRCodeURL(curPageURL() . "stop.php?stopid=" . $_REQUEST['stopid']);
+// set header and footer fonts
+$pdf->setHeaderFont(Array(
+	PDF_FONT_NAME_MAIN,
+	'',
+	PDF_FONT_SIZE_MAIN
+));
+$pdf->setFooterFont(Array(
+	PDF_FONT_NAME_DATA,
+	'',
+	PDF_FONT_SIZE_DATA
+));
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+// ---------------------------------------------------------
+// set default font subsetting mode
+$pdf->setFontSubsetting(true);
+// Set font
+// dejavusans is a UTF-8 Unicode font, if you only need to
+// print standard ASCII chars, you can use core fonts like
+// helvetica or times to reduce file size.
+$pdf->SetFont('helvetica', '', 14, '', true);
+// Add a page
+// This method has several options, check the source code documentation for more information.
+$pdf->AddPage();
+// Print text using writeHTMLCell()
+$pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);
+// ---------------------------------------------------------
+// Close and output PDF document
+// This method has several options, check the source code documentation for more information.
+$pdf->Output('example_001.pdf', 'I');
+//============================================================+
+// END OF FILE
+//============================================================+
 
+?>
+

file:a/stop.php -> file:b/stop.php
--- a/stop.php
+++ b/stop.php
@@ -1,36 +1,87 @@
 <?php
-include('common.inc.php');
-$url = $APIurl."/json/stop?stop_id=".$_REQUEST['stopid'];
+include ('common.inc.php');
+$stopid = filter_var($_REQUEST['stopid'], FILTER_SANITIZE_NUMBER_INT);
+$stopcode = filter_var($_REQUEST['stopcode'], FILTER_SANITIZE_STRING);
+$url = $APIurl . "/json/stop?stop_id=" . $stopid;
 $stop = json_decode(getPage($url));
+if ($stopcode != ""  && $stop[5] != $stopcode) {
+	$url = $APIurl . "/json/stopcodesearch?q=" . $stopcode;
+	$stopsearch = json_decode(getPage($url));
+	$stopid = $stopsearch[0][0];
+	$url = $APIurl . "/json/stop?stop_id=" . $stopid;
+	$stop = json_decode(getPage($url));
+}
+if (!startsWith($stop[5], "Wj") && strpos($stop[1],"Platform") === false) {
+    // expand out to all platforms
+}
+$stops = Array();
+$stopPositions = Array();
+$tripStopNumbers = Array();
+$allStopsTrips = Array();
+$stopLinks = "";
+if (isset($_REQUEST['stopids'])) {
+    $stopids = explode(",",filter_var($_REQUEST['stopids'], FILTER_SANITIZE_STRING));
+    foreach ($stopids as $sub_stopid) {
+        $url = $APIurl . "/json/stop?stop_id=" . $sub_stopid;
+        $stop = json_decode(getPage($url));
+        $stops[] = $stop;
+    }
+    $stop = $stops[0];
+    $stopid = $stops[0][0];
+    $stopLinks .= "Individual stop pages: ";
+    foreach ($stops as $key => $sub_stop) {
+        $stopLinks .= '<a href="stop.php?stopid='.$sub_stop[0].'&stopcode='.$sub_stop[5].'">'.$sub_stop[1].' Stop #'.($key+1).'</a> ';
+        $stopPositions[$key] = Array($sub_stop[2],$sub_stop[3]);
+        $url = $APIurl . "/json/stoptrips?stop=" . $sub_stop[0] . "&time=" . midnight_seconds() . "&service_period=" . service_period();
+        $trips = json_decode(getPage($url));
+        foreach ($trips as $trip) {
+            if (!isset($allStopTrips[$row[1][0]])) $allStopTrips[$row[1][0]] = $trip;
+            $tripStopNumbers[$row[1][0]][] = $key;
+        }
+    }
+}
 
-include_header($stop[1],"stop");
+include_header($stop[1], "stop");
+
 if (isMetricsOn()) {
-// Create a new Instance of the tracker
-$owa = new owa_php($config);
-// Set the ID of the site being tracked
-$owa->setSiteId('bus.lambdacomplex.org');
-// Create a new event object
-$event = $owa->makeEvent();
-// Set the Event Type, in this case a "video_play"
-$event->setEventType('view_stop');
-// Set a property
-$event->set('stop_id',$_REQUEST['stopid']);
-// Track the event
-$owa->trackEvent($event);
-    }
+	// Create a new Instance of the tracker
+	$owa = new owa_php();
+	// Set the ID of the site being tracked
+	$owa->setSiteId($owaSiteID);
+	// Create a new event object
+	$event = $owa->makeEvent();
+	// Set the Event Type, in this case a "video_play"
+	$event->setEventType('view_stop');
+	// Set a property
+	$event->set('stop_id', $stopid);
+	// Track the event
+	$owa->trackEvent($event);
+}
 timePlaceSettings();
-echo '<div data-role="content" class="ui-content" role="main"><p>'.staticmap(Array(0 => Array($stop[2],$stop[3]))).'</p>';
+echo '<div data-role="content" class="ui-content" role="main">';
+echo $stopLinks;
+if (sizeof($stops) > 0) {
+    echo '<p>' . staticmap($stopPositions) . '</p>';
+} else {
+    echo '<p>' . staticmap(Array(
+	0 => Array(
+		$stop[2],
+		$stop[3]
+	)
+)) . '</p>';
+}
 echo '  <ul data-role="listview"  data-inset="true">';
-$url = $APIurl."/json/stoptrips?stop=".$_REQUEST['stopid']."&time=".midnight_seconds()."&service_period=".service_period();
+$url = $APIurl . "/json/stoptrips?stop=" . $stopid . "&time=" . midnight_seconds() . "&service_period=" . service_period();
 $trips = json_decode(getPage($url));
-debug(print_r($trips,true));
-foreach ($trips as $row)
-{
-echo  '<li>';
-echo '<h3><a href="trip.php?stopid='.$_REQUEST['stopid'].'&tripid='.$row[1][0].'">'.$row[1][1];
-echo '<br><small>Via: '.viaPointNames($row[1][0],$_REQUEST['stopid']).'</small> </a></h3>';      
-echo '<p class="ui-li-aside"><strong>'.midnight_seconds_to_time($row[0]).'</strong></p>';
-echo '</li>';  
+foreach ($trips as $row) {
+	echo '<li>';
+	echo '<h3><a href="trip.php?stopid=' . $stopid . '&tripid=' . $row[1][0] . '">' . $row[1][1];
+	if (isFastDevice()) {
+		$viaPoints = viaPointNames($row[1][0], $stopid);
+		if ($viaPoints != "") echo '<br><small>Via: ' . $viaPoints . '</small> </a></h3>';
+	}
+	echo '<p class="ui-li-aside"><strong>' . midnight_seconds_to_time($row[0]) . '</strong></p>';
+	echo '</li>';
 }
 if (sizeof($trips) == 0) echo "<li> <center>No trips in the near future.</center> </li>";
 echo '</ul></div>';

--- a/stopList.php
+++ b/stopList.php
@@ -1,8 +1,8 @@
 <?php
-include('common.inc.php');
-
-function navbar() {
-   echo'
+include ('common.inc.php');
+function navbar()
+{
+	echo '
 		<div data-role="navbar">
 			<ul> 
 				<li><a href="stopList.php">Timing Points</a></li>
@@ -12,83 +12,124 @@
 			</ul>
                 </div>
 	';
-	timePlaceSettings();
 }
 // By suburb
 if (isset($_REQUEST['suburbs'])) {
-   include_header("Stops by Suburb","stopList");
-   navbar();
-   echo '  <ul data-role="listview" data-filter="true" data-inset="true" >';
-   foreach ($suburbs as $suburb) {
-         echo  '<li><a href="stopList.php?suburb='.urlencode($suburb).'">'.$suburb.'</a></li>';
-   }
-echo '</ul>';
-} else {
-// Timing Points / All stops
-
-if ($_REQUEST['allstops']) {
-   $url = $APIurl."/json/stops";
-   include_header("All Stops","stopList");
-   navbar();
-} else if ($_REQUEST['nearby']) {
-   $url = $APIurl."/json/neareststops?lat={$_SESSION['lat']}&lon={$_SESSION['lon']}&limit=15";
-include_header("Nearby Stops","stopList");
-   navbar();
-   timePlaceSettings();
-} else if ($_REQUEST['suburb']) {
-   $url = $APIurl."/json/stopzonesearch?q=".filter_var($_REQUEST['suburb'], FILTER_SANITIZE_STRING);
-include_header("Stops in ".ucwords(filter_var($_REQUEST['suburb'], FILTER_SANITIZE_STRING)),"stopList");
-if (isMetricsOn()) {
-// Create a new Instance of the tracker
-$owa = new owa_php($config);
-// Set the ID of the site being tracked
-$owa->setSiteId('bus.lambdacomplex.org');
-// Create a new event object
-$event = $owa->makeEvent();
-// Set the Event Type, in this case a "video_play"
-$event->setEventType('view_stop_list_suburb');
-// Set a property
-$event->set('stop_list_suburb',$_REQUEST['suburb']);
-// Track the event
-$owa->trackEvent($event);
-    }
-   navbar();
-} else {
-   $url = $APIurl."/json/timingpoints";
-   include_header("Timing Points / Major Stops","stopList");
-   navbar();
+	include_header("Stops by Suburb", "stopList");
+	navbar();
+	echo '  <ul data-role="listview" data-filter="true" data-inset="true" >';
+	foreach ($suburbs as $suburb) {
+		echo '<li><a href="stopList.php?suburb=' . urlencode($suburb) . '">' . $suburb . '</a></li>';
+	}
+	echo '</ul>';
 }
-        echo '<div class="noscriptnav"> Go to letter: ';
-foreach(range('A','Z') as $letter) 
-{ 
-   echo "<a href=\"#$letter\">$letter</a>&nbsp;"; 
-}
-echo "</div>
+else {
+	// Timing Points / All stops
+	if ($_REQUEST['allstops']) {
+		$url = $APIurl . "/json/stops";
+		include_header("All Stops", "stopList");
+		navbar();
+		timePlaceSettings();
+	}
+	else if ($_REQUEST['nearby']) {
+		$url = $APIurl . "/json/neareststops?lat={$_SESSION['lat']}&lon={$_SESSION['lon']}&limit=15";
+		include_header("Nearby Stops", "stopList");
+		navbar();
+		timePlaceSettings(true);
+	}
+	else if ($_REQUEST['suburb']) {
+		$suburb = filter_var($_REQUEST['suburb'], FILTER_SANITIZE_STRING);
+		$url = $APIurl . "/json/stopzonesearch?q=" . $suburb;
+		include_header("Stops in " . ucwords($suburb) , "stopList");
+		if (isMetricsOn()) {
+			// Create a new Instance of the tracker
+			$owa = new owa_php($config);
+			// Set the ID of the site being tracked
+			$owa->setSiteId($owaSiteID);
+			// Create a new event object
+			$event = $owa->makeEvent();
+			// Set the Event Type, in this case a "video_play"
+			$event->setEventType('view_stop_list_suburb');
+			// Set a property
+			$event->set('stop_list_suburb', $suburb);
+			// Track the event
+			$owa->trackEvent($event);
+		}
+		navbar();
+	}
+	else {
+		$url = $APIurl . "/json/timingpoints";
+		include_header("Timing Points / Major Stops", "stopList");
+		navbar();
+		timePlaceSettings();
+	}
+	echo '<div class="noscriptnav"> Go to letter: ';
+	foreach (range('A', 'Z') as $letter) {
+		echo "<a href=\"#$letter\">$letter</a>&nbsp;";
+	}
+	echo "</div>
 	<script>
 $('.noscriptnav').hide();
         </script>";
-echo '  <ul data-role="listview" data-filter="true" data-inset="true" >';
-$contents = json_decode(getPage($url));
-debug(print_r($contents,true));
-foreach ($contents as $key => $row) {
-    $stopName[$key]  = $row[1];
-}
-
-// Sort the stops by name
-array_multisort($stopName, SORT_ASC, $contents);
-
-$firstletter = "";
-foreach ($contents as $row)
-{
-    if (substr($row[1],0,1) != $firstletter){
-        echo "<a name=$firstletter></a>";
-        $firstletter = substr($row[1],0,1);
-    }
-      echo  '<li><a href="stop.php?stopid='.$row[0].'">'.bracketsMeanNewLine($row[1]).'</a></li>';
-        }
-echo '</ul>';
+	echo '  <ul data-role="listview" data-filter="true" data-inset="true" >';
+	$stops = json_decode(getPage($url));
+	foreach ($stops as $key => $row) {
+		$stopName[$key] = $row[1];
+	}
+	// Sort the stops by name
+	array_multisort($stopName, SORT_ASC, $stops);
+	$firstletter = "";
+	$stopsGrouped = Array();
+	foreach ($stops as $key => $row) {
+		if (substr($row[1], 0, 1) != $firstletter) {
+			echo "<a name=$firstletter></a>";
+			$firstletter = substr($row[1], 0, 1);
+		}
+		if (($stops[$key][1] != $stops[$key + 1][1]) || $key + 1 >= sizeof($stops)) {
+			if (sizeof($stopsGrouped) > 0) {
+				// print and empty grouped stops
+				// subsequent duplicates
+				$stopsGrouped["stop_ids"][] = $row[0];
+				echo '<li><a href="stop.php?stopids=' . implode(",", $stopsGrouped['stop_ids']) . '">';
+				if (isset($_SESSION['lat']) && isset($_SESSION['lon'])) {
+					echo '<span class="ui-li-count">' . floor(distance($row[2], $row[3], $_SESSION['lat'], $_SESSION['lon'])) . 'm away</span>';
+				}
+				echo bracketsMeanNewLine($row[1].'('.sizeof($stopsGrouped["stop_ids"]).' stops)');
+				echo "</a></li>\n";
+				$stopsGrouped = Array();
+			}
+			else {
+				// just a normal stop
+					echo '<li>';
+			if (!startsWith($row[5], "Wj")) echo '<img src="css/images/time.png" alt="Timing Point" class="ui-li-icon">';
+		
+				if (!startsWith($row[5], "Wj")) echo '<img src="css/images/time.png" alt="Timing Point" class="ui-li-icon">';
+				echo '<a href="stop.php?stopid=' . $row[0] . (startsWith($row[5], "Wj") ? '&stopcode=' . $row[5] : "") . '">';
+				if (isset($_SESSION['lat']) && isset($_SESSION['lon'])) {
+					echo '<span class="ui-li-count">' . floor(distance($row[2], $row[3], $_SESSION['lat'], $_SESSION['lon'])) . 'm away</span>';
+				}
+				echo bracketsMeanNewLine($row[1]);
+				echo "</a></li>\n";
+			}
+		}
+		else {
+			// this is a duplicated line item
+			if ($key - 1 <= 0 || ($stops[$key][1] != $stops[$key - 1][1])) {
+				// first duplicate
+				$stopsGrouped = Array(
+					"name" => $row[1],
+					"stop_ids" => Array(
+						$row[0]
+					)
+				);
+			}
+			else {
+				// subsequent duplicates
+				$stopsGrouped["stop_ids"][] = $row[0];
+			}
+		}
+	}
+	echo '</ul>';
 }
 include_footer();
 ?>
-
-

--- /dev/null
+++ b/tcpdf/2dbarcodes.php
@@ -1,1 +1,173 @@
+<?php
+//============================================================+
+// File name   : 2dbarcodes.php
+// Version     : 1.0.007
+// Begin       : 2009-04-07
+// Last Update : 2010-12-16
+// Author      : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
+// License     : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
+// -------------------------------------------------------------------
+// Copyright (C) 2009-2010  Nicola Asuni - Tecnick.com S.r.l.
+//
+// This file is part of TCPDF software library.
+//
+// TCPDF 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 3 of the
+// License, or (at your option) any later version.
+//
+// TCPDF 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 TCPDF.  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.
+//
+//============================================================+
 
+/**
+ * @file
+ * PHP class to creates array representations for 2D barcodes to be used with TCPDF.
+ * @package com.tecnick.tcpdf
+ * @author Nicola Asuni
+ * @version 1.0.007
+ */
+
+/**
+ * @class TCPDF2DBarcode
+ * PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org).
+ * @package com.tecnick.tcpdf
+ * @version 1.0.007
+ * @author Nicola Asuni
+ */
+class TCPDF2DBarcode {
+
+	/**
+	 * Array representation of barcode.
+	 * @protected
+	 */
+	protected $barcode_array = false;
+
+	/**
+	 * 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 $code (string) code to print
+ 	 * @param $type (string) type of barcode: <ul><li>RAW: raw mode - comma-separad list of array rows</li><li>RAW2: raw mode - array rows are surrounded by square parenthesis.</li><li>QRCODE : QR-CODE Low error correction</li><li>QRCODE,L : QR-CODE Low error correction</li><li>QRCODE,M : QR-CODE Medium error correction</li><li>QRCODE,Q : QR-CODE Better error correction</li><li>QRCODE,H : QR-CODE Best error correction</li><li>PDF417 : PDF417 (ISO/IEC 15438:2006)</li><li>PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".</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 $code (string) code to print
+ 	 * @param $type (string) type of barcode: <ul><li>RAW: raw mode - comma-separad list of array rows</li><li>RAW2: raw mode - array rows are surrounded by square parenthesis.</li><li>QRCODE : QR-CODE Low error correction</li><li>QRCODE,L : QR-CODE Low error correction</li><li>QRCODE,M : QR-CODE Medium error correction</li><li>QRCODE,Q : QR-CODE Better error correction</li><li>QRCODE,H : QR-CODE Best error correction</li><li>PDF417 : PDF417 (ISO/IEC 15438:2006)</li><li>PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".</li></ul>
+ 	 * @return array
+	 */
+	public function setBarcode($code, $type) {
+		$mode = explode(',', $type);
+		$qrtype = strtoupper($mode[0]);
+		switch ($qrtype) {
+			case 'QRCODE': { // QR-CODE
+				require_once(dirname(__FILE__).'/qrcode.php');
+				if (!isset($mode[1]) OR (!in_array($mode[1],array('L','M','Q','H')))) {
+					$mode[1] = 'L'; // Ddefault: Low error correction
+				}
+				$qrcode = new QRcode($code, strtoupper($mode[1]));
+				$this->barcode_array = $qrcode->getBarcodeArray();
+				break;
+			}
+			case 'PDF417': { // PDF417 (ISO/IEC 15438:2006)
+				require_once(dirname(__FILE__).'/pdf417.php');
+				if (!isset($mode[1]) OR ($mode[1] === '')) {
+					$aspectratio = 2; // default aspect ratio (width / height)
+				} else {
+					$aspectratio = floatval($mode[1]);
+				}
+				if (!isset($mode[2]) OR ($mode[2] === '')) {
+					$ecl = -1; // default error correction level (auto)
+				} else {
+					$ecl = intval($mode[2]);
+				}
+				// set macro block
+				$macro = array();
+				if (isset($mode[3]) AND ($mode[3] !== '') AND isset($mode[4]) AND ($mode[4] !== '') AND isset($mode[5]) AND ($mode[5] !== '')) {
+					$macro['segment_total'] = intval($mode[3]);
+					$macro['segment_index'] = intval($mode[4]);
+					$macro['file_id'] = strtr($mode[5], "\xff", ',');
+					for ($i = 0; $i < 7; ++$i) {
+						$o = $i + 6;
+						if (isset($mode[$o]) AND ($mode[$o] !== '')) {
+							// add option
+							$macro['option_'.$i] = strtr($mode[$o], "\xff", ',');
+						}
+					}
+				}
+				$qrcode = new PDF417($code, $ecl, $aspectratio, $macro);
+				$this->barcode_array = $qrcode->getBarcodeArray();
+				break;
+			}
+			case 'RAW':
+			case 'RAW2': { // RAW MODE
+				// remove spaces
+				$code = preg_replace('/[\s]*/si', '', $code);
+				if (strlen($code) < 3) {
+					break;
+				}
+				if ($qrtype == 'RAW') {
+					// comma-separated rows
+					$rows = explode(',', $code);
+				} else { // RAW2
+					// rows enclosed in square parentheses
+					$code = substr($code, 1, -1);
+					$rows = explode('][', $code);
+				}
+				$this->barcode_array['num_rows'] = count($rows);
+				$this->barcode_array['num_cols'] = strlen($rows[0]);
+				$this->barcode_array['bcode'] = array();
+				foreach ($rows as $r) {
+					$this->barcode_array['bcode'][] = str_split($r, 1);
+				}
+				break;
+			}
+			case 'TEST': { // TEST MODE
+				$this->barcode_array['num_rows'] = 5;
+				$this->barcode_array['num_cols'] = 15;
+				$this->barcode_array['bcode'] = array(
+					array(1,1,1,0,1,1,1,0,1,1,1,0,1,1,1),
+					array(0,1,0,0,1,0,0,0,1,0,0,0,0,1,0),
+					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));
+				break;
+			}
+			default: {
+				$this->barcode_array = false;
+			}
+		}
+	}
+} // end of class
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/CHANGELOG.TXT
@@ -1,1 +1,1957 @@
-
+5.9.059 (2011-02-27)
+	- Default Header() method was improved to reduce document size.
+
+5.9.058 (2011-02-25)
+	- Image() method was improved to cache images with transparency layers (thanks to Korneliusz Jarzębski for reporting this problem).
+
+5.9.057 (2011-02-24)
+	- A problem with image caching system was fixed (thanks to Korneliusz Jarzębski for reporting this problem).
+
+5.9.056 (2011-02-22)
+	- A bug on fixHTMLCode() method was fixed.
+	- Automatic line break for HTML was fixed.
+
+5.9.055 (2011-02-17)
+	- Another bug related to HTML table page break was fixed.
+
+5.9.054 (2011-02-16)
+	- A bug related to HTML table page break was fixed.
+
+5.9.053 (2011-02-16)
+	- Support for HTMl attribute display="none" was added.
+
+5.9.052 (2011-02-15)
+	- A bug related to HTML automatic newlines was fixed.
+
+5.9.051 (2011-02-12)
+	- "Commas at beginning of new lines" problem was fixed.
+
+5.9.050 (2011-02-11)
+	- Bug #3177606 "SVG Bar chart error" was fixed.
+
+5.9.049 (2011-02-03)
+	- Bug #3170777 "TCPDF creates a new page after a single line in writeHTML" was fixed.
+
+5.9.048 (2011-02-02)
+	- No changes. Just released to override previous release that was not uploaded correctly.
+
+5.9.047 (2011-01-28)
+	- Bug #3167115 "PDF error in <table> (example 48)" was fixed (was introduced in 5.8.046).
+
+5.9.046 (2011-01-18)
+	- PDF view/print layers are now automatically turned off if not used (see setVisibility() method).
+
+5.9.045 (2011-01-17)
+	- HTML list support were improved.
+
+5.9.044 (2011-01-15)
+	- Bug #3158422 "writeHTMLCell Loop" was fixed.
+	- Some HTML image alignment problems were fixed.
+
+5.9.043 (2011-01-14)
+	- Bug #3158178 "PHP Notice" was fixed.
+	- Bug #3158193 "Endless loop in writeHTML" was fixed.
+	- Bug #3157764 "SVG Pie chart incorrectly rendered2".
+
+5.9.042 (2011-01-14)
+	- Some problems of the PHP4 version were fixed.
+
+5.9.041 (2011-01-13)
+	- A problem with SVG elliptical arc path was fixed (ref. bug #3156574).
+	- A problem related to font weight on HTML table headers was fixed.
+
+5.9.040 (2011-01-12)
+	- A bug related to empty pages after table was fixed.
+
+5.9.039 (2011-01-12)
+	- Bug item #3155759 "openssl_random_pseudo_bytes() slow under Windows" was fixed.
+
+5.9.038 (2011-01-11)
+	- Minor bugs were fixed.
+
+5.9.037 (2011-01-09)
+	- An alignment problem for HTML texts was fixed.
+
+5.9.036 (2011-01-07)
+	- A bug related to HTML tables on header was fixed.
+
+5.9.035 (2011-01-03)
+	- A problem related to HTML table border alignment was fixed.
+	- Bug #2996366 "FastCGI and Header Problems" was fixed.
+
+5.9.034 (2010-12-19)
+	- DejaVu and GNU Free fonts were updated.
+
+5.9.033 (2010-12-18)
+	- Source code documetnation was improved.
+
+5.9.032 (2010-12-18)
+	- Default font stretching and spacing values are now inherited by HTML methods.
+
+5.9.031 (2010-12-16)
+	- Source code documentation errors were fixed.
+
+5.9.030 (2010-12-16)
+	- Several source code documentation errors were fixed.
+	- Source code style was changed for Doxygen.
+	- Source code documentation was moved online to http://www.tcpdf.org
+
+5.9.029 (2010-12-04)
+	- The $fitbox parameter on Image() method was extended to specify image alignment inside the box (check the example n. 9).
+
+5.9.028 (2010-12-03)
+	- Font utils makefont.php and makeallttffonts.php were updated.
+
+5.9.027 (2010-12-01)
+	- Spot Colors are now better integrated with HTML mode.
+	- Method SetDocInfoUnicode() was added to turn on/off Unicode mode for document information dictionary (meta tags) - check the example n. 19.
+
+5.9.026 (2010-12-01)
+	- A problem with mixed text directions on HTML was fixed.
+
+5.9.025 (2010-12-01)
+	- The AddSpotColor() now automatically fills the spotcolor array (defined on spotcolors.php file).
+
+5.9.024 (2010-11-30)
+	- Bug item #3123612 "SVG not use gradientTransform in percentage mode" was fixed.
+
+5.9.023 (2010-11-25)
+	- A potential bug on SVG transcoder was fixed.
+
+5.9.022 (2010-11-21)
+	- Method ImageEPS includes support for EPS/AI Spot colors.
+	- Method ImageEPS includes a new parameter $fixoutvals to remove values outside the bounding box.
+
+5.9.021 (2010-11-20)
+	- Support for custom bullet points images was added (check the example n.6)
+	- Examples n. 6 and 61 were update (check the comments inside).
+
+5.9.020 (2010-11-19)
+	- A problem related to additional page when using multicolumn mode was fixed.
+
+5.9.019 (2010-11-19)
+	- An SVG bug was fixed.
+	- ImageSVG() and ImageEPS() methods now accepts image data streams (put the string on the $file parameter preceded by '@' character).
+	- Option 'E' was added to the $dest parameter of Output() method to return the document as base64 mime multi-part email attachment (RFC 2045).
+
+5.9.018 (2010-11-19)
+	- An SVG bug was fixed.
+
+5.9.017 (2010-11-16)
+	- Tagline color was set to transparent.
+	- The method fixHTMLCode() was added to automatically clean up HTML code (requires HTML Tidy).
+
+5.9.016 (2010-11-16)
+	- Bug item #3109705 "list item page break hanging bullet" was fixed.
+
+5.9.015 (2010-11-16)
+	- Bug item affecting QRCode was fixed.
+	- Some bugs affecting HTML lists were fixed.
+	- ImageSVG() and fitBlock() methods were improved to handle some SVG problems.
+	- Some problems with PHP4 compatibility were fixed.
+
+5.9.014 (2010-11-15)
+	- Bug item #3109464 "QRCode error" was fixed.
+
+5.9.013 (2010-11-15)
+	- Bug item #3109257 "Problem with interlaced GIFs and PNGs" was fixed.
+	- Image function now accepts image data streams (check example n. 9).
+
+5.9.012 (2010-11-12)
+	- Method getTCPDFVersion() was added.
+	- PDF_PRODUCER constant was removed.
+	- Method convertHTMLColorToDec() was improved.
+	- HTML colors now support spot color names defined on the new spotcolors.php file.
+	- The default method Header() was improved to support SVG and EPS/AI images.
+	- A bug on SVG importer was fixed.
+
+5.9.011 (2010-11-02)
+	- Bug item #3101486 "Bug Fix for image loading" was fixed.
+
+5.9.010 (2010-10-27)
+	- Support for CSS properties 'border-spacing' and 'padding' for tables were added.
+	- Several language files were added.
+
+5.9.009 (2010-10-21)
+	- HTML text alignment was improved to include the case of RTL text on LTR direction and LTR text on RTL direction.
+
+5.9.008 (2010-10-21)
+	- Bug item #3091502 "Bookmark oddity" was fixed.
+	- HTML internal links now accepts page number and Y position.
+	- The method write1DBarcode() was improved to accept separate horizontal and vertical padding (see example n. 27).
+
+5.9.007 (2010-10-20)
+	- Method adjustCellPadding() was fixed to handle bad input.
+
+5.9.006 (2010-10-19)
+	- Support for AES 256 bit encryption was added (see example n. 16).
+	- Method getNumLines() was fixed for the empty string case.
+
+5.9.005 (2010-10-18)
+	- Method addPageRegion() was changed to accept regions starting exactly from the top of the page.
+
+5.9.004 (2010-10-18)
+	- A bug related to annotations was fixed.
+	- The file unicode_data.php was canged to encapsulate all data in a class.
+	- The file htmlcolors.php was changed to remove the global variable.
+
+5.9.003 (2010-10-15)
+	- Support for no-write page regions was added. Check the example n. 64 and new methods setPageRegions(), addPageRegion(), getPageRegions(), removePageRegion().
+	- A bug on Right-To-Left alignment was fixed.
+
+5.9.002 (2010-10-08)
+	- Cell method was improved to preserve the font stretching and spacing values when using the $stretch parameter (see example n. 4).
+
+5.9.001 (2010-10-07)
+	- The problem of blank page for nobr table higher than a single page was fixed.
+
+5.9.000 (2010-10-06)
+	- Support for text stretching and spacing (kerning) was added, see example n. 63 and methods setFontStretching(), getFontStretching(), setFontSpacing(), getFontSpacing().
+	- Support for CSS properties 'font-stretch' and 'letter-spacing' was added (see example n. 63).
+	- The cMargin state was replaced by cell_padding array that can be set/get using setCellPadding() and getCellPadding() methods.
+	- Methods getCellPaddings() and setCellPaddings() were added to fine tune cell paddings (see example n. 5).
+	- Methods getCellMargins() and setCellMargins() were added to fine tune cell margins (see example n. 5).
+	- Method write1DBarcode() was improved to permit custom labels (see example n. 27).
+	- Method ImagePngAlpha() now includes support for ImageMagick to improve performances.
+	- XObject Template support was extended to support Multicell(), writeHTML() and writeHTMLCell() methods.
+	- The signature of getNumLines() and getStringHeight() methods is changed.
+	- Example n. 57 was updated.
+
+// -------------------------------------------------------------------
+
+5.8.034 (2010-09-27)
+	- A bug related to SetFont on XObject templates was fixed.
+
+5.8.033 (2010-09-25)
+	- A problem with Footer() and multiple columns was fixed.
+
+5.8.032 (2010-09-22)
+	- Bug #3073165 "Issues with changes to addHTMLVertSpace()" was fixed.
+
+5.8.031 (2010-09-20)
+	- Bug #3071961 "Spaces in HTML" was fixed.
+
+5.8.030 (2010-09-17)
+	- SVG support was improved and some bugs were fixed.
+
+5.8.029 (2010-09-16)
+	- A problem with HTML borders was fixed.
+
+5.8.028 (2010-09-13)
+	- Bug #3065224 "mcrypt_create_iv error on TCPDF 5.8.027 on PHP 5.3.2" was fixed.
+
+5.8.027 (2010-09-13)
+	- Bug #3065118 "mcrypt_decrypt error on TCPDF 5.8.026 on PHP 5.3.2" was fixed.
+
+5.8.026 (2010-09-13)
+	- A bug on addHTMLTOC() method was fixed. Note: be sure that the #TOC_PAGE_NUMBER# template has enough width to be printed correctly.
+
+5.8.025 (2010-09-09)
+	- Bug #3062692 "Textarea inside a table" was fixed.
+
+5.8.024 (2010-09-08)
+	- Bug #3062005 "Undefined variable: ann_obj_id" was fixed.
+
+5.8.023 (2010-08-31)
+	- Forms bug added on version 5.8.019 was fixed.
+
+5.8.022 (2010-08-31)
+	- Bug #3056632 "SVG rendered vertically flipped" was fixed.
+
+5.8.021 (2010-08-30)
+	- A new CID-0 'chinese' font was added for traditional Chinese.
+	- Bug #3054287 'Inner tags are ignored due to "align" attribute' was fixed.
+
+5.8.020 (2010-08-26)
+	- CSS "catch-all" class selector is now supported.
+
+5.8.019 (2010-08-26)
+	- XObject Templates now includes support for links and annotations.
+	- A problem related to link alignment on cell was fixed.
+	- A problem related to SVG styles was fixed.
+
+5.8.018 (2010-08-25)
+	- Method getNumberOfColumns() was added.
+	- A problem related to table header was fixed.
+	- Method getSVGTransformMatrix() was fixed to apply SVG transformations in the correct order.
+	- SVG support was improved and several bugs were fixed.
+
+5.8.017 (2010-08-25)
+	- This version includes support for XObject Templates (see the new example n. 62).
+	- Methods starttemplate(), endTemplate() and printTemplate() were added (see the new example n. 62).
+
+5.8.016 (2010-08-24)
+	- Alignment problem on write2DBarcode was fixed.
+
+5.8.015 (2010-08-24)
+	- A problem arised with the latest bugfix was fixed.
+
+5.8.014 (2010-08-23)
+	- Method _getxobjectdict() was added for better compatibility with external extensions.
+	- A bug related to radiobuttons was fixed.
+	- Bug #3051509 "new line after punctuation marks" was fixed (partially).
+
+5.8.013 (2010-08-23)
+	- SVG support for 'direction' property was added.
+	- A problem on default width calculation for linear barcodes was fixed.
+	- New option was added to write1DBarcode() method to improve alignments (see example n. 27).
+	- Bug #3050896 "Nested HTML tables: styles are not applied" was fixed.
+	- Method _putresourcedict() was improved to include external XObject templates.
+
+5.8.012 (2010-08-22)
+	- Support for SVG 'text-anchor' property was added.
+
+5.8.011 (2010-08-21)
+	- Method write1DBarcode() was improved to be backward compatible (check the new example n. 27).
+	- Support for CSS width and height properties on images were added.
+
+5.8.010 (2010-08-20)
+	- Documentation of unhtmlentities() was fixed.
+	- The 'fitwidth' option was added and border color problem was fixed on write1DBarcode() method (check the example n. 27).
+
+5.8.009 (2010-08-20)
+	- Internal object numbering was improved.
+	- Some errors in object encryption were fixed.
+
+5.8.008 (2010-08-19)
+	- Method write1DBarcode() was changed, check the example n. 27.
+	- Method Footer() was changed to account for barcode changes.
+	- Automatic calculation of K_PATH_URL constant was fixed on configuration file.
+	- Method setEqualColumns() was fixed for $width=0 case.
+	- Method AddTOC() was fixed for multipage and multicolumn modes.
+	- Better support for SVG "font-family" property.
+	- A problem on default Page Zoom mode was fixed.
+	- Several Annotation bugs were fixed.
+
+5.8.007 (2010-08-18)
+	- A bug affecting HTML tables was fixed.
+	- Bug #3047500 "SVG not rendering paths properly" was fixed.
+
+5.8.006 (2010-08-17)
+	- A bug affecting HTML table nesting was fixed.
+
+5.8.005 (2010-08-17)
+	- A bug affecting the HTML 'select' tag in certain conditions was fixed.
+
+5.8.004 (2010-08-17)
+	- Better support for HTML "font-family" property.
+	- A bug related to HTML multicolumn was fixed.
+
+5.8.003 (2010-08-16)
+	- Better support for HTML "font-family" property.
+
+5.8.002 (2010-08-14)
+	- HTML alignments were improved
+	- IMPORTANT: Default regular expression to find spaces has been changed to exclude the non-breaking-space (160 DEC- A0 HEX). If you are using setSpacesRE() method, please read the new documentation.
+	- Example n. 1 was updated.
+
+5.8.001 (2010-08-12)
+	- Bug #3043650 "subsetchars incorrectly cached" was fixed.
+
+5.8.000 (2010-08-11)
+	- A control to avoid bookmarking page 0 was added.
+	- addTOC() method now includes support for multicolumn mode.
+	- Support for tables in multicolumn mode was improved.
+	- Example n.10 was updated.
+	- All trimming functions were replaced with stringLeftTrim(), stringRightTrim() and stringTrim().
+	- HTML alignments were improved.
+
+------------------------------------------------------------
+
+5.7.003 (2010-08-08)
+	- Bug #3041263 "php source ending is bad" was fixed (all PHP files were updated, including fonts).
+
+5.7.002 (2010-08-06)
+	- Methods copyPage(), movePage() and deletePage() were changed to account for internal markings.
+
+5.7.001 (2010-08-05)
+	- Bug #3040105 "Broken PDF when using TOC (example 45)" was fixed.
+
+5.7.000 (2010-08-03)
+	- CSS borders are now supported for HTML tables and other block tags (see example n. 61);
+	- Cell borders were improved (see example n. 57);
+	- Minor bugs were fixed.
+
+------------------------------------------------------------
+
+5.6.000 (2010-07-31)
+	- A bug with object IDs was fixes.
+	- Performances were improved.
+
+------------------------------------------------------------
+
+5.5.015 (2010-07-29)
+	- Automatic fix for unclosed self-closing tag.
+	- Support for deprecated 's' and 'strike' tags was added.
+	- Empty list items problem was fixed.
+
+5.5.014 (2010-07-15)
+	- Support for external images was improved.
+
+5.5.013 (2010-07-14)
+	- Bug #3029338 "FI and FO output destination filename bug" was fixed (previous fix was wrong).
+
+5.5.012 (2010-07-14)
+	- Bug #3029310 "Font baseline inconsistencies with line-height and font-size" was fixed.
+	- Bug #3029338 "FI and FO output destination filename bug" was fixed.
+
+5.5.011 (2010-07-09)
+	- Support for multiple CSS classes was added.
+	- The method getColumn() was added to return the current column number.
+	- Some regular Expressions were fixed to be more compatible with UTF-8.
+
+5.5.010 (2010-07-06)
+	- Bug item #3025772 "Borders in all image functions are still flawed" was fixed.
+
+5.5.009 (2010-07-05)
+	- A problem related to last page footer was fixed.
+	- Image alignments and fit-on-page features were improved.
+
+5.5.008 (2010-07-02)
+	- A problem on table header alignment in booklet mode was fixed.
+	- Default graphic vars are now applied for setHeader();
+
+5.5.007 (2010-07-02)
+	- Attribute "readonly" was added to input and textarea form fields.
+	- Vertical alignment feature was added on MultiCell() method only for simple text mode (see example n. 5).
+	- Text-Fit feature was added on MultiCell() method only for simple text mode (see example n. 5).
+
+5.5.006 (2010-06-29)
+	- getStringHeight() and getNumLines() methods were fixed.
+
+5.5.005 (2010-06-28)
+	- Bug #3022170 "getFontDescent() does not return correct descent value" was fixed.
+	- Some problems with multicolumn mode were fixed.
+
+5.5.004 (2010-06-27)
+	- Bug #3021803 "SVG Border" was fixed.
+
+5.5.003 (2010-06-26)
+	- On Write() method, blank lines at the beginning of a page or column are now automatically removed.
+
+5.5.002 (2010-06-24)
+	- ToUnicode Identity-H name was replaced with a full CMap (to avoid preflight syntax error).
+	- Bug #3020638 "str_split() not available in php4" was fixed.
+	- Bug #3020665 "file_get_contents() too many parameters for php4" was fixed.
+
+5.5.001 (2010-06-23)
+	- A problem on image streams was fixed.
+
+5.5.000 (2010-06-22)
+	- Several PDF syntax errors (and related bugs) were fixed.
+	- Bug #3019090 "/Length values are wrong if AES encryption is used" was fixed.
+
+------------------------------------------------------------
+
+5.4.003 (2010-06-19)
+	- A problem related to page boxes was fixed.
+	- Bug #3016920 "Font subsetting issues when editing pdf" was partially fixed (Note that flattening transparency layers is currently incompatible with TrueTypeUnicode fonts).
+
+5.4.002 (2010-06-18)
+	- A problem related with setProtection() method was fixed.
+
+5.4.001 (2010-06-18)
+	- A problem related with setProtection() method was fixed.
+
+5.4.000 (2010-06-18)
+	- The method setSignatureAppearance() was added, check the example n. 52.
+	- Several problems related to font subsetting were fixed.
+
+------------------------------------------------------------
+
+5.3.010 (2010-06-15)
+	- Previous release was corrupted.
+
+5.3.009 (2010-06-15)
+	- Bug #3015934 "Bullets don't display correctly" was fixed.
+
+5.3.008 (2010-06-13)
+	- This version fixes some problems of SVG rasterization.
+
+5.3.007 (2010-06-13)
+	- This version improves SVG support.
+
+5.3.006 (2010-06-10)
+	- This version includes a change in uniqid calls for backward compatibility with PHP4.
+
+5.3.005 (2010-06-09)
+	- The method getPageSizeFromFormat() was changed to include all standard page formats (includes 281 page formats + variation).
+
+5.3.004 (2010-06-08)
+	- Bug #3013291 "HTML table cell width" was fixed.
+	- Bug #3013294 "HTML table cell alignment" was fixed.
+	- The columns widths of HTML tables are now inherited from the first row.
+
+5.3.003 (2010-06-08)
+	- Bug #3013102 "HTML table header misaligned after page break" was fixed.
+
+5.3.002 (2010-06-07)
+	- The methods setFontSubsetting() and setFontSubsetting() were added to control the default font subsetting mode (see example n. 1).
+	- Bug #3012596 "Whitespace should not appeared after use Thai top characters" was fixed.
+	- Examples n. 1, 14, and 54 were updated.
+
+5.3.001 (2010-06-06)
+	- Barcode PDF417 was improved to support Macro Code Blocks (see example n. 50).
+
+5.3.000 (2010-06-05)
+	- License was changed to GNU-LGPLv3 (see the updated LICENSE.TXT file).
+	- PDF417 barcode support was added (check the example n. 50).
+	- The method write2DBarcode() was improved (some parameters were added and other changed - check example n. 50).
+
+------------------------------------------------------------
+
+5.2.000 (2010-06-02)
+	- IMPORTANT: Support for font subsetting was added by default to reduce the size of documents using large unicode font files.
+		If you embed the whole font in the PDF, the person on the other end can make changes to it even if he didn't have your font.
+		If you subset the font, file size of the PDF will be smaller but the person who receives your PDF would need to have your same font in order to make changes to your PDF.
+	- The signature of the SetFont() and AddFont() methods were changed to include the font subsetting option (subsetting is applied by default).
+	- Examples 14 and 54 were updated.
+
+------------------------------------------------------------
+
+5.1.002 (2010-05-27)
+	- Bug #3007818 "SetAutoPageBreak fails with MultiCell" was fixed.
+	- A bug related to MultiCell() minimun height was fixed.
+
+5.1.001 (2010-05-26)
+	- The problem of blank page after table was fixed.
+
+5.1.000 (2010-05-25)
+	- This version includes support for CSS (Cascading Style Sheets) (see example n. 61).
+	- The convertHTMLColorToDec() method was improved.
+
+------------------------------------------------------------
+
+5.0.014 (2010-05-21)
+	- A problem on color and style of HTML links was fixed.
+	- A bug relative to gradients was fixed.
+	- The getStringHeight() method was added and getNumLines() method was improved.
+	- All examples were updated.
+
+5.0.013 (2010-05-19)
+	- A bug related to page-breaks and table cells was fixed.
+
+5.0.012 (2010-05-19)
+	- Page orientation bug was fixed.
+	- The access to method setPageFormat() was changed to 'protected' because it is not intended to be directly called.
+
+5.0.011 (2010-05-19)
+	- Page orientation bug was fixed.
+	- Bug #3003966 "Multiple columns and nested lists" was fixed.
+
+5.0.010 (2010-05-17)
+	- The methods setPageFormat(), setPageOrientation() and related methods were extended to include page boxes, page rotations and page transitions.
+	- The method setPageBoxes() was added to set page boundaries (MediaBox, CropBox, BleedBox, TrimBox, ArtBox);
+	- A bug relative to underline, overline and linethrough was fixed.
+
+5.0.009 (2010-05-16)
+	- Bug #3002381 "Multiple columns and nested lists" was fixed.
+
+5.0.008 (2010-05-15)
+	- Bug "Columns WriteHTML and Justification" was fixed.
+
+5.0.007 (2010-05-14)
+	- Bug #3001347 "Bug when using  WriteHTML with setEqualColumns()" was fixed.
+	- Bug #3001505 "problem with sup and sub tags at the beginning of a line" was fixed.
+
+5.0.006 (2010-05-13)
+	- Length of hr tag was fixed.
+	- An error on 2d barcode method was fixed.
+
+5.0.005 (2010-05-12)
+	- WARNING: The logic of permissions on the SetProtection() method has been inverted and extended (see example 16). Now you have to specify the features you want to block.
+	- SetProtection() method was extended to support RSA and AES 128 encryption and public-keys (see example 16).
+	- Bug #2999489 "setEqualColumns() and TOC uses wrong columns" was fixed (see the example 10).
+
+5.0.004 (2010-05-10)
+	- HTML line alignment when using sub and sup tags was fixed.
+
+5.0.003 (2010-05-07)
+	- Horizontal alignment was fixed for images and barcodes. Now the X coordinate is always relative to the left margin. Use GetAbsX() instead of GetX() to get the X relative to left margin.
+	- Header() method was changed to account for new image alignment rules.
+
+5.0.002 (2010-05-06)
+	- Bookmark() and related methods were fixed to accept HTML code.
+	- A problem on HTML links was fixed.
+
+5.0.001 (2010-05-06)
+	- Protected method _putstream was re-added for backward compatibility.
+	- The following method were added to display HTML Table Of Content (see example n. 59):
+		addTOCPage(), endTOCPage(), addHTMLTOC().
+
+5.0.000 (2010-05-05)
+	- Method ImageSVG() was added to embedd SVG images (see example n. 58). Note that not all SVG images are supported.
+	- Method setRasterizeVectorImages() was added to enable/disable rasterization for vector images via ImageMagick library.
+	- Method RoundedRectXY() was added.
+	- Method PieSectorXY() was added.
+	- Gradient() method is now public and support new features.
+	- Shading to transparency is now supported.
+	- Image alignments were fixed.
+	- Support for dynamic images were improved.
+	- PDF_IMAGE_SCALE_RATIO has been changed to 1.25 for better compatibility with SVG.
+	- RAW and RAW2 modes were added to 2D Barcodes (see example n. 50).
+	- Automatic padding feature was added on barcodes (see examples n. 27 and 50).
+	- Bug #2995003 "Reproduced thead bug" was fixed.
+	- The Output() method now accepts FI and FD destinations to save the document on server before sending it to the client.
+	- Ellipse() method was improved and fixed (see page 2 of example n. 12).
+
+------------------------------------------------------------
+
+4.9.018 (2010-04-21)
+	- Bug item #2990356 "Current font size not respected with more than two HTML <p>" was fixed.
+
+4.9.017 (2010-04-21)
+	- Bug item #2990224 "Different behaviour for equivalent HTML strings" was fixed.
+	- Bug item #2990314 "Dash is not appearing with SHY character" was fixed.
+
+4.9.016 (2010-04-20)
+	- An error on htmlcolors.php was fixed.
+	- getImageFileType() method was improved.
+	- GIF images with transparency are now better supported.
+	- Automatic page orientation was improved.
+
+4.9.015 (2010-04-20)
+	- A new method copyPage() was added to clone pages (see example n. 44).
+	- Support for text overline was added.
+	- Underline and linethrough methods were fixed.
+	- Bug #2989058 "SHY character causes unnecessary word-wrapping" was fixed.
+
+4.9.014 (2010-04-18)
+	- Bug item #2988845 was fixed.
+
+4.9.013 (2010-04-15)
+	- Image() and ImageEPS() methods were fixed and improved; $fitonpage parameter was added.
+
+4.9.012 (2010-04-12)
+	- The hyphenateText() method was added to automatically hyphenate text (see example n. 46).
+
+4.9.011 (2010-04-07)
+	- Vertical alignments for Cell() method were improved (see example n. 57).
+
+4.9.010 (2010-04-06)
+	- Signature of Cell() method now includes new parameters for vertical alignment (see example n. 57).
+	- Text() method was extended to include all Cell() parameters.
+	- HTML line alignment procedure was changed to fix some bugs.
+
+4.9.009 (2010-04-05)
+	- Text() method was fixed for backward compatibility.
+
+4.9.008 (2010-04-03)
+	- Additional line space after table header was removed.
+	- Support for HTML lists in multicolumn mode was added.
+	- The method setTextRenderingMode() was added to set text rendering modes (see the example n. 26).
+	- The following HTML attributes were added to set text rendering modes (see the example n. 26): stroke, strokecolor, fill.
+
+4.9.007 (2010-04-03)
+	- Font Descent computation was fixed (patch #2981441).
+
+4.9.006 (2010-04-02)
+	- The constant K_TCPDF_CALLS_IN_HTML was added on configuration file to enable/disable the ability to call TCPDF methods in HTML.
+	- The usage of tcpdf tag in HTML mode was changed to remove the possible security flaw offered by the eval() function (thanks to Matthias Hecker for spotting this security problem). See the new example n. 49 for further information.
+
+4.9.005 (2010-04-01)
+	- Bug# 2980354 "Wrong File attachment description with security" was fixed.
+	- Several problems with HTML line alignment were fixed.
+	- The constant K_THAI_TOPCHAR was added on configuration file to enable/disable the special procedure used to avoid the overlappind of symbols on Thai language.
+	- A problem with font name directory was fixed.
+	- A bug on _destroy() method was fixed.
+
+4.9.004 (2010-03-31)
+	- Patch #979681 "GetCharWidth - default character width" was applied (bugfix).
+
+4.9.003 (2010-03-30)
+	- Problem of first <br /> on multiple columns was fixed.
+	- HTML line alignment was fixed.
+	- A QR-code bug was fixed.
+
+4.9.002 (2010-03-29)
+	- Patch #2978349 "$ignore_min_height is ignored in function Cell()" was applied.
+	- Bug #2978607 "2D Barcodes are wrong" was fixed.
+	- A problem with HTML block tags was fixed.
+	- Artificial italic for CID-0 fonts was added.
+	- Several multicolumn bugs were fixed.
+	- Support for HTML tables on multicolumn was added.
+
+4.9.001 (2010-03-28)
+	- QR Code minor bug was fixed.
+	- Multicolumn mode was added (see the new example n. 10).
+	- The following methods were added: setEqualColumns(), setColumnsArray(), selectColumn().
+	- Thai diacritics support were changed (note that this is incompatible with html justification).
+
+4.9.000 (2010-03-27)
+	- QR Code (2D barcode) support was added (see example n. 50).
+	- The following methods were added to print crop and registration marks (see example n. 56): colorRegistrationBar(), cropMark(), registrationMark().
+	- Limited support for CSS line-height property was added.
+	- Gradient method now supports Gray, RGB and CMYK space color.
+	- Example n. 51 was updated.
+	- Vertical alignment of font inside cell was fixed.
+	- Support for multiple Thai diacritics was added.
+	- Bug item #2974929 "Duplicate case values" was fixed.
+	- Bug item #2976729 "File attachment not working with security" was fixed.
+
+------------------------------------------------------------
+
+4.8.039 (2010-03-20)
+	- Problems related to custom locale settings were fixed.
+	- Problems related to HTML on Header and Footer were fixed.
+
+4.8.038 (2010-03-13)
+	- Various bugs related to page-break in HTML mode were fixed.
+	- Bug item #2968974 "Another <thead> pagebreak problem" was fixed.
+	- Bug item #2969276 "justification problem" was fixed.
+	- Bug item #2969289 "bug when using justified text and custom headers" was fixed.
+	- Images are now automatically resized to be contained on the page.
+	- Some HTML line alignments were fixed.
+	- Signature of AddPage() and SetMargins() methods were changed to include an option to set default page margins.
+
+4.8.037 (2010-03-03)
+	- Bug item #2962068 was fixed.
+	- Bug item #2967017 "Problems with <thead> and pagebreaks" was fixed.
+	- Bug item #2967023 "table header lost with pagebreak" was fixed.
+	- Bug item #2967032 "Header lost with nested tables" was fixed.
+
+4.8.036 (2010-02-24)
+	- Automatic page break for HTML images was improved.
+	- Example 10 was updated.
+	- Japanese was removed from example 8 because the freeserif font doesn't contain japanese (you can display it using arialunicid0 font).
+
+4.8.035 (2010-02-23)
+	- Automatic page break for HTML images was added.
+	- Support for multicolumn HTML was added (example 10 was updated).
+
+4.8.034 (2010-02-17)
+	- Language files were updated.
+
+4.8.033 (2010-02-12)
+	- A bug related to protection mode with links was fixed.
+
+4.8.032 (2010-02-04)
+	- A bug related to $maxh parameter on Write() and MultiCell() was fixed.
+	- Support for body tag was added.
+
+4.8.031 (2010-01-30)
+	- Bug item #2941589 "paragraph justify not working on some non-C locales" was fixed.
+
+4.8.030 (2010-01-27)
+	- Some text alignment cases were fixed.
+
+4.8.029 (2010-01-27)
+	- Bug item #2941057 "TOC Error in PDF File Output" was fixed.
+	- Some text alignment cases were fixed.
+
+4.8.028 (2010-01-26)
+	- Text alignment for RTL mode was fixed.
+
+4.8.027 (2010-01-25)
+	- Bug item #2938412 "Table related problems - thead, nobr, table width" was fixed.
+
+4.8.026 (2010-01-19)
+	- The misspelled word "lenght" was replaced with "length" in some variables and comments.
+
+4.8.025 (2010-01-18)
+	- addExtGState() method was improved to reuse existing ExtGState objects.
+
+4.8.024 (2010-01-15)
+	- Justification mode for HTML was fixed (Bug item #2932470).
+
+4.8.023 (2010-01-15)
+	- Bug item #2932470 "Some HTML entities breaks justification" was fixed.
+
+4.8.022 (2010-01-14)
+	- Source code documentation was fixed.
+
+4.8.021 (2010-01-03)
+	- A Bug relative to Table Of Content index was fixed.
+
+4.8.020 (2009-12-21)
+	- Bug item #2918545 "Display problem of the first row of a table with larger font" was fixed.
+	- A Bug relative to table rowspan mode was fixed.
+
+4.8.019 (2009-12-16)
+	- Bug item #2915684 "Image size" was fixed.
+	- Bug item #2914995 "Image jpeg quality" was fixed.
+	- The signature of the Image() method was changed (check the documentation for the $resize parameter).
+
+4.8.018 (2009-12-15)
+	- Bug item #2914352 "write error" was fixed.
+
+4.8.017 (2009-11-27)
+	- THEAD problem when table is used on header/footer was fixed.
+	- A first line alignment on HTML justification was fixed.
+	- Method getImageFileType() was added.
+	- Images with unknown extension and type are now supported via ImageMagick PHP extension.
+
+4.8.016 (2009-11-21)
+	- Document Information Dictionary was fixed.
+	- CSS attributes 'page-break-before', 'page-break-after' and 'page-break-inside' are now supported.
+	- Problem of unclosed last page was fixed.
+	- Problem of 'thead' unnecessarily repeated on the next page was fixed.
+
+4.8.015 (2009-11-20)
+	- A problem with some PNG transparency images was fixed.
+	- Bug #2900762 "Sort issues in Bookmarks" was fixed.
+	- Text justification was fixed for various modes: underline, strikeout and background.
+
+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.
+
+4.6.019 (2009-07-13)
+	- Bug item #2820703 "xref table broken" was fixed.
+
+4.6.018 (2009-07-10)
+	- Bug item #2819319 "Text over text" was fixed.
+	- Method Arrow() was added to print graphic arrows (example 12 was updated).
+
+4.6.017 (2009-07-05)
+	- Bug item #2816079 "Example 48 not working" was fixed.
+	- The signature of the checkPageBreak() was changed. The parameter $addpage was added to turn off the automatic page creation.
+
+4.6.016 (2009-06-16)
+	- Method setSpacesRE() was added to set the regular expression used for detecting withespaces or word separators. If you are using chinese, try: setSpacesRE('/[\s\p{Z}\p{Lo}]/');, otherwise you can use setSpacesRE('/[\s\p{Z}]/');
+	- The method _putinfo() now automatically fills the metadata with '?' in case of empty string.
+
+4.6.015 (2009-06-11)
+	- Bug #2804667 "word wrap bug" was fixed.
+
+4.6.014 (2009-06-04)
+	- Bug #2800931 "Table thead tag bug" was fixed.
+	- A bug related to <pre> tag was fixed.
+
+4.6.013 (2009-05-28)
+	- List bullets position was fixed for RTL languages.
+
+4.6.012 (2009-05-23)
+	- setUserRights() method doesn't work anymore unless you call the setSignature() method with the Adobe private key!
+
+4.6.011 (2009-05-18)
+	- Signature of the Image() method was changed to include the new $fitbox parameter (see source code documentation).
+
+4.6.010 (2009-05-17)
+	- Image() method was improved: now is possible to specify the maximum dimensions for a constraint box defined by $w and $h parameters, and setting the $resize parameter to null.
+	- <tcpdf> tag indent problem was fixed.
+	- $y parameter was added to checkPageBreak() method.
+	- Bug n. 2791773 "writeHTML" was fixed.
+
+4.6.009 (2009-05-13)
+	- xref table for embedded files was fixed.
+
+4.6.008 (2009-05-07)
+	- setSignature() method was improved (but is still experimental).
+	- Example n. 52 was added.
+
+4.6.007 (2009-05-05)
+	- Bug #2786685 "writeHtmlCell and <br /> in custom footer" was fixed.
+	- Table header repeating bug was fixed.
+	- Some newlines and tabs are now automatically removed from HTML strings.
+
+4.6.006 (2009-04-28)
+	- Support for "<a name="...">...</a>" was added.
+	- By default TCPDF requires PCRE Unicode support turned on but now works also without it (with limited ability to detect some Unicode blank spaces).
+
+4.6.005 (2009-04-25)
+	- Points (pt) conversion in getHTMLUnitToUnits() was fixed.
+	- Default tcpdf.pem certificate file was added.
+	- Experimental support for signing document was added but it is not yet completed (some help is needed - I think that the calculation of the ByteRange is OK and the problem is on the signature calculation).
+
+4.6.004 (2009-04-23)
+	- Method deletePage() was added to delete pages (see example n. 44).
+
+4.6.003 (2009-04-21)
+	- The caching mechanism of the UTF8StringToArray() method was fixed.
+
+4.6.002 (2009-04-20)
+	- Documentation of rollbackTransaction() method was fixed.
+	- The setImageScale() and getImageScale() methods now set and get the adjusting parameter used by pixelsToUnits() method.
+	- HTML images now support other units of measure than pixels (getHTMLUnitToUnits() is now used instead of pixelsToUnits()).
+	- WARNING: PDF_IMAGE_SCALE_RATIO has been changed by default to 1.
+
+4.6.001 (2009-04-17)
+	- Spaces between HTML block tags are now automatically removed.
+	- The bug related to cMargin changes between tables was fixed.
+
+4.6.000 (2009-04-16)
+	- WARNING: THIS VERSION CHANGES THE BEHAVIOUR OF $x and $y parameters for several TCPDF methods:
+		zero coordinates for $x and $y are now valid coordinates;
+		set $x and $y as empty strings to get the current value.
+	- Some error caused by 'empty' funtion were fixed.
+	- Default color for convertHTMLColorToDec() method was changed to white and the return value for invalid color is false.
+	- HTML on footer bug was fixed.
+	- The following examples were fixed: 5,7,10,17,19,20,21,33,42,43.
+
+4.5.043 (2009-04-15)
+	- Barcode class (barcode.php) was extended to include new linear barcode types (see example n. 27):
+		C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9
+		C39+ : CODE 39 with checksum
+		C39E : CODE 39 EXTENDED
+		C39E+ : CODE 39 EXTENDED + CHECKSUM
+		C93 : CODE 93 - USS-93
+		S25 : Standard 2 of 5
+		S25+ : Standard 2 of 5 + CHECKSUM
+		I25 : Interleaved 2 of 5
+		I25+ : Interleaved 2 of 5 + CHECKSUM
+		C128A : CODE 128 A
+		C128B : CODE 128 B
+		C128C : CODE 128 C
+		EAN2 : 2-Digits UPC-Based Extention
+		EAN5 : 5-Digits UPC-Based Extention
+		EAN8 : EAN 8
+		EAN13 : EAN 13
+		UPCA : UPC-A
+		UPCE : UPC-E
+		MSI : MSI (Variation of Plessey code)
+		MSI+ : MSI + CHECKSUM (modulo 11)
+		POSTNET : POSTNET
+		PLANET : PLANET
+		RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
+		KIX : KIX (Klant index - Customer index)
+		IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200 (NOTE: requires BCMath PHP extension)
+		CODABAR : CODABAR
+		CODE11 : CODE 11
+		PHARMA : PHARMACODE
+		PHARMA2T : PHARMACODE TWO-TRACKS
+
+4.5.042 (2009-04-15)
+	- Method Write() was fixed for the strings containing only zero value.
+
+4.5.041 (2009-04-14)
+	- Barcode methods were fixed.
+
+4.5.040 (2009-04-14)
+	- Method Write() was fixed to handle empty strings.
+
+4.5.039 (2009-04-11)
+	- Support for linear barcodes was extended (see example n. 27 and barcodes.php documentation).
+
+4.5.038 (2009-04-10)
+	- Write() method was improved to support separators for Japanese, Korean, Chinese Traditional and Chinese Simplified.
+
+4.5.037 (2009-04-09)
+	- General performances were improved.
+	- The signature of the method utf8Bidi() was changed.
+	- The method UniArrSubString() was added.
+	- Experimental support for 2D barcodes were added (see example n. 50 and 2dbarcodes.php class).
+
+4.5.036 (2009-04-03)
+	- TCPDF methods can be called inside the HTML code (see example n. 49).
+	- All tag attributes, such as <p align="center"> must be enclosed within double quotes.
+
+4.5.035 (2009-03-28)
+	- Bug #2717436 "writeHTML rowspan problem (continued)" was fixed.
+	- Bug #2719090 "writeHTML fix follow up" was fixed.
+	- The method _putuserrights() was changed to avoid Adobe Reader 9.1 crash. This broken the 'trick' that was used to display forms in Acrobat Reader.
+
+4.5.034 (2009-03-27)
+	- Bug #2716914 "Bug writeHTML of a table in body and footer related with pb" was fixed.
+	- Bug #2717056 ] "writeHTML problem when setting tr style" was fixed.
+	- The signature of the Cell() method was changed.
+
+4.5.033 (2009-03-27)
+	- The support for rowspan/colspan on HTML tables was improved (see example n. 48).
+
+4.5.032 (2009-03-23)
+	- setPrintFooter(false) bug was fixed.
+
+4.5.031 (2009-03-20)
+	- Table header support was extended to multiple pages.
+
+4.5.030 (2009-03-20)
+	- thead tag is now supported on HTML tables (header rows are repeated after page breaks).
+	- The startTransaction() was improved to autocommit.
+	- List bullets now uses the foreground color (putHtmlListBullet()).
+
+4.5.029 (2009-03-19)
+	- The following methods were added to UNDO commands (see example 47): startTransaction(), commitTransaction(), rollbackTransaction().
+	- All examples were updated.
+
+4.5.028 (2009-03-18)
+	- Bug #2690945 "List Bugs" was fixed.
+	- HTML text alignment on lists was fixed.
+	- The constant PDF_FONT_MONOSPACED was added to the configuration file to define the default monospaced font.
+	- The following methods were fixed: getPageWidth(), getPageHeight(), getBreakMargin().
+	- All examples were updated.
+
+4.5.027 (2009-03-16)
+	- Method getPageDimensions() was added to get page dimensions.
+	- The signature of the following methos were changed: getPageWidth(), getPageHeight(), getBreakMargin().
+	- _parsepng() method was fixed for PNG URL images (fread bug).
+
+4.5.026 (2009-03-11)
+	- Bug #2681793 affecting URL images with spaces was fixed.
+
+4.5.025 (2009-03-10)
+	- A small bug affecting hyphenation support was fixed.
+	- The method SetDefaultMonospacedFont() was added to define the default monospaced font.
+
+4.5.024 (2009-03-07)
+	- The bug #2666493 was fixed "Footer corrupts document".
+
+4.5.023 (2009-03-06)
+	- The bug #2666688 was fixed "Rowspan in tables".
+
+4.5.022 (2009-03-05)
+	- The bug #2659676 was fixed "refer to #2157099 test 4 < BR > problem still not fixed".
+	- addTOC() function bug was fixed.
+
+4.5.020 (2009-03-03)
+	- The following bug was fixed: "function removeSHY corrupts unicode".
+
+4.5.019 (2009-02-28)
+	- The problem of decimal separator using different locale was fixed.
+	- The text hyphenation is now supported (see example n. 46).
+
+4.5.018 (2009-02-26)
+	- The _destroy() method was added to unset all class variables and frees memory.
+	- Now it's possible to call Output() method multiple times.
+
+4.5.017 (2009-02-24)
+	- A minor bug that raises a PHP warning was fixed.
+
+4.5.016 (2009-02-24)
+	- Bug item #2631200 "getNumLines() counts wrong" was fixed.
+	- Multiple attachments bug was fixed.
+	- All class variables are now cleared on Output() for memory otpimization.
+
+4.5.015 (2009-02-18)
+	- Bug item #2612553 "function Write() must not break a line on &nbsp;  character" was fixed.
+
+4.5.014 (2009-02-13)
+	- Bug item #2595015 "POSTNET Barcode Checksum Error" was fixed (on barcode.php).
+	- Pagebreak bug for barcode was fixed.
+
+4.5.013 (2009-02-12)
+	- border attribute is now supported on HTML images (only accepts the same values accepted by Cell()).
+
+4.5.012 (2009-02-12)
+	- An error on image border feature was fixed.
+
+4.5.011 (2009-02-12)
+	- HTML links for images are now supported.
+	- height attribute is now supported on HTML cells.
+	- $border parameter was added to Image() and ImageEps() methods.
+	- The method getNumLines() was added to estimate the number of lines required for the specified text.
+
+4.5.010 (2009-01-29)
+	- Bug n. 2546108 "BarCode Y position" was fixed.
+
+4.5.009 (2009-01-26)
+	- Bug n. 2538094 "Empty pdf file created" was fixed.
+
+4.5.008 (2009-01-26)
+	- setPage() method was fixed to correctly restore graphic states.
+	- Source code was cleaned up for performances.
+
+4.5.007 (2009-01-24)
+	- checkPageBreak() and write1DBarcode() methods were fixed.
+	- Source code was cleaned up for performances.
+	- barcodes.php was updated.
+
+4.5.006 (2009-01-23)
+	- getHTMLUnitToPoints() method was replaced by getHTMLUnitToUnits() to fix HTML units bugs.
+
+4.5.005 (2009-01-23)
+	- Page closing bug was fixed.
+
+4.5.004 (2009-01-21)
+	- The access of convertHTMLColorToDec() method was changed to public
+	- Fixed bug on UL tag.
+
+4.5.003 (2009-01-19)
+	- Fonts on different folders are now supported.
+
+4.5.002 (2009-01-07)
+	- addTOC() function was improved (see example n. 45).
+
+4.5.001 (2009-01-04)
+	- The signature of startPageGroup() function was changed.
+	- Method Footer() was improved to automatically print page or page-group number (see example n. 23).
+	- Protected method formatTOCPageNumber() was added to customize the format of page numbers on the Table Of Content.
+	- The signature of addTOC() was changed to include the font used for page numbers.
+
+4.5.000 (2009-01-03)
+	- A new $diskcache parameter was added to class constructor to enable disk caching and reduce RAM memory usage (see example n. 43).
+	- The method movePageTo() was added to move pages to previous positions (see example n. 44).
+	- The methods getAliasNumPage() and getPageNumGroupAlias() were added to get the alias for page number (needed when using movepageTo()).
+	- The methods addTOC() was added to print a Table Of Content (see example n. 45).
+	- Imagick class constant was removed for better compatibility with PHP4.
+	- All existing examples were updated and new examples were added.
+
+4.4.009 (2008-12-29)
+	- Examples 1 and 35 were fixed.
+
+4.4.008 (2008-12-28)
+	- Bug #2472169 "Unordered bullet size not adjusted for unit type" was fixed.
+
+4.4.007 (2008-12-23)
+	- Bug #2459935 "no unit conversion for header line" was fixed.
+	- Example n. 42 for image alpha channel was added.
+	- All examples were updated.
+
+4.4.006 (2008-12-11)
+	- Method setLIsymbol() was changed to reflect latest changes in HTML list handling.
+
+4.4.005 (2008-12-10)
+	- Bug item #2413870 "ordered list override value" was fixed.
+
+4.4.004 (2008-12-10)
+	- The protected method getHTMLUnitToPoints() was added to accept various HTML units of measure (em, ex, px, in, cm, mm, pt, pc, %).
+	- The method intToRoman() was added to convert integer number to Roman representation.
+	- Support fot HTML lists was improved: the CSS property list-style-type is now supported.
+
+4.4.003 (2008-12-09)
+	- Bug item #2412147 "Warning on line 3367" was fixed.
+	- Method setHtmlLinksStyle() was added to set default HTML link colors and font style.
+	- Method addHtmlLink() was changed to use color and style defined on the inline CSS.
+
+4.4.002 (2008-12-09)
+	- Borders on Multicell() were fixed.
+	- Problem of Multicell() on Header function (Bug item #2407579) was fixed.
+	- Problem on graphics tranformations applied to Multicell() was fixed.
+	- Support for ImageMagick was added.
+	- Width calculation for nested tables was fixed.
+
+4.4.001 (2008-12-08)
+	- Some missing core fonts were added on fonts directory.
+	- CID0 fonts rendering was fixed.
+	- HTML support was improved (<pre> and <tt> tags are now supported).
+	- Bug item #2406022 "Left padding bug in MultiCell with maxh" was fixed.
+
+4.4.000 (2008-12-07)
+	- File attachments are now supported (see example n. 41).
+	- Font functions were optimized to reduce document size.
+	- makefont.php was updated.
+	- Linux binaries were added on /fonts/utils
+	- All fonts were updated.
+	- $autopadding parameter was added to Multicell() to disable automatic padding features.
+	- $maxh parameter was added to Multicell() and Write() to set a maximum height.
+
+4.3.009 (2008-12-05)
+	- Bug item #2392989 (Custom header + setlinewidth + cell border bug) was fixed.
+
+4.3.008 (2008-12-05)
+	- Bug item #2390566 "rect bug" was fixed.
+	- File path was fixed for font embedded files.
+	- SetFont() method signature was changed to include the font filename.
+	- Some font-related methods were improved.
+	- Methods getFontFamily() and getFontStyle() were added.
+
+4.3.007 (2008-12-03)
+	- PNG alpha channel is now supported (GD library is required).
+	- AddFont() function now support custom font file path on $file parameter.
+	- The default width variable ($dw) is now always defined for any font.
+	- The 'Style' attribute on CID-0 fonts was removed because of protection bug.
+
+4.3.006 (2008-12-01)
+	- A regular expression on getHtmlDomArray() to find HTML tags was fixed.
+
+4.3.005 (2008-11-25)
+	- makefont.php was fixed.
+	- Bug item #2339877 was fixed (false loop condition detected on WriteHTML()).
+	- Bug item #2336733 was fixed (lasth value update on Multicell() when border and fill are disabled).
+	- Bug item #2342303 was fixed (automatic page-break on Image() and ImageEPS()).
+
+4.3.004 (2008-11-19)
+	- Function _textstring() was fixed (bug 2309051).
+	- All examples were updated.
+
+4.3.003 (2008-11-18)
+	- CID-0 font bug was fixed.
+	- Some functions were optimized.
+	- Function getGroupPageNoFormatted() was added.
+	- Example n. 23 was updated.
+
+4.3.002 (2008-11-17)
+	- Bug item #2305518 "CID-0 font don't work with encryption" was fixed.
+
+4.3.001 (2008-11-17)
+	- Bug item #2300007 "download mimetype pdf" was fixed.
+	- Double quotes were replaced by single quotes to improve PHP performances.
+	- A bug relative to HTML cell borders was fixed.
+
+4.3.000 (2008-11-14)
+	- The function setOpenCell() was added to set the top/bottom cell sides to be open or closed when the cell cross the page.
+	- A bug relative to list items indentation was fixed.
+	- A bug relative to borders on HTML tables and Multicell was fixed.
+	- A bug relative to rowspanned cells was fixed.
+	- A bug relative to html images across pages was fixed.
+
+4.2.009 (2008-11-13)
+	- Spaces between li tags are now automatically removed.
+
+4.2.008 (2008-11-12)
+	- A bug relative to fill color on next page was fixed.
+
+4.2.007 (2008-11-12)
+	- The function setListIndentWidth() was added to set custom indentation widht for HTML lists.
+
+4.2.006 (2008-11-06)
+	- A bug relative to HTML justification was fixed.
+
+4.2.005 (2008-11-06)
+	- A bug relative to HTML justification was fixed.
+	- The methods formatPageNumber() and PageNoFormatted() were added to format page numbers.
+	- Default Footer() method was changed to use PageNoFormatted() instead of PageNo().
+	- Example 6 was updated.
+
+4.2.004 (2008-11-04)
+	- Bug item n. 2217039 "filename handling improvement" was fixed.
+
+4.2.003 (2008-10-31)
+	- Font style bug was fixed.
+
+4.2.002 (2008-10-31)
+	- Bug item #2210922 (htm element br not work) was fixed.
+	- Write() function was improved to support margin changes.
+
+4.2.001 (2008-10-30)
+	- setHtmlVSpace($tagvs) function was added to set custom vertical spaces for HTML tags.
+	- writeHTML() function now support margin changes during execution.
+	- Signature of addHTMLVertSpace() function is changed.
+
+4.2.000 (2008-10-29)
+	- htmlcolors.php was changed to support class-loaders.
+	- ImageEps() function was improved in performances.
+	- Signature of Link() And Annotation() functions were changed.
+	- (Bug item #2198926) Links and Annotations alignment were fixed (support for geometric tranformations was added).
+	- rowspan mode for HTML table cells was improved and fixed.
+	- Booklet mode for double-sided pages was added; see SetBooklet() function and example n. 40.
+	- lastPage() signature is changed.
+	- Signature of Write() function is changed.
+	- Some HTML justification problems were fixed.
+	- Some functions were fixed to better support RTL mode.
+	- Example n. 10 was changed to support RTL mode.
+	- All examples were updated.
+
+4.1.004 (2008-10-23)
+	- unicode_data.php was changed to support class-loaders.
+	- Bug item #2186040/2 (writeHTML margin problem) was fixed.
+
+4.1.003 (2008-10-22)
+	- Bug item #2185399 was fixed (rowspan and page break).
+	- Bugs item #2186040 was fixed (writeHTML margin problem).
+	- Newline after table was removed.
+
+4.1.002 (2008-10-21)
+	- Bug item #2184525 was fixed (rowspan on HTML cell).
+
+4.1.001 (2008-10-21)
+	- Support for "start" attribute was added to HTML ordered list.
+	- unicode_data.php file was changed to include UTF-8 to ASCII table.
+	- Some functions were modified to better support UTF-8 extensions to core fonts.
+	- Support for images on HTML lists was improved.
+	- Examples n. 1 and 6 were updated.
+
+4.1.000 (2008-10-18)
+	- Page-break bug using HTML content was fixed.
+	- The "false" parameter was reintroduced to class_exists function on PHP5 version to avoid autoload.
+	- addHtmlLink() function was improved to support internal links (i.e.: <a href="#23">link to page 23</a>).
+	- Justification alignment is now supported on HTML (see example n. 39).
+	- example_006.php was updated.
+
+4.0.033 (2008-10-13)
+	- Bug n. 2157099 was fixed.
+	- SetX() and SetY() functions were improved.
+	- SetY() includes a new parameter to avoid the X reset.
+
+4.0.032 (2008-10-10)
+	- Bug n. 2156926 was fixed (bold, italic, underlined, linethrough).
+	- setStyle() method was removed.
+	- Configuration file was changed to use helvetica (non-unicode) font by default.
+	- The use of mixed font types was improved.
+	- All examples were updated.
+
+4.0.031 (2008-10-09)
+	- _putannots() and _putbookmarks() links alignments were fixed.
+
+4.0.030 (2008-10-07)
+	- _putbookmarks() function was fixed.
+	- _putannots() was fixed to include internal links.
+
+4.0.029 (2008-09-27)
+	- Infinite loop bug was fixed [Bug item #130309].
+	- Multicell() problem on Header() was fixed.
+
+4.0.028 (2008-09-26)
+	- setLIsymbol() was added to set the LI symbol used on UL lists.
+	- Missing $padding and $encryption_key variables declarations were added [Bug item #2129058].
+
+4.0.027 (2008-09-19)
+	- Bug #2118588 "Undefined offset in tcpdf.php on line 9581" was fixed.
+	- arailunicid0.php font was updated.
+	- The problem of javascript form fields duplication after saving was fixed.
+
+4.0.026 (2008-09-17)
+	- convertHTMLColorToDec() function was improved to support rgb(RR,GG,BB) notation.
+	- The following inline CSS attributes are now supported: text-decoration, color, background-color and font-size names: xx-small, x-small, small, medium, large, x-large, xx-large
+	- Example n. 6 was updated.
+
+4.0.025 (2008-09-15)
+	- _putcidfont0 function was improved to include CJK fonts (Chinese, Japanese, Korean, CJK, Asian fonts) without embedding.
+	- arialunicid0 font was added (see the new example n. 38).
+	- The following Unicode to CID-0 tables were added on fonts folder: uni2cid_ak12.php, uni2cid_aj16.php, uni2cid_ag15.php, uni2cid_ac15.php.
+
+4.0.024 (2008-09-12)
+	- "stripos" function was replaced with "strpos + strtolower" for backward compatibility with PHP4.
+	- support for Spot Colors were added. Check the new example n. 37 and the following new functions:
+		AddSpotColor()
+		SetDrawSpotColor()
+		SetFillSpotColor()
+		SetTextSpotColor()
+		_putspotcolors()
+	- Bookmark() function was improved to fix wrong levels.
+	- $lasth changes after header/footer calls were fixed.
+
+4.0.023 (2008-09-05)
+	- Some HTML related problems were fixed.
+	- Image alignment on HTML was changed, now it always defaults to the normal mode (see example_006.php).
+
+4.0.022 (2008-08-28)
+	- Line height on HTML was fixed.
+	- Image inside an HTML cell problem was fixed.
+	- A new "zarbold" persian font was added.
+
+4.0.021 (2008-08-24)
+	- HTTP headers were fixed on Output function().
+	- getAliasNbPages() and getPageGroupAlias() functions were changed to support non-unicode fonts on unicode documents.
+	- Function Write() was fixed.
+	- The problem of additional vertical spaces on HTML was fixed.
+	- The problem of frame around HTML links was fixed.
+
+4.0.020 (2008-08-15)
+	- "[2052259] WriteHTML <u> & <b>" bug was fixed.
+
+4.0.019 (2008-08-13)
+	- "Rowspan on first cell" bug was fixed.
+
+4.0.018 (2008-08-08)
+	- Default cellpadding for HTML tables was fixed.
+	- Annotation() function was added to support some PDF annotations (see example_036.php and section 8.4 of PDF reference 1.7).
+	- HTML links are now correclty shifted during line alignments.
+	- function getAliasNbPages() was added and Footer() was updated.
+	- RowSpan mode for HTML tables was fixed.
+	- Bugs item #2043610 "Multiple sizes vertical align wrong" was fixed.
+	- ImageEPS() function was improved and RTL alignment was fixed (see example_032.php).
+
+4.0.017 (2008-08-05)
+	- Missing CNZ and CEO style modes were added to Rect() function.
+	- Fonts utils were updated to include support for OpenType fonts.
+	- getLastH() function was added.
+
+4.0.016 (2008-07-30)
+	- setPageMark() function was added. This function must be called after calling Image() function for a background image.
+
+4.0.015 (2008-07-29)
+	- Some functions were changed to support different page formats (see example_028.php).
+	- The signature of setPage() function is changed.
+
+4.0.014 (2008-07-29)
+	- K_PATH_MAIN calculation on tcpdf_config.php was fixed.
+	- HTML support for EPS/AI images was added (see example_006.php).
+	- Bugs item #2030807 "Truncated text on multipage html fields" was fixed.
+	- PDF header bug was fixed.
+	- helvetica was added as default font family.
+	- Stroke mode was fixed on Text function.
+	- several minor bugs were fixed.
+
+4.0.013 (2008-07-27)
+	- Bugs item #2027799 " Big spaces between lines after page break" was fixed.
+	- K_PATH_MAIN calculation on tcpdf_config.php was changed.
+	- Function setVisibility() was fixed to avoid the "Incorrect PDEObject type" error message.
+
+4.0.012 (2008-07-24)
+	- Addpage(), Header() and Footer() functions were changed to simplify the implementation of external header/footer functions.
+	- The following functions were added:
+			setHeader()
+			setFooter()
+			getImageRBX()
+			getImageRBY()
+			getCellHeightRatio()
+			getHeaderFont()
+			getFooterFont()
+			getRTL()
+			getBarcode()
+			getHeaderData()
+			getHeaderMargin()
+			getFooterMargin()
+
+4.0.011 (2008-07-23)
+	- Font support was improved.
+	- The folder /fonts/utils contains new utilities and instructions for embedd font files.
+	- Documentation was updated.
+
+4.0.010 (2008-07-22)
+	- HTML tables were fixed to work across pages.
+	- Header() and Footer() functions were updated to preserve previous settings.
+	- example_035.php was added.
+
+4.0.009 (2008-07-21)
+	- UTF8StringToArray() function was fixed for non-unicode mode.
+
+4.0.008 (2008-07-21)
+	- Barcodes alignment was fixed (see example_027.php).
+	- unicode_data.php was updated.
+	- Arabic shaping for "Zero-Width Non-Joiner" character (U+200C) was fixed.
+
+4.0.007 (2008-07-18)
+	- str_split was replaced by preg_split for compatibility with PHP4 version.
+	- Clipping mode was added to all graphic functions by using parameter $style = "CNZ" or "CEO" (see example_034.php).
+
+4.0.006 (2008-07-16)
+	- HTML rowspan bug was fixed.
+	- Line style for MultiCell() was fixed.
+	- WriteHTML() function was improved.
+	- CODE128C barcode was fixed (barcodes.php).
+
+4.0.005 (2008-07-11)
+	- Bug [2015715] "PHP Error/Warning" was fixed.
+
+4.0.004 (2008-07-09)
+	- HTML cell internal padding was fixed.
+
+4.0.003 (2008-07-08)
+	- Removed URL encoding when F option is selected on Output() function.
+	- fixed some minor bugs in html tables.
+
+4.0.002 (2008-07-07)
+	- Bug [2000861] was still unfixed and has been fixed.
+
+4.0.001 (2008-07-05)
+	- Bug [2000861] was fixed.
+
+4.0.000 (2008-07-03)
+	- THIS IS A MAIN RELEASE THAT INCLUDES SEVERAL NEW FEATURES AND BUGFIXES
+	- Signature fo SetTextColor() and SetFillColor() functions was changed (parameter $storeprev was removed).
+	- HTML support was completely rewritten and improved (see example 6).
+	- Alignments parameters were fixed.
+	- Functions GetArrStringWidth() and GetStringWidth() now include font parameters.
+	- Fonts support was improved.
+	- All core fonts were replaced and moved to fonts/ directory.
+	- The following functions were added: getMargins(), getFontSize(), getFontSizePt().
+	- File config/tcpdf_config_old.php was renamed tcpdf_config_alt.php and updated.
+	- Multicell and WriteHTMLCell fill function was fixed.
+	- Several minor bugs were fixed.
+	- barcodes.php was updated.
+	- All examples were updated.
+
+------------------------------------------------------------
+
+3.1.001 (2008-06-13)
+	- Bug [1992515] "K_PATH_FONTS default value wrong" was fixed.
+	- Vera font was removed, DejaVu font and Free fonts were updated.
+	- Image handling was improved.
+	- All examples were updated.
+
+3.1.000 (2008-06-11)
+	- setPDFVersion() was added to change the default PDF version (currently 1.7).
+	- setViewerPreferences() was added to control the way the document is to be presented on the screen or printed (see example 29).
+	- SetDisplayMode() signature was changed (new options were added).
+	- LinearGradient(), RadialGradient(), CoonsPatchMesh() functions were added to print various color gradients (see example 30).
+	- PieSector() function was added to render render pie charts (see example 31).
+	- ImageEps() was added to display EPS and AI images with limited support (see example 32).
+	- writeBarcode() function is now depracated, a new write1DBarcode() function was added. The barcode directory was removed and a new barcodes.php file was added.
+	- The new write1DBarcode() function support more barcodes and do not need the GD library (see example 027). All barcodes are directly written to PDF using graphic functions.
+	- HTML lists were improved and could be nested (you may now represent trees).
+	- AddFont() bug was fixed.
+	- _putfonts() bug was fixed.
+	- graphics functions were fixed.
+	- unicode_data.php file was updated (fixed).
+	- almohanad font was updated.
+	- example 18 was updated (Farsi and Arabic languages).
+	- source code cleanup.
+	- All examples were updated and new examples were added.
+
+3.0.015 (2008-06-06)
+	- AddPage() function signature is changed to include page format.
+	- example 28 was added to show page format changes.
+	- setPageUnit() function was added to change the page units of measure.
+	- setPageFormat() function was added to change the page format and orientation between pages.
+	- setPageOrientation() function was added to change the page orientation.
+	- Arabic font shaping was fixed for laa letter and square boxes (see the example 18).
+
+3.0.014 (2008-06-04)
+	- Arabic font shaping was fixed.
+	- setDefaultTableColumns() function was added.
+	- $cell_height_ratio variable was added.
+	- setCellHeightRatio() function was added to define the default height of cell repect font height.
+
+3.0.013 (2008-06-03)
+	- Multicell height parameter was fixed.
+	- Arabic font shaping was improved.
+	- unicode_data.php was updated.
+
+3.0.012 (2008-05-30)
+	- K_PATH_MAIN and K_PATH_URL constants are now automatically set on config file.
+	- DOCUMENT_ROOT constant was fixed for IIS Webserver (config file was updated).
+	- Arabic font shaping was improved.
+	- TranslateY() function was fixed (bug [1977962]).
+	- setVisibility() function was fixed.
+	- writeBarcode() function was fixed to scale using $xref parameter.
+	- All examples were updated.
+
+3.0.011 (2008-05-23)
+	- CMYK color support was added to all graphic functions.
+	- HTML table support was improved:
+	  -- now it's possible to include additional html tags inside a cell;
+	  -- colspan attribute was added.
+	- example 006 was updated.
+
+3.0.010 (2008-05-21)
+	- fixed $laa_array inclusion on utf8Bidi() function.
+
+3.0.009 (2008-05-20)
+	- unicode_data.php was updated.
+	- Arabic laa letter problem was fixed.
+
+3.0.008 (2008-05-12)
+	- Arabic support was fixed and improved (unicode_data.php was updated).
+	- Polycurve() function was added to draw a poly-Bezier curve.
+	- list items alignment was fixed.
+	- example 6 was updated.
+
+3.0.007 (2008-05-06)
+	- Arabic support was fixed and improved.
+	- AlMohanad (arabic) font was added.
+	- C128 barcode bugs were fixed.
+
+3.0.006 (2008-04-21)
+	- Condition to check negative width values was added.
+
+3.0.005 (2008-04-18)
+	- back-Slash character escape was fixed on writeHTML() function.
+	- Exampe 6 was updated.
+
+3.0.004 (2008-04-11)
+	- Bug [1939304] (Right to Left Issue) was fixed.
+
+3.0.003 (2008-04-07)
+	- Bug [1934523](Words between HTML tags in cell not kept on one line) was fixed.
+	- "face" attribute of "font" tag is now fully supported.
+
+3.0.002 (2008-04-01)
+	- Write() functions now return the number of cells and not the number of lines.
+	- TCPDF is released under LGPL 2.1, or any later version.
+
+3.0.001 (2008-05-28)
+	- _legacyparsejpeg() and _legacyparsepng() were renamed _parsejpeg() and _parsepng().
+	- function writeBarcode() was fixed.
+	- all examples were updated.
+	- example 27 was added to show various barcodes.
+
+3.0.000 (2008-03-27)
+	- private function pixelsToMillimeters() was changed to public function pixelsToUnits() to fix html image size bug.
+	- Image-related functions were rewritten.
+	- resize parameter was added to Image() signature to reduce the image size and fit width and height (see example 9).
+	- TCPDF now supports all images supported by GD library: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM.
+	- CMYK support was added to SetDrawColor(), SetFillColor(), SetTextColor() (see example 22).
+	- Page Groups were added (see example 23).
+	- setVisibility() function was added to restrict the rendering of some elements to screen or printout (see example 24).
+	- All private variables and functions were changed to protected.
+	- setAlpha() function was added to give transparency support for all objects (see example 25).
+	- Clipping and stroke modes were added to Text() function (see example 26).
+	- All examples were moved to "examples" directory.
+	- function setJPEGQuality() was added to set the JPEG image comrpession (see example 9).
+
+2.9.000 (2008-03-26)
+	- htmlcolors.php file was added to include html colors.
+	- Support for HTML color names and three-digit hexadecimal color codes was added.
+	- private function convertColorHexToDec() was renamed convertHTMLColorToDec().
+	- color and bgcolor attributes are now supported on all HTML tags (color nesting is also supported).
+	- Write() function were fixed.
+	- example_006.php was updated.
+	- private function setUserRights() was added to release user rights on Acrobat Reader (this allows to display forms, see example 14)
+
+2.8.000 (2008-03-20)
+	- Private variables were changed to protected.
+	- Function Write() was fixed and improved.
+	- Support for dl, dt, dd, del HTML tags was introduced.
+	- Line-trought mode was added for HTML and text.
+	- Text vertical alignment on cells were fixed.
+	- Examples were updated to reflect changes.
+
+2.7.002 (2008-03-13)
+	- Bug "[1912142] Encrypted PDF created/modified date" was fixed.
+
+2.7.001 (2008-03-10)
+	- Cell justification was fixed for non-unicode mode.
+
+2.7.000 (2008-03-09)
+	- Cell() stretching mode 4 (forced character spacing) was fixed.
+	- writeHTMLCell() now uses Multicell() to write.
+	- Multicell() has a new parameter $ishtml to act as writeHTMLCell().
+	- Write() speed was improved for non-arabic strings.
+	- Example n. 20 was changed.
+
+2.6.000 (2008-03-07)
+	- various alignments bugs were fixed.
+
+2.5.000 (2008-03-07)
+	- Several bugs were fixed.
+	- example_019.php was added to test non-unicode mode using old fonts.
+
+2.4.000 (2008-03-06)
+	- RTL support was deeply improved.
+	- GetStringWidth() was fixed to support RTL languages.
+	- Text() RTL alignment was fixed.
+	- Some functions were added: GetArrStringWidth(), GetCharWidth(), uniord(), utf8Bidi().
+	- example_018.php was added and test_unicode.php was removed.
+
+2.3.000 (2008-03-05)
+	- MultiCell() signature is changed. Now support multiple columns across pages (see example_017).
+	- Write() signature is changed. Now support the cell mode to be used with MultiCell.
+	- Header() and Footer() were changed.
+	- The following functions were added: UTF8ArrSubString() and unichr().
+	- Examples were updated to reflect last changes.
+
+2.2.004 (2008-03-04)
+	- Several examples were added.
+	- AddPage() Header() and Footer() were fixed.
+	- Documentation is now available on http://www.tcpdf.org
+
+2.2.003 (2008-03-03)
+	- [1894853] Performance of MultiCell() was improved.
+	- RadioButton and ListBox functions were added.
+	- javascript form functions were rewritten and properties names are changed. The properties function supported by form fields are listed on Possible values are listed on http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf.
+
+2.2.002 (2008-02-28)
+	- [1900495] html images path was fixed.
+	- Legacy image functions were reintroduced to allow PNG and JPEG support without GD library.
+
+2.2.001 (2008-02-16)
+	- The bug "[1894700] bug with replace relative path" was fixed
+	- Justification was fixed
+
+2.2.000 (2008-02-12)
+	- fixed javascript bug introduced with latest release
+
+2.1.002 (2008-02-12)
+	- Justify function was fixed on PHP4 version.
+	- Bookmank function was added ([1578250] Table of contents).
+	- Javascript and Form fields support was added ([1796359] Form fields).
+
+2.1.001 (2008-02-10)
+	- The bug "[1885776] Race Condition in function justitfy" was fixed.
+	- The bug "[1890217] xpdf complains that pdf is incorrect" was fixed.
+
+2.1.000 (2008-01-07)
+	- FPDF_FONTPATH constant was changed to K_PATH_FONTS on config file
+	- Bidirectional Algorithm to correctly reverse bidirectional languages was added.
+	- SetLeftMargin, SetTopMargin, SetRightMargin functions were fixed.
+	- SetCellPadding function was added.
+	- writeHTML was updated with new parameters.
+	- Text function was fixed.
+	- MultiCell function was fixed, now works also across multiple pages.
+	- Line width was fixed on Header and Footer functions and <hr> tag.
+	- "GetImageSize" was renamed "getimagesize".
+	- Document version was changed from 1.3 to 1.5.
+	- _begindoc() function was fixed.
+	- ChangeDate was fixed and ModDate was added.
+	- The following functions were added:
+	  setPage() : Move pointer to the specified document page.
+	  getPage() : Get current document page number.
+	  lastpage() : Reset pointer to the last document page.
+	  getNumPages() : Get the total number of inserted pages.
+	  GetNumChars() : count the number of (UTF-8) characters in a string.
+	- $stretch parameter was added to Cell() function to fit text on cell:
+			0 = disabled
+			1 = horizontal scaling only if necessary
+			2 = forced horizontal scaling
+			3 = character spacing only if necessary
+			4 = forced character spacing
+	- Line function was fixed for RTL.
+	- Graphic transformation functions were added [1811158]:
+			StartTransform()
+			StopTransform()
+			ScaleX()
+			ScaleY()
+			ScaleXY()
+			Scale()
+			MirrorH()
+			MirrorV()
+			MirrorP()
+			MirrorL()
+			TranslateX()
+			TranslateY()
+			Translate()
+			Rotate()
+			SkewX()
+			SkewY()
+			Skew()
+	- Graphic function were added/updated [1688549]:
+			SetLineStyle()
+			_outPoint()
+			_outLine()
+			_outRect()
+			_outCurve()
+			Line()
+			Rect()
+			Curve
+			Ellipse
+			Circle
+			Polygon
+			RegularPolygon
+
+2.0.000 (2008-01-04)
+	- RTL (Right-To-Left) languages support was added. Language direction is set using the $l['a_meta_dir'] setting on /configure/language/xxx.php language files.
+	- setRTL($enable) method was added to manually enable/disable the RTL text direction.
+	- The attribute "dir" was added to support custom text direction on HTML tags. Possible values are: ltr - for Left-To-Right and RTL for Right-To-Left.
+	- RC4 40bit encryption was added. Check the SetProtection method.
+	- [1815213] Improved image support for GIF, JPEG, PNG formats.
+	- [1800094] Attribute "value" was added to ordered list items <li>.
+	- Image function now has a new "align" parameter that indicates the alignment of the pointer next to image insertion and relative to image height. The value can be:
+			T: top-right for LTR or top-left for RTL
+			M: middle-right for LTR or middle-left for RTL
+			B: bottom-right for LTR or bottom-left for RTL
+			N: next line
+	- Attribute "align" was added to <img> html tag to set the above image "align" parameter. Possible values are:
+			top: top-right for LTR or top-left for RTL
+			middle: middle-right for LTR or middle-left for RTL
+			bottom: bottom-right for LTR or bottom-left for RTL
+	- [1798103] newline was added after </ul>, </ol> and </p> tages.
+	- [1816393] Documentation was updated.
+	- 'ln' parameter was fixed on writeHTMLCell. Now it's possible to print two or more columns across several pages;
+	- The method lastPage() was added to move the pointer on the last page;
+
+------------------------------------------------------------
+
+1.53.0.TC034 (2007-07-30)
+	- fixed htmlentities conversion.
+	- MultiCell() function returns the number of cells.
+
+1.53.0.TC033 (2007-07-30)
+	- fixed bug 1762550: case sensitive for font files
+	- NOTE: all fonts files names must be in lowercase!
+
+1.53.0.TC032 (2007-07-27)
+	- setLastH method was added to resolve bug 1689071.
+	- all fonts names were converted in lowercase (bug 1713005).
+	- bug 1740954 was fixed.
+	- justification was added as Cell option.
+
+1.53.0.TC031 (2007-03-20)
+	- ToUnicode CMap were added on _puttruetypeunicode function. Now you may search and copy unicode text.
+
+1.53.0.TC030 (2007-03-06)
+	- fixed bug on PHP4 version.
+
+1.53.0.TC029 (2007-03-06)
+	- DejaVu Fonts were added.
+
+1.53.0.TC028 (2007-03-03)
+	- MultiCell function signature were changed: the $ln parameter were added. Check documentation for further information.
+	- Greek language were added on example sentences.
+	- setPrintHeader() and setPrintFooter() functions were added to enable or disable page header and footer.
+
+1.53.0.TC027 (2006-12-14)
+	- $attr['face'] bug were fixed.
+	- K_TCPDF_EXTERNAL_CONFIG control where introduced on /config/tcpdf_config.php to use external configuration files.
+
+1.53.0.TC026 (2006-10-28)
+	- writeHTML function call were fixed on examples.
+
+1.53.0.TC025 (2006-10-27)
+	- Bugs item #1421290 were fixed (0D - 0A substitution in some characters)
+	- Bugs item #1573174 were fixed (MultiCell documentation)
+
+1.53.0.TC024 (2006-09-26)
+	- getPageHeight() function were fixed (bug 1543476).
+	- fixed missing breaks on closedHTMLTagHandler function (bug 1535263).
+	- fixed extra spaces on Write function (bug 1535262).
+
+1.53.0.TC023 (2006-08-04)
+	- paths to barcode directory were fixed.
+	- documentation were updated.
+
+1.53.0.TC022 (2006-07-16)
+	- fixed bug: [ 1516858 ] Probs with PHP autoloader and class_exists()
+
+1.53.0.TC021 (2006-07-01)
+	- HTML attributes with whitespaces are now supported (thanks to Nelson Benitez for his support)
+
+1.53.0.TC020 (2006-06-23)
+	- code cleanup
+
+1.53.0.TC019 (2006-05-21)
+	- fixed <strong> and <em> closing tags
+
+1.53.0.TC018 (2006-05-18)
+	- fixed font names bug
+
+1.53.0.TC017 (2006-05-18)
+	- the TTF2UFM utility to convert True Type fonts for TCPDF were included on fonts folder.
+	- new free unicode fonts were included on /fonts/freefont.
+	- test_unicode.php example were exended.
+	- parameter $fill were added on Write, writeHTML and writeHTMLCell functions.
+	- documentation were updated.
+
+1.53.0.TC016 (2006-03-09)
+	- fixed closing <strong> tag on html parser.
+
+1.53.0.TC016 (2005-08-28)
+	- fpdf.php and tcpdf.php files were joined in one single class (you can still extend TCPDF with your own class).
+	- fixed problem when mb_internal_encoding is set.
+
+1.53.0.TC014 (2005-05-29)
+	- fixed WriteHTMLCell new page issue.
+
+1.53.0.TC013 (2005-05-29)
+	- fixed WriteHTMLCell across pages.
+
+1.53.0.TC012 (2005-05-29)
+	- font color attribute bug were fixed.
+
+1.53.0.TC011 (2005-03-31)
+	- SetFont function were fixed (thank Sjaak Lauwers for bug notice).
+
+1.53.0.TC010 (2005-03-22)
+	- the html functions were improved (thanks to Manfred Vervuert for bug reporting).
+
+1.53.0.TC009 (2005-03-19)
+	- a wrong reference to convertColorHexToDec were fixed.
+
+1.53.0.TC008 (2005-02-07)
+	- removed some extra bytes from PHP files.
+
+1.53.0.TC007 (2005-01-08)
+	- fill attribute were removed from writeHTMLCell method.
+
+1.53.0.TC006 (2005-01-08)
+	- the documentation were updated.
+
+1.53.0.TC005 (2005-01-05)
+	- Steven Wittens's unicode methods were removed.
+	- All unicode methods were rewritten from scratch.
+	- TCPDF is now licensed as LGPL.
+
+1.53.0.TC004 (2005-01-04)
+	- this changelog were added.
+	- removed commercial fonts for licensing issue.
+	- Bitstream Vera Fonts were added (http://www.bitstream.com/font_rendering/products/dev_fonts/vera.html).
+	- Now the AddFont and SetFont functions returns the basic font if the styled version do not exist.
+
+EOF --------------------------------------------------------
+

file:b/tcpdf/LICENSE.TXT (new)
--- /dev/null
+++ b/tcpdf/LICENSE.TXT
@@ -1,1 +1,861 @@
-
+**********************************************************************
+* TCPDF LICENSE
+**********************************************************************
+
+  TCPDF 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 3 of the
+  License, or (at your option) any later version. Additionally, 
+  YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE 
+  GENERATED PDF DOCUMENTS.
+
+**********************************************************************
+**********************************************************************
+
+                   GNU LESSER 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.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser 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
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
+**********************************************************************
+**********************************************************************
+
+                    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>.
+
+**********************************************************************
+**********************************************************************
+

file:b/tcpdf/README.TXT (new)
--- /dev/null
+++ b/tcpdf/README.TXT
@@ -1,1 +1,91 @@
+TCPDF - README
+============================================================
 
+I WISH TO IMPROVE AND EXPAND TCPDF BUT I NEED YOUR SUPPORT.
+PLEASE MAKE A DONATION:
+http://sourceforge.net/donate/index.php?group_id=128076
+
+------------------------------------------------------------
+
+Name: TCPDF
+Version: 5.9.059
+Release date: 2011-02-27
+Author:	Nicola Asuni
+
+Copyright (c) 2002-2011:
+	Nicola Asuni
+	Tecnick.com s.r.l.
+	Via Della Pace, 11
+	09044 Quartucciu (CA)
+	ITALY
+	www.tecnick.com
+
+URLs:
+	http:  www.tcpdf.org
+	http:  www.sourceforge.net/projects/tcpdf
+
+Description:
+	TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions.
+
+Main Features:
+    * no external libraries are required for the basic functions;
+    * all standard page formats, custom page formats, custom margins and units of measure;
+    * UTF-8 Unicode and Right-To-Left languages;
+    * TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
+    * font subsetting;
+    * methods to publish some XHTML + CSS code, Javascript and Forms;
+    * images, graphic (geometric figures) and transformation methods;
+    * supports JPEG, PNG and SVG 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)
+    * 1D and 2D barcodes: 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, QR-Code, PDF417;
+    * Grayscale, RGB, CMYK, Spot Colors and Transparencies;
+    * automatic page header and footer management;
+    * document encryption up to 256 bit and digital signature certifications;
+    * transactions to UNDO commands;
+    * PDF annotations, including links, text and file attachments;
+    * text rendering modes (fill, stroke and clipping);
+    * multiple columns mode;
+    * no-write page regions;
+    * bookmarks and table of content;
+    * text hyphenation;
+    * text stretching and spacing (tracking/kerning);
+    * automatic page break, line break and text alignments including justification;
+    * automatic page numbering and page groups;
+    * move and delete pages;
+    * page compression (requires php-zlib extension);
+    * XOBject Templates;
+
+Installation (full instructions on http:  www.tcpdf.org):
+	1. copy the folder on your Web server
+	2. set your installation path and other parameters on the config/tcpdf_config.php
+	3. call the examples/example_001.php page with your browser to see an example
+
+Source Code Documentation:
+	doc/index.html
+	http://www.tcpdf.org/doc/
+
+For Additional Documentation:
+	http:  www.tcpdf.org
+
+License
+	Copyright (C) 2002-2011  Nicola Asuni - Tecnick.com S.r.l.
+
+	TCPDF 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 3 of the
+	License, or (at your option) any later version. Additionally, 
+	YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE 
+	GENERATED PDF DOCUMENTS.
+
+	TCPDF 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 License
+	along with TCPDF. If not, see
+	<http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT>.
+
+	See LICENSE.TXT file for more information.
+
+============================================================
+

--- /dev/null
+++ b/tcpdf/barcodes.php
@@ -1,1 +1,1966 @@
-
+<?php
+//============================================================+
+// File name   : barcodes.php
+// Version     : 1.0.012
+// Begin       : 2008-06-09
+// Last Update : 2010-12-16
+// Author      : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
+// License     : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
+// -------------------------------------------------------------------
+// Copyright (C) 2008-2010  Nicola Asuni - Tecnick.com S.r.l.
+//
+// This file is part of TCPDF software library.
+//
+// TCPDF 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 3 of the
+// License, or (at your option) any later version.
+//
+// TCPDF 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 TCPDF.  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.
+//
+//============================================================+
+
+/**
+ * @file
+ * PHP class to creates array representations for common 1D barcodes to be used with TCPDF.
+ * @package com.tecnick.tcpdf
+ * @author Nicola Asuni
+ * @version 1.0.012
+ */
+
+/**
+ * @class TCPDFBarcode
+ * PHP class to creates array representations for common 1D barcodes to be used with TCPDF (http://www.tcpdf.org).<br>
+ * @package com.tecnick.tcpdf
+ * @version 1.0.012
+ * @author Nicola Asuni
+ */
+class TCPDFBarcode {
+
+	/**
+	 * Array representation of barcode.
+	 * @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 $code (string) code to print
+ 	 * @param $type (string) 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 $code (string) code to print
+ 	 * @param $type (string) 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
+	 * @param $code (string) code to represent.
+	 * @param $extended (boolean) if true uses the extended mode.
+	 * @param $checksum (boolean) if true add a checksum to the code.
+	 * @return array barcode representation.
+	 * @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';
+
+		$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);
+		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 $code (string) code to represent.
+	 * @return encoded string.
+	 * @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);
+		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 $code (string) code to represent.
+	 * @return char checksum.
+	 * @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);
+		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
+	 * @param $code (string) code to represent.
+	 * @return array barcode representation.
+	 * @protected
+	 */
+	protected function barcode_code93($code) {
+		$chr['0'] = '131112';
+		$chr['1'] = '111213';
+		$chr['2'] = '111312';
+		$chr['3'] = '111411';
+		$chr['4'] = '121113';
+		$chr['5'] = '121212';
+		$chr['6'] = '121311';
+		$chr['7'] = '111114';
+		$chr['8'] = '131211';
+		$chr['9'] = '141111';
+		$chr['A'] = '211113';
+		$chr['B'] = '211212';
+		$chr['C'] = '211311';
+		$chr['D'] = '221112';
+		$chr['E'] = '221211';
+		$chr['F'] = '231111';
+		$chr['G'] = '112113';
+		$chr['H'] = '112212';
+		$chr['I'] = '112311';
+		$chr['J'] = '122112';
+		$chr['K'] = '132111';
+		$chr['L'] = '111123';
+		$chr['M'] = '111222';
+		$chr['N'] = '111321';
+		$chr['O'] = '121122';
+		$chr['P'] = '131121';
+		$chr['Q'] = '212112';
+		$chr['R'] = '212211';
+		$chr['S'] = '211122';
+		$chr['T'] = '211221';
+		$chr['U'] = '221121';
+		$chr['V'] = '222111';
+		$chr['W'] = '112122';
+		$chr['X'] = '112221';
+		$chr['Y'] = '122121';
+		$chr['Z'] = '123111';
+		$chr['-'] = '121131';
+		$chr['.'] = '311112';
+		$chr[' '] = '311211';
+		$chr['$'] = '321111';
+		$chr['/'] = '112131';
+		$chr['+'] = '113121';
+		$chr['%'] = '211131';
+		$chr[128] = '121221'; // ($)
+		$chr[129] = '311121'; // (/)
+		$chr[130] = '122211'; // (+)
+		$chr[131] = '312111'; // (%)
+		$chr['*'] = '111141';
+		$code = strtoupper($code);
+		$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) {
+			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);
+		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;
+	}
+
+	/**
+	 * Calculate CODE 93 checksum (modulo 47).
+	 * @param $code (string) code to represent.
+	 * @return string checksum code.
+	 * @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);
+		// calculate check digit C
+		$p = 1;
+		$check = 0;
+		for ($i = ($len - 1); $i >= 0; --$i) {
+			$k = array_keys($chars, $code{$i});
+			$check += ($k[0] * $p);
+			++$p;
+			if ($p > 20) {
+				$p = 1;
+			}
+		}
+		$check %= 47;
+		$c = $chars[$check];
+		$code .= $c;
+		// calculate check digit K
+		$p = 1;
+		$check = 0;
+		for ($i = $len; $i >= 0; --$i) {
+			$k = array_keys($chars, $code{$i});
+			$check += ($k[0] * $p);
+			++$p;
+			if ($p > 15) {
+				$p = 1;
+			}
+		}
+		$check %= 47;
+		$k = $chars[$check];
+		return $c.$k;
+	}
+
+	/**
+	 * Checksum for standard 2 of 5 barcodes.
+	 * @param $code (string) code to process.
+	 * @return int checksum.
+	 * @protected
+	 */
+	protected function checksum_s25($code) {
+		$len = strlen($code);
+		$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;
+	}
+
+	/**
+	 * MSI.
+	 * Variation of Plessey code, with similar applications
+	 * Contains digits (0 to 9) and encodes the data only in the width of bars.
+	 * @param $code (string) code to represent.
+	 * @param $checksum (boolean) if true add a checksum to the code (modulo 11)
+	 * @return array barcode representation.
+	 * @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';
+		$chr['B'] = '110100110110';
+		$chr['C'] = '110110100100';
+		$chr['D'] = '110110100110';
+		$chr['E'] = '110110110100';
+		$chr['F'] = '110110110110';
+		if ($checksum) {
+			// add checksum
+			$clen = strlen($code);
+			$p = 2;
+			$check = 0;
+			for ($i = ($clen - 1); $i >= 0; --$i) {
+				$check += (hexdec($code{$i}) * $p);
+				++$p;
+				if ($p > 7) {
+					$p = 2;
+				}
+			}
+			$check %= 11;
+			if ($check > 0) {
+				$check = 11 - $check;
+			}
+			$code .= $check;
+		}
+		$seq = '110'; // left guard
+		$clen = strlen($code);
+		for ($i = 0; $i < $clen; ++$i) {
+			$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);
+	}
+
+	/**
+	 * Standard 2 of 5 barcodes.
+	 * Used in airline ticket marking, photofinishing
+	 * Contains digits (0 to 9) and encodes the data only in the width of bars.
+	 * @param $code (string) code to represent.
+	 * @param $checksum (boolean) if true add a checksum to the code
+	 * @return array barcode representation.
+	 * @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';
+		if ($checksum) {
+			// add checksum
+			$code .= $this->checksum_s25($code);
+		}
+		if((strlen($code) % 2) != 0) {
+			// add leading zero if code-length is odd
+			$code = '0'.$code;
+		}
+		$seq = '11011010';
+		$clen = strlen($code);
+		for ($i = 0; $i < $clen; ++$i) {
+			$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);
+	}
+
+	/**
+	 * Convert binary barcode sequence to TCPDF barcode array.
+	 * @param $seq (string) barcode as binary sequence.
+	 * @param $bararray (array) barcode array.
+	 * òparam array $bararray TCPDF barcode array to fill up
+	 * @return array barcode representation.
+	 * @protected
+	 */
+	protected function binseq_to_array($seq, $bararray) {
+		$len = strlen($seq);
+		$w = 0;
+		$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;
+	}
+
+	/**
+	 * Interleaved 2 of 5 barcodes.
+	 * 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 $code (string) code to represent.
+	 * @param $checksum (boolean) if true add a checksum to the code
+	 * @return array barcode representation.
+	 * @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) {
+			// 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);
+		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]);
+			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 $code (string) code to represent.
+	 * @param $type (string) barcode type: A, B or C
+	 * @return array barcode representation.
+	 * @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);
+				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);
+		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];
+			} 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
+	 * @param $code (string) code to represent.
+	 * @param $len (string) barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A
+	 * @return array barcode representation.
+	 * @protected
+	 */
+	protected function barcode_eanupc($code, $len=13) {
+		$upce = false;
+		if ($len == 6) {
+			$len = 12; // UPC-A
+			$upce = true; // UPC-E mode
+		}
+		$data_len = $len - 1;
+		//Padding
+		$code = str_pad($code, $data_len, '0', STR_PAD_LEFT);
+		$code_len = strlen($code);
+		// calculate check digit
+		$sum_a = 0;
+		for ($i = 1; $i < $data_len; $i+=2) {
+			$sum_a += $code{$i};
+		}
+		if ($len > 12) {
+			$sum_a *= 3;
+		}
+		$sum_b = 0;
+		for ($i = 0; $i < $data_len; $i+=2) {
+			$sum_b += ($code{$i});
+		}
+		if ($len < 13) {
+			$sum_b *= 3;
+		}
+		$r = ($sum_a + $sum_b) % 10;
+		if($r > 0) {
+			$r = (10 - $r);
+		}
+		if ($code_len == $data_len) {
+			// add check digit
+			$code .= $r;
+		} elseif ($r !== intval($code{$data_len})) {
+			// wrong checkdigit
+			return false;
+		}
+		if ($len == 12) {
+			// UPC-A
+			$code = '0'.$code;
+			++$len;
+		}
+		if ($upce) {
+			// convert UPC-A to UPC-E
+			$tmp = substr($code, 4, 3);
+			if (($tmp == '000') OR ($tmp == '100') OR ($tmp == '200')) {
+				// manufacturer code ends in 000, 100, or 200
+				$upce_code = substr($code, 2, 2).substr($code, 9, 3).substr($code, 4, 1);
+			} else {
+				$tmp = substr($code, 5, 2);
+				if ($tmp == '00') {
+					// manufacturer code ends in 00
+					$upce_code = substr($code, 2, 3).substr($code, 10, 2).'3';
+				} else {
+					$tmp = substr($code, 6, 1);
+					if ($tmp == '0') {
+						// manufacturer code ends in 0
+						$upce_code = substr($code, 2, 4).substr($code, 11, 1).'4';
+					} else {
+						// manufacturer code does not end in zero
+						$upce_code = substr($code, 2, 5).substr($code, 11, 1);
+					}
+				}
+			}
+		}
+		//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(
+			'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(
+			'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) {
+				$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) {
+				for ($i = 0; $i < $half_len; ++$i) {
+					$seq .= $codes['A'][$code{$i}];
+				}
+			} else {
+				$p = $parities[$code{0}];
+				for ($i = 1; $i < $half_len; ++$i) {
+					$seq .= $codes[$p[$i-1]][$code{$i}];
+				}
+			}
+			$seq .= '01010'; // center guard bar
+			for ($i = $half_len; $i < $len; ++$i) {
+				$seq .= $codes['C'][$code{$i}];
+			}
+			$seq .= '101'; // right guard bar
+		}
+		$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
+	 * @param $code (string) code to represent.
+	 * @param $len (string) barcode type: 2 = 2-Digit, 5 = 5-Digit
+	 * @return array barcode representation.
+	 * @protected
+	 */
+	protected function barcode_eanext($code, $len=5) {
+		//Padding
+		$code = str_pad($code, $len, '0', STR_PAD_LEFT);
+		// calculate check digit
+		if ($len == 2) {
+			$r = $code % 4;
+		} elseif ($len == 5) {
+			$r = (3 * ($code{0} + $code{2} + $code{4})) + (9 * ($code{1} + $code{3}));
+			$r %= 10;
+		} else {
+			return false;
+		}
+		//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(
+			'0'=>array('A','A'),
+			'1'=>array('A','B'),
+			'2'=>array('B','A'),
+			'3'=>array('B','B')
+		);
+		$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
+			$seq .= $codes[$p[$i]][$code{$i}];
+		}
+		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
+		return $this->binseq_to_array($seq, $bararray);
+	}
+
+	/**
+	 * POSTNET and PLANET barcodes.
+	 * Used by U.S. Postal Service for automated mail sorting
+	 * @param $code (string) zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD.
+	 * @param $planet (boolean) if true print the PLANET barcode, otherwise print POSTNET
+	 * @return array barcode representation.
+	 * @protected
+	 */
+	protected function barcode_postnet($code, $planet=false) {
+		// bar lenght
+		if ($planet) {
+			$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(
+				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)
+			);
+		}
+		$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
+		$sum = 0;
+		for ($i = 0; $i < $len; ++$i) {
+			$sum += intval($code{$i});
+		}
+		$chkd = ($sum % 10);
+		if($chkd > 0) {
+			$chkd = (10 - $chkd);
+		}
+		$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.
+	 * @param $code (string) code to print
+	 * @param $kix (boolean) 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.
+	 * @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(
+			'0' => array(3,3,2,2),
+			'1' => array(3,4,1,2),
+			'2' => array(3,4,2,1),
+			'3' => array(4,3,1,2),
+			'4' => array(4,3,2,1),
+			'5' => array(4,4,1,1),
+			'6' => array(3,1,4,2),
+			'7' => array(3,2,3,2),
+			'8' => array(3,2,4,1),
+			'9' => array(4,1,3,2),
+			'A' => array(4,1,4,1),
+			'B' => array(4,2,3,1),
+			'C' => array(3,1,2,4),
+			'D' => array(3,2,1,4),
+			'E' => array(3,2,2,3),
+			'F' => array(4,1,1,4),
+			'G' => array(4,1,2,3),
+			'H' => array(4,2,1,3),
+			'I' => array(1,3,4,2),
+			'J' => array(1,4,3,2),
+			'K' => array(1,4,4,1),
+			'L' => array(2,3,3,2),
+			'M' => array(2,3,4,1),
+			'N' => array(2,4,3,1),
+			'O' => array(1,3,2,4),
+			'P' => array(1,4,1,4),
+			'Q' => array(1,4,2,3),
+			'R' => array(2,3,1,4),
+			'S' => array(2,3,2,3),
+			'T' => array(2,4,1,3),
+			'U' => array(1,1,4,4),
+			'V' => array(1,2,3,4),
+			'W' => array(1,2,4,3),
+			'X' => array(2,1,3,4),
+			'Y' => array(2,1,4,3),
+			'Z' => array(2,2,3,3)
+		);
+		$code = strtoupper($code);
+		$len = strlen($code);
+		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 3, 'bcode' => array());
+		if ($notkix) {
+			// table for checksum calculation (row,col)
+			$checktable = array(
+				'0' => array(1,1),
+				'1' => array(1,2),
+				'2' => array(1,3),
+				'3' => array(1,4),
+				'4' => array(1,5),
+				'5' => array(1,0),
+				'6' => array(2,1),
+				'7' => array(2,2),
+				'8' => array(2,3),
+				'9' => array(2,4),
+				'A' => array(2,5),
+				'B' => array(2,0),
+				'C' => array(3,1),
+				'D' => array(3,2),
+				'E' => array(3,3),
+				'F' => array(3,4),
+				'G' => array(3,5),
+				'H' => array(3,0),
+				'I' => array(4,1),
+				'J' => array(4,2),
+				'K' => array(4,3),
+				'L' => array(4,4),
+				'M' => array(4,5),
+				'N' => array(4,0),
+				'O' => array(5,1),
+				'P' => array(5,2),
+				'Q' => array(5,3),
+				'R' => array(5,4),
+				'S' => array(5,5),
+				'T' => array(5,0),
+				'U' => array(0,1),
+				'V' => array(0,2),
+				'W' => array(0,3),
+				'X' => array(0,4),
+				'Y' => array(0,5),
+				'Z' => array(0,0)
+			);
+			$row = 0;
+			$col = 0;
+			for ($i = 0; $i < $len; ++$i) {
+				$row += $checktable[$code{$i}][0];
+				$col += $checktable[$code{$i}][1];
+			}
+			$row %= 6;
+			$col %= 6;
+			$chk = array_keys($checktable, array($row,$col));
+			$code .= $chk[0];
+			++$len;
+		}
+		$k = 0;
+		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;
+		}
+		for ($i = 0; $i < $len; ++$i) {
+			for ($j = 0; $j < 4; ++$j) {
+				switch ($barmode[$code{$i}][$j]) {
+					case 1: {
+						$p = 0;
+						$h = 2;
+						break;
+					}
+					case 2: {
+						$p = 0;
+						$h = 3;
+						break;
+					}
+					case 3: {
+						$p = 1;
+						$h = 1;
+						break;
+					}
+					case 4: {
+						$p = 1;
+						$h = 2;
+						break;
+					}
+				}
+				$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;
+		}
+		return $bararray;
+	}
+
+	/**
+	 * CODABAR barcodes.
+	 * Older code often used in library systems, sometimes in blood banks
+	 * @param $code (string) code to represent.
+	 * @return array barcode representation.
+	 * @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
+	 * @param $code (string) code to represent.
+	 * @return array barcode representation.
+	 * @protected
+	 */
+	protected function barcode_code11($code) {
+		$chr = array(
+			'0' => '111121',
+			'1' => '211121',
+			'2' => '121121',
+			'3' => '221111',
+			'4' => '112121',
+			'5' => '212111',
+			'6' => '122111',
+			'7' => '111221',
+			'8' => '211211',
+			'9' => '211111',
+			'-' => '112111',
+			'S' => '112211'
+		);
+
+		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
+		$k = 0;
+		$w = 0;
+		$seq = '';
+		$len = strlen($code);
+		// calculate check digit C
+		$p = 1;
+		$check = 0;
+		for ($i = ($len - 1); $i >= 0; --$i) {
+			$digit = $code{$i};
+			if ($digit == '-') {
+				$dval = 10;
+			} else {
+				$dval = intval($digit);
+			}
+			$check += ($dval * $p);
+			++$p;
+			if ($p > 10) {
+				$p = 1;
+			}
+		}
+		$check %= 11;
+		if ($check == 10) {
+			$check = '-';
+		}
+		$code .= $check;
+		if ($len > 10) {
+			// calculate check digit K
+			$p = 1;
+			$check = 0;
+			for ($i = $len; $i >= 0; --$i) {
+				$digit = $code{$i};
+				if ($digit == '-') {
+					$dval = 10;
+				} else {
+					$dval = intval($digit);
+				}
+				$check += ($dval * $p);
+				++$p;
+				if ($p > 9) {
+					$p = 1;
+				}
+			}
+			$check %= 11;
+			$code .= $check;
+			++$len;
+		}
+		$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;
+	}
+
+	/**
+	 * Pharmacode
+	 * Contains digits (0 to 9)
+	 * @param $code (string) code to represent.
+	 * @return array barcode representation.
+	 * @protected
+	 */
+	protected function barcode_pharmacode($code) {
+		$seq = '';
+		$code = intval($code);
+		while ($code > 0) {
+			if (($code % 2) == 0) {
+				$seq .= '11100';
+				$code -= 2;
+			} else {
+				$seq .= '100';
+				$code -= 1;
+			}
+			$code /= 2;
+		}
+		$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);
+	}
+
+	/**
+	 * Pharmacode two-track
+	 * Contains digits (0 to 9)
+	 * @param $code (string) code to represent.
+	 * @return array barcode representation.
+	 * @protected
+	 */
+	protected function barcode_pharmacode2t($code) {
+		$seq = '';
+		$code = intval($code);
+		do {
+			switch ($code % 3) {
+				case 0: {
+					$seq .= '3';
+					$code = ($code - 3) / 3;
+					break;
+				}
+				case 1: {
+					$seq .= '1';
+					$code = ($code - 1) / 3;
+					break;
+				}
+				case 2: {
+					$seq .= '2';
+					$code = ($code - 2) / 3;
+					break;
+				}
+			}
+		} while($code != 0);
+		$seq = strrev($seq);
+		$k = 0;
+		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array());
+		$len = strlen($seq);
+		for ($i = 0; $i < $len; ++$i) {
+			switch ($seq{$i}) {
+				case '1': {
+					$p = 1;
+					$h = 1;
+					break;
+				}
+				case '2': {
+					$p = 0;
+					$h = 1;
+					break;
+				}
+				case '3': {
+					$p = 0;
+					$h = 2;
+					break;
+				}
+			}
+			$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;
+	}
+
+
+	/**
+	 * IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
+	 * (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 $code (string) code to print, separate the ZIP (routing code) from the rest using a minus char '-' (BarcodeID_ServiceTypeID_MailerID_SerialNumber-RoutingCode)
+	 * @return array barcode representation.
+	 * @protected
+	 */
+	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);
+		$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);
+		$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];
+		if (isset($code_arr[1])) {
+			$routing_code = $code_arr[1];
+		} else {
+			$routing_code = '';
+		}
+		// Conversion of Routing Code
+		switch (strlen($routing_code)) {
+			case 0: {
+				$binary_code = 0;
+				break;
+			}
+			case 5: {
+				$binary_code = bcadd($routing_code, '1');
+				break;
+			}
+			case 9: {
+				$binary_code = bcadd($routing_code, '100001');
+				break;
+			}
+			case 11: {
+				$binary_code = bcadd($routing_code, '1000100001');
+				break;
+			}
+			default: {
+				return false;
+				break;
+			}
+		}
+		$binary_code = bcmul($binary_code, 10);
+		$binary_code = bcadd($binary_code, $tracking_number{0});
+		$binary_code = bcmul($binary_code, 5);
+		$binary_code = bcadd($binary_code, $tracking_number{1});
+		$binary_code .= substr($tracking_number, 2, 18);
+		// convert to hexadecimal
+		$binary_code = $this->dec_to_hex($binary_code);
+		// pad to get 13 bytes
+		$binary_code = str_pad($binary_code, 26, '0', STR_PAD_LEFT);
+		// convert string to array of bytes
+		$binary_code_arr = chunk_split($binary_code, 2, "\r");
+		$binary_code_arr = substr($binary_code_arr, 0, -1);
+		$binary_code_arr = explode("\r", $binary_code_arr);
+		// calculate frame check sequence
+		$fcs = $this->imb_crc11fcs($binary_code_arr);
+		// exclude first 2 bits from first byte
+		$first_byte = sprintf('%2s', dechex((hexdec($binary_code_arr[0]) << 2) >> 2));
+		$binary_code_102bit = $first_byte.substr($binary_code, 2);
+		// convert binary data to codewords
+		$codewords = array();
+		$data = $this->hex_to_dec($binary_code_102bit);
+		$codewords[0] = bcmod($data, 636) * 2;
+		$data = bcdiv($data, 636);
+		for ($i = 1; $i < 9; ++$i) {
+			$codewords[$i] = bcmod($data, 1365);
+			$data = bcdiv($data, 1365);
+		}
+		$codewords[9] = $data;
+		if (($fcs >> 10) == 1) {
+			$codewords[9] += 659;
+		}
+		// generate lookup tables
+		$table2of13 = $this->imb_tables(2, 78);
+		$table5of13 = $this->imb_tables(5, 1287);
+		// convert codewords to characters
+		$characters = array();
+		$bitmask = 512;
+		foreach($codewords as $k => $val) {
+			if ($val <= 1286) {
+				$chrcode = $table5of13[$val];
+			} else {
+				$chrcode = $table2of13[($val - 1287)];
+			}
+			if (($fcs & $bitmask) > 0) {
+				// bitwise invert
+				$chrcode = ((~$chrcode) & 8191);
+			}
+			$characters[] = $chrcode;
+			$bitmask /= 2;
+		}
+		$characters = array_reverse($characters);
+		// build bars
+		$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);
+			$dsc = (($characters[$dsc_chr[$i]] & pow(2, $dsc_pos[$i])) > 0);
+			if ($asc AND $dsc) {
+				// full bar (F)
+				$p = 0;
+				$h = 3;
+			} elseif ($asc) {
+				// ascender (A)
+				$p = 0;
+				$h = 2;
+			} elseif ($dsc) {
+				// descender (D)
+				$p = 1;
+				$h = 2;
+			} else {
+				// tracker (T)
+				$p = 1;
+				$h = 1;
+			}
+			$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;
+	}
+
+	/**
+	 * Convert large integer number to hexadecimal representation.
+	 * (requires PHP bcmath extension)
+	 * @param $number (string) number to convert specified as a string
+	 * @return string hexadecimal representation
+	 */
+	public function dec_to_hex($number) {
+		$i = 0;
+		$hex = array();
+		if($number == 0) {
+			return '00';
+		}
+		while($number > 0) {
+			if($number == 0) {
+				array_push($hex, '0');
+			} else {
+				array_push($hex, strtoupper(dechex(bcmod($number, '16'))));
+				$number = bcdiv($number, '16', 0);
+			}
+		}
+		$hex = array_reverse($hex);
+		return implode($hex);
+	}
+
+	/**
+	 * Convert large hexadecimal number to decimal representation (string).
+	 * (requires PHP bcmath extension)
+	 * @param $hex (string) hexadecimal number to convert specified as a string
+	 * @return string hexadecimal representation
+	 */
+	public function hex_to_dec($hex) {
+		$dec = 0;
+		$bitval = 1;
+		$len = strlen($hex);
+		for($pos = ($len - 1); $pos >= 0; --$pos) {
+			$dec = bcadd($dec, bcmul(hexdec($hex{$pos}), $bitval));
+			$bitval = bcmul($bitval, 16);
+		}
+		return $dec;
+	}
+
+	/**
+	 * Intelligent Mail Barcode calculation of Frame Check Sequence
+	 * @param $code_arr (string) array of hexadecimal values (13 bytes holding 102 bits right justified).
+	 * @return int 11 bit Frame Check Sequence as integer (decimal base)
+	 * @protected
+	 */
+	protected function imb_crc11fcs($code_arr) {
+		$genpoly = 0x0F35; // generator polynomial
+		$fcs = 0x07FF; // Frame Check Sequence
+		// do most significant byte skipping the 2 most significant bits
+		$data = hexdec($code_arr[0]) << 5;
+		for ($bit = 2; $bit < 8; ++$bit) {
+			if (($fcs ^ $data) & 0x400) {
+				$fcs = ($fcs << 1) ^ $genpoly;
+			} else {
+				$fcs = ($fcs << 1);
+			}
+			$fcs &= 0x7FF;
+			$data <<= 1;
+		}
+		// do rest of bytes
+		for ($byte = 1; $byte < 13; ++$byte) {
+			$data = hexdec($code_arr[$byte]) << 3;
+			for ($bit = 0; $bit < 8; ++$bit) {
+				if (($fcs ^ $data) & 0x400) {
+					$fcs = ($fcs << 1) ^ $genpoly;
+				} else {
+					$fcs = ($fcs << 1);
+				}
+				$fcs &= 0x7FF;
+				$data <<= 1;
+			}
+		}
+		return $fcs;
+	}
+
+	/**
+	 * Reverse unsigned short value
+	 * @param $num (int) value to reversr
+	 * @return int reversed value
+	 * @protected
+	 */
+	protected function imb_reverse_us($num) {
+		$rev = 0;
+		for ($i = 0; $i < 16; ++$i) {
+			$rev <<= 1;
+			$rev |= ($num & 1);
+			$num >>= 1;
+		}
+		return $rev;
+	}
+
+	/**
+	 * generate Nof13 tables used for Intelligent Mail Barcode
+	 * @param $n (int) is the type of table: 2 for 2of13 table, 5 for 5of13table
+	 * @param $size (int) size of table (78 for n=2 and 1287 for n=5)
+	 * @return array requested table
+	 * @protected
+	 */
+	protected function imb_tables($n, $size) {
+		$table = array();
+		$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
+			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
+					if ($reverse == $count) {
+						$table[$lui] = $count;
+						--$lui;
+					} else {
+						$table[$lli] = $count;
+						++$lli;
+						$table[$lli] = $reverse;
+						++$lli;
+					}
+				}
+			}
+		}
+		return $table;
+	}
+
+} // end of class
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/cache/chapter_demo_1.txt
@@ -1,1 +1,20 @@
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc.
 
+Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.
+
+Integer non sem eget neque mattis accumsan. Maecenas eu nisl mauris, sit amet interdum ipsum. In pharetra erat vel lectus venenatis elementum. Nulla non elit ligula, sit amet mollis urna. Morbi ut gravida est. Mauris tincidunt sem et turpis molestie malesuada. Curabitur vel nulla risus, sed mollis erat. Suspendisse vehicula accumsan purus nec varius. Donec fermentum lorem id felis sodales dictum. Quisque et dolor ipsum. Nam luctus consectetur dui vitae fermentum. Curabitur sodales consequat augue, id ultricies augue tempor ac. Aliquam ac magna id ipsum vehicula bibendum. Sed elementum congue tristique. Phasellus vel lorem eu lectus porta sodales. Etiam neque tortor, sagittis id pharetra quis, laoreet vel arcu.
+
+Cras quam mi, ornare laoreet laoreet vel, vehicula at lacus. Maecenas a lacus accumsan augue convallis sagittis sed quis odio. Morbi sit amet turpis diam, dictum convallis urna. Cras eget interdum augue. Cras eu nisi sit amet dolor faucibus porttitor. Suspendisse potenti. Nunc vitae dolor risus, at cursus libero. Suspendisse bibendum tellus non nibh hendrerit tristique. Mauris eget orci elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta libero non ante laoreet semper. Proin volutpat sodales mi, ac fermentum erat sagittis in. Vivamus at viverra felis. Ut pretium facilisis ante et pharetra.
+
+Nulla facilisi. Cras varius quam eget libero aliquam vitae tincidunt leo rutrum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque a nisl massa, quis pretium urna. Proin vel porttitor tortor. Cras rhoncus congue velit in bibendum. Donec pharetra semper augue id lacinia. Quisque magna quam, hendrerit eu aliquam et, pellentesque ut tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas nulla quam, rutrum eu feugiat at, elementum eu libero. Maecenas ullamcorper leo et turpis rutrum ac laoreet eros faucibus. Phasellus condimentum lorem quis neque imperdiet quis molestie enim iaculis. Phasellus risus est, vestibulum ut convallis ultrices, dignissim nec erat. Etiam congue lobortis laoreet. Nulla ut neque sed velit dapibus semper. Quisque nec dolor id nibh eleifend iaculis. Vivamus vitae fermentum odio. Etiam malesuada quam in nulla aliquam sed convallis dui feugiat.
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc.
+
+Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.
+
+Integer non sem eget neque mattis accumsan. Maecenas eu nisl mauris, sit amet interdum ipsum. In pharetra erat vel lectus venenatis elementum. Nulla non elit ligula, sit amet mollis urna. Morbi ut gravida est. Mauris tincidunt sem et turpis molestie malesuada. Curabitur vel nulla risus, sed mollis erat. Suspendisse vehicula accumsan purus nec varius. Donec fermentum lorem id felis sodales dictum. Quisque et dolor ipsum. Nam luctus consectetur dui vitae fermentum. Curabitur sodales consequat augue, id ultricies augue tempor ac. Aliquam ac magna id ipsum vehicula bibendum. Sed elementum congue tristique. Phasellus vel lorem eu lectus porta sodales. Etiam neque tortor, sagittis id pharetra quis, laoreet vel arcu.
+
+Cras quam mi, ornare laoreet laoreet vel, vehicula at lacus. Maecenas a lacus accumsan augue convallis sagittis sed quis odio. Morbi sit amet turpis diam, dictum convallis urna. Cras eget interdum augue. Cras eu nisi sit amet dolor faucibus porttitor. Suspendisse potenti. Nunc vitae dolor risus, at cursus libero. Suspendisse bibendum tellus non nibh hendrerit tristique. Mauris eget orci elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta libero non ante laoreet semper. Proin volutpat sodales mi, ac fermentum erat sagittis in. Vivamus at viverra felis. Ut pretium facilisis ante et pharetra.
+
+Nulla facilisi. Cras varius quam eget libero aliquam vitae tincidunt leo rutrum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque a nisl massa, quis pretium urna. Proin vel porttitor tortor. Cras rhoncus congue velit in bibendum. Donec pharetra semper augue id lacinia. Quisque magna quam, hendrerit eu aliquam et, pellentesque ut tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas nulla quam, rutrum eu feugiat at, elementum eu libero. Maecenas ullamcorper leo et turpis rutrum ac laoreet eros faucibus. Phasellus condimentum lorem quis neque imperdiet quis molestie enim iaculis. Phasellus risus est, vestibulum ut convallis ultrices, dignissim nec erat. Etiam congue lobortis laoreet. Nulla ut neque sed velit dapibus semper. Quisque nec dolor id nibh eleifend iaculis. Vivamus vitae fermentum odio. Etiam malesuada quam in nulla aliquam sed convallis dui feugiat.
+

--- /dev/null
+++ b/tcpdf/cache/chapter_demo_2.txt
@@ -1,1 +1,24 @@
+<p><strong>Lorem ipsum</strong> dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc.</p>
 
+<img src="../images/image_demo.jpg" width="54mm" height="80mm" />
+
+<p style="background-color:yellow;"><i>Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.</i></p>
+
+<p>Integer non sem eget neque mattis accumsan. Maecenas eu nisl mauris, sit amet interdum ipsum. In pharetra erat vel lectus venenatis elementum. Nulla non elit ligula, sit amet mollis urna. Morbi ut gravida est. Mauris tincidunt sem et turpis molestie malesuada. Curabitur vel nulla risus, sed mollis erat. Suspendisse vehicula accumsan purus nec varius. Donec fermentum lorem id felis sodales dictum. Quisque et dolor ipsum. Nam luctus consectetur dui vitae fermentum. Curabitur sodales consequat augue, id ultricies augue tempor ac. Aliquam ac magna id ipsum vehicula bibendum. Sed elementum congue tristique. Phasellus vel lorem eu lectus porta sodales. Etiam neque tortor, sagittis id pharetra quis, laoreet vel arcu.</p>
+
+<p style="color:navy;">Cras quam mi, ornare laoreet laoreet vel, vehicula at lacus. Maecenas a lacus accumsan augue convallis sagittis sed quis odio. Morbi sit amet turpis diam, dictum convallis urna. Cras eget interdum augue. Cras eu nisi sit amet dolor faucibus porttitor. Suspendisse potenti. Nunc vitae dolor risus, at cursus libero. Suspendisse bibendum tellus non nibh hendrerit tristique. Mauris eget orci elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta libero non ante laoreet semper. Proin volutpat sodales mi, ac fermentum erat sagittis in. Vivamus at viverra felis. Ut pretium facilisis ante et pharetra.</p>
+
+<p>Nulla facilisi. Cras varius quam eget libero aliquam vitae tincidunt leo rutrum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque a nisl massa, quis pretium urna. Proin vel porttitor tortor. Cras rhoncus congue velit in bibendum. Donec pharetra semper augue id lacinia. Quisque magna quam, hendrerit eu aliquam et, pellentesque ut tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas nulla quam, rutrum eu feugiat at, elementum eu libero. Maecenas ullamcorper leo et turpis rutrum ac laoreet eros faucibus. Phasellus condimentum lorem quis neque imperdiet quis molestie enim iaculis. Phasellus risus est, vestibulum ut convallis ultrices, dignissim nec erat. Etiam congue lobortis laoreet. Nulla ut neque sed velit dapibus semper. Quisque nec dolor id nibh eleifend iaculis. Vivamus vitae fermentum odio. Etiam malesuada quam in nulla aliquam sed convallis dui feugiat.</p>
+
+<p><strong>Lorem ipsum</strong> dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc.</p>
+
+<img src="../images/image_demo.jpg" width="54mm" height="80mm" />
+
+<p style="background-color:yellow;"><i>Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.</i></p>
+
+<p>Integer non sem eget neque mattis accumsan. Maecenas eu nisl mauris, sit amet interdum ipsum. In pharetra erat vel lectus venenatis elementum. Nulla non elit ligula, sit amet mollis urna. Morbi ut gravida est. Mauris tincidunt sem et turpis molestie malesuada. Curabitur vel nulla risus, sed mollis erat. Suspendisse vehicula accumsan purus nec varius. Donec fermentum lorem id felis sodales dictum. Quisque et dolor ipsum. Nam luctus consectetur dui vitae fermentum. Curabitur sodales consequat augue, id ultricies augue tempor ac. Aliquam ac magna id ipsum vehicula bibendum. Sed elementum congue tristique. Phasellus vel lorem eu lectus porta sodales. Etiam neque tortor, sagittis id pharetra quis, laoreet vel arcu.</p>
+
+<p style="color:navy;">Cras quam mi, ornare laoreet laoreet vel, vehicula at lacus. Maecenas a lacus accumsan augue convallis sagittis sed quis odio. Morbi sit amet turpis diam, dictum convallis urna. Cras eget interdum augue. Cras eu nisi sit amet dolor faucibus porttitor. Suspendisse potenti. Nunc vitae dolor risus, at cursus libero. Suspendisse bibendum tellus non nibh hendrerit tristique. Mauris eget orci elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta libero non ante laoreet semper. Proin volutpat sodales mi, ac fermentum erat sagittis in. Vivamus at viverra felis. Ut pretium facilisis ante et pharetra.</p>
+
+<p>Nulla facilisi. Cras varius quam eget libero aliquam vitae tincidunt leo rutrum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque a nisl massa, quis pretium urna. Proin vel porttitor tortor. Cras rhoncus congue velit in bibendum. Donec pharetra semper augue id lacinia. Quisque magna quam, hendrerit eu aliquam et, pellentesque ut tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas nulla quam, rutrum eu feugiat at, elementum eu libero. Maecenas ullamcorper leo et turpis rutrum ac laoreet eros faucibus. Phasellus condimentum lorem quis neque imperdiet quis molestie enim iaculis. Phasellus risus est, vestibulum ut convallis ultrices, dignissim nec erat. Etiam congue lobortis laoreet. Nulla ut neque sed velit dapibus semper. Quisque nec dolor id nibh eleifend iaculis. Vivamus vitae fermentum odio. Etiam malesuada quam in nulla aliquam sed convallis dui feugiat.</p>
+

--- /dev/null
+++ b/tcpdf/cache/table_data_demo.txt
@@ -1,1 +1,16 @@
+Austria;Vienna;83859;8075
+Belgium;Brussels;30518;10192
+Denmark;Copenhagen;43094;5295
+Finland;Helsinki;304529;5147
+France;Paris;543965;58728
+Germany;Berlin;357022;82057
+Greece;Athens;131625;10511
+Ireland;Dublin;70723;3694
+Italy;Roma;301316;57563
+Luxembourg;Luxembourg;2586;424
+Netherlands;Amsterdam;41526;15654
+Portugal;Lisbon;91906;9957
+Spain;Madrid;504790;39348
+Sweden;Stockholm;410934;8839
+United Kingdom;London;243820;58862
 

--- /dev/null
+++ b/tcpdf/cache/utf8test.txt
@@ -1,1 +1,123 @@
+Sentences that contain all letters commonly used in a language

+--------------------------------------------------------------

+

+Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> -- 2001-09-02

+

+This file is UTF-8 encoded.

+

+

+Danish (da)

+---------

+

+  Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen

+  Wolther spillede på xylofon.

+  (= Quiz contestants were eating strawbery with cream while Wolther

+  the circus clown played on xylophone.)

+

+German (de)

+-----------

+

+  Falsches Üben von Xylophonmusik quält jeden größeren Zwerg

+  (= Wrongful practicing of xylophone music tortures every larger dwarf)

+

+  Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich

+  (= Twelve boxing fighters hunted Eva across the dike of Sylt)

+

+  Heizölrückstoßabdämpfung

+  (= fuel oil recoil absorber)

+  (jqvwxy missing, but all non-ASCII letters in one word)

+

+English (en)

+------------

+

+  The quick brown fox jumps over the lazy dog

+

+Spanish (es)

+------------

+

+  El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y 

+  frío, añoraba a su querido cachorro.

+  (Contains every letter and every accent, but not every combination

+  of vowel + acute.)

+

+French (fr)

+-----------

+

+  Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à

+  côté de l'alcôve ovoïde, où les bûches se consument dans l'âtre, ce

+  qui lui permet de penser à la cænogenèse de l'être dont il est question

+  dans la cause ambiguë entendue à Moÿ, dans un capharnaüm qui,

+  pense-t-il, diminue çà et là la qualité de son œuvre. 

+

+  l'île exiguë

+  Où l'obèse jury mûr

+  Fête l'haï volapük,

+  Âne ex aéquo au whist,

+  Ôtez ce vœu déçu.

+

+  Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en

+  canoë au delà des îles, près du mälström où brûlent les novæ.

+

+Irish Gaelic (ga)

+-----------------

+

+  D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh

+

+Hungarian (hu)

+--------------

+

+  Árvíztűrő tükörfúrógép

+  (= flood-proof mirror-drilling machine, only all non-ASCII letters)

+

+Icelandic (is)

+--------------

+

+  Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa

+

+  Sævör grét áðan því úlpan var ónýt

+  (some ASCII letters missing)

+

+Greek (el)

+-------------

+

+  Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο

+  (= No more shall I see acacias or myrtles in the golden clearing)

+

+  Ξεσκεπάζω τὴν ψυχοφθόρα βδελυγμία

+  (= I uncover the soul-destroying abhorrence)

+

+Hebrew (iw)

+-----------

+

+  ? דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה

+

+Polish (pl)

+-----------

+

+  Pchnąć w tę łódź jeża lub osiem skrzyń fig

+  (= To push a hedgehog or eight bins of figs in this boat)

+  

+  Zażółć gęślą jaźń

+

+Russian (ru)

+------------

+

+  В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!

+  (= Would a citrus live in the bushes of south? Yes, but only a fake one!)

+

+Thai (th)

+---------

+

+  [--------------------------|------------------------]

+  ๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า  กว่าบรรดาฝูงสัตว์เดรัจฉาน

+  จงฝ่าฟันพัฒนาวิชาการ           อย่าล้างผลาญฤๅเข่นฆ่าบีฑาใคร

+  ไม่ถือโทษโกรธแช่งซัดฮึดฮัดด่า     หัดอภัยเหมือนกีฬาอัชฌาสัย

+  ปฏิบัติประพฤติกฎกำหนดใจ        พูดจาให้จ๊ะๆ จ๋าๆ น่าฟังเอย ฯ

+

+  [The copyright for the Thai example is owned by The Computer

+  Association of Thailand under the Royal Patronage of His Majesty the

+  King.]

+

+Please let me know if you find others! Special thanks to the people

+from all over the world who contributed these sentences.

 

--- /dev/null
+++ b/tcpdf/config/lang/afr.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : afr.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Afrikaans
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Afrikaans
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Afrikaans
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'af';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'bladsy';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/ara.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : ara.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Arabic
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Arabic
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Arabic
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'rtl';
+$l['a_meta_language'] = 'ar';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'صفحة';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/aze.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : aze.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Azerbaijani
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Azerbaijani
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Azerbaijani
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'az';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'səhifə';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/bel.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : bel.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Basque
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Basque
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Basque
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'be';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'старонкі';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/bra.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : eng.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Brazilian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Brazilian
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Brazilian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'pt';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'página';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/cat.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : cat.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Catalan
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Catalan
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Catalan
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'ca';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'pàgina';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/ces.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : ces.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Czech
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Czech
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Czech
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'cs';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'stránky';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/chi.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : chi.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Chinese (Simplified)
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Chinese (Simplified)
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Chinese (Simplified)
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'cn';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = '页面';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/cym.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : urd.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Welsh
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Welsh
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Welsh
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'cy';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'tudalen';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/dan.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : dan.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Danish
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Danish
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Danish
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'da';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'side';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/eng.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : eng.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               English
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: English
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// English
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'en';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'page';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/est.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : est.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Estonian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Estonian
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Estonian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'et';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'lehekülg';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/eus.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : eus.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Basque
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Basque
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Basque
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'eu';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'Orrialdearen';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/fra.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : fra.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               French
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: French
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// French
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'fr';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'page';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/ger.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : ger.php
+// Begin       : 2004-03-03
+// Last Update : 2010-11-16
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               German
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: German
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// German
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'de';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'Seite';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/gle.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : ind.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Irish
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Irish
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Irish
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'ga';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'leathanach';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/glg.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : glg.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Galician
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Galician
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Galician
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'gl';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'Páxina';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/hat.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : hat.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Haitian Creole
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Haitian Creole
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Haitian Creole
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'ht';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'paj';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/heb.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : heb.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Hebrew
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Hebrew
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Hebrew
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'rtl';
+$l['a_meta_language'] = 'he';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'מקור:';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/hrv.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : hrv.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Croatian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Croatian
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Croatian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'hr';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'stranica';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/hun.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : hun.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Hungarian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Hungarian
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Hungarian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'hu';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'oldal';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/hye.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : hye.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Armenian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Armenian
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Armenian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'hy';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'էջ';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/ind.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : ind.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Indonesian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Indonesian
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Indonesian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'id';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'halaman';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/ita.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : ita.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Italian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Italian
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Italian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'it';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'pagina';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/kat.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : kat.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Georgian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Georgian
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Georgian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'ka';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'გვერდი';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/kor.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : kor.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Korean
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Korean
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Korean
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'ko';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = '페이지';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/mkd.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : mkd.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Macedonian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Macedonian
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Macedonian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'mk';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'страница';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/mlt.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : mlt.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Maltese
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Maltese
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Maltese
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'mt';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'paġna';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/msa.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : msa.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Malay
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Malay
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Malay
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'ms';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'laman';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/nld.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : nld.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Dutch
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Dutch
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Dutch
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'nl';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'pagina';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/nob.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : nob.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Norwegian Bokmål
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Norwegian Bokmål
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Norwegian Bokmål
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'nb';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'side';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/pol.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : pol.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Polish
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Polish
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Polish
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'pl';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'strona';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/por.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : por.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Portuguese
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Portuguese
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Portuguese
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'pt';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'página';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/ron.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : ron.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Romanian, Moldavian, Moldovan
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Romanian, Moldavian, Moldovan
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Romanian, Moldavian, Moldovan
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'ro';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'pagina';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/rus.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : rus.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Russian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Russian
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Russian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'ru';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'страницы';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/slv.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : slv.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Slovene
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Slovene
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Slovene
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'sl';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'stran';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/spa.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : spa.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Spanish; Castilian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Spanish; Castilian
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Spanish; Castilian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'es';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'página';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/sqi.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : sqi.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Albanian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Albanian
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Albanian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'sq';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'faqe';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/srp.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : srp.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Serbian
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Serbian
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Serbian
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'sr';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'страна';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/swa.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : swa.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Swahili
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Swahili
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Swahili
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'sw';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'ukurasa';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/swe.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : swe.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Swedish
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Swedish
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Swedish
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'sv';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'sida';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/urd.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : urd.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Urdu
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Urdu
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Urdu
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'rtl';
+$l['a_meta_language'] = 'ur';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'صفحہ';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/yid.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : yid.php
+// Begin       : 2004-03-03
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Welsh
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Welsh
+ * @author Nicola Asuni
+ * @since 2004-03-03
+ */
+
+// Welsh
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'rtl';
+$l['a_meta_language'] = 'yi';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = 'זייַט';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/lang/zho.php
@@ -1,1 +1,48 @@
+<?php
+//============================================================+
+// File name   : zho.php
+// Begin       : 2010-10-26
+// Last Update : 2010-10-26
+//
+// Description : Language module for TCPDF
+//               (contains translated texts)
+//               Chinese
+//
+// 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
+//============================================================+
 
+/**
+ * TCPDF language file (contains translated texts).
+ * @package com.tecnick.tcpdf
+ * @brief TCPDF language file: Chinese
+ * @author Nicola Asuni
+ * @since 2010-10-26
+ */
+
+// Chinese
+
+global $l;
+$l = Array();
+
+// PAGE META DESCRIPTORS --------------------------------------
+
+$l['a_meta_charset'] = 'UTF-8';
+$l['a_meta_dir'] = 'ltr';
+$l['a_meta_language'] = 'zh';
+
+// TRANSLATIONS --------------------------------------
+$l['w_page'] = '頁面';
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/tcpdf_config.php
@@ -1,1 +1,241 @@
-
+<?php
+//============================================================+
+// File name   : tcpdf_config.php
+// Begin       : 2004-06-11
+// Last Update : 2010-12-16
+//
+// 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
+ * @package com.tecnick.tcpdf
+ * @version 4.9.005
+ * @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
+	$k_path_url = $k_path_main; // default value for console mode
+	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(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
+	}
+
+	/**
+	 * 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');
+
+	/**
+	 * default data font size
+	 */
+	define ('PDF_FONT_SIZE_DATA', 8);
+
+	/**
+	 * 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.25);
+
+	/**
+	 * 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);
+
+	/**
+	 * set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
+	 */
+	define('K_THAI_TOPCHARS', true);
+
+	/**
+	 * if true allows to call TCPDF methods using HTML syntax
+	 * IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
+	 */
+	define('K_TCPDF_CALLS_IN_HTML', true);
+}
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/config/tcpdf_config_alt.php
@@ -1,1 +1,235 @@
-
+<?php
+//============================================================+
+// File name   : tcpdf_config.php
+// Begin       : 2004-06-11
+// Last Update : 2010-12-16
+//
+// Description : Alternative 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
+//============================================================+
+
+/**
+ * Alternative configuration file for TCPDF.
+ * @author Nicola Asuni
+ * @package com.tecnick.tcpdf
+ * @version 4.9.005
+ * @since 2004-10-27
+ */
+
+// 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(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
+}
+
+/**
+ * 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');
+
+/**
+ * default data font size
+ */
+define ('PDF_FONT_SIZE_DATA', 8);
+
+/**
+ * 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.25);
+
+/**
+ * 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);
+
+/**
+ * set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
+ */
+define('K_THAI_TOPCHARS', true);
+
+/**
+ * if true allows to call TCPDF methods using HTML syntax
+ * IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
+ */
+define('K_TCPDF_CALLS_IN_HTML', true);
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/doc/index.html
@@ -1,1 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
+<head>
+<title>TCPDF DOCUMENTATION</title>
+<meta http-equiv="refresh" content="1;url=http://www.tcpdf.org/doc/" />
+</head>
+<body>
+<a href="http://www.tcpdf.org/doc/">TCPDF Documentation</a>
+</body>
+</html>
 

--- /dev/null
+++ b/tcpdf/examples/example_001.php
@@ -1,1 +1,103 @@
+<?php
+//============================================================+
+// File name   : example_001.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-14
+//
+// Description : Example 001 for TCPDF class
+//               Default Header and Footer
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Default Header and Footer
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 001');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 001', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set default font subsetting mode
+$pdf->setFontSubsetting(true);
+
+// Set font
+// dejavusans is a UTF-8 Unicode font, if you only need to
+// print standard ASCII chars, you can use core fonts like
+// helvetica or times to reduce file size.
+$pdf->SetFont('dejavusans', '', 14, '', true);
+
+// Add a page
+// This method has several options, check the source code documentation for more information.
+$pdf->AddPage();
+
+// Set some content to print
+$html = <<<EOD
+<h1>Welcome to <a href="http://www.tcpdf.org" style="text-decoration:none;background-color:#CC0000;color:black;">&nbsp;<span style="color:black;">TC</span><span style="color:white;">PDF</span>&nbsp;</a>!</h1>
+<i>This is the first example of TCPDF library.</i>
+<p>This text is printed using the <i>writeHTMLCell()</i> method but you can also use: <i>Multicell(), writeHTML(), Write(), Cell() and Text()</i>.</p>
+<p>Please check the source code documentation and other examples for further information.</p>
+<p style="color:#CC0000;">TO IMPROVE AND EXPAND TCPDF I NEED YOUR SUPPORT, PLEASE <a href="http://sourceforge.net/donate/index.php?group_id=128076">MAKE A DONATION!</a></p>
+EOD;
+
+// Print text using writeHTMLCell()
+$pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);
+
+// ---------------------------------------------------------
+
+// Close and output PDF document
+// This method has several options, check the source code documentation for more information.
+$pdf->Output('example_001.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_002.php
@@ -1,1 +1,88 @@
+<?php
+//============================================================+
+// File name   : example_002.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 002 for TCPDF class
+//               Removing Header and Footer
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Removing Header and Footer
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 002');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// remove default header/footer
+$pdf->setPrintHeader(false);
+$pdf->setPrintFooter(false);
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', 'BI', 20);
+
+// add a page
+$pdf->AddPage();
+
+// set some text to print
+$txt = <<<EOD
+TCPDF Example 002
+
+Default page header and footer are disabled using setPrintHeader() and setPrintFooter() methods.
+EOD;
+
+// print a block of text using Write()
+$pdf->Write($h=0, $txt, $link='', $fill=0, $align='C', $ln=true, $stretch=0, $firstline=false, $firstblock=false, $maxh=0);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_002.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_003.php
@@ -1,1 +1,119 @@
+<?php
+//============================================================+
+// File name   : example_003.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 003 for TCPDF class
+//               Custom Header and Footer
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Custom Header and Footer
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+
+// Extend the TCPDF class to create custom Header and Footer
+class MYPDF extends TCPDF {
+
+	//Page header
+	public function Header() {
+		// Logo
+		$image_file = K_PATH_IMAGES.'logo_example.jpg';
+		$this->Image($image_file, 10, 10, 15, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);
+		// Set font
+		$this->SetFont('helvetica', 'B', 20);
+		// Title
+		$this->Cell(0, 15, '<< TCPDF Example 003 >>', 0, false, 'C', 0, '', 0, false, 'M', 'M');
+	}
+
+	// Page footer
+	public function Footer() {
+		// Position at 15 mm from bottom
+		$this->SetY(-15);
+		// Set font
+		$this->SetFont('helvetica', 'I', 8);
+		// Page number
+		$this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
+	}
+}
+
+// create new PDF document
+$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 003');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', 'BI', 12);
+
+// add a page
+$pdf->AddPage();
+
+// set some text to print
+$txt = <<<EOD
+TCPDF Example 003
+
+Custom page header and footer are defined by extending the TCPDF class and overriding the Header() and Footer() methods.
+EOD;
+
+// print a block of text using Write()
+$pdf->Write($h=0, $txt, $link='', $fill=0, $align='C', $ln=true, $stretch=0, $firstline=false, $firstblock=false, $maxh=0);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_003.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_004.php
@@ -1,1 +1,122 @@
+<?php
+//============================================================+
+// File name   : example_004.php
+// Begin       : 2008-03-04
+// Last Update : 2010-10-08
+//
+// Description : Example 004 for TCPDF class
+//               Cell stretching
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Cell stretching
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 004');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 004', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', '', 11);
+
+// add a page
+$pdf->AddPage();
+
+//Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
+
+// test Cell stretching
+$pdf->Cell(0, 0, 'TEST CELL STRETCH: no stretch', 1, 1, 'C', 0, '', 0);
+$pdf->Cell(0, 0, 'TEST CELL STRETCH: scaling', 1, 1, 'C', 0, '', 1);
+$pdf->Cell(0, 0, 'TEST CELL STRETCH: force scaling', 1, 1, 'C', 0, '', 2);
+$pdf->Cell(0, 0, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3);
+$pdf->Cell(0, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4);
+
+$pdf->Ln(5);
+
+$pdf->Cell(45, 0, 'TEST CELL STRETCH: scaling', 1, 1, 'C', 0, '', 1);
+$pdf->Cell(45, 0, 'TEST CELL STRETCH: force scaling', 1, 1, 'C', 0, '', 2);
+$pdf->Cell(45, 0, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3);
+$pdf->Cell(45, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4);
+
+$pdf->AddPage();
+
+// example using general stretching and spacing
+
+for ($stretching = 90; $stretching <= 110; $stretching += 10) {
+	for ($spacing = -0.254; $spacing <= 0.254; $spacing += 0.254) {
+
+		// set general stretching (scaling) value
+		$pdf->setFontStretching($stretching);
+
+		// set general spacing value
+		$pdf->setFontSpacing($spacing);
+
+		$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, no stretch', 1, 1, 'C', 0, '', 0);
+		$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
+		$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
+		$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
+		$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
+
+		$pdf->Ln(2);
+	}
+}
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_004.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_005.php
@@ -1,1 +1,159 @@
+<?php
+//============================================================+
+// File name   : example_005.php
+// Begin       : 2008-03-04
+// Last Update : 2010-10-04
+//
+// Description : Example 005 for TCPDF class
+//               Multicell
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Multicell
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 005');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 005', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', '', 10);
+
+// add a page
+$pdf->AddPage();
+
+// set cell padding
+$pdf->setCellPaddings(1, 1, 1, 1);
+
+// set cell margins
+$pdf->setCellMargins(1, 1, 1, 1);
+
+// set color for background
+$pdf->SetFillColor(255, 255, 127);
+
+// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0)
+
+// set some text for example
+$txt = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.';
+
+// Multicell test
+$pdf->MultiCell(55, 5, '[LEFT] '.$txt, 1, 'L', 1, 0, '', '', true);
+$pdf->MultiCell(55, 5, '[RIGHT] '.$txt, 1, 'R', 0, 1, '', '', true);
+$pdf->MultiCell(55, 5, '[CENTER] '.$txt, 1, 'C', 0, 0, '', '', true);
+$pdf->MultiCell(55, 5, '[JUSTIFY] '.$txt."\n", 1, 'J', 1, 2, '' ,'', true);
+$pdf->MultiCell(55, 5, '[DEFAULT] '.$txt, 1, '', 0, 1, '', '', true);
+
+$pdf->Ln(4);
+
+// set color for background
+$pdf->SetFillColor(220, 255, 220);
+
+// Vertical alignment
+$pdf->MultiCell(55, 40, '[VERTICAL ALIGNMENT - TOP] '.$txt, 1, 'J', 1, 0, '', '', true, 0, false, true, 40, 'T');
+$pdf->MultiCell(55, 40, '[VERTICAL ALIGNMENT - MIDDLE] '.$txt, 1, 'J', 1, 0, '', '', true, 0, false, true, 40, 'M');
+$pdf->MultiCell(55, 40, '[VERTICAL ALIGNMENT - BOTTOM] '.$txt, 1, 'J', 1, 1, '', '', true, 0, false, true, 40, 'B');
+
+$pdf->Ln(4);
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// set color for background
+$pdf->SetFillColor(215, 235, 255);
+
+// set some text for example
+$txt = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc.
+
+Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.';
+
+// print a blox of text using multicell()
+$pdf->MultiCell(80, 5, $txt."\n", 1, 'J', 1, 1, '' ,'', true);
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// AUTO-FITTING
+
+// set color for background
+$pdf->SetFillColor(255, 235, 235);
+
+// Fit text on cell by reducing font size
+$pdf->MultiCell(55, 60, '[FIT CELL] '.$txt."\n", 1, 'J', 1, 1, 125, 145, true, 0, false, true, 60, 'M', true);
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// CUSTOM PADDING
+
+// set color for background
+$pdf->SetFillColor(255, 255, 215);
+
+// set font
+$pdf->SetFont('helvetica', '', 8);
+
+// set cell padding
+$pdf->setCellPaddings(2, 4, 6, 8);
+
+$txt = "CUSTOM PADDING:\nLeft=2, Top=4, Right=6, Bottom=8\nLorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue.\n";
+
+$pdf->MultiCell(55, 5, $txt, 1, 'J', 1, 2, 125, 210, true);
+
+// move pointer to last page
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_005.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_006.php
@@ -1,1 +1,333 @@
-
+<?php
+//============================================================+
+// File name   : example_006.php
+// Begin       : 2008-03-04
+// Last Update : 2010-11-20
+//
+// Description : Example 006 for TCPDF class
+//               WriteHTML and RTL support
+//
+// 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
+//============================================================+
+
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: WriteHTML and RTL support
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 006');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 006', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('dejavusans', '', 10);
+
+// add a page
+$pdf->AddPage();
+
+// writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='')
+// writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true)
+
+// create some HTML content
+$html = '<h1>HTML Example</h1>
+Some special characters: &lt; € &euro; &#8364; &amp; è &egrave; &copy; &gt; \\slash \\\\double-slash \\\\\\triple-slash
+<h2>List</h2>
+List example:
+<ol>
+	<li><img src="../images/logo_example.png" alt="test alt attribute" width="30" height="30" border="0" /> test image</li>
+	<li><b>bold text</b></li>
+	<li><i>italic text</i></li>
+	<li><u>underlined text</u></li>
+	<li><b>b<i>bi<u>biu</u>bi</i>b</b></li>
+	<li><a href="http://www.tecnick.com" dir="ltr">link to http://www.tecnick.com</a></li>
+	<li>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.<br />Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</li>
+	<li>SUBLIST
+		<ol>
+			<li>row one
+				<ul>
+					<li>sublist</li>
+				</ul>
+			</li>
+			<li>row two</li>
+		</ol>
+	</li>
+	<li><b>T</b>E<i>S</i><u>T</u> <del>line through</del></li>
+	<li><font size="+3">font + 3</font></li>
+	<li><small>small text</small> normal <small>small text</small> normal <sub>subscript</sub> normal <sup>superscript</sup> normal</li>
+</ol>
+<dl>
+	<dt>Coffee</dt>
+	<dd>Black hot drink</dd>
+	<dt>Milk</dt>
+	<dd>White cold drink</dd>
+</dl>
+<div style="text-align:center">IMAGES<br />
+<img src="../images/logo_example.png" alt="test alt attribute" width="100" height="100" border="0" /><img src="../images/tiger.ai" alt="test alt attribute" width="100" height="100" border="0" /><img src="../images/logo_example.jpg" alt="test alt attribute" width="100" height="100" border="0" />
+</div>';
+
+// output the HTML content
+$pdf->writeHTML($html, true, false, true, false, '');
+
+
+// output some RTL HTML content
+$html = '<div style="text-align:center">The words &#8220;<span dir="rtl">&#1502;&#1494;&#1500; [mazel] &#1496;&#1493;&#1489; [tov]</span>&#8221; mean &#8220;Congratulations!&#8221;</div>';
+$pdf->writeHTML($html, true, false, true, false, '');
+
+// test some inline CSS
+$html = '<p>This is just an example of html code to demonstrate some supported CSS inline styles.
+<span style="font-weight: bold;">bold text</span>
+<span style="text-decoration: line-through;">line-trough</span>
+<span style="text-decoration: underline line-through;">underline and line-trough</span>
+<span style="color: rgb(0, 128, 64);">color</span>
+<span style="background-color: rgb(255, 0, 0); color: rgb(255, 255, 255);">background color</span>
+<span style="font-weight: bold;">bold</span>
+<span style="font-size: xx-small;">xx-small</span>
+<span style="font-size: x-small;">x-small</span>
+<span style="font-size: small;">small</span>
+<span style="font-size: medium;">medium</span>
+<span style="font-size: large;">large</span>
+<span style="font-size: x-large;">x-large</span>
+<span style="font-size: xx-large;">xx-large</span>
+</p>';
+
+$pdf->writeHTML($html, true, false, true, false, '');
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// Print a table
+
+// add a page
+$pdf->AddPage();
+
+// create some HTML content
+$subtable = '<table border="1" cellspacing="6" cellpadding="4"><tr><td>a</td><td>b</td></tr><tr><td>c</td><td>d</td></tr></table>';
+
+$html = '<h2>HTML TABLE:</h2>
+<table border="1" cellspacing="3" cellpadding="4">
+	<tr>
+		<th>#</th>
+		<th align="right">RIGHT align</th>
+		<th align="left">LEFT align</th>
+		<th>4A</th>
+	</tr>
+	<tr>
+		<td>1</td>
+		<td bgcolor="#cccccc" align="center" colspan="2">A1 ex<i>amp</i>le <a href="http://www.tcpdf.org">link</a> column span. One two tree four five six seven eight nine ten.<br />line after br<br /><small>small text</small> normal <sub>subscript</sub> normal <sup>superscript</sup> normal  bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla<ol><li>first<ol><li>sublist</li><li>sublist</li></ol></li><li>second</li></ol><small color="#FF0000" bgcolor="#FFFF00">small small small small small small small small small small small small small small small small small small small small</small></td>
+		<td>4B</td>
+	</tr>
+	<tr>
+		<td>'.$subtable.'</td>
+		<td bgcolor="#0000FF" color="yellow" align="center">A2 € &euro; &#8364; &amp; è &egrave;<br/>A2 € &euro; &#8364; &amp; è &egrave;</td>
+		<td bgcolor="#FFFF00" align="left"><font color="#FF0000">Red</font> Yellow BG</td>
+		<td>4C</td>
+	</tr>
+	<tr>
+		<td>1A</td>
+		<td rowspan="2" colspan="2" bgcolor="#FFFFCC">2AA<br />2AB<br />2AC</td>
+		<td bgcolor="#FF0000">4D</td>
+	</tr>
+	<tr>
+		<td>1B</td>
+		<td>4E</td>
+	</tr>
+	<tr>
+		<td>1C</td>
+		<td>2C</td>
+		<td>3C</td>
+		<td>4F</td>
+	</tr>
+</table>';
+
+// output the HTML content
+$pdf->writeHTML($html, true, false, true, false, '');
+
+// Print some HTML Cells
+
+$html = '<span color="red">red</span> <span color="green">green</span> <span color="blue">blue</span><br /><span color="red">red</span> <span color="green">green</span> <span color="blue">blue</span>';
+
+$pdf->SetFillColor(255,255,0);
+
+$pdf->writeHTMLCell(0, 0, '', '', $html, 'LRTB', 1, 0, true, 'L', true);
+$pdf->writeHTMLCell(0, 0, '', '', $html, 'LRTB', 1, 1, true, 'C', true);
+$pdf->writeHTMLCell(0, 0, '', '', $html, 'LRTB', 1, 0, true, 'R', true);
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// Print a table
+
+// add a page
+$pdf->AddPage();
+
+// create some HTML content
+$html = '<h1>Image alignments on HTML table</h1>
+<table cellpadding="1" cellspacing="1" border="1" style="text-align:center;">
+<tr><td><img src="../images/logo_example.png" border="0" height="41" width="41" /></td></tr>
+<tr style="text-align:left;"><td><img src="../images/logo_example.png" border="0" height="41" width="41" align="top" /></td></tr>
+<tr style="text-align:center;"><td><img src="../images/logo_example.png" border="0" height="41" width="41" align="middle" /></td></tr>
+<tr style="text-align:right;"><td><img src="../images/logo_example.png" border="0" height="41" width="41" align="bottom" /></td></tr>
+<tr><td style="text-align:left;"><img src="../images/logo_example.png" border="0" height="41" width="41" align="top" /></td></tr>
+<tr><td style="text-align:center;"><img src="../images/logo_example.png" border="0" height="41" width="41" align="middle" /></td></tr>
+<tr><td style="text-align:right;"><img src="../images/logo_example.png" border="0" height="41" width="41" align="bottom" /></td></tr>
+</table>';
+
+// output the HTML content
+$pdf->writeHTML($html, true, false, true, false, '');
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// Print all HTML colors
+
+// add a page
+$pdf->AddPage();
+
+require('../htmlcolors.php');
+
+$textcolors = '<h1>HTML Text Colors</h1>';
+$bgcolors = '<hr /><h1>HTML Background Colors</h1>';
+
+foreach($webcolor as $k => $v) {
+	$textcolors .= '<span color="#'.$v.'">'.$v.'</span> ';
+	$bgcolors .= '<span bgcolor="#'.$v.'" color="#333333">'.$v.'</span> ';
+}
+
+// output the HTML content
+$pdf->writeHTML($textcolors, true, false, true, false, '');
+$pdf->writeHTML($bgcolors, true, false, true, false, '');
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// Test word-wrap
+
+// create some HTML content
+$html = '<hr />
+<h1>Various tests</h1>
+<a href="#2">link to page 2</a><br />
+<font face="courier"><b>thisisaverylongword</b></font> <font face="helvetica"><i>thisisanotherverylongword</i></font> <font face="times"><b>thisisaverylongword</b></font> thisisanotherverylongword <font face="times">thisisaverylongword</font> <font face="courier"><b>thisisaverylongword</b></font> <font face="helvetica"><i>thisisanotherverylongword</i></font> <font face="times"><b>thisisaverylongword</b></font> thisisanotherverylongword <font face="times">thisisaverylongword</font> <font face="courier"><b>thisisaverylongword</b></font> <font face="helvetica"><i>thisisanotherverylongword</i></font> <font face="times"><b>thisisaverylongword</b></font> thisisanotherverylongword <font face="times">thisisaverylongword</font> <font face="courier"><b>thisisaverylongword</b></font> <font face="helvetica"><i>thisisanotherverylongword</i></font> <font face="times"><b>thisisaverylongword</b></font> thisisanotherverylongword <font face="times">thisisaverylongword</font> <font face="courier"><b>thisisaverylongword</b></font> <font face="helvetica"><i>thisisanotherverylongword</i></font> <font face="times"><b>thisisaverylongword</b></font> thisisanotherverylongword <font face="times">thisisaverylongword</font>';
+
+// output the HTML content
+$pdf->writeHTML($html, true, false, true, false, '');
+
+// Test fonts nesting
+$html1 = 'Default <font face="courier">Courier <font face="helvetica">Helvetica <font face="times">Times <font face="dejavusans">dejavusans </font>Times </font>Helvetica </font>Courier </font>Default';
+$html2 = '<small>small text</small> normal <small>small text</small> normal <sub>subscript</sub> normal <sup>superscript</sup> normal';
+$html3 = '<font size="10" color="#ff7f50">The</font> <font size="10" color="#6495ed">quick</font> <font size="14" color="#dc143c">brown</font> <font size="18" color="#008000">fox</font> <font size="22"><a href="http://www.tcpdf.org">jumps</a></font> <font size="22" color="#a0522d">over</font> <font size="18" color="#da70d6">the</font> <font size="14" color="#9400d3">lazy</font> <font size="10" color="#4169el">dog</font>.';
+
+$html = $html1.'<br />'.$html2.'<br />'.$html3.'<br />'.$html3.'<br />'.$html2;
+
+// output the HTML content
+$pdf->writeHTML($html, true, false, true, false, '');
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// test pre tag
+
+// add a page
+$pdf->AddPage();
+
+$html = <<<EOF
+<div style="background-color:#880000;color:white;">
+Hello World!<br />
+Hello
+</div>
+<pre style="background-color:#336699;color:white;">
+int main() {
+    printf("HelloWorld");
+    return 0;
+}
+</pre>
+<tt>Monospace font</tt>, normal font, <tt>monospace font</tt>, normal font.
+<br />
+<div style="background-color:#880000;color:white;">DIV LEVEL 1<div style="background-color:#008800;color:white;">DIV LEVEL 2</div>DIV LEVEL 1</div>
+<br />
+<span style="background-color:#880000;color:white;">SPAN LEVEL 1 <span style="background-color:#008800;color:white;">SPAN LEVEL 2</span> SPAN LEVEL 1</span>
+EOF;
+
+// output the HTML content
+$pdf->writeHTML($html, true, false, true, false, '');
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// test custom bullet points for list
+
+// add a page
+$pdf->AddPage();
+
+$html = <<<EOF
+<h1>Test custom bullet image for list items</h1>
+<ul style="font-size:14pt;list-style-type:img|png|4|4|../images/logo_example.png">
+	<li>test custom bullet image</li>
+	<li>test custom bullet image</li>
+	<li>test custom bullet image</li>
+	<li>test custom bullet image</li>
+<ul>
+EOF;
+
+// output the HTML content
+$pdf->writeHTML($html, true, false, true, false, '');
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_006.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_007.php
@@ -1,1 +1,114 @@
+<?php
+//============================================================+
+// File name   : example_007.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 007 for TCPDF class
+//               Two independent columns with WriteHTMLCell()
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Two independent columns with WriteHTMLCell()
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 007');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 007', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', '', 12);
+
+// add a page
+$pdf->AddPage();
+
+// create columns content
+$left_column = '<b>LEFT COLUMN</b> left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column';
+
+$right_column = '<b>RIGHT COLUMN</b> right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column';
+
+// writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true)
+
+// get current vertical position
+$y = $pdf->getY();
+
+// set color for background
+$pdf->SetFillColor(255, 255, 200);
+
+// set color for text
+$pdf->SetTextColor(0, 63, 127);
+
+// write the first column
+$pdf->writeHTMLCell(80, '', '', $y, $left_column, 1, 0, 1, true, 'J', true);
+
+// set color for background
+$pdf->SetFillColor(215, 235, 255);
+
+// set color for text
+$pdf->SetTextColor(127, 31, 0);
+
+// write the second column
+$pdf->writeHTMLCell(80, '', '', '', $right_column, 1, 1, 1, true, 'J', true);
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_007.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_008.php
@@ -1,1 +1,95 @@
+<?php
+//============================================================+
+// File name   : example_008.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 008 for TCPDF class
+//               Include external UTF-8 text file
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Include external UTF-8 text file
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 008');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 008', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('freeserif', '', 12);
+
+// add a page
+$pdf->AddPage();
+
+// get esternal file content
+$utf8text = file_get_contents('../cache/utf8test.txt', false);
+
+// set color for text
+$pdf->SetTextColor(0, 63, 127);
+
+//Write($h, $txt, $link='', $fill=0, $align='', $ln=false, $stretch=0, $firstline=false, $firstblock=false, $maxh=0)
+
+// write the text
+$pdf->Write(5, $utf8text, '', 0, '', false, 0, false, false, 0);
+
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_008.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_009.php
@@ -1,1 +1,147 @@
+<?php
+//============================================================+
+// File name   : example_009.php
+// Begin       : 2008-03-04
+// Last Update : 2010-12-04
+//
+// Description : Example 009 for TCPDF class
+//               Test Image
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Test Image
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 009');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 009', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// -------------------------------------------------------------------
+
+// add a page
+$pdf->AddPage();
+
+// set JPEG quality
+$pdf->setJPEGQuality(75);
+
+// Image method signature:
+// 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, $fitonpage=false)
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// Example of Image from data stream ('PHP rules')
+$imgdata = base64_decode('iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABlBMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDrEX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg==');
+
+// The '@' character is used to indicate that follows an image data stream and not an image file name
+$pdf->Image('@'.$imgdata);
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// Image example with resizing
+$pdf->Image('../images/image_demo.jpg', 15, 140, 75, 113, 'JPG', 'http://www.tcpdf.org', '', true, 150, '', false, false, 1, false, false, false);
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// test fitbox with all alignment combinations
+
+$horizontal_alignments = array('L', 'C', 'R');
+$vertical_alignments = array('T', 'M', 'B');
+
+$x = 15;
+$y = 35;
+$w = 30;
+$h = 30;
+// test all combinations of alignments
+for ($i = 0; $i < 3; ++$i) {
+	$fitbox = $horizontal_alignments[$i].' ';
+	$x = 15;
+	for ($j = 0; $j < 3; ++$j) {
+		$fitbox{1} = $vertical_alignments[$j];
+		$pdf->Rect($x, $y, $w, $h, 'F', array(), array(128,255,128));
+		$pdf->Image('../images/image_demo.jpg', $x, $y, $w, $h, 'JPG', '', '', false, 300, '', false, false, 0, $fitbox, false, false);
+		$x += 32; // new column
+	}
+	$y += 32; // new row
+}
+
+$x = 115;
+$y = 35;
+$w = 25;
+$h = 50;
+for ($i = 0; $i < 3; ++$i) {
+	$fitbox = $horizontal_alignments[$i].' ';
+	$x = 115;
+	for ($j = 0; $j < 3; ++$j) {
+		$fitbox{1} = $vertical_alignments[$j];
+		$pdf->Rect($x, $y, $w, $h, 'F', array(), array(128,255,255));
+		$pdf->Image('../images/image_demo.jpg', $x, $y, $w, $h, 'JPG', '', '', false, 300, '', false, false, 0, $fitbox, false, false);
+		$x += 27; // new column
+	}
+	$y += 52; // new row
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// Stretching, position and alignment example
+
+$pdf->SetXY(110, 200);
+$pdf->Image('../images/image_demo.jpg', '', '', 40, 40, '', '', 'T', false, 300, '', false, false, 1, false, false, false);
+$pdf->Image('../images/image_demo.jpg', '', '', 40, 40, '', '', '', false, 300, '', false, false, 1, false, false, false);
+
+// -------------------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_009.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_010.php
@@ -1,1 +1,153 @@
+<?php
+//============================================================+
+// File name   : example_010.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-11
+//
+// Description : Example 010 for TCPDF class
+//               Text on multiple columns
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Text on multiple columns
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+
+/**
+ * Extend TCPDF to work with multiple columns
+ */
+class MC_TCPDF extends TCPDF {
+
+	/**
+	 * Print chapter
+	 * @param $num (int) chapter number
+	 * @param $title (string) chapter title
+	 * @param $file (string) name of the file containing the chapter body
+	 * @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
+	 * @public
+	 */
+	public function PrintChapter($num, $title, $file, $mode=false) {
+		// disable existing columns
+		$this->setEqualColumns();
+		// add a new page
+		$this->AddPage();
+		// reset margins
+		$this->selectColumn();
+		// print chapter title
+		$this->ChapterTitle($num, $title);
+		// set columns
+		$this->setEqualColumns(3, 57);
+		// print chapter body
+		$this->ChapterBody($file, $mode);
+	}
+
+	/**
+	 * Set chapter title
+	 * @param $num (int) chapter number
+	 * @param $title (string) chapter title
+	 * @public
+	 */
+	public function ChapterTitle($num, $title) {
+		$this->SetFont('helvetica', '', 14);
+		$this->SetFillColor(200, 220, 255);
+		$this->Cell(180, 6, 'Chapter '.$num.' : '.$title, 0, 1, '', 1);
+		$this->Ln(4);
+	}
+
+	/**
+	 * Print chapter body
+	 * @param $file (string) name of the file containing the chapter body
+	 * @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
+	 * @public
+	 */
+	public function ChapterBody($file, $mode=false) {
+		$this->selectColumn();
+		// get esternal file content
+		$content = file_get_contents($file, false);
+		// set font
+		$this->SetFont('times', '', 9);
+		$this->SetTextColor(50, 50, 50);
+		// print content
+		if ($mode) {
+			// ------ HTML MODE ------
+			$this->writeHTML($content, true, false, true, false, 'J');
+		} else {
+			// ------ TEXT MODE ------
+			$this->Write(0, $content, '', 0, 'J', true, 0, false, true, 0);
+		}
+		$this->Ln();
+	}
+} // end of extended class
+
+// ---------------------------------------------------------
+// EXAMPLE
+// ---------------------------------------------------------
+// create new PDF document
+$pdf = new MC_TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 010');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 010', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// print TEXT
+$pdf->PrintChapter(1, 'LOREM IPSUM [TEXT]', '../cache/chapter_demo_1.txt', false);
+
+// print HTML
+$pdf->PrintChapter(2, 'LOREM IPSUM [HTML]', '../cache/chapter_demo_2.txt', true);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_010.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_011.php
@@ -1,1 +1,139 @@
+<?php
+//============================================================+
+// File name   : example_011.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 011 for TCPDF class
+//               Colored Table
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Colored Table
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// extend TCPF with custom functions
+class MYPDF extends TCPDF {
+
+	// Load table data from file
+	public function LoadData($file) {
+		// Read file lines
+		$lines = file($file);
+		$data = array();
+		foreach($lines as $line) {
+			$data[] = explode(';', chop($line));
+		}
+		return $data;
+	}
+
+	// Colored table
+	public function ColoredTable($header,$data) {
+		// Colors, line width and bold font
+		$this->SetFillColor(255, 0, 0);
+		$this->SetTextColor(255);
+		$this->SetDrawColor(128, 0, 0);
+		$this->SetLineWidth(0.3);
+		$this->SetFont('', 'B');
+		// Header
+		$w = array(40, 35, 40, 45);
+		$num_headers = count($header);
+		for($i = 0; $i < $num_headers; ++$i) {
+			$this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', 1);
+		}
+		$this->Ln();
+		// Color and font restoration
+		$this->SetFillColor(224, 235, 255);
+		$this->SetTextColor(0);
+		$this->SetFont('');
+		// Data
+		$fill = 0;
+		foreach($data as $row) {
+			$this->Cell($w[0], 6, $row[0], 'LR', 0, 'L', $fill);
+			$this->Cell($w[1], 6, $row[1], 'LR', 0, 'L', $fill);
+			$this->Cell($w[2], 6, number_format($row[2]), 'LR', 0, 'R', $fill);
+			$this->Cell($w[3], 6, number_format($row[3]), 'LR', 0, 'R', $fill);
+			$this->Ln();
+			$fill=!$fill;
+		}
+		$this->Cell(array_sum($w), 0, '', 'T');
+	}
+}
+
+// create new PDF document
+$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 011');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 011', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 12);
+
+// add a page
+$pdf->AddPage();
+
+//Column titles
+$header = array('Country', 'Capital', 'Area (sq km)', 'Pop. (thousands)');
+
+//Data loading
+$data = $pdf->LoadData('../cache/table_data_demo.txt');
+
+// print colored table
+$pdf->ColoredTable($header, $data);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_011.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_012.php
@@ -1,1 +1,206 @@
-
+<?php
+//============================================================+
+// File name   : example_012.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 012 for TCPDF class
+//               Graphic Functions
+//
+// 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
+//============================================================+
+
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Graphic Functions
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 012');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// disable header and footer
+$pdf->setPrintHeader(false);
+$pdf->setPrintFooter(false);
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 10);
+
+// add a page
+$pdf->AddPage();
+
+$style = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,20,5,10', 'phase' => 10, 'color' => array(255, 0, 0));
+$style2 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0));
+$style3 = array('width' => 1, 'cap' => 'round', 'join' => 'round', 'dash' => '2,10', 'color' => array(255, 0, 0));
+$style4 = array('L' => 0,
+                'T' => array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => '20,10', 'phase' => 10, 'color' => array(100, 100, 255)),
+                'R' => array('width' => 0.50, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)),
+                'B' => array('width' => 0.75, 'cap' => 'square', 'join' => 'miter', 'dash' => '30,10,5,10'));
+$style5 = array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 64, 128));
+$style6 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,10', 'color' => array(0, 128, 0));
+$style7 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 128, 0));
+
+// Line
+$pdf->Text(5, 4, 'Line examples');
+$pdf->Line(5, 10, 80, 30, $style);
+$pdf->Line(5, 10, 5, 30, $style2);
+$pdf->Line(5, 10, 80, 10, $style3);
+
+// Rect
+$pdf->Text(100, 4, 'Rectangle examples');
+$pdf->Rect(100, 10, 40, 20, 'DF', $style4, array(220, 220, 200));
+$pdf->Rect(145, 10, 40, 20, 'D', array('all' => $style3));
+
+// Curve
+$pdf->Text(5, 34, 'Curve examples');
+$pdf->Curve(5, 40, 30, 55, 70, 45, 60, 75, null, $style6);
+$pdf->Curve(80, 40, 70, 75, 150, 45, 100, 75, 'F', $style6);
+$pdf->Curve(140, 40, 150, 55, 180, 45, 200, 75, 'DF', $style6, array(200, 220, 200));
+
+// Circle and ellipse
+$pdf->Text(5, 79, 'Circle and ellipse examples');
+$pdf->SetLineStyle($style5);
+$pdf->Circle(25,105,20);
+$pdf->Circle(25,105,10, 90, 180, null, $style6);
+$pdf->Circle(25,105,10, 270, 360, 'F');
+$pdf->Circle(25,105,10, 270, 360, 'C', $style6);
+
+$pdf->SetLineStyle($style5);
+$pdf->Ellipse(100,103,40,20);
+$pdf->Ellipse(100,105,20,10, 0, 90, 180, null, $style6);
+$pdf->Ellipse(100,105,20,10, 0, 270, 360, 'DF', $style6);
+
+$pdf->SetLineStyle($style5);
+$pdf->Ellipse(175,103,30,15,45);
+$pdf->Ellipse(175,105,15,7.50, 45, 90, 180, null, $style6);
+$pdf->Ellipse(175,105,15,7.50, 45, 270, 360, 'F', $style6, array(220, 200, 200));
+
+// Polygon
+$pdf->Text(5, 129, 'Polygon examples');
+$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
+$pdf->Polygon(array(5,135,45,135,15,165));
+$pdf->Polygon(array(60,135,80,135,80,155,70,165,50,155), 'DF', array($style6, $style7, $style7, 0, $style6), array(220, 200, 200));
+$pdf->Polygon(array(120,135,140,135,150,155,110,155), 'D', array($style6, 0, $style7, $style6));
+$pdf->Polygon(array(160,135,190,155,170,155,200,160,160,165), 'DF', array('all' => $style6), array(220, 220, 220));
+
+// Polygonal Line
+$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 164)));
+$pdf->PolyLine(array(80,165,90,160,100,165,110,160,120,165,130,160,140,165), 'D', array(), array());
+
+// Regular polygon
+$pdf->Text(5, 169, 'Regular polygon examples');
+$pdf->SetLineStyle($style5);
+$pdf->RegularPolygon(20, 190, 15, 6, 0, 1, 'F');
+$pdf->RegularPolygon(55, 190, 15, 6);
+$pdf->RegularPolygon(55, 190, 10, 6, 45, 0, 'DF', array($style6, 0, $style7, 0, $style7, $style7));
+$pdf->RegularPolygon(90, 190, 15, 3, 0, 1, 'DF', array('all' => $style5), array(200, 220, 200), 'F', array(255, 200, 200));
+$pdf->RegularPolygon(125, 190, 15, 4, 30, 1, null, array('all' => $style5), null, null, $style6);
+$pdf->RegularPolygon(160, 190, 15, 10);
+
+// Star polygon
+$pdf->Text(5, 209, 'Star polygon examples');
+$pdf->SetLineStyle($style5);
+$pdf->StarPolygon(20, 230, 15, 20, 3, 0, 1, 'F');
+$pdf->StarPolygon(55, 230, 15, 12, 5);
+$pdf->StarPolygon(55, 230, 7, 12, 5, 45, 0, 'DF', array('all' => $style7), array(220, 220, 200), 'F', array(255, 200, 200));
+$pdf->StarPolygon(90, 230, 15, 20, 6, 0, 1, 'DF', array('all' => $style5), array(220, 220, 200), 'F', array(255, 200, 200));
+$pdf->StarPolygon(125, 230, 15, 5, 2, 30, 1, null, array('all' => $style5), null, null, $style6);
+$pdf->StarPolygon(160, 230, 15, 10, 3);
+$pdf->StarPolygon(160, 230, 7, 50, 26);
+
+// Rounded rectangle
+$pdf->Text(5, 249, 'Rounded rectangle examples');
+$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
+$pdf->RoundedRect(5, 255, 40, 30, 3.50, '1111', 'DF');
+$pdf->RoundedRect(50, 255, 40, 30, 6.50, '1000');
+$pdf->RoundedRect(95, 255, 40, 30, 10.0, '1111', null, $style6);
+$pdf->RoundedRect(140, 255, 40, 30, 8.0, '0101', 'DF', $style6, array(200, 200, 200));
+
+// Arrows
+$pdf->Text(185, 249, 'Arrows');
+$pdf->SetLineStyle($style5);
+$pdf->SetFillColor(255, 0, 0);
+$pdf->Arrow($x0=200, $y0=280, $x1=185, $y1=266, $head_style=0, $arm_size=5, $arm_angle=15);
+$pdf->Arrow($x0=200, $y0=280, $x1=190, $y1=263, $head_style=1, $arm_size=5, $arm_angle=15);
+$pdf->Arrow($x0=200, $y0=280, $x1=195, $y1=261, $head_style=2, $arm_size=5, $arm_angle=15);
+$pdf->Arrow($x0=200, $y0=280, $x1=200, $y1=260, $head_style=3, $arm_size=5, $arm_angle=15);
+
+// - . - . - . - . - . - . - . - . - . - . - . - . - . - . -
+
+// ellipse
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Cell(0, 0, 'Arc of Ellipse');
+
+// center of ellipse
+$xc=100;
+$yc=100;
+
+// X Y axis
+$pdf->SetDrawColor(200, 200, 200);
+$pdf->Line($xc-50, $yc, $xc+50, $yc);
+$pdf->Line($xc, $yc-50, $xc, $yc+50);
+
+// ellipse axis
+$pdf->SetDrawColor(200, 220, 255);
+$pdf->Line($xc-50, $yc-50, $xc+50, $yc+50);
+$pdf->Line($xc-50, $yc+50, $xc+50, $yc-50);
+
+// ellipse
+$pdf->SetDrawColor(200, 255, 200);
+$pdf->Ellipse($xc, $yc, $rx=30, $ry=15, $angle=45, $astart=0, $afinish=360, $style='D', $line_style=array(), $fill_color=array(), $nc=2);
+
+// ellipse arc
+$pdf->SetDrawColor(255, 0, 0);
+$pdf->Ellipse($xc, $yc, $rx=30, $ry=15, $angle=45, $astart=45, $afinish=90, $style='D', $line_style=array(), $fill_color=array(), $nc=2);
+
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_012.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_013.php
@@ -1,1 +1,230 @@
-
+<?php
+//============================================================+
+// File name   : example_013.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 013 for TCPDF class
+//               Graphic Transformations
+//
+// 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
+//============================================================+
+
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Graphic Transformations
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 013');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 013', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', 'B', 20);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Graphic Transformations', '', 0, 'C', 1, 0, false, false, 0);
+
+// set font
+$pdf->SetFont('helvetica', '', 10);
+
+// --- Scaling ---------------------------------------------
+$pdf->SetDrawColor(200);
+$pdf->SetTextColor(200);
+$pdf->Rect(50, 70, 40, 10, 'D');
+$pdf->Text(50, 66, 'Scale');
+$pdf->SetDrawColor(0);
+$pdf->SetTextColor(0);
+// Start Transformation
+$pdf->StartTransform();
+// Scale by 150% centered by (50,80) which is the lower left corner of the rectangle
+$pdf->ScaleXY(150, 50, 80);
+$pdf->Rect(50, 70, 40, 10, 'D');
+$pdf->Text(50, 66, 'Scale');
+// Stop Transformation
+$pdf->StopTransform();
+
+// --- Translation -----------------------------------------
+$pdf->SetDrawColor(200);
+$pdf->SetTextColor(200);
+$pdf->Rect(125, 70, 40, 10, 'D');
+$pdf->Text(125, 66, 'Translate');
+$pdf->SetDrawColor(0);
+$pdf->SetTextColor(0);
+// Start Transformation
+$pdf->StartTransform();
+// Translate 7 to the right, 5 to the bottom
+$pdf->Translate(7, 5);
+$pdf->Rect(125, 70, 40, 10, 'D');
+$pdf->Text(125, 66, 'Translate');
+// Stop Transformation
+$pdf->StopTransform();
+
+// --- Rotation --------------------------------------------
+$pdf->SetDrawColor(200);
+$pdf->SetTextColor(200);
+$pdf->Rect(70, 100, 40, 10, 'D');
+$pdf->Text(70, 96, 'Rotate');
+$pdf->SetDrawColor(0);
+$pdf->SetTextColor(0);
+// Start Transformation
+$pdf->StartTransform();
+// Rotate 20 degrees counter-clockwise centered by (70,110) which is the lower left corner of the rectangle
+$pdf->Rotate(20, 70, 110);
+$pdf->Rect(70, 100, 40, 10, 'D');
+$pdf->Text(70, 96, 'Rotate');
+// Stop Transformation
+$pdf->StopTransform();
+
+// --- Skewing ---------------------------------------------
+$pdf->SetDrawColor(200);
+$pdf->SetTextColor(200);
+$pdf->Rect(125, 100, 40, 10, 'D');
+$pdf->Text(125, 96, 'Skew');
+$pdf->SetDrawColor(0);
+$pdf->SetTextColor(0);
+// Start Transformation
+$pdf->StartTransform();
+// skew 30 degrees along the x-axis centered by (125,110) which is the lower left corner of the rectangle
+$pdf->SkewX(30, 125, 110);
+$pdf->Rect(125, 100, 40, 10, 'D');
+$pdf->Text(125, 96, 'Skew');
+// Stop Transformation
+$pdf->StopTransform();
+
+// --- Mirroring horizontally ------------------------------
+$pdf->SetDrawColor(200);
+$pdf->SetTextColor(200);
+$pdf->Rect(70, 130, 40, 10, 'D');
+$pdf->Text(70, 126, 'MirrorH');
+$pdf->SetDrawColor(0);
+$pdf->SetTextColor(0);
+// Start Transformation
+$pdf->StartTransform();
+// mirror horizontally with axis of reflection at x-position 70 (left side of the rectangle)
+$pdf->MirrorH(70);
+$pdf->Rect(70, 130, 40, 10, 'D');
+$pdf->Text(70, 126, 'MirrorH');
+// Stop Transformation
+$pdf->StopTransform();
+
+// --- Mirroring vertically --------------------------------
+$pdf->SetDrawColor(200);
+$pdf->SetTextColor(200);
+$pdf->Rect(125, 130, 40, 10, 'D');
+$pdf->Text(125, 126, 'MirrorV');
+$pdf->SetDrawColor(0);
+$pdf->SetTextColor(0);
+// Start Transformation
+$pdf->StartTransform();
+// mirror vertically with axis of reflection at y-position 140 (bottom side of the rectangle)
+$pdf->MirrorV(140);
+$pdf->Rect(125, 130, 40, 10, 'D');
+$pdf->Text(125, 126, 'MirrorV');
+// Stop Transformation
+$pdf->StopTransform();
+
+// --- Point reflection ------------------------------------
+$pdf->SetDrawColor(200);
+$pdf->SetTextColor(200);
+$pdf->Rect(70, 160, 40, 10, 'D');
+$pdf->Text(70, 156, 'MirrorP');
+$pdf->SetDrawColor(0);
+$pdf->SetTextColor(0);
+// Start Transformation
+$pdf->StartTransform();
+// point reflection at the lower left point of rectangle
+$pdf->MirrorP(70,170);
+$pdf->Rect(70, 160, 40, 10, 'D');
+$pdf->Text(70, 156, 'MirrorP');
+// Stop Transformation
+$pdf->StopTransform();
+
+// --- Mirroring against a straigth line described by a point (120, 120) and an angle -20°
+$angle=-20;
+$px=120;
+$py=170;
+
+// just for visualisation: the straight line to mirror against
+
+$pdf->SetDrawColor(200);
+$pdf->Line($px-1,$py-1,$px+1,$py+1);
+$pdf->Line($px-1,$py+1,$px+1,$py-1);
+$pdf->StartTransform();
+$pdf->Rotate($angle, $px, $py);
+$pdf->Line($px-5, $py, $px+60, $py);
+$pdf->StopTransform();
+
+$pdf->SetDrawColor(200);
+$pdf->SetTextColor(200);
+$pdf->Rect(125, 160, 40, 10, 'D');
+$pdf->Text(125, 156, 'MirrorL');
+$pdf->SetDrawColor(0);
+$pdf->SetTextColor(0);
+//Start Transformation
+$pdf->StartTransform();
+//mirror against the straight line
+$pdf->MirrorL($angle, $px, $py);
+$pdf->Rect(125, 160, 40, 10, 'D');
+$pdf->Text(125, 156, 'MirrorL');
+//Stop Transformation
+$pdf->StopTransform();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_013.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_014.php
@@ -1,1 +1,191 @@
+<?php
+//============================================================+
+// File name   : example_014.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 014 for TCPDF class
+//               Javascript Form and user rights (only works on Adobe Acrobat)
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Javascript Form and user rights (only works on Adobe Acrobat)
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 014');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 014', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// IMPORTANT: disable font subsetting to allow users editing the document
+$pdf->setFontSubsetting(false);
+
+// set font
+$pdf->SetFont('helvetica', '', 10, '', false);
+
+// add a page
+$pdf->AddPage();
+
+/*
+It is possible to create text fields, combo boxes, check boxes and buttons.
+Fields are created at the current position and are given a name.
+This name allows to manipulate them via JavaScript in order to perform some validation for instance.
+*/
+
+// set default form properties
+$pdf->setFormDefaultProp(array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 200), 'strokeColor'=>array(255, 128, 128)));
+
+$pdf->SetFont('helvetica', 'BI', 18);
+$pdf->Cell(0, 5, 'Example of Form', 0, 1, 'C');
+$pdf->Ln(10);
+
+$pdf->SetFont('helvetica', '', 12);
+
+// First name
+$pdf->Cell(35, 5, 'First name:');
+$pdf->TextField('firstname', 50, 5);
+$pdf->Ln(6);
+
+// Last name
+$pdf->Cell(35, 5, 'Last name:');
+$pdf->TextField('lastname', 50, 5);
+$pdf->Ln(6);
+
+// Gender
+$pdf->Cell(35, 5, 'Gender:');
+//$pdf->ComboBox('gender', 10, 5, array('', 'M', 'F'));
+$pdf->ComboBox('gender', 30, 5, array(array('', '-'), array('M', 'Male'), array('F', 'Female')));
+$pdf->Ln(6);
+
+// Drink
+$pdf->Cell(35, 5, 'Drink:');
+$pdf->RadioButton('drink', 5, array(), array(), 'Water');
+$pdf->Cell(35, 5, 'Water');
+$pdf->Ln(6);
+$pdf->Cell(35, 5, '');
+$pdf->RadioButton('drink', 5, array(), array(), 'Beer', true);
+$pdf->Cell(35, 5, 'Beer');
+$pdf->Ln(6);
+$pdf->Cell(35, 5, '');
+$pdf->RadioButton('drink', 5, array(), array(), 'Wine');
+$pdf->Cell(35, 5, 'Wine');
+$pdf->Ln(10);
+
+// Listbox
+$pdf->Cell(35, 5, 'List:');
+$pdf->ListBox('listbox', 60, 15, array('', 'item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7'), array('multipleSelection'=>'true'));
+$pdf->Ln(20);
+
+// Adress
+$pdf->Cell(35, 5, 'Address:');
+$pdf->TextField('address', 60, 18, array('multiline'=>true));
+$pdf->Ln(19);
+
+// E-mail
+$pdf->Cell(35, 5, 'E-mail:');
+$pdf->TextField('email', 50, 5);
+$pdf->Ln(6);
+
+// Newsletter
+$pdf->Cell(35, 5, 'Newsletter:');
+$pdf->CheckBox('newsletter', 5, true, array(), array(), 'OK');
+$pdf->Ln(10);
+
+// Date of the day
+$pdf->Cell(35, 5, 'Date:');
+$pdf->TextField('date', 30, 5, array(), array('v'=>date('Y-m-d'), 'dv'=>date('Y-m-d')));
+$pdf->Ln(10);
+
+$pdf->SetX(50);
+
+// Button to validate and print
+$pdf->Button('print', 30, 10, 'Print', 'Print()', array('lineWidth'=>2, 'borderStyle'=>'beveled', 'fillColor'=>array(128, 196, 255), 'strokeColor'=>array(64, 64, 64)));
+
+// Reset Button
+$pdf->Button('reset', 30, 10, 'Reset', array('S'=>'ResetForm'), array('lineWidth'=>2, 'borderStyle'=>'beveled', 'fillColor'=>array(128, 196, 255), 'strokeColor'=>array(64, 64, 64)));
+
+// Submit Button
+$pdf->Button('submit', 30, 10, 'Submit', array('S'=>'SubmitForm', 'F'=>'http://localhost/printvars.php', 'Flags'=>array('ExportFormat')), array('lineWidth'=>2, 'borderStyle'=>'beveled', 'fillColor'=>array(128, 196, 255), 'strokeColor'=>array(64, 64, 64)));
+
+
+// Form validation functions
+$js = <<<EOD
+function CheckField(name,message) {
+	var f = getField(name);
+	if(f.value == '') {
+	    app.alert(message);
+	    f.setFocus();
+	    return false;
+	}
+	return true;
+}
+function Print() {
+	if(!CheckField('firstname','First name is mandatory')) {return;}
+	if(!CheckField('lastname','Last name is mandatory')) {return;}
+	if(!CheckField('gender','Gender is mandatory')) {return;}
+	if(!CheckField('address','Address is mandatory')) {return;}
+	print();
+}
+EOD;
+
+// Add Javascript code
+$pdf->IncludeJS($js);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_014.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_015.php
@@ -1,1 +1,122 @@
+<?php
+//============================================================+
+// File name   : example_015.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 015 for TCPDF class
+//               Bookmarks (Table of Content)
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Bookmarks (Table of Content)
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 015');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 015', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// Bookmark($txt, $level=0, $y=-1, $page='')
+
+// set font
+$pdf->SetFont('times', 'B', 20);
+
+// add a page
+$pdf->AddPage();
+
+// set a bookmark for the current position
+$pdf->Bookmark('Chapter 1', 0, 0);
+
+// print a line using Cell()
+$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L');
+
+$pdf->SetFont('times', 'I', 14);
+$pdf->Write(0, 'You can set PDF Bookmarks using the Bookmark() method.');
+
+$pdf->SetFont('times', 'B', 20);
+
+// add other pages and bookmarks
+
+$pdf->AddPage();
+$pdf->Bookmark('Paragraph 1.1', 1, 0);
+$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Paragraph 1.2', 1, 0);
+$pdf->Cell(0, 10, 'Paragraph 1.2', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0);
+$pdf->Cell(0, 10, 'Sub-Paragraph 1.2.1', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Paragraph 1.3', 1, 0);
+$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Chapter 2', 0, 0);
+$pdf->Cell(0, 10, 'Chapter 2', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Chapter 3', 0, 0);
+$pdf->Cell(0, 10, 'Chapter 3', 0, 1, 'L');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_015.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_016.php
@@ -1,1 +1,135 @@
+<?php
+//============================================================+
+// File name   : example_016.php
+// Begin       : 2008-03-04
+// Last Update : 2010-10-19
+//
+// Description : Example 016 for TCPDF class
+//               Document Encryption / Security
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Document Encryption / Security
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+
+// *** Set PDF protection (encryption) *********************
+
+/*
+  The permission array is composed of values taken from the following ones (specify the ones you want to block):
+	- print : Print the document;
+	- modify : Modify the contents of the document by operations other than those controlled by 'fill-forms', 'extract' and 'assemble';
+	- copy : Copy or otherwise extract text and graphics from the document;
+	- annot-forms : Add or modify text annotations, fill in interactive form fields, and, if 'modify' is also set, create or modify interactive form fields (including signature fields);
+	- fill-forms : Fill in existing interactive form fields (including signature fields), even if 'annot-forms' is not specified;
+	- extract : Extract text and graphics (in support of accessibility to users with disabilities or for other purposes);
+	- assemble : Assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if 'modify' is not set;
+	- print-high : Print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this is not set, printing is limited to a low-level representation of the appearance, possibly of degraded quality.
+	- owner : (inverted logic - only for public-key) when set permits change of encryption and enables all other permissions.
+
+ 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 (owner) password, if different from the user one, can be used to get full document access.
+
+ Possible encryption modes are:
+ 	0 = RSA 40 bit
+ 	1 = RSA 128 bit
+ 	2 = AES 128 bit
+ 	3 = AES 256 bit
+
+ NOTES:
+ - To create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt
+ - To export crt to p12: openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12
+ - To convert pfx certificate to pem: openssl pkcs12 -in tcpdf.pfx -out tcpdf.crt -nodes
+
+*/
+
+$pdf->SetProtection($permissions=array('print', 'copy'), $user_pass='', $owner_pass=null, $mode=0, $pubkeys=null);
+
+// Example with public-key
+// To open the document you need to install the private key (tcpdf.p12) on the Acrobat Reader. The password is: 1234
+//$pdf->SetProtection($permissions=array('print', 'copy'), $user_pass='', $owner_pass=null, $mode=1, $pubkeys=array(array('c' => 'file://../tcpdf.crt', 'p' => array('print'))));
+
+// *********************************************************
+
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 016');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 016', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array('helvetica', '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array('helvetica', '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', '', 16);
+
+// add a page
+$pdf->AddPage();
+
+// set some text to print
+$txt = <<<EOD
+Encryption Example
+
+Consult the source code documentation for the SetProtection() method.
+EOD;
+
+// print a block of text using Write()
+$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
+
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_016.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_017.php
@@ -1,1 +1,118 @@
+<?php
+//============================================================+
+// File name   : example_017.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 017 for TCPDF class
+//               Two independent columns with MultiCell
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Two independent columns with MultiCell
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 017');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 017', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 20);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of independent Multicell() columns', '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->Ln(5);
+
+$pdf->SetFont('times', '', 12);
+
+// create columns content
+// create columns content
+$left_column = '[LEFT COLUMN] left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column'."\n";
+
+$right_column = '[RIGHT COLUMN] right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column'."\n";
+
+// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0)
+
+// set color for background
+$pdf->SetFillColor(255, 255, 200);
+
+// set color for text
+$pdf->SetTextColor(0, 63, 127);
+
+// write the first column
+$pdf->MultiCell(80, 0, $left_column, 1, 'J', 1, 0, '', '', true, 0, false, true, 0);
+
+// set color for background
+$pdf->SetFillColor(215, 235, 255);
+
+// set color for text
+$pdf->SetTextColor(127, 31, 0);
+
+// write the second column
+$pdf->MultiCell(80, 0, $right_column, 1, 'J', 1, 1, '', '', true, 0, false, true, 0);
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_017.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_018.php
@@ -1,1 +1,133 @@
+<?php
+//============================================================+
+// File name   : example_018.php
+// Begin       : 2008-03-06
+// Last Update : 2010-08-08
+//
+// Description : Example 018 for TCPDF class
+//               RTL document with Persian language
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: RTL document with Persian language
+ * @author Nicola Asuni
+ * @since 2008-03-06
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 018');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 018', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+// set some language dependent data:
+$lg = Array();
+$lg['a_meta_charset'] = 'UTF-8';
+$lg['a_meta_dir'] = 'rtl';
+$lg['a_meta_language'] = 'fa';
+$lg['w_page'] = 'page';
+
+//set some language-dependent strings
+$pdf->setLanguageArray($lg);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('dejavusans', '', 12);
+
+// add a page
+$pdf->AddPage();
+
+// Persian and English content
+$htmlpersian = '<span color="#660000">Persian example:</span><br />سلام بالاخره مشکل PDF فارسی به طور کامل حل شد. اینم یک نمونش.<br />مشکل حرف \"ژ\" در بعضی کلمات مانند کلمه ویژه نیز بر طرف شد.<br />نگارش حروف لام و الف پشت سر هم نیز تصحیح شد.<br />با تشکر از  "Asuni Nicola" و محمد علی گل کار برای پشتیبانی زبان فارسی.';
+$pdf->WriteHTML($htmlpersian, true, 0, true, 0);
+
+// set LTR direction for english translation
+$pdf->setRTL(false);
+
+$pdf->SetFontSize(10);
+
+// print newline
+$pdf->Ln();
+
+// Persian and English content
+$htmlpersiantranslation = '<span color="#0000ff">Hi, At last Problem of Persian PDF Solved completely. This is a example for it.<br />Problem of "jeh" letter in some word like "ویژه" (=special) fix too.<br />The joining of laa and alf letter fix now.<br />Special thanks to "Nicola Asuni" and "Mohamad Ali Golkar" for Persian support.</span>';
+$pdf->WriteHTML($htmlpersiantranslation, true, 0, true, 0);
+
+// Restore RTL direction
+$pdf->setRTL(true);
+
+// set font size
+$pdf->SetFont('almohanad', '', 18);
+
+// print newline
+$pdf->Ln();
+
+// Arabic and English content
+$pdf->Cell(0, 12, 'بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ',0,1,'C');
+$htmlcontent = 'تمَّ بِحمد الله حلّ مشكلة الكتابة باللغة العربية في ملفات الـ<span color="#FF0000">PDF</span> مع دعم الكتابة <span color="#0000FF">من اليمين إلى اليسار</span> و<span color="#009900">الحركَات</span> .<br />تم الحل بواسطة <span color="#993399">صالح المطرفي و Asuni Nicola</span>  . ';
+$pdf->WriteHTML($htmlcontent, true, 0, true, 0);
+
+// set LTR direction for english translation
+$pdf->setRTL(false);
+
+// set font size
+$pdf->SetFontSize(18);
+
+// print newline
+$pdf->Ln();
+
+// Arabic and English content
+$htmlcontent2 = '<span color="#0000ff">This is Arabic "العربية" Example With TCPDF.</span>';
+$pdf->WriteHTML($htmlcontent2, true, 0, true, 0);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_018.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_019.php
@@ -1,1 +1,107 @@
+<?php
+//============================================================+
+// File name   : example_019.php
+// Begin       : 2008-03-07
+// Last Update : 2010-08-08
+//
+// Description : Example 019 for TCPDF class
+//               Non unicode with alternative config file
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Non unicode with alternative config file
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+
+// load alternative config file
+require_once('../config/tcpdf_config_alt.php');
+define("K_TCPDF_EXTERNAL_CONFIG", true);
+
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, false, 'ISO-8859-1', false);
+
+// Set document information dictionary in unicode mode
+$pdf->SetDocInfoUnicode(true);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni [€]');
+$pdf->SetTitle('TCPDF Example 019');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 019', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+// set some language dependent data:
+$lg = Array();
+$lg['a_meta_charset'] = 'ISO-8859-1';
+$lg['a_meta_dir'] = 'ltr';
+$lg['a_meta_language'] = 'en';
+$lg['w_page'] = 'page';
+
+//set some language-dependent strings
+$pdf->setLanguageArray($lg);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 12);
+
+// add a page
+$pdf->AddPage();
+
+// set color for background
+$pdf->SetFillColor(200, 255, 200);
+
+$txt = 'An alternative configuration file is used on this example.
+Check the definition of the K_TCPDF_EXTERNAL_CONFIG constant on the source code.';
+
+// print some text
+$pdf->MultiCell(0, 0, $txt."\n", 1, 'J', 1, 1, '', '', true, 0, false, true, 0);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_019.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_020.php
@@ -1,1 +1,147 @@
+<?php
+//============================================================+
+// File name   : example_020.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 020 for TCPDF class
+//               Two columns composed by MultiCell of different
+//               heights
+//
+// 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
+//============================================================+
 
+/**
+* Creates an example PDF TEST document using TCPDF
+* @package com.tecnick.tcpdf
+* @abstract TCPDF - Example: Two columns composed by MultiCell of different heights
+* @author Nicola Asuni
+* @since 2008-03-04
+*/
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// extend TCPF with custom functions
+class MYPDF extends TCPDF {
+	
+	public function MultiRow($left, $right) {
+		// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0)
+	
+		$page_start = $this->getPage();
+		$y_start = $this->GetY();
+	
+		// write the left cell
+		$this->MultiCell(40, 0, $left, 1, 'R', 1, 2, '', '', true, 0);
+	
+		$page_end_1 = $this->getPage();
+		$y_end_1 = $this->GetY();
+	
+		$this->setPage($page_start);
+	
+		// write the right cell
+		$this->MultiCell(0, 0, $right, 1, 'J', 0, 1, $this->GetX() ,$y_start, true, 0);
+	
+		$page_end_2 = $this->getPage();
+		$y_end_2 = $this->GetY();
+	
+		// set the new row position by case
+		if (max($page_end_1,$page_end_2) == $page_start) {
+			$ynew = max($y_end_1, $y_end_2);
+		} elseif ($page_end_1 == $page_end_2) {
+			$ynew = max($y_end_1, $y_end_2);
+		} elseif ($page_end_1 > $page_end_2) {
+			$ynew = $y_end_1;
+		} else {
+			$ynew = $y_end_2;
+		}
+	
+		$this->setPage(max($page_end_1,$page_end_2));
+		$this->SetXY($this->GetX(),$ynew);
+	}
+
+}
+
+// create new PDF document
+$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 020');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 020', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 20);
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of text layout using Multicell()', '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->Ln(5);
+
+$pdf->SetFont('times', '', 9);
+
+//$pdf->SetCellPadding(0);
+//$pdf->SetLineWidth(2);
+
+// set color for background
+$pdf->SetFillColor(255, 255, 200);
+
+$text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc.
+
+Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.';
+
+// print some rows just as example
+for ($i = 0; $i < 10; ++$i) {
+	$pdf->MultiRow('Row '.($i+1), $text."\n");
+}
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_020.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_021.php
@@ -1,1 +1,92 @@
+<?php
+//============================================================+
+// File name   : example_021.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 021 for TCPDF class
+//               WriteHTML text flow
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: WriteHTML text flow.
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 021');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 021', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 9);
+
+// add a page
+$pdf->AddPage();
+
+// create some HTML content
+$html = '<h1>Example of HTML text flow</h1>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. <em>Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?</em> <em>Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</em><br /><br /><b>A</b> + <b>B</b> = <b>C</b> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>B</i> = <i>A</i> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>A</i> = <i>B</i> -&gt; &nbsp;&nbsp; <b>A</b> + <b>B</b> = <b>C</b> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>B</i> = <i>A</i> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>A</i> = <i>B</i> -&gt; &nbsp;&nbsp; <b>A</b> + <b>B</b> = <b>C</b> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>B</i> = <i>A</i> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>A</i> = <i>B</i> -&gt; &nbsp;&nbsp; <b>A</b> + <b>B</b> = <b>C</b> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>B</i> = <i>A</i> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>A</i> = <i>B</i> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <b>A</b> + <b>B</b> = <b>C</b> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>B</i> = <i>A</i> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>A</i> = <i>B</i> -&gt; &nbsp;&nbsp; <b>A</b> + <b>B</b> = <b>C</b> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>B</i> = <i>A</i> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>A</i> = <i>B</i> -&gt; &nbsp;&nbsp; <b>A</b> + <b>B</b> = <b>C</b> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>B</i> = <i>A</i> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>A</i> = <i>B</i> -&gt; &nbsp;&nbsp; <b>A</b> + <b>B</b> = <b>C</b> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>B</i> = <i>A</i> &nbsp;&nbsp; -&gt; &nbsp;&nbsp; <i>C</i> - <i>A</i> = <i>B</i><br /><br /><b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u>';
+
+// output the HTML content
+$pdf->writeHTML($html, true, 0, true, 0);
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_021.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_022.php
@@ -1,1 +1,147 @@
+<?php
+//============================================================+
+// File name   : example_022.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 022 for TCPDF class
+//               CMYK 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: CMYK colors.
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 022');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 022', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// check also the following methods:
+// SetDrawColorArray()
+// SetFillColorArray()
+// SetTextColorArray()
+
+// set font
+$pdf->SetFont('helvetica', 'B', 18);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of CMYK, RGB and Grayscale colours', '', 0, 'L', true, 0, false, false, 0);
+
+// define style for border
+$border_style = array('all' => array('width' => 2, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'phase' => 0));
+
+// --- CMYK ------------------------------------------------
+
+$pdf->SetDrawColor(50, 0, 0, 0);
+$pdf->SetFillColor(100, 0, 0, 0);
+$pdf->SetTextColor(100, 0, 0, 0);
+$pdf->Rect(30, 60, 30, 30, 'DF', $border_style);
+$pdf->Text(30, 92, 'Cyan');
+
+$pdf->SetDrawColor(0, 50, 0, 0);
+$pdf->SetFillColor(0, 100, 0, 0);
+$pdf->SetTextColor(0, 100, 0, 0);
+$pdf->Rect(70, 60, 30, 30, 'DF', $border_style);
+$pdf->Text(70, 92, 'Magenta');
+
+$pdf->SetDrawColor(0, 0, 50, 0);
+$pdf->SetFillColor(0, 0, 100, 0);
+$pdf->SetTextColor(0, 0, 100, 0);
+$pdf->Rect(110, 60, 30, 30, 'DF', $border_style);
+$pdf->Text(110, 92, 'Yellow');
+
+$pdf->SetDrawColor(0, 0, 0, 50);
+$pdf->SetFillColor(0, 0, 0, 100);
+$pdf->SetTextColor(0, 0, 0, 100);
+$pdf->Rect(150, 60, 30, 30, 'DF', $border_style);
+$pdf->Text(150, 92, 'Black');
+
+// --- RGB -------------------------------------------------
+
+$pdf->SetDrawColor(255, 127, 127);
+$pdf->SetFillColor(255, 0, 0);
+$pdf->SetTextColor(255, 0, 0);
+$pdf->Rect(30, 110, 30, 30, 'DF', $border_style);
+$pdf->Text(30, 142, 'Red');
+
+$pdf->SetDrawColor(127, 255, 127);
+$pdf->SetFillColor(0, 255, 0);
+$pdf->SetTextColor(0, 255, 0);
+$pdf->Rect(70, 110, 30, 30, 'DF', $border_style);
+$pdf->Text(70, 142, 'Green');
+
+$pdf->SetDrawColor(127, 127, 255);
+$pdf->SetFillColor(0, 0, 255);
+$pdf->SetTextColor(0, 0, 255);
+$pdf->Rect(110, 110, 30, 30, 'DF', $border_style);
+$pdf->Text(110, 142, 'Blue');
+
+// --- GRAY ------------------------------------------------
+
+$pdf->SetDrawColor(191);
+$pdf->SetFillColor(127);
+$pdf->SetTextColor(127);
+$pdf->Rect(30, 160, 30, 30, 'DF', $border_style);
+$pdf->Text(30, 192, 'Gray');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_022.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_023.php
@@ -1,1 +1,114 @@
+<?php
+//============================================================+
+// File name   : example_023.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 023 for TCPDF class
+//               Page Groups
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Page Groups.
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 023');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 023', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', 'BI', 14);
+
+// Start First Page Group
+$pdf->startPageGroup();
+
+// add a page
+$pdf->AddPage();
+
+// set some text to print
+$txt = <<<EOD
+Example of page groups.
+Check the page numbers on the page footer.
+
+This is the first page of group 1.
+EOD;
+
+// print a block of text using Write()
+$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
+
+// add second page
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'This is the second page of group 1', 0, 1, 'L');
+
+// Start Second Page Group
+$pdf->startPageGroup();
+
+// add some pages
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'This is the first page of group 2', 0, 1, 'L');
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'This is the second page of group 2', 0, 1, 'L');
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'This is the third page of group 2', 0, 1, 'L');
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'This is the fourth page of group 2', 0, 1, 'L');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_023.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_024.php
@@ -1,1 +1,119 @@
+<?php
+//============================================================+
+// File name   : example_024.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 024 for TCPDF class
+//               Object Visibility
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Object Visibility
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 024');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 024', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', '', 18);
+
+// add a page
+$pdf->AddPage();
+
+/*
+ * setVisibility() allows to restrict the rendering of some
+ * elements to screen or printout. This can be useful, for
+ * instance, to put a background image or color that will
+ * show on screen but won't print.
+ */
+
+$txt = 'You can limit the visibility of PDF objects to screen or printer by using the setVisibility() method.
+Check the print preview of this document to display the alternative text.';
+
+$pdf->Write(0, $txt, '', 0, '', true, 0, false, false, 0);
+
+// change font size
+$pdf->SetFontSize(40);
+
+// change text color
+$pdf->SetTextColor(0,63,127);
+
+// set visibility only for screen
+$pdf->setVisibility('screen');
+
+// write something only for screen
+$pdf->Write(0, '[This line is for display]', '', 0, 'C', true, 0, false, false, 0);
+
+// set visibility only for print
+$pdf->setVisibility('print');
+
+// change text color
+$pdf->SetTextColor(127,0,0);
+
+// write something only for print
+$pdf->Write(0, '[This line is for printout]', '', 0, 'C', true, 0, false, false, 0);
+
+// restore visibility
+$pdf->setVisibility('all');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_024.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_025.php
@@ -1,1 +1,119 @@
+<?php
+//============================================================+
+// File name   : example_025.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 025 for TCPDF class
+//               Object Transparency
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Object Transparency
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 025');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 025', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 12);
+
+// add a page
+$pdf->AddPage();
+
+$txt = 'You can set the transparency of PDF objects using the setAlpha() method.';
+$pdf->Write(0, $txt, '', 0, '', true, 0, false, false, 0);
+
+/*
+ * setAlpha() gives transparency support. You can set the
+ * alpha channel from 0 (fully transparent) to 1 (fully
+ * opaque). It applies to all elements (text, drawings,
+ * images).
+ */
+
+$pdf->SetLineWidth(2);
+
+// draw opaque red square
+$pdf->SetFillColor(255, 0, 0);
+$pdf->SetDrawColor(127, 0, 0);
+$pdf->Rect(30, 40, 60, 60, 'DF');
+
+// set alpha to semi-transparency
+$pdf->SetAlpha(0.5);
+
+// draw green square
+$pdf->SetFillColor(0, 255, 0);
+$pdf->SetDrawColor(0, 127, 0);
+$pdf->Rect(50, 60, 60, 60, 'DF');
+
+// draw blue square
+$pdf->SetFillColor(0, 0, 255);
+$pdf->SetDrawColor(0, 0, 127);
+$pdf->Rect(70, 80, 60, 60, 'DF');
+
+// draw jpeg image
+$pdf->Image('../images/image_demo.jpg', 90, 100, 60, 60, '', 'http://www.tcpdf.org', '', true, 72);
+
+// restore full opacity
+$pdf->SetAlpha(1);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_025.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_026.php
@@ -1,1 +1,146 @@
+<?php
+//============================================================+
+// File name   : example_026.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 026 for TCPDF class
+//               Text Rendering Modes and Text Clipping
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Text Rendering Modes and Text Clipping
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 026');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 026', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 22);
+
+// add a page
+$pdf->AddPage();
+
+// set color for text stroke
+$pdf->SetDrawColor(255,0,0);
+
+
+$pdf->setTextRenderingMode($stroke=0, $fill=true, $clip=false);
+$pdf->Write(0, 'Fill text', '', 0, '', true, 0, false, false, 0);
+
+$pdf->setTextRenderingMode($stroke=0.2, $fill=false, $clip=false);
+$pdf->Write(0, 'Stroke text', '', 0, '', true, 0, false, false, 0);
+
+$pdf->setTextRenderingMode($stroke=0.2, $fill=true, $clip=false);
+$pdf->Write(0, 'Fill, then stroke text', '', 0, '', true, 0, false, false, 0);
+
+$pdf->setTextRenderingMode($stroke=0, $fill=false, $clip=false);
+$pdf->Write(0, 'Neither fill nor stroke text (invisible)', '', 0, '', true, 0, false, false, 0);
+
+
+// * * * CLIPPING MODES  * * * * * * * * * * * * * * * * * *
+
+$pdf->StartTransform();
+$pdf->setTextRenderingMode($stroke=0, $fill=true, $clip=true);
+$pdf->Write(0, 'Fill text and add to path for clipping', '', 0, '', true, 0, false, false, 0);
+$pdf->Image('../images/image_demo.jpg', 15, 65, 170, 10, '', '', '', true, 72);
+$pdf->StopTransform();
+
+$pdf->StartTransform();
+$pdf->setTextRenderingMode($stroke=0.3, $fill=false, $clip=true);
+$pdf->Write(0, 'Stroke text and add to path for clipping', '', 0, '', true, 0, false, false, 0);
+$pdf->Image('../images/image_demo.jpg', 15, 75, 170, 10, '', '', '', true, 72);
+$pdf->StopTransform();
+
+$pdf->StartTransform();
+$pdf->setTextRenderingMode($stroke=0.3, $fill=true, $clip=true);
+$pdf->Write(0, 'Fill, then stroke text and add to path for clipping', '', 0, '', true, 0, false, false, 0);
+$pdf->Image('../images/image_demo.jpg', 15, 85, 170, 10, '', '', '', true, 72);
+$pdf->StopTransform();
+
+$pdf->StartTransform();
+$pdf->setTextRenderingMode($stroke=0, $fill=false, $clip=true);
+$pdf->Write(0, 'Add text to path for clipping', '', 0, '', true, 0, false, false, 0);
+$pdf->Image('../images/image_demo.jpg', 15, 95, 170, 10, '', '', '', true, 72);
+$pdf->StopTransform();
+
+// reset text rendering mode
+$pdf->setTextRenderingMode($stroke=0, $fill=true, $clip=false);
+
+// * * * HTML MODE * * * * * * * * * * * * * * * * * * * * *
+
+// The following attributes were added to HTML:
+// stroke : stroke width
+// strokecolor : stroke color
+// fill : true (default) to fill the font, false otherwise
+
+
+// create some HTML content with text rendering modes
+$html  = '<span stroke="0" fill="true">HTML Fill text</span><br />';
+$html .= '<span stroke="0.2" fill="false">HTML Stroke text</span><br />';
+$html .= '<span stroke="0.2" fill="true" strokecolor="#FF0000" color="#FFFF00">HTML Fill, then stroke text</span><br />';
+$html .= '<span stroke="0" fill="false">HTML Neither fill nor stroke text (invisible)</span><br />';
+
+// output the HTML content
+$pdf->writeHTML($html, true, 0, true, 0);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_026.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_027.php
@@ -1,1 +1,404 @@
-
+<?php
+//============================================================+
+// File name   : example_027.php
+// Begin       : 2008-03-04
+// Last Update : 2010-10-21
+//
+// Description : Example 027 for TCPDF class
+//               1D Barcodes
+//
+// 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
+//============================================================+
+
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: 1D Barcodes.
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 027');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 027', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set a barcode on the page footer
+$pdf->setBarcode(date('Y-m-d H:i:s'));
+
+// set font
+$pdf->SetFont('helvetica', '', 10);
+
+// add a page
+$pdf->AddPage();
+
+// define barcode style
+$style = array(
+	'position' => '',
+	'align' => 'C',
+	'stretch' => false,
+	'fitwidth' => true,
+	'cellfitalign' => '',
+	'border' => true,
+	'hpadding' => 'auto',
+	'vpadding' => 'auto',
+	'fgcolor' => array(0,0,0),
+	'bgcolor' => false, //array(255,255,255),
+	'text' => true,
+	'font' => 'helvetica',
+	'fontsize' => 8,
+	'stretchtext' => 4
+);
+
+// PRINT VARIOUS 1D BARCODES
+
+// CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
+$pdf->Cell(0, 0, 'CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9', 0, 1);
+$pdf->write1DBarcode('CODE 39', 'C39', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// CODE 39 + CHECKSUM
+$pdf->Cell(0, 0, 'CODE 39 + CHECKSUM', 0, 1);
+$pdf->write1DBarcode('CODE 39 +', 'C39+', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// CODE 39 EXTENDED
+$pdf->Cell(0, 0, 'CODE 39 EXTENDED', 0, 1);
+$pdf->write1DBarcode('CODE 39 E', 'C39E', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// CODE 39 EXTENDED + CHECKSUM
+$pdf->Cell(0, 0, 'CODE 39 EXTENDED + CHECKSUM', 0, 1);
+$pdf->write1DBarcode('CODE 39 E+', 'C39E+', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// CODE 93 - USS-93
+$pdf->Cell(0, 0, 'CODE 93 - USS-93', 0, 1);
+$pdf->write1DBarcode('TEST93', 'C93', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// Standard 2 of 5
+$pdf->Cell(0, 0, 'Standard 2 of 5', 0, 1);
+$pdf->write1DBarcode('1234567', 'S25', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// Standard 2 of 5 + CHECKSUM
+$pdf->Cell(0, 0, 'Standard 2 of 5 + CHECKSUM', 0, 1);
+$pdf->write1DBarcode('1234567', 'S25+', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// Interleaved 2 of 5
+$pdf->Cell(0, 0, 'Interleaved 2 of 5', 0, 1);
+$pdf->write1DBarcode('1234567', 'I25', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// Interleaved 2 of 5 + CHECKSUM
+$pdf->Cell(0, 0, 'Interleaved 2 of 5 + CHECKSUM', 0, 1);
+$pdf->write1DBarcode('1234567', 'I25+', '', '', '', 18, 0.4, $style, 'N');
+
+
+// add a page ----------
+$pdf->AddPage();
+
+// CODE 128 A
+$pdf->Cell(0, 0, 'CODE 128 A', 0, 1);
+$pdf->write1DBarcode('CODE 128 A', 'C128A', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// CODE 128 B
+$pdf->Cell(0, 0, 'CODE 128 B', 0, 1);
+$pdf->write1DBarcode('CODE 128 B', 'C128B', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// CODE 128 C
+$pdf->Cell(0, 0, 'CODE 128 C', 0, 1);
+$pdf->write1DBarcode('0123456789', 'C128C', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// EAN 8
+$pdf->Cell(0, 0, 'EAN 8', 0, 1);
+$pdf->write1DBarcode('1234567', 'EAN8', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// EAN 13
+$pdf->Cell(0, 0, 'EAN 13', 0, 1);
+$pdf->write1DBarcode('1234567890128', 'EAN13', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// UPC-A
+$pdf->Cell(0, 0, 'UPC-A', 0, 1);
+$pdf->write1DBarcode('12345678901', 'UPCA', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// UPC-E
+$pdf->Cell(0, 0, 'UPC-E', 0, 1);
+$pdf->write1DBarcode('04210000526', 'UPCE', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// 5-Digits UPC-Based Extention
+$pdf->Cell(0, 0, '5-Digits UPC-Based Extention', 0, 1);
+$pdf->write1DBarcode('51234', 'EAN5', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// 2-Digits UPC-Based Extention
+$pdf->Cell(0, 0, '2-Digits UPC-Based Extention', 0, 1);
+$pdf->write1DBarcode('34', 'EAN2', '', '', '', 18, 0.4, $style, 'N');
+
+// add a page ----------
+$pdf->AddPage();
+
+// MSI
+$pdf->Cell(0, 0, 'MSI', 0, 1);
+$pdf->write1DBarcode('80523', 'MSI', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// MSI + CHECKSUM (module 11)
+$pdf->Cell(0, 0, 'MSI + CHECKSUM (module 11)', 0, 1);
+$pdf->write1DBarcode('80523', 'MSI+', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// CODABAR
+$pdf->Cell(0, 0, 'CODABAR', 0, 1);
+$pdf->write1DBarcode('123456789', 'CODABAR', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// CODE 11
+$pdf->Cell(0, 0, 'CODE 11', 0, 1);
+$pdf->write1DBarcode('123-456-789', 'CODE11', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// PHARMACODE
+$pdf->Cell(0, 0, 'PHARMACODE', 0, 1);
+$pdf->write1DBarcode('789', 'PHARMA', '', '', '', 18, 0.4, $style, 'N');
+
+$pdf->Ln();
+
+// PHARMACODE TWO-TRACKS
+$pdf->Cell(0, 0, 'PHARMACODE TWO-TRACKS', 0, 1);
+$pdf->write1DBarcode('105', 'PHARMA2T', '', '', '', 18, 2, $style, 'N');
+
+// add a page ----------
+$pdf->AddPage();
+
+// IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
+$pdf->Cell(0, 0, 'IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200', 0, 1);
+$pdf->write1DBarcode('01234567094987654321-01234567891', 'IMB', '', '', '', 15, 0.6, $style, 'N');
+
+$pdf->Ln();
+
+// POSTNET
+$pdf->Cell(0, 0, 'POSTNET', 0, 1);
+$pdf->write1DBarcode('98000', 'POSTNET', '', '', '', 15, 0.6, $style, 'N');
+
+$pdf->Ln();
+
+// PLANET
+$pdf->Cell(0, 0, 'PLANET', 0, 1);
+$pdf->write1DBarcode('98000', 'PLANET', '', '', '', 15, 0.6, $style, 'N');
+
+$pdf->Ln();
+
+// RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
+$pdf->Cell(0, 0, 'RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)', 0, 1);
+$pdf->write1DBarcode('SN34RD1A', 'RMS4CC', '', '', '', 15, 0.6, $style, 'N');
+
+$pdf->Ln();
+
+// KIX (Klant index - Customer index)
+$pdf->Cell(0, 0, 'KIX (Klant index - Customer index)', 0, 1);
+$pdf->write1DBarcode('SN34RDX1A', 'KIX', '', '', '', 15, 0.6, $style, 'N');
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// TEST BARCODE ALIGNMENTS
+
+// add a page
+$pdf->AddPage();
+
+// set a background color
+$style['bgcolor'] = array(255,255,240);
+$style['fgcolor'] = array(127,0,0);
+
+// Left position
+$style['position'] = 'L';
+$pdf->write1DBarcode('LEFT', 'C128A', '', '', '', 15, 0.4, $style, 'N');
+
+$pdf->Ln(2);
+
+// Center position
+$style['position'] = 'C';
+$pdf->write1DBarcode('CENTER', 'C128A', '', '', '', 15, 0.4, $style, 'N');
+
+$pdf->Ln(2);
+
+// Right position
+$style['position'] = 'R';
+$pdf->write1DBarcode('RIGHT', 'C128A', '', '', '', 15, 0.4, $style, 'N');
+
+$pdf->Ln(2);
+// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+
+$style['fgcolor'] = array(0,127,0);
+$style['position'] = '';
+$style['stretch'] = false; // disable stretch
+$style['fitwidth'] = false; // disable fitwidth
+
+// Left alignment
+$style['align'] = 'L';
+$pdf->write1DBarcode('LEFT', 'C128A', '', '', '', 15, 0.4, $style, 'N');
+
+$pdf->Ln(2);
+
+// Center alignment
+$style['align'] = 'C';
+$pdf->write1DBarcode('CENTER', 'C128A', '', '', '', 15, 0.4, $style, 'N');
+
+$pdf->Ln(2);
+
+// Right alignment
+$style['align'] = 'R';
+$pdf->write1DBarcode('RIGHT', 'C128A', '', '', '', 15, 0.4, $style, 'N');
+
+$pdf->Ln(2);
+// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+
+$style['fgcolor'] = array(0,64,127);
+$style['position'] = '';
+$style['stretch'] = false; // disable stretch
+$style['fitwidth'] = true; // disable fitwidth
+
+// Left alignment
+$style['cellfitalign'] = 'L';
+$pdf->write1DBarcode('LEFT', 'C128A', 105, '', 90, 15, 0.4, $style, 'N');
+
+$pdf->Ln(2);
+
+// Center alignment
+$style['cellfitalign'] = 'C';
+$pdf->write1DBarcode('CENTER', 'C128A', 105, '', 90, 15, 0.4, $style, 'N');
+
+$pdf->Ln(2);
+
+// Right alignment
+$style['cellfitalign'] = 'R';
+$pdf->write1DBarcode('RIGHT', 'C128A', 105, '', 90, 15, 0.4, $style, 'N');
+
+$pdf->Ln(2);
+// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+
+$style['fgcolor'] = array(127,0,127);
+
+// Left alignment
+$style['position'] = 'L';
+$pdf->write1DBarcode('LEFT', 'C128A', '', '', '', 15, 0.4, $style, 'N');
+
+$pdf->Ln(2);
+
+// Center alignment
+$style['position'] = 'C';
+$pdf->write1DBarcode('CENTER', 'C128A', '', '', '', 15, 0.4, $style, 'N');
+
+$pdf->Ln(2);
+
+// Right alignment
+$style['position'] = 'R';
+$pdf->write1DBarcode('RIGHT', 'C128A', '', '', '', 15, 0.4, $style, 'N');
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// TEST BARCODE STYLE
+
+// define barcode style
+$style = array(
+	'position' => '',
+	'align' => '',
+	'stretch' => true,
+	'fitwidth' => false,
+	'cellfitalign' => '',
+	'border' => true,
+	'hpadding' => 'auto',
+	'vpadding' => 'auto',
+	'fgcolor' => array(0,0,128),
+	'bgcolor' => array(255,255,128),
+	'text' => true,
+	'label' => 'CUSTOM LABEL',
+	'font' => 'helvetica',
+	'fontsize' => 8,
+	'stretchtext' => 4
+);
+
+// CODE 39 EXTENDED + CHECKSUM
+$pdf->Cell(0, 0, 'CODE 39 EXTENDED + CHECKSUM', 0, 1);
+$pdf->SetLineStyle(array('width' => 1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0)));
+$pdf->write1DBarcode('CODE 39 E+', 'C39E+', '', '', 120, 25, 0.4, $style, 'N');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_027.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_028.php
@@ -1,1 +1,139 @@
+<?php
+//============================================================+
+// File name   : example_028.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 028 for TCPDF class
+//               Changing page formats
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: changing page formats
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 028');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// remove default header/footer
+$pdf->setPrintHeader(false);
+$pdf->setPrintFooter(false);
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(10, PDF_MARGIN_TOP, 10);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+$pdf->SetDisplayMode('fullpage', 'SinglePage', 'UseNone');
+
+// set font
+$pdf->SetFont('times', 'B', 20);
+
+$pdf->AddPage('P', 'A4');
+$pdf->Cell(0, 0, 'A4 PORTRAIT', 1, 1, 'C');
+
+$pdf->AddPage('L', 'A4');
+$pdf->Cell(0, 0, 'A4 LANDSCAPE', 1, 1, 'C');
+
+$pdf->AddPage('P', 'A5');
+$pdf->Cell(0, 0, 'A5 PORTRAIT', 1, 1, 'C');
+
+$pdf->AddPage('L', 'A5');
+$pdf->Cell(0, 0, 'A5 LANDSCAPE', 1, 1, 'C');
+
+$pdf->AddPage('P', 'A6');
+$pdf->Cell(0, 0, 'A6 PORTRAIT', 1, 1, 'C');
+
+$pdf->AddPage('L', 'A6');
+$pdf->Cell(0, 0, 'A6 LANDSCAPE', 1, 1, 'C');
+
+$pdf->AddPage('P', 'A7');
+$pdf->Cell(0, 0, 'A7 PORTRAIT', 1, 1, 'C');
+
+$pdf->AddPage('L', 'A7');
+$pdf->Cell(0, 0, 'A7 LANDSCAPE', 1, 1, 'C');
+
+
+// --- test backward editing ---
+
+
+$pdf->setPage(1, true);
+$pdf->SetY(50);
+$pdf->Cell(0, 0, 'A4 test', 1, 1, 'C');
+
+$pdf->setPage(2, true);
+$pdf->SetY(50);
+$pdf->Cell(0, 0, 'A4 test', 1, 1, 'C');
+
+$pdf->setPage(3, true);
+$pdf->SetY(50);
+$pdf->Cell(0, 0, 'A5 test', 1, 1, 'C');
+
+$pdf->setPage(4, true);
+$pdf->SetY(50);
+$pdf->Cell(0, 0, 'A5 test', 1, 1, 'C');
+
+$pdf->setPage(5, true);
+$pdf->SetY(50);
+$pdf->Cell(0, 0, 'A6 test', 1, 1, 'C');
+
+$pdf->setPage(6, true);
+$pdf->SetY(50);
+$pdf->Cell(0, 0, 'A6 test', 1, 1, 'C');
+
+$pdf->setPage(7, true);
+$pdf->SetY(40);
+$pdf->Cell(0, 0, 'A7 test', 1, 1, 'C');
+
+$pdf->setPage(8, true);
+$pdf->SetY(40);
+$pdf->Cell(0, 0, 'A7 test', 1, 1, 'C');
+
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_028.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_029.php
@@ -1,1 +1,125 @@
+<?php
+//============================================================+
+// File name   : example_029.php
+// Begin       : 2008-06-09
+// Last Update : 2010-08-08
+//
+// Description : Example 029 for TCPDF class
+//               Set PDF viewer display preferences.
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Set PDF viewer display preferences.
+ * @author Nicola Asuni
+ * @since 2008-06-09
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 029');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 029', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set array for viewer preferences
+$preferences = array(
+	'HideToolbar' => true,
+	'HideMenubar' => true,
+	'HideWindowUI' => true,
+	'FitWindow' => true,
+	'CenterWindow' => true,
+	'DisplayDocTitle' => true,
+	'NonFullScreenPageMode' => 'UseNone', // UseNone, UseOutlines, UseThumbs, UseOC
+	'ViewArea' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox
+	'ViewClip' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox
+	'PrintArea' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox
+	'PrintClip' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox
+	'PrintScaling' => 'AppDefault', // None, AppDefault
+	'Duplex' => 'DuplexFlipLongEdge', // Simplex, DuplexFlipShortEdge, DuplexFlipLongEdge
+	'PickTrayByPDFSize' => true,
+	'PrintPageRange' => array(1,1,2,3),
+	'NumCopies' => 2
+);
+
+// Check the example n. 60 for advanced page settings
+
+// set pdf viewer preferences
+$pdf->setViewerPreferences($preferences);
+
+// set font
+$pdf->SetFont('times', '', 14);
+
+// add a page
+$pdf->AddPage();
+
+// print a line
+$pdf->Cell(0, 12, 'DISPLAY PREFERENCES - PAGE 1', 1, 1, 'C');
+
+$pdf->Ln(5);
+
+$pdf->Write(0, 'You can use the setViewerPreferences() method to change viewer preferences.', '', 0, 'L', true, 0, false, false, 0);
+
+// add a page
+$pdf->AddPage();
+// print a line
+$pdf->Cell(0, 12, 'DISPLAY PREFERENCES - PAGE 2', 0, 0, 'C');
+
+// add a page
+$pdf->AddPage();
+// print a line
+$pdf->Cell(0, 12, 'DISPLAY PREFERENCES - PAGE 3', 0, 0, 'C');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_029.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_030.php
@@ -1,1 +1,189 @@
+<?php
+//============================================================+
+// File name   : example_030.php
+// Begin       : 2008-06-09
+// Last Update : 2010-08-08
+//
+// Description : Example 030 for TCPDF class
+//               Colour gradients
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Colour gradients
+ * @author Nicola Asuni
+ * @since 2008-06-09
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 030');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 030', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', 'B', 20);
+
+// --- first page ------------------------------------------
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Cell(0, 0, 'TCPDF Gradients', 0, 1, 'C', 0, '', 0, false, 'T', 'M');
+
+// set colors for gradients (r,g,b) or (grey 0-255)
+$red = array(255, 0, 0);
+$blue = array(0, 0, 200);
+$yellow = array(255, 255, 0);
+$green = array(0, 255, 0);
+$white = array(255);
+$black = array(0);
+
+// set the coordinates x1,y1,x2,y2 of the gradient (see linear_gradient_coords.jpg)
+$coords = array(0, 0, 1, 0);
+
+// paint a linear gradient
+$pdf->LinearGradient(20, 45, 80, 80, $red, $blue, $coords);
+
+// write label
+$pdf->Text(20, 130, 'LinearGradient()');
+
+// set the coordinates fx,fy,cx,cy,r of the gradient (see radial_gradient_coords.jpg)
+$coords = array(0.5, 0.5, 1, 1, 1.2);
+
+// paint a radial gradient
+$pdf->RadialGradient(110, 45, 80, 80, $white, $black, $coords);
+
+// write label
+$pdf->Text(110, 130, 'RadialGradient()');
+
+// paint a coons patch mesh with default coordinates
+$pdf->CoonsPatchMesh(20, 155, 80, 80, $yellow, $blue, $green, $red);
+
+// write label
+$pdf->Text(20, 240, 'CoonsPatchMesh()');
+

+$coords = array(
+	0.00,0.00, 0.33,0.20,             //lower left
+	0.67,0.00, 1.00,0.00, 0.80,0.33,  //lower right
+	0.80,0.67, 1.00,1.00, 0.67,0.80,  //upper right
+	0.33,1.00, 0.00,1.00, 0.20,0.67,  //upper left
+	0.00,0.33);                       //lower left
+$coords_min = 0;   //minimum value of the coordinates
+$coords_max = 1;   //maximum value of the coordinates
+
+// paint a coons patch gradient with the above coordinates
+$pdf->CoonsPatchMesh(110, 155, 80, 80, $yellow, $blue, $green, $red, $coords, $coords_min, $coords_max);
+
+// write label
+$pdf->Text(110, 240, 'CoonsPatchMesh()');
+
+// --- second page -----------------------------------------
+$pdf->AddPage();
+
+// first patch: f = 0
+$patch_array[0]['f'] = 0;
+$patch_array[0]['points'] = array(
+	0.00,0.00, 0.33,0.00,
+	0.67,0.00, 1.00,0.00, 1.00,0.33,
+	0.8,0.67, 1.00,1.00, 0.67,0.8,
+	0.33,1.80, 0.00,1.00, 0.00,0.67,
+	0.00,0.33);
+$patch_array[0]['colors'][0] = array('r' => 255, 'g' => 255, 'b' => 0);
+$patch_array[0]['colors'][1] = array('r' => 0, 'g' => 0, 'b' => 255);
+$patch_array[0]['colors'][2] = array('r' => 0, 'g' => 255,'b' => 0);
+$patch_array[0]['colors'][3] = array('r' => 255, 'g' => 0,'b' => 0);
+
+// second patch - above the other: f = 2
+$patch_array[1]['f'] = 2;
+$patch_array[1]['points'] = array(
+	0.00,1.33,
+	0.00,1.67, 0.00,2.00, 0.33,2.00,
+	0.67,2.00, 1.00,2.00, 1.00,1.67,
+	1.5,1.33);
+$patch_array[1]['colors'][0]=array('r' => 0, 'g' => 0, 'b' => 0);
+$patch_array[1]['colors'][1]=array('r' => 255, 'g' => 0, 'b' => 255);
+
+// third patch - right of the above: f = 3
+$patch_array[2]['f'] = 3;
+$patch_array[2]['points'] = array(
+	1.33,0.80,
+	1.67,1.50, 2.00,1.00, 2.00,1.33,
+	2.00,1.67, 2.00,2.00, 1.67,2.00,
+	1.33,2.00);
+$patch_array[2]['colors'][0] = array('r' => 0, 'g' => 255, 'b' => 255);
+$patch_array[2]['colors'][1] = array('r' => 0, 'g' => 0, 'b' => 0);
+
+// fourth patch - below the above, which means left(?) of the above: f = 1
+$patch_array[3]['f'] = 1;
+$patch_array[3]['points'] = array(
+	2.00,0.67,
+	2.00,0.33, 2.00,0.00, 1.67,0.00,
+	1.33,0.00, 1.00,0.00, 1.00,0.33,
+	0.8,0.67);
+$patch_array[3]['colors'][0] = array('r' => 0, 'g' => 0, 'b' => 0);
+$patch_array[3]['colors'][1] = array('r' => 0, 'g' => 0, 'b' => 255);
+
+$coords_min = 0;
+$coords_max = 2;
+
+$pdf->CoonsPatchMesh(10, 45, 190, 200, '', '', '', '', $patch_array, $coords_min, $coords_max);
+
+// write label
+$pdf->Text(10, 250, 'CoonsPatchMesh()');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_030.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_031.php
@@ -1,1 +1,104 @@
+<?php
+//============================================================+
+// File name   : example_031.php
+// Begin       : 2008-06-09
+// Last Update : 2010-08-08
+//
+// Description : Example 031 for TCPDF class
+//               Pie Chart
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Pie Chart
+ * @author Nicola Asuni
+ * @since 2008-06-09
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 031');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 031', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', 'B', 20);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of PieSector() method.');
+
+$xc = 105;
+$yc = 100;
+$r = 50;
+
+$pdf->SetFillColor(0, 0, 255);
+$pdf->PieSector($xc, $yc, $r, 20, 120, 'FD', false, 0, 2);
+
+$pdf->SetFillColor(0, 255, 0);
+$pdf->PieSector($xc, $yc, $r, 120, 250, 'FD', false, 0, 2);
+
+$pdf->SetFillColor(255, 0, 0);
+$pdf->PieSector($xc, $yc, $r, 250, 20, 'FD', false, 0, 2);
+
+// write labels
+$pdf->SetTextColor(255,255,255);
+$pdf->Text(105, 65, 'BLUE');
+$pdf->Text(60, 95, 'GREEN');
+$pdf->Text(120, 115, 'RED');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_031.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_032.php
@@ -1,1 +1,94 @@
+<?php
+//============================================================+
+// File name   : example_032.php
+// Begin       : 2008-06-09
+// Last Update : 2010-08-08
+//
+// Description : Example 032 for TCPDF class
+//               EPS/AI image
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: EPS/AI image
+ * @author Nicola Asuni
+ * @since 2008-06-09
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 032');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 032', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 12);
+
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of ImageEPS() method for AI and EPS images');
+
+$pdf->ImageEps($file='../images/tiger.ai', $x=10, $y=50, $w=190, $h=190, $link='', $useBoundingBox=true, $align='', $palign='', $border=0, $fitonpage=false);
+
+$pdf->AddPage();
+
+$pdf->ImageEps('../images/bug.eps', 0, 25, 0, 240, "http://www.tcpdf.org", true, 'T', 'C');
+
+$pdf->AddPage();
+
+$pdf->ImageEps('../images/pelican.ai', 15, 70, 180);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_032.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_033.php
@@ -1,1 +1,106 @@
+<?php
+//============================================================+
+// File name   : example_033.php
+// Begin       : 2008-06-24
+// Last Update : 2010-08-08
+//
+// Description : Example 033 for TCPDF class
+//               Mixed font types
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Mixed font types
+ * @author Nicola Asuni
+ * @since 2008-06-24
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 033');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 033', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// add a page
+$pdf->AddPage();
+
+// set default font subsetting mode
+$pdf->setFontSubsetting(false);
+
+$pdf->SetFont('helvetica', 'B', 20);
+
+$pdf->Write(0, 'Font Types', '', 0, 'C', 1, 0, false, false, 0);
+
+$pdf->Ln(10);
+
+$pdf->SetFont('times', '', 10);
+
+$pdf->MultiCell(80, 0, "[Core font] : Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis.\n", 1, 'J', 0, 1, '', '', true, 0);
+
+$pdf->Ln(2);
+
+$pdf->SetFont('dejavusans', '', 10);
+
+$pdf->MultiCell(80, 0, "[True Type Unicode font] : Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis.\n", 1, 'J', 0, 1, '', '', true, 0);
+
+$pdf->Ln(2);
+
+$pdf->SetFont('arialunicid0', '', 9);
+
+$pdf->MultiCell(80, 0, "[CID-0 font] : Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis.\n", 1, 'J', 0, 1, '', '', true, 0);
+
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_033.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_034.php
@@ -1,1 +1,97 @@
+<?php
+//============================================================+
+// File name   : example_034.php
+// Begin       : 2008-07-18
+// Last Update : 2010-08-08
+//
+// Description : Example 034 for TCPDF class
+//               Clipping
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Clipping
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 034');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 034', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', 'B', 20);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Image Clipping using geometric functions', '', 0, 'C', 1, 0, false, false, 0);
+
+//Start Graphic Transformation
+$pdf->StartTransform();
+
+// set clipping mask
+$pdf->StarPolygon(105, 100, 30, 10, 3, 0, 1, 'CNZ');
+
+// draw jpeg image to be clipped
+$pdf->Image('../images/image_demo.jpg', 75, 70, 60, 60, '', 'http://www.tcpdf.org', '', true, 72);
+
+//Stop Graphic Transformation
+$pdf->StopTransform();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_034.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_035.php
@@ -1,1 +1,112 @@
+<?php
+//============================================================+
+// File name   : example_035.php
+// Begin       : 2008-07-22
+// Last Update : 2010-08-08
+//
+// Description : Example 035 for TCPDF class
+//               Line styles with cells and multicells
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Line styles with cells and multicells
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 035');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 035', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', 'BI', 16);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of SetLineStyle() method', '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->Ln();
+
+$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 4, 'color' => array(255, 0, 0)));
+$pdf->SetFillColor(255,255,128);
+$pdf->SetTextColor(0,0,128);
+
+$text="DUMMY";
+
+$pdf->Cell(0, 0, $text, 1, 1, 'L', 1, 0);
+
+$pdf->Ln();
+
+$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 255)));
+$pdf->SetFillColor(255,255,0);
+$pdf->SetTextColor(0,0,255);
+$pdf->MultiCell(60, 4, $text, 1, 'C', 1, 0);
+
+$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 255, 0)));
+$pdf->SetFillColor(0,0,255);
+$pdf->SetTextColor(255,255,0);
+$pdf->MultiCell(60, 4, $text, 'TB', 'C', 1, 0);
+
+$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 255)));
+$pdf->SetFillColor(0,255,0);
+$pdf->SetTextColor(255,0,255);
+$pdf->MultiCell(60, 4, $text, 1, 'C', 1, 1);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_035.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_036.php
@@ -1,1 +1,90 @@
+<?php
+//============================================================+
+// File name   : example_036.php
+// Begin       : 2008-08-08
+// Last Update : 2010-08-08
+//
+// Description : Example 036 for TCPDF class
+//               Annotations
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Annotations
+ * @author Nicola Asuni
+ * @since 2008-08-08
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 036');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 036', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', '', 16);
+
+// add a page
+$pdf->AddPage();
+
+$txt = 'Example of Text Annotation.
+Move your mouse over the yellow box or double click on it to display the annotation text.';
+$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
+
+// text annotation
+$pdf->Annotation(83, 27, 10, 10, "Text annotation example\naccented letters test: àèéìòù", array('Subtype'=>'Text', 'Name' => 'Comment', 'T' => 'title example', 'Subj' => 'example', 'C' => array(255, 255, 0)));
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_036.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_037.php
@@ -1,1 +1,203 @@
-
+<?php
+//============================================================+
+// File name   : example_037.php
+// Begin       : 2008-09-12
+// Last Update : 2010-08-08
+//
+// Description : Example 037 for TCPDF class
+//               Spot 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
+//============================================================+
+
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Spot colors.
+ * @author Nicola Asuni
+ * @since 2008-09-12
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 037');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 037', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 20);
+
+// add a page
+$pdf->AddPage();
+
+
+$pdf->Write(0, 'Example of Spot Colors', '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->Ln(5);
+
+$pdf->SetFont('helvetica', '', 8);
+
+// Define some new spot colors
+// $c, $m, $y and $k (2nd, 3rd, 4th and 5th parameter) are the CMYK color components.
+// AddSpotColor($name, $c, $m, $y, $k)
+$pdf->AddSpotColor('Pantone 116 C', 0, 20, 100, 0);
+$pdf->AddSpotColor('HKS 16 K', 30, 100, 90, 10);
+$pdf->AddSpotColor('Pantone 505 C', 57, 100, 85, 55);
+$pdf->AddSpotColor('Pantone 440 C', 50, 60, 80, 70);
+$pdf->AddSpotColor('Pantone 288 C', 100, 60, 10, 5);
+$pdf->AddSpotColor('Pantone 289 C', 100, 78, 50, 0);
+$pdf->AddSpotColor('Pantone 356 C', 100, 30, 100, 0);
+$pdf->AddSpotColor('Pantone 567 C', 100, 50, 80, 45);
+$pdf->AddSpotColor('Pantone 9060 C', 0, 0, 7, 0);
+$pdf->AddSpotColor('Pantone 420 C', 22, 14, 22, 0);
+$pdf->AddSpotColor('Pantone 422 C', 39, 24, 34, 0);
+$pdf->AddSpotColor('Pantone 433 C', 34, 0, 0, 94);
+$pdf->AddSpotColor('NovaSpace-Black', 50, 0, 0, 100);
+$pdf->AddSpotColor('Pantone 601 C', 0, 0, 55, 0);
+$pdf->AddSpotColor('Pantone 659 C', 50, 20, 0, 10);
+
+// Select the spot color
+// $tint (the second parameter) is the intensity of the color (0-100).
+// SetTextSpotColor($name, $tint=100)
+// SetDrawSpotColor($name, $tint=100)
+// SetFillSpotColor($name, $tint=100)
+
+$pdf->SetTextSpotColor('NovaSpace-Black', 100);
+$pdf->SetDrawSpotColor('NovaSpace-Black', 100);
+
+$starty = 50;
+
+// print some spot colors
+$pdf->SetFillSpotColor('Pantone 116 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 116 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('HKS 16 K', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'HKS 16 K');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 505 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 505 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 440 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 440 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 288 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 288 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 289 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 289 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 356 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 356 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 567 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 567 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 9060 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 9060 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 420 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 420 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 422 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 422 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 433 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 433 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 601 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 601 C');
+
+$starty += 8;
+
+$pdf->SetFillSpotColor('Pantone 659 C', 100);
+$pdf->Rect(30, $starty, 20, 6, 'DF');
+$pdf->Text(53, $starty + 1, 'Pantone 659 C');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_037.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_038.php
@@ -1,1 +1,88 @@
+<?php
+//============================================================+
+// File name   : example_038.php
+// Begin       : 2008-09-15
+// Last Update : 2010-08-08
+//
+// Description : Example 038 for TCPDF class
+//               CID-0 CJK unembedded font
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: CID-0 CJK unembedded font
+ * @author Nicola Asuni
+ * @since 2008-09-15
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 038');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 038', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('arialunicid0', '', 20);
+
+// add a page
+$pdf->AddPage();
+
+$txt = 'Example of CID-0 CJK unembedded font.
+To display extended text you must have CJK fonts for your PDF reader: こんにちは世界';
+
+$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_038.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_039.php
@@ -1,1 +1,105 @@
+<?php
+//============================================================+
+// File name   : example_039.php
+// Begin       : 2008-10-16
+// Last Update : 2010-08-08
+//
+// Description : Example 039 for TCPDF class
+//               HTML justification
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: HTML justification
+ * @author Nicola Asuni
+ * @since 2008-10-18
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 039');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 039', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// add a page
+$pdf->AddPage();
+
+// set font
+$pdf->SetFont('helvetica', 'B', 20);
+
+$pdf->Write(0, 'Example of HTML Justification', '', 0, 'L', true, 0, false, false, 0);
+
+// create some HTML content
+$html = '<span style="text-align:justify;">a <u>abc</u> abcdefghijkl abcdef abcdefg <b>abcdefghi</b> a abc abcd <img src="../images/logo_example.png" border="0" height="41" width="41" /> <img src="../images/tiger.ai" alt="test alt attribute" width="100" height="100" border="0" /> abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a <u>abc</u> abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg abcdefghi a abc abcd <a href="http://tcpdf.org">abcdef abcdefg</a> start a abc before <span style="background-color:yellow">yellow color</span> after a abc abcd abcdef abcdefg abcdefghi a abc abcd end abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi<br />abcd abcdef abcdefg abcdefghi<br />abcd abcde abcdef</span>';
+
+// set core font
+$pdf->SetFont('helvetica', '', 10);
+
+// output the HTML content
+$pdf->writeHTML($html, true, 0, true, true);
+
+$pdf->Ln();
+
+// set UTF-8 Unicode font
+$pdf->SetFont('dejavusans', '', 10);
+
+// output the HTML content
+$pdf->writeHTML($html, true, 0, true, true);
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_039.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_040.php
@@ -1,1 +1,117 @@
+<?php
+//============================================================+
+// File name   : example_040.php
+// Begin       : 2008-10-28
+// Last Update : 2010-08-31
+//
+// Description : Example 040 for TCPDF class
+//               Booklet mode (double-sided pages)
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Booklet mode (double-sided pages)
+ * @author Nicola Asuni
+ * @since 2008-10-28
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 040');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 040', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set display mode
+$pdf->SetDisplayMode($zoom='fullpage', $layout='TwoColumnRight', $mode='UseNone');
+
+// set pdf viewer preferences
+$pdf->setViewerPreferences(array('Duplex' => 'DuplexFlipLongEdge'));
+
+// set booklet mode
+$pdf->SetBooklet(true, 10, 30);
+
+// set core font
+$pdf->SetFont('helvetica', '', 18);
+
+// add a page (left page)
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of booklet mode', '', 0, 'L', true, 0, false, false, 0);
+
+// print a line using Cell()
+$pdf->Cell(0, 0, 'PAGE 1', 1, 1, 'C');
+
+
+// add a page (right page)
+$pdf->AddPage();
+
+// print a line using Cell()
+$pdf->Cell(0, 0, 'PAGE 2', 1, 1, 'C');
+
+
+// add a page (left page)
+$pdf->AddPage();
+
+// print a line using Cell()
+$pdf->Cell(0, 0, 'PAGE 3', 1, 1, 'C');
+
+// add a page (right page)
+$pdf->AddPage();
+
+// print a line using Cell()
+$pdf->Cell(0, 0, 'PAGE 4', 1, 1, 'C');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_040.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_041.php
@@ -1,1 +1,91 @@
+<?php
+//============================================================+
+// File name   : example_041.php
+// Begin       : 2008-12-07
+// Last Update : 2010-08-08
+//
+// Description : Example 041 for TCPDF class
+//               Annotation - FileAttachment
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Annotation - FileAttachment
+ * @author Nicola Asuni
+ * @since 2008-12-07
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 041');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 041', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', '', 16);
+
+// add a page
+$pdf->AddPage();
+
+
+$txt = 'Example of File Attachment.
+Double click on the icon to open the attached file.';
+$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
+
+// attach an external file
+$pdf->Annotation(85, 27, 5, 5, 'text file', array('Subtype'=>'FileAttachment', 'Name' => 'PushPin', 'FS' => '../cache/utf8test.txt'));
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_041.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_042.php
@@ -1,1 +1,103 @@
+<?php
+//============================================================+
+// File name   : example_042.php
+// Begin       : 2008-12-23
+// Last Update : 2010-08-08
+//
+// Description : Example 042 for TCPDF class
+//               Test Image with alpha channel
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Test Image with alpha channel
+ * @author Nicola Asuni
+ * @since 2008-12-23
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 042');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 042', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set JPEG quality
+//$pdf->setJPEGQuality(75);
+
+$pdf->SetFont('helvetica', '', 18);
+
+// add a page
+$pdf->AddPage();
+
+// create background text
+$background_text = str_repeat('TCPDF test PNG Alpha Channel ', 50);
+$pdf->MultiCell(0, 5, $background_text, 0, 'J', 0, 2, '', '', true, 0, false);
+
+// --- Method (A) ------------------------------------------
+// the Image() method recognizes the alpha channel embedded on the image:
+
+$pdf->Image('../images/image_with_alpha.png', 50, 50, 100, '', '', 'http://www.tcpdf.org', '', false, 300);
+
+// --- Method (B) ------------------------------------------
+// provide image + separate 8-bit mask
+
+// first embed mask image (w, h, x and y will be ignored, the image will be scaled to the target image's size)
+$mask = $pdf->Image('../images/alpha.png', 50, 140, 100, '', '', '', '', false, 300, '', true);
+
+// embed image, masked with previously embedded mask
+$pdf->Image('../images/img.png', 50, 140, 100, '', '', 'http://www.tcpdf.org', '', false, 300, '', false, $mask);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_042.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_043.php
@@ -1,1 +1,86 @@
+<?php
+//============================================================+
+// File name   : example_043.php
+// Begin       : 2009-01-02
+// Last Update : 2010-08-08
+//
+// Description : Example 043 for TCPDF class
+//               Disk caching
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Disk caching
+ * @author Nicola Asuni
+ * @since 2009-01-02
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', true);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 043');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 043', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 16);
+
+// add a page
+$pdf->AddPage();
+
+// Multicell test
+$pdf->MultiCell(0, 0, 'DISK CACHING TEST: check the parameters of the class constructor.', 1, 'L', 0, 0, '', '', true);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_043.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_044.php
@@ -1,1 +1,129 @@
+<?php
+//============================================================+
+// File name   : example_044.php
+// Begin       : 2009-01-02
+// Last Update : 2010-08-08
+//
+// Description : Example 044 for TCPDF class
+//               Move, copy and delete pages
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Move, copy and delete pages
+ * @author Nicola Asuni
+ * @since 2009-01-02
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 044');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 044', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', 'B', 40);
+
+// print a line using Cell()
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'PAGE: A', 0, 1, 'L');
+
+// add some vertical space
+$pdf->Ln(10);
+
+// print some text
+$pdf->SetFont('times', 'I', 16);
+$txt = 'TCPDF allows you to Copy, Move and Delete pages.';
+$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->SetFont('helvetica', 'B', 40);
+
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'PAGE: B', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'PAGE: D', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'PAGE: E', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'PAGE: E-2', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'PAGE: F', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'PAGE: C', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'PAGE: G', 0, 1, 'L');
+
+// Move page 7 to page 3
+$pdf->movePage(7, 3);
+
+// Delete page 6
+$pdf->deletePage(6);
+
+$pdf->AddPage();
+$pdf->Cell(0, 10, 'PAGE: H', 0, 1, 'L');
+
+// copy the second page
+$pdf->copyPage(2);
+
+// NOTE: to insert a page to a previous position, you can add a new page to the end of document and then move it using movePage().
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_044.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_045.php
@@ -1,1 +1,131 @@
+<?php
+//============================================================+
+// File name   : example_045.php
+// Begin       : 2008-03-04
+// Last Update : 2010-08-08
+//
+// Description : Example 045 for TCPDF class
+//               Bookmarks and Table of Content
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Bookmarks and Table of Content
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 045');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 045', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', 'B', 20);
+
+// add a page
+$pdf->AddPage();
+
+// set a bookmark for the current position
+$pdf->Bookmark('Chapter 1', 0, 0);
+
+// print a line using Cell()
+$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Paragraph 1.1', 1, 0);
+$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Paragraph 1.2', 1, 0);
+$pdf->Cell(0, 10, 'Paragraph 1.2', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0);
+$pdf->Cell(0, 10, 'Sub-Paragraph 1.2.1', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Paragraph 1.3', 1, 0);
+$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L');
+
+// add some pages and bookmarks
+for ($i = 2; $i < 12; $i++) {
+	$pdf->AddPage();
+	$pdf->Bookmark('Chapter '.$i, 0, 0);
+	$pdf->Cell(0, 10, 'Chapter '.$i, 0, 1, 'L');
+}
+
+// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+
+// add a new page for TOC
+$pdf->addTOCPage();
+
+// write the TOC title
+$pdf->SetFont('times', 'B', 16);
+$pdf->MultiCell(0, 0, 'Table Of Content', 0, 'C', 0, 1, '', '', true, 0);
+$pdf->Ln();
+
+$pdf->SetFont('dejavusans', '', 12);
+
+// add a simple Table Of Content at first page
+// (check the example n. 59 for the HTML version)
+$pdf->addTOC(1, 'courier', '.', 'INDEX');
+
+// end of TOC page
+$pdf->endTOCPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_045.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_046.php
@@ -1,1 +1,124 @@
+<?php
+//============================================================+
+// File name   : example_046.php
+// Begin       : 2009-02-28
+// Last Update : 2010-08-08
+//
+// Description : Example 046 for TCPDF class
+//               Text Hyphenation
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: text Hyphenation
+ * @author Nicola Asuni
+ * @since 2009-02-28
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 046');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 046', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', 'B', 20);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of Text Hyphenation', '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->Ln(10);
+
+/*
+Unicode Data for SHY:
+	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)
+*/
+
+/*
+// You can autmatically add SOFT HYPHENS to your text using
+// the hyphenateText() method, but this requires either an
+// hyphenation pattern array of a hyphenation pattern TEX file.
+// You can download hyphenation TEX patterns from:
+// http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/
+
+// EXAMPLE:
+
+$html = 'On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.';
+
+$hyphen_patterns = $pdf->getHyphenPatternsFromTEX('../hyphens/hyph-en-gb.tex');
+
+$html = $pdf->hyphenateText($html, $hyphen_patterns, $dictionary=array(), $leftmin=1, $rightmin=2, $charmin=1, $charmax=8);
+*/
+
+
+// HTML text with soft hyphens (&shy;)
+$html = 'On the other hand, we de&shy;nounce with righ&shy;teous in&shy;dig&shy;na&shy;tion and dis&shy;like men who are so be&shy;guiled and de&shy;mo&shy;r&shy;al&shy;ized by the charms of plea&shy;sure of the mo&shy;ment, so blind&shy;ed by de&shy;sire, that they can&shy;not fore&shy;see the pain and trou&shy;ble that are bound to en&shy;sue; and equal blame be&shy;longs to those who fail in their du&shy;ty through weak&shy;ness of will, which is the same as say&shy;ing through shrink&shy;ing from toil and pain. Th&shy;ese cas&shy;es are per&shy;fect&shy;ly sim&shy;ple and easy to distin&shy;guish. In a free hour, when our pow&shy;er of choice is un&shy;tram&shy;melled and when noth&shy;ing pre&shy;vents our be&shy;ing able to do what we like best, ev&shy;ery plea&shy;sure is to be wel&shy;comed and ev&shy;ery pain avoid&shy;ed. But in cer&shy;tain cir&shy;cum&shy;s&shy;tances and ow&shy;ing to the claims of du&shy;ty or the obli&shy;ga&shy;tions of busi&shy;ness it will fre&shy;quent&shy;ly oc&shy;cur that plea&shy;sures have to be re&shy;pu&shy;di&shy;at&shy;ed and an&shy;noy&shy;ances ac&shy;cept&shy;ed. The wise man there&shy;fore al&shy;ways holds in th&shy;ese mat&shy;ters to this prin&shy;ci&shy;ple of se&shy;lec&shy;tion: he re&shy;jects plea&shy;sures to se&shy;cure other greater plea&shy;sures, or else he en&shy;dures pains to avoid worse pains.';
+
+$pdf->SetFont('times', '', 10);
+$pdf->SetDrawColor(255,0,0);
+$pdf->SetTextColor(0,63,127);
+
+// print a cell
+$pdf->writeHTMLCell(50, 0, '', '', $html, 1, 1, 0, true, 'J');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_046.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_047.php
@@ -1,1 +1,118 @@
+<?php
+//============================================================+
+// File name   : example_047.php
+// Begin       : 2009-03-19
+// Last Update : 2010-08-08
+//
+// Description : Example 047 for TCPDF class
+//               Transactions
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Transactions
+ * @author Nicola Asuni
+ * @since 2009-03-19
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 047');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 047', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 16);
+
+// add a page
+$pdf->AddPage();
+
+$txt = 'Example of Transactions.
+TCPDF allows you to undo some operations using the Transactions.
+Check the source code for further information.';
+$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->Ln(5);
+
+$pdf->SetFont('times', '', 12);
+
+// start transaction
+$pdf->startTransaction();
+
+$pdf->Write(0, "LINE 1\n");
+$pdf->Write(0, "LINE 2\n");
+
+// restarts transaction
+$pdf->startTransaction();
+
+$pdf->Write(0, "LINE 3\n");
+$pdf->Write(0, "LINE 4\n");
+
+// rolls back to the last (re)start
+$pdf = $pdf->rollbackTransaction();
+
+$pdf->Write(0, "LINE 5\n");
+$pdf->Write(0, "LINE 6\n");
+
+// start transaction
+$pdf->startTransaction();
+
+$pdf->Write(0, "LINE 7\n");
+
+// commit transaction (actually just frees memory)
+$pdf->commitTransaction(); 
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_047.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_048.php
@@ -1,1 +1,314 @@
-
+<?php
+//============================================================+
+// File name   : example_048.php
+// Begin       : 2009-03-20
+// Last Update : 2010-08-08
+//
+// Description : Example 048 for TCPDF class
+//               HTML tables and table headers
+//
+// 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
+//============================================================+
+
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: HTML tables and table headers
+ * @author Nicola Asuni
+ * @since 2009-03-20
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 048');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 048', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', 'B', 20);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of HTML tables', '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->SetFont('helvetica', '', 8);
+
+// -----------------------------------------------------------------------------
+
+$tbl = <<<EOD
+<table cellspacing="0" cellpadding="1" border="1">
+    <tr>
+        <td rowspan="3">COL 1 - ROW 1<br />COLSPAN 3</td>
+        <td>COL 2 - ROW 1</td>
+        <td>COL 3 - ROW 1</td>
+    </tr>
+    <tr>
+    	<td rowspan="2">COL 2 - ROW 2 - COLSPAN 2<br />text line<br />text line<br />text line<br />text line</td>
+    	<td>COL 3 - ROW 2</td>
+    </tr>
+    <tr>
+       <td>COL 3 - ROW 3</td>
+    </tr>
+  
+</table>
+EOD;
+
+$pdf->writeHTML($tbl, true, false, false, false, '');
+
+// -----------------------------------------------------------------------------
+
+$tbl = <<<EOD
+<table cellspacing="0" cellpadding="1" border="1">
+    <tr>
+        <td rowspan="3">COL 1 - ROW 1<br />COLSPAN 3<br />text line<br />text line<br />text line<br />text line<br />text line<br />text line</td>
+        <td>COL 2 - ROW 1</td>
+        <td>COL 3 - ROW 1</td>
+    </tr>
+    <tr>
+    	<td rowspan="2">COL 2 - ROW 2 - COLSPAN 2<br />text line<br />text line<br />text line<br />text line</td>
+    	 <td>COL 3 - ROW 2</td>
+    </tr>
+    <tr>
+       <td>COL 3 - ROW 3</td>
+    </tr>
+  
+</table>
+EOD;
+
+$pdf->writeHTML($tbl, true, false, false, false, '');
+
+// -----------------------------------------------------------------------------
+
+$tbl = <<<EOD
+<table cellspacing="0" cellpadding="1" border="1">
+    <tr>
+        <td rowspan="3">COL 1 - ROW 1<br />COLSPAN 3<br />text line<br />text line<br />text line<br />text line<br />text line<br />text line</td>
+        <td>COL 2 - ROW 1</td>
+        <td>COL 3 - ROW 1</td>
+    </tr>
+    <tr>
+    	<td rowspan="2">COL 2 - ROW 2 - COLSPAN 2<br />text line<br />text line<br />text line<br />text line</td>
+    	 <td>COL 3 - ROW 2<br />text line<br />text line</td>
+    </tr>
+    <tr>
+       <td>COL 3 - ROW 3</td>
+    </tr>
+  
+</table>
+EOD;
+
+$pdf->writeHTML($tbl, true, false, false, false, '');
+
+// -----------------------------------------------------------------------------
+
+$tbl = <<<EOD
+<table border="1">
+<tr>
+<th rowspan="3">Left column</th>
+<th colspan="5">Heading Column Span 5</th>
+<th colspan="9">Heading Column Span 9</th>
+</tr>
+<tr>
+<th rowspan="2">Rowspan 2<br />This is some text that fills the table cell.</th>
+<th colspan="2">span 2</th>
+<th colspan="2">span 2</th>
+<th rowspan="2">2 rows</th>
+<th colspan="8">Colspan 8</th>
+</tr>
+<tr>
+<th>1a</th>
+<th>2a</th>
+<th>1b</th>
+<th>2b</th>
+<th>1</th>
+<th>2</th>
+<th>3</th>
+<th>4</th>
+<th>5</th>
+<th>6</th>
+<th>7</th>
+<th>8</th>
+</tr>
+</table>
+EOD;
+
+$pdf->writeHTML($tbl, true, false, false, false, '');
+
+// -----------------------------------------------------------------------------
+
+// Table with rowspans and THEAD
+$tbl = <<<EOD
+<table border="1" cellpadding="2" cellspacing="2">
+<thead>
+ <tr style="background-color:#FFFF00;color:#0000FF;">
+  <td width="30" align="center"><b>A</b></td>
+  <td width="140" align="center"><b>XXXX</b></td>
+  <td width="140" align="center"><b>XXXX</b></td>
+  <td width="80" align="center"> <b>XXXX</b></td>
+  <td width="80" align="center"><b>XXXX</b></td>
+  <td width="45" align="center"><b>XXXX</b></td>
+ </tr>
+ <tr style="background-color:#FF0000;color:#FFFF00;">
+  <td width="30" align="center"><b>B</b></td>
+  <td width="140" align="center"><b>XXXX</b></td>
+  <td width="140" align="center"><b>XXXX</b></td>
+  <td width="80" align="center"> <b>XXXX</b></td>
+  <td width="80" align="center"><b>XXXX</b></td>
+  <td width="45" align="center"><b>XXXX</b></td>
+ </tr>
+</thead>
+ <tr>
+  <td width="30" align="center">1.</td>
+  <td width="140" rowspan="6">XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX</td>
+  <td width="140">XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td width="80">XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+ <tr>
+  <td width="30" align="center" rowspan="3">2.</td>
+  <td width="140" rowspan="3">XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+ <tr>
+  <td width="80">XXXX<br />XXXX<br />XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+ <tr>
+  <td width="80" rowspan="2" >RRRRRR<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+ <tr>
+  <td width="30" align="center">3.</td>
+  <td width="140">XXXX1<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+ <tr>
+  <td width="30" align="center">4.</td>
+  <td width="140">XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+</table>
+EOD;
+
+$pdf->writeHTML($tbl, true, false, false, false, '');
+
+$pdf->writeHTML($tbl, true, false, false, false, '');
+
+// -----------------------------------------------------------------------------
+
+// NON-BREAKING TABLE (nobr="true")
+
+$tbl = <<<EOD
+<table border="1" cellpadding="2" cellspacing="2" nobr="true">
+ <tr>
+  <th colspan="3" align="center">NON-BREAKING TABLE</th>
+ </tr>
+ <tr>
+  <td>1-1</td>
+  <td>1-2</td>
+  <td>1-3</td>
+ </tr>
+ <tr>
+  <td>2-1</td>
+  <td>3-2</td>
+  <td>3-3</td>
+ </tr>
+ <tr>
+  <td>3-1</td>
+  <td>3-2</td>
+  <td>3-3</td>
+ </tr>
+</table>
+EOD;
+
+$pdf->writeHTML($tbl, true, false, false, false, '');
+
+// -----------------------------------------------------------------------------
+
+// NON-BREAKING ROWS (nobr="true")
+
+$tbl = <<<EOD
+<table border="1" cellpadding="2" cellspacing="2" align="center">
+ <tr nobr="true">
+  <th colspan="3">NON-BREAKING ROWS</th>
+ </tr>
+ <tr nobr="true">
+  <td>ROW 1<br />COLUMN 1</td>
+  <td>ROW 1<br />COLUMN 2</td>
+  <td>ROW 1<br />COLUMN 3</td>
+ </tr>
+ <tr nobr="true">
+  <td>ROW 2<br />COLUMN 1</td>
+  <td>ROW 2<br />COLUMN 2</td>
+  <td>ROW 2<br />COLUMN 3</td>
+ </tr>
+ <tr nobr="true">
+  <td>ROW 3<br />COLUMN 1</td>
+  <td>ROW 3<br />COLUMN 2</td>
+  <td>ROW 3<br />COLUMN 3</td>
+ </tr>
+</table>
+EOD;
+
+$pdf->writeHTML($tbl, true, false, false, false, '');
+
+// -----------------------------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_048.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_049.php
@@ -1,1 +1,127 @@
+<?php
+//============================================================+
+// File name   : example_049.php
+// Begin       : 2009-04-03
+// Last Update : 2010-08-08
+//
+// Description : Example 049 for TCPDF class
+//               WriteHTML with TCPDF callback functions
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: WriteHTML with TCPDF callback functions
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 049');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 049', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 10);
+
+// add a page
+$pdf->AddPage();
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+IMPORTANT:
+If you are printing user-generated content, tcpdf tag can be unsafe.
+You can disable this tag by setting to false the K_TCPDF_CALLS_IN_HTML
+constant on TCPDF configuration file.
+
+For security reasons, the parameters for the 'params' attribute of TCPDF 
+tag must be prepared as an array and encoded with the 
+serializeTCPDFtagParameters() method (see the example below).
+
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+$html = '<h1>Test TCPDF Methods in HTML</h1>
+<h2 style="color:red;">IMPORTANT:</h2>
+<span style="color:red;">If you are printing user-generated content, tcpdf tag can be unsafe.<br />
+You can disable this tag by setting to false the <b>K_TCPDF_CALLS_IN_HTML</b> constant on TCPDF configuration file.</span>
+<h2>write1DBarcode method in HTML</h2>';
+
+$params = $pdf->serializeTCPDFtagParameters(array('CODE 39', 'C39', '', '', 80, 30, 0.4, array('position'=>'S', 'border'=>true, 'padding'=>4, 'fgcolor'=>array(0,0,0), 'bgcolor'=>array(255,255,255), 'text'=>true, 'font'=>'helvetica', 'fontsize'=>8, 'stretchtext'=>4), 'N'));
+$html .= '<tcpdf method="write1DBarcode" params="'.$params.'" />';
+
+$params = $pdf->serializeTCPDFtagParameters(array('CODE 128C+', 'C128C', '', '', 80, 30, 0.4, array('position'=>'S', 'border'=>true, 'padding'=>4, 'fgcolor'=>array(0,0,0), 'bgcolor'=>array(255,255,255), 'text'=>true, 'font'=>'helvetica', 'fontsize'=>8, 'stretchtext'=>4), 'N'));
+$html .= '<tcpdf method="write1DBarcode" params="'.$params.'" />';
+
+$html .= '<tcpdf method="AddPage" /><h2>Graphic Functions</h2>';
+
+$params = $pdf->serializeTCPDFtagParameters(array(0));
+$html .= '<tcpdf method="SetDrawColor" params="'.$params.'" />';
+
+$params = $pdf->serializeTCPDFtagParameters(array(50, 50, 40, 10, 'DF', array(), array(0,128,255)));
+$html .= '<tcpdf method="Rect" params="'.$params.'" />';
+
+
+// output the HTML content
+$pdf->writeHTML($html, true, 0, true, 0);
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_049.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_050.php
@@ -1,1 +1,206 @@
-
+<?php
+//============================================================+
+// File name   : example_050.php
+// Begin       : 2009-04-09
+// Last Update : 2010-08-08
+//
+// Description : Example 050 for TCPDF class
+//               2D Barcodes
+//
+// 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
+//============================================================+
+
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: 2D barcodes.
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 050');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 050', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
+
+// set font
+$pdf->SetFont('helvetica', '', 10);
+
+// add a page
+$pdf->AddPage();
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// set style for barcode
+$style = array(
+	'border' => true,
+	'vpadding' => 'auto',
+	'hpadding' => 'auto',
+	'fgcolor' => array(0,0,0),
+	'bgcolor' => false, //array(255,255,255)
+	'module_width' => 1, // width of a single module in points
+	'module_height' => 1 // height of a single module in points
+);
+
+// write RAW 2D Barcode
+$pdf->SetXY(30, 30);
+$code = '111011101110111,010010001000010,010011001110010,010010000010010,010011101110010';
+$pdf->write2DBarcode($code, 'RAW', '', '', 30, 20, $style, 'N');
+
+$pdf->SetXY(100, 30);
+// write RAW2 2D Barcode
+$code = '[111011101110111][010010001000010][010011001110010][010010000010010][010011101110010]';
+$pdf->write2DBarcode($code, 'RAW2', '', '', 30, 20, $style, 'N');
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// set style for barcode
+$style = array(
+	'border' => 2,
+	'vpadding' => 'auto',
+	'hpadding' => 'auto',
+	'fgcolor' => array(0,0,0),
+	'bgcolor' => false, //array(255,255,255)
+	'module_width' => 1, // width of a single module in points
+	'module_height' => 1 // height of a single module in points
+);
+
+// QRCODE,L : QR-CODE Low error correction
+$pdf->SetXY(30, 60);
+$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,L', '', '', 50, 50, $style, 'N');
+$pdf->Text(30, 55, 'QRCODE L');
+
+// QRCODE,M : QR-CODE Medium error correction
+$pdf->SetXY(100, 60);
+$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,M', '', '', 50, 50, $style, 'N');
+$pdf->Text(100, 55, 'QRCODE M');
+
+// QRCODE,Q : QR-CODE Better error correction
+$pdf->SetXY(30, 120);
+$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,Q', '', '', 50, 50, $style, 'N');
+$pdf->Text(30, 115, 'QRCODE Q');
+
+
+// QRCODE,H : QR-CODE Best error correction
+$pdf->SetXY(100, 120);
+$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,H', '', '', 50, 50, $style, 'N');
+$pdf->Text(100, 115, 'QRCODE H');
+
+// -------------------------------------------------------------------
+// PDF417 (ISO/IEC 15438:2006)
+
+/*
+
+ The $type parameter can be simple 'PDF417' or 'PDF417' followed by a 
+ number of comma-separated options:
+ 
+ 'PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6'
+ 
+ Possible options are:
+ 
+ 	a  = aspect ratio (width/height);
+ 	e  = error correction level (0-8);
+ 	
+ 	Macro Control Block options:
+ 	
+ 	t  = total number of macro segments;
+ 	s  = macro segment index (0-99998);
+ 	f  = file ID;
+ 	o0 = File Name (text);
+ 	o1 = Segment Count (numeric);
+ 	o2 = Time Stamp (numeric);
+ 	o3 = Sender (text);
+ 	o4 = Addressee (text);
+ 	o5 = File Size (numeric);
+ 	o6 = Checksum (numeric).
+ 
+ Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional.
+ To use a comma character ',' on text options, replace it with the character 255: "\xff".
+
+*/
+
+$pdf->SetXY(30, 180);
+$pdf->write2DBarcode('www.tcpdf.org', 'PDF417', '', '', 0, 30, $style, 'N');
+$pdf->Text(30, 175, 'PDF417 (ISO/IEC 15438:2006)');
+
+// -------------------------------------------------------------------
+// new style
+$style = array(
+	'border' => 2,
+	'padding' => 'auto',
+	'fgcolor' => array(0,0,255),
+	'bgcolor' => array(255,255,64)
+);
+
+// QRCODE,H : QR-CODE Best error correction
+$pdf->SetXY(30, 220);
+$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,H', '', '', 50, 50, $style, 'N');
+$pdf->Text(30, 215, 'QRCODE H - COLORED');
+
+// new style
+$style = array(
+	'border' => false,
+	'padding' => 0,
+	'fgcolor' => array(128,0,0),
+	'bgcolor' => false
+);
+
+// QRCODE,H : QR-CODE Best error correction
+$pdf->SetXY(100, 220);
+$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,H', '', '', 50, 50, $style, 'N');
+$pdf->Text(100, 215, 'QRCODE H - NO PADDING');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_050.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_051.php
@@ -1,1 +1,112 @@
+<?php
+//============================================================+
+// File name   : example_051.php
+// Begin       : 2009-04-16
+// Last Update : 2010-08-08
+//
+// Description : Example 051 for TCPDF class
+//               Full page background
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Full page background
+ * @author Nicola Asuni
+ * @since 2009-04-16
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+
+// Extend the TCPDF class to create custom Header and Footer
+class MYPDF extends TCPDF {
+	//Page header
+	public function Header() {
+		// full background image
+		// store current auto-page-break status
+		$bMargin = $this->getBreakMargin();
+		$auto_page_break = $this->AutoPageBreak;
+		$this->SetAutoPageBreak(false, 0);
+		$img_file = K_PATH_IMAGES.'image_demo.jpg';
+		$this->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0);
+		// restore auto-page-break status
+		$this->SetAutoPageBreak($auto_page_break, $bMargin);
+	}
+}
+
+// create new PDF document
+$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 051');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(0);
+$pdf->SetFooterMargin(0);
+
+// remove default footer
+$pdf->setPrintFooter(false);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', '', 48);
+
+// add a page
+$pdf->AddPage();
+
+// Print a text
+$html = '<span style="background-color:yellow;color:blue;">&nbsp;PAGE 1&nbsp;</span>
+<p stroke="0.2" fill="true" strokecolor="yellow" color="blue" style="font-family:helvetica;font-weight:bold;font-size:26pt;">You can set a full page background.</p>';
+$pdf->writeHTML($html, true, false, true, false, '');
+
+
+// add a page
+$pdf->AddPage();
+
+// Print a text
+$html = '<span style="background-color:yellow;color:blue;">&nbsp;PAGE 2&nbsp;</span>';
+$pdf->writeHTML($html, true, false, true, false, '');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_051.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_052.php
@@ -1,1 +1,116 @@
+<?php
+//============================================================+
+// File name   : example_052.php
+// Begin       : 2009-05-07
+// Last Update : 2010-08-08
+//
+// Description : Example 052 for TCPDF class
+//               Certification Signature (experimental)
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Certification Signature (experimental)
+ * @author Nicola Asuni
+ * @since 2009-05-07
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 052');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 052', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+/*
+NOTES:
+ - To create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt
+ - To export crt to p12: openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12
+ - To convert pfx certificate to pem: openssl pkcs12 -in tcpdf.pfx -out tcpdf.crt -nodes
+*/
+
+// set certificate file
+$certificate = 'file://../tcpdf.crt';
+
+// set additional information
+$info = array(
+	'Name' => 'TCPDF',
+	'Location' => 'Office',
+	'Reason' => 'Testing TCPDF',
+	'ContactInfo' => 'http://www.tcpdf.org',
+	);
+
+// set document signature
+$pdf->setSignature($certificate, $certificate, 'tcpdfdemo', '', 2, $info);
+
+// set font
+$pdf->SetFont('helvetica', '', 12);
+
+// add a page
+$pdf->AddPage();
+
+// print a line of text
+$text = 'This is a <b color="#FF0000">digitally signed document</b> using the default (example) <b>tcpdf.crt</b> certificate.<br />To validate this signature you have to load the <b color="#006600">tcpdf.fdf</b> on the Arobat Reader to add the certificate to <i>List of Trusted Identities</i>.<br /><br />For more information check the source code of this example and the source code documentation for the <i>setSignature()</i> method.<br /><br /><a href="http://www.tcpdf.org">www.tcpdf.org</a>';
+$pdf->writeHTML($text, true, 0, true, 0);
+
+
+// *** set signature appearance ***
+
+// create content for signature (image and/or text)
+$pdf->Image($file='../images/tcpdf_signature.png', $x=180, $y=60, $w=15, $h=15, $type='PNG');
+// define active area for signature appearance
+$pdf->setSignatureAppearance($x=180, $y=60, $w=15, $h=15);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_052.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_053.php
@@ -1,1 +1,109 @@
+<?php
+//============================================================+
+// File name   : example_053.php
+// Begin       : 2009-09-02
+// Last Update : 2010-08-08
+//
+// Description : Example 053 for TCPDF class
+//               Javascript example.
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Javascript example.
+ * @author Nicola Asuni
+ * @since 2009-09-02
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 053');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 053', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('times', '', 14);
+
+// add a page
+$pdf->AddPage();
+
+// print a some of text
+$text = 'This is an example of <strong>JavaScript</strong> usage on PDF documents.<br /><br />For more information check the source code of this example, the source code documentation for the <i>IncludeJS()</i> method and the <i>JavaScript for Acrobat API Reference</i> guide.<br /><br /><a href="http://www.tcpdf.org">www.tcpdf.org</a>';
+$pdf->writeHTML($text, true, 0, true, 0);
+
+// write some JavaScript code
+$js = <<<EOD
+app.alert('JavaScript Popup Example', 3, 0, 'Welcome');
+var cResponse = app.response({
+	cQuestion: 'How are you today?',
+	cTitle: 'Your Health Status',
+	cDefault: 'Fine',
+	cLabel: 'Response:'
+});
+if (cResponse == null) {
+	app.alert('Thanks for trying anyway.', 3, 0, 'Result');
+} else {
+	app.alert('You responded, "'+cResponse+'", to the health question.', 3, 0, 'Result');
+}
+EOD;
+
+// force print dialog
+$js .= 'print(true);';
+
+// set javascript
+$pdf->IncludeJS($js);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_053.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_054.php
@@ -1,1 +1,129 @@
+<?php
+//============================================================+
+// File name   : example_054.php
+// Begin       : 2009-09-07
+// Last Update : 2010-08-08
+//
+// Description : Example 054 for TCPDF class
+//               XHTML Forms
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: XHTML Forms
+ * @author Nicola Asuni
+ * @since 2009-09-07
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 054');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 054', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// IMPORTANT: disable font subsetting to allow users editing the document
+$pdf->setFontSubsetting(false);
+
+// set font
+$pdf->SetFont('helvetica', '', 10, '', false);
+
+// add a page
+$pdf->AddPage();
+
+// create some HTML content
+$html = <<<EOD
+<h1>XHTML Form Example</h1>
+<form method="post" action="http://localhost/printvars.php" enctype="multipart/form-data">
+<label for="name">name:</label> <input type="text" name="name" value="" size="20" maxlength="30" /><br />
+<label for="password">password:</label> <input type="password" name="password" value="" size="20" maxlength="30" /><br /><br />
+<label for="infile">file:</label> <input type="file" name="userfile" size="20" /><br /><br />
+<input type="checkbox" name="agree" value="1" checked="checked" /> <label for="agree">I agree </label><br /><br />
+<input type="radio" name="radioquestion" id="rqa" value="1" /> <label for="rqa">one</label><br />
+<input type="radio" name="radioquestion" id="rqb" value="2" checked="checked"/> <label for="rqb">two</label><br />
+<input type="radio" name="radioquestion" id="rqc" value="3" /> <label for="rqc">three</label><br /><br />
+<label for="selection">select:</label>
+<select name="selection" size="0">
+	<option value="0">zero</option>
+	<option value="1">one</option>
+	<option value="2">two</option>
+	<option value="3">three</option>
+</select><br /><br />
+<label for="selection">select:</label>
+<select name="multiselection" size="2" multiple="multiple">
+	<option value="0">zero</option>
+	<option value="1">one</option>
+	<option value="2">two</option>
+	<option value="3">three</option>
+</select><br /><br /><br />
+<label for="text">text area:</label><br />
+<textarea cols="40" rows="3" name="text">line one
+line two</textarea><br />
+<br /><br /><br />
+<input type="reset" name="reset" value="Reset" />
+<input type="submit" name="submit" value="Submit" />
+<input type="button" name="print" value="Print" onclick="print()" />
+<input type="hidden" name="hiddenfield" value="OK" />
+<br />
+</form>
+EOD;
+
+// output the HTML content
+$pdf->writeHTML($html, true, 0, true, 0);
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_054.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_055.php
@@ -1,1 +1,116 @@
+<?php
+//============================================================+
+// File name   : example_055.php
+// Begin       : 2009-10-21
+// Last Update : 2010-12-27
+//
+// Description : Example 055 for TCPDF class
+//               Display all characters available on core fonts.
+//
+// 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
+//============================================================+
 
+/**
+ * Display all characters available on core fonts.
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: XHTML Forms
+ * @author Nicola Asuni
+ * @since 2009-10-21
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 055');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 055', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 14);
+
+// array of font names
+$core_fonts = array('courier', 'helvetica', 'times', 'symbol', 'zapfdingbats');
+
+// set fill color
+$pdf->SetFillColor(221,238,255);
+
+// create one HTML table for each core font
+foreach($core_fonts as $font) {
+	// add a page
+	$pdf->AddPage();
+	
+	// Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
+	
+	// set font for title
+	$pdf->SetFont('helvetica', 'B', 16);
+	
+	// print font name
+	$pdf->Cell(0, 10, 'FONT: '.$font, 1, 1, 'C', true, '', 0, false, 'T', 'M');
+	
+	// set font for chars
+	$pdf->SetFont($font, '', 16);
+	
+	// print each character
+	for ($i = 0; $i < 256; ++$i) {
+		if (($i > 0) AND (($i % 16) == 0)) {
+			$pdf->Ln();
+		}
+		$pdf->Cell(11.25, 11.25, $pdf->unichr($i), 1, 0, 'C', false, '', 0, false, 'T', 'M');
+	}
+	
+	$pdf->Ln(20);
+	
+	// print a pangram
+	$pdf->Cell(0, 0, 'The quick brown fox jumps over the lazy dog', 0, 1, 'C', false, '', 0, false, 'T', 'M');
+}
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_055.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_056.php
@@ -1,1 +1,118 @@
+<?php
+//============================================================+
+// File name   : example_056.php
+// Begin       : 2010-03-26
+// Last Update : 2010-08-08
+//
+// Description : Example 056 for TCPDF class
+//               Crop marks and color registration bars
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Crop marks and color registration bars
+ * @author Nicola Asuni
+ * @since 2010-03-26
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 056');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 056', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 20);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of Crop Marks and Color Registration Bars', '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->Ln(5);
+
+// color registration bars
+
+$pdf->colorRegistrationBar($x=50, $y=70, $w=40, $h=40, $transition=true, $vertical=false, $colors='A,R,G,B,C,M,Y,K');
+$pdf->colorRegistrationBar($x=90, $y=70, $w=40, $h=40, $transition=true, $vertical=true, $colors='A,R,G,B,C,M,Y,K');
+$pdf->colorRegistrationBar($x=50, $y=115, $w=80, $h=5, $transition=false, $vertical=true, $colors='A,W,R,G,B,C,M,Y,K');
+$pdf->colorRegistrationBar($x=135, $y=70, $w=5, $h=50, $transition=false, $vertical=false, $colors='A,W,R,G,B,C,M,Y,K');
+
+// corner crop marks
+
+$pdf->cropMark($x=50, $y=70, $w=10, $h=10, $type='A', $color=array(0,0,0));
+$pdf->cropMark($x=140, $y=70, $w=10, $h=10, $type='B', $color=array(0,0,0));
+$pdf->cropMark($x=50, $y=120, $w=10, $h=10, $type='C', $color=array(0,0,0));
+$pdf->cropMark($x=140, $y=120, $w=10, $h=10, $type='D', $color=array(0,0,0));
+
+// various crop marks
+
+$pdf->cropMark($x=95, $y=65, $w=5, $h=5, $type='A,B', $color=array(255,0,0));
+$pdf->cropMark($x=95, $y=125, $w=5, $h=5, $type='C,D', $color=array(255,0,0));
+
+$pdf->cropMark($x=45, $y=95, $w=5, $h=5, $type='A,C', $color=array(0,255,0));
+$pdf->cropMark($x=145, $y=95, $w=5, $h=5, $type='B,D', $color=array(0,255,0));
+
+$pdf->cropMark($x=95, $y=140, $w=5, $h=5, $type='A,D', $color=array(0,0,255));
+
+// registration marks
+
+$pdf->registrationMark($x=40, $y=60, $r=5, $double=false, $cola=array(0,0,0), $colb=array(255,255,255));
+$pdf->registrationMark($x=150, $y=60, $r=5, $double=true, $cola=array(0,0,0), $colb=array(255,255,0));
+$pdf->registrationMark($x=40, $y=130, $r=5, $double=true, $cola=array(0,0,0), $colb=array(255,255,0));
+$pdf->registrationMark($x=150, $y=130, $r=5, $double=false, $cola=array(0,0,0), $colb=array(255,255,255));
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_056.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                             
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_057.php
@@ -1,1 +1,269 @@
-
+<?php
+//============================================================+
+// File name   : example_057.php
+// Begin       : 2010-04-03
+// Last Update : 2010-10-05
+//
+// Description : Example 057 for TCPDF class
+//               Cell vertical alignments
+//
+// 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
+//============================================================+
+
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Cell vertical alignments
+ * @author Nicola Asuni
+ * @since 2008-03-04
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 057');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 057', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', 'B', 20);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of alignment options for Cell()', '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->SetFont('helvetica', '', 11);
+
+// set border width
+$pdf->SetLineWidth(0.7);
+
+// set color for cell border
+$pdf->SetDrawColor(0,128,255);
+
+$pdf->setCellHeightRatio(3);
+
+$pdf->SetXY(15, 60);
+
+// text on center
+$pdf->Cell(30, 0, 'Top-Center', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'C');
+$pdf->Cell(30, 0, 'Center-Center', 1, $ln=0, 'C', 0, '', 0, false, 'C', 'C');
+$pdf->Cell(30, 0, 'Bottom-Center', 1, $ln=0, 'C', 0, '', 0, false, 'B', 'C');
+$pdf->Cell(30, 0, 'Ascent-Center', 1, $ln=0, 'C', 0, '', 0, false, 'A', 'C');
+$pdf->Cell(30, 0, 'Baseline-Center', 1, $ln=0, 'C', 0, '', 0, false, 'L', 'C');
+$pdf->Cell(30, 0, 'Descent-Center', 1, $ln=0, 'C', 0, '', 0, false, 'D', 'C');
+
+
+$pdf->SetXY(15, 90);
+
+// text on top
+$pdf->Cell(30, 0, 'Top-Top', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'T');
+$pdf->Cell(30, 0, 'Center-Top', 1, $ln=0, 'C', 0, '', 0, false, 'C', 'T');
+$pdf->Cell(30, 0, 'Bottom-Top', 1, $ln=0, 'C', 0, '', 0, false, 'B', 'T');
+$pdf->Cell(30, 0, 'Ascent-Top', 1, $ln=0, 'C', 0, '', 0, false, 'A', 'T');
+$pdf->Cell(30, 0, 'Baseline-Top', 1, $ln=0, 'C', 0, '', 0, false, 'L', 'T');
+$pdf->Cell(30, 0, 'Descent-Top', 1, $ln=0, 'C', 0, '', 0, false, 'D', 'T');
+
+
+$pdf->SetXY(15, 120);
+
+// text on bottom
+$pdf->Cell(30, 0, 'Top-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'B');
+$pdf->Cell(30, 0, 'Center-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'C', 'B');
+$pdf->Cell(30, 0, 'Bottom-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'B', 'B');
+$pdf->Cell(30, 0, 'Ascent-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'A', 'B');
+$pdf->Cell(30, 0, 'Baseline-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'L', 'B');
+$pdf->Cell(30, 0, 'Descent-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'D', 'B');
+
+
+// draw some reference lines
+$linestyle = array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => '', 'phase' => 0, 'color' => array(255, 0, 0));
+$pdf->Line(15, 60, 195, 60, $linestyle);
+$pdf->Line(15, 90, 195, 90, $linestyle);
+$pdf->Line(15, 120, 195, 120, $linestyle);
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// Print an image to explain cell measures
+
+$pdf->Image('../images/tcpdf_cell.png', 15, 160, 100, 100, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false);
+$legend = 'LEGEND:
+
+X: cell x top-left origin (top-right for RTL)
+Y: cell y top-left origin (top-right for RTL)
+CW: cell width
+CH: cell height
+LW: line width
+NRL: normal line position
+EXT: external line position
+INT: internal line position
+ML: margin left
+MR: margin right
+MT: margin top
+MB: margin bottom
+PL: padding left
+PR: padding right
+PT: padding top
+PB: padding bottom
+TW: text width
+FA: font ascent
+FB: font baseline
+FD: font descent';
+$pdf->SetFont('helvetica', '', 10);
+$pdf->setCellHeightRatio(1.25);
+$pdf->MultiCell(0, 0, $legend, 0, 'L', false, 1, 125, 160, true, 0, false, true, 0, 'T', false);
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// CELL BORDERS
+
+// add a page
+$pdf->AddPage();
+
+$pdf->SetFont('helvetica', 'B', 20);
+
+$pdf->Write(0, 'Example of borders for Cell()', '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->SetFont('helvetica', '', 11);
+
+// set border width
+$pdf->SetLineWidth(0.508);
+
+// set color for cell border
+$pdf->SetDrawColor(0,128,255);
+
+// set filling color
+$pdf->SetFillColor(255,255,128);
+
+// set cell height ratio
+$pdf->setCellHeightRatio(3);
+
+$pdf->Cell(30, 0, '1', 1, 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'LTRB', 'LTRB', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'LTR', 'LTR', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'TRB', 'TRB', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'LRB', 'LRB', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'LTB', 'LTB', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'LT', 'LT', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'TR', 'TR', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'RB', 'RB', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'LB', 'LB', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'LR', 'LR', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'TB', 'TB', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'L', 'L', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'T', 'T', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'R', 'R', 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(2);
+$pdf->Cell(30, 0, 'B', 'B', 1, 'C', 1, '', 0, false, 'T', 'C');
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// ADVANCED SETTINGS FOR CELL BORDERS
+
+// add a page
+$pdf->AddPage();
+
+$pdf->SetFont('helvetica', 'B', 20);
+
+$pdf->Write(0, 'Example of advanced border settings for Cell()', '', 0, 'L', true, 0, false, false, 0);
+
+$pdf->SetFont('helvetica', '', 11);
+
+// set border width
+$pdf->SetLineWidth(1);
+
+// set color for cell border
+$pdf->SetDrawColor(0,128,255);
+
+// set filling color
+$pdf->SetFillColor(255,255,128);
+
+$border = array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0)));
+$pdf->Cell(30, 0, 'LTRB', $border, 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(5);
+
+$border = array(
+'L' => array('width' => 2, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0)),
+'R' => array('width' => 2, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 255)),
+'T' => array('width' => 2, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 255, 0)),
+'B' => array('width' => 2, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 255)));
+$pdf->Cell(30, 0, 'LTRB', $border, 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(5);
+
+$border = array('mode' => 'ext', 'LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0)));
+$pdf->Cell(30, 0, 'LTRB EXT', $border, 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(5);
+
+$border = array('mode' => 'int', 'LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0)));
+$pdf->Cell(30, 0, 'LTRB INT', $border, 1, 'C', 1, '', 0, false, 'T', 'C');
+$pdf->Ln(5);
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_057.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_058.php
@@ -1,1 +1,95 @@
+<?php
+//============================================================+
+// File name   : example_058.php
+// Begin       : 2010-04-22
+// Last Update : 2010-08-08
+//
+// Description : Example 058 for TCPDF class
+//               SVG Image
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: SVG Image
+ * @author Nicola Asuni
+ * @since 2010-05-02
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 058');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 058', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 10);
+
+// add a page
+$pdf->AddPage();
+
+// NOTE: Uncomment the following line to rasterize SVG image using the ImageMagick library.
+//$pdf->setRasterizeVectorImages(true);
+
+$pdf->ImageSVG($file='../images/testsvg.svg', $x=15, $y=30, $w='', $h='', $link='http://www.tcpdf.org', $align='', $palign='', $border=1, $fitonpage=false);
+
+$pdf->ImageSVG($file='../images/tux.svg', $x=30, $y=100, $w='', $h=100, $link='', $align='', $palign='', $border=0, $fitonpage=false);
+
+$pdf->SetFont('helvetica', '', 8);
+$pdf->SetY(195);
+$txt = '© The copyright holder of the above Tux image is Larry Ewing, allows anyone to use it for any purpose, provided that the copyright holder is properly attributed. Redistribution, derivative work, commercial use, and all other use is permitted.';
+$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_058.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_059.php
@@ -1,1 +1,190 @@
+<?php
+//============================================================+
+// File name   : example_059.php
+// Begin       : 2010-05-06
+// Last Update : 2010-09-13
+//
+// Description : Example 059 for TCPDF class
+//               Table Of Content using HTML templates.
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Table Of Content using HTML templates.
+ * @author Nicola Asuni
+ * @since 2010-05-06
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+/**
+ * TCPDF class extension with custom header and footer for TOC page
+ */
+class TOC_TCPDF extends TCPDF {
+
+	/**
+ 	 * Overwrite Header() method.
+	 * @public
+	 */
+	public function Header() {
+		if ($this->tocpage) {
+			// *** replace the following parent::Header() with your code for TOC page
+			parent::Header();
+		} else {
+			// *** replace the following parent::Header() with your code for normal pages
+			parent::Header();
+		}
+	}
+
+	/**
+ 	 * Overwrite Footer() method.
+	 * @public
+	 */
+	public function Footer() {
+		if ($this->tocpage) {
+			// *** replace the following parent::Footer() with your code for TOC page
+			parent::Footer();
+		} else {
+			// *** replace the following parent::Footer() with your code for normal pages
+			parent::Footer();
+		}
+	}
+
+} // end of class
+
+// create new PDF document
+$pdf = new TOC_TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 059');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 059', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// set font
+$pdf->SetFont('helvetica', '', 10);
+
+// ---------------------------------------------------------
+
+// create some content ...
+
+// add a page
+$pdf->AddPage();
+
+// set a bookmark for the current position
+$pdf->Bookmark('Chapter 1', 0, 0);
+
+// print a line using Cell()
+$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Paragraph 1.1', 1, 0);
+$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Paragraph 1.2', 1, 0);
+$pdf->Cell(0, 10, 'Paragraph 1.2', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0);
+$pdf->Cell(0, 10, 'Sub-Paragraph 1.2.1', 0, 1, 'L');
+
+$pdf->AddPage();
+$pdf->Bookmark('Paragraph 1.3', 1, 0);
+$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L');
+
+for ($i = 2; $i < 12; ++$i) {
+	$pdf->AddPage();
+	$pdf->Bookmark('Chapter '.$i, 0, 0);
+	$pdf->Cell(0, 10, 'Chapter '.$i, 0, 1, 'L');
+}
+
+
+// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+
+
+// add a new page for TOC
+$pdf->addTOCPage();
+
+// write the TOC title and/or other elements on the TOC page
+$pdf->SetFont('times', 'B', 16);
+$pdf->MultiCell(0, 0, 'Table Of Content', 0, 'C', 0, 1, '', '', true, 0);
+$pdf->Ln();
+$pdf->SetFont('helvetica', '', 10);
+
+// define styles for various bookmark levels
+$bookmark_templates = array();
+
+/*
+ * The key of the $bookmark_templates array represent the bookmark level (from 0 to n).
+ * The following templates will be replaced with proper content:
+ *     #TOC_DESCRIPTION#    this will be replaced with the bookmark description;
+ *     #TOC_PAGE_NUMBER#    this will be replaced with page number.
+ *
+ * NOTES:
+ *     If you want to align the page number on the right you have to use a monospaced font like courier, otherwise you can left align using any font type.
+ *     The following is just an example, you can get various styles by combining various HTML elements.
+ */
+
+// A monospaced font for the page number is mandatory to get the right alignment
+$bookmark_templates[0] = '<table border="0" cellpadding="0" cellspacing="0" style="background-color:#EEFAFF"><tr><td width="155mm"><span style="font-family:times;font-weight:bold;font-size:12pt;color:black;">#TOC_DESCRIPTION#</span></td><td width="25mm"><span style="font-family:courier;font-weight:bold;font-size:12pt;color:black;" align="right">#TOC_PAGE_NUMBER#</span></td></tr></table>';
+$bookmark_templates[1] = '<table border="0" cellpadding="0" cellspacing="0"><tr><td width="5mm">&nbsp;</td><td width="150mm"><span style="font-family:times;font-size:11pt;color:green;">#TOC_DESCRIPTION#</span></td><td width="25mm"><span style="font-family:courier;font-weight:bold;font-size:11pt;color:green;" align="right">#TOC_PAGE_NUMBER#</span></td></tr></table>';
+$bookmark_templates[2] = '<table border="0" cellpadding="0" cellspacing="0"><tr><td width="10mm">&nbsp;</td><td width="145mm"><span style="font-family:times;font-size:10pt;color:#666666;"><i>#TOC_DESCRIPTION#</i></span></td><td width="25mm"><span style="font-family:courier;font-weight:bold;font-size:10pt;color:#666666;" align="right">#TOC_PAGE_NUMBER#</span></td></tr></table>';
+// add other bookmark level templates here ...
+
+// add table of content at page 1
+// (check the example n. 45 for a text-only TOC
+$pdf->addHTMLTOC($page=1, $toc_name='INDEX', $bookmark_templates, $correct_align=true);
+
+// end of TOC page
+$pdf->endTOCPage();
+
+// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_059.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_060.php
@@ -1,1 +1,109 @@
+<?php
+//============================================================+
+// File name   : example_060.php
+// Begin       : 2010-05-17
+// Last Update : 2010-08-08
+//
+// Description : Example 060 for TCPDF class
+//               Advanced page settings.
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Advanced page settings.
+ * @author Nicola Asuni
+ * @since 2010-05-17
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 060');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 060', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// set font
+$pdf->SetFont('helvetica', '', 20);
+
+// ---------------------------------------------------------
+
+// set page format (read source code documentation for further information)
+$page_format = array(
+	'MediaBox' => array ('llx' => 0, 'lly' => 0, 'urx' => 210, 'ury' => 297),
+	'CropBox' => array ('llx' => 0, 'lly' => 0, 'urx' => 210, 'ury' => 297),
+	'BleedBox' => array ('llx' => 5, 'lly' => 5, 'urx' => 205, 'ury' => 292),
+	'TrimBox' => array ('llx' => 10, 'lly' => 10, 'urx' => 200, 'ury' => 287),
+	'ArtBox' => array ('llx' => 15, 'lly' => 15, 'urx' => 195, 'ury' => 282),
+	'Dur' => 3,
+	'trans' => array(
+		'D' => 1.5,
+		'S' => 'Split',
+		'Dm' => 'V',
+		'M' => 'O'
+	),
+	'Rotate' => 90,
+	'PZ' => 1,
+);
+
+// Check the example n. 29 for viewer preferences
+
+// add first page ---
+$pdf->AddPage('P', $page_format, false, false);
+$pdf->Cell(0, 12, 'First Page', 1, 1, 'C');
+
+// add second page ---
+$page_format['Rotate'] = 270;
+$pdf->AddPage('P', $page_format, false, false);
+$pdf->Cell(0, 12, 'Second Page', 1, 1, 'C');
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_060.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_061.php
@@ -1,1 +1,274 @@
-
+<?php
+//============================================================+
+// File name   : example_061.php
+// Begin       : 2010-05-24
+// Last Update : 2010-08-08
+//
+// Description : Example 061 for TCPDF class
+//               XHTML + CSS
+//
+// 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
+//============================================================+
+
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: XHTML + CSS
+ * @author Nicola Asuni
+ * @since 2010-05-25
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 061');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 061', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 10);
+
+// add a page
+$pdf->AddPage();
+
+/* NOTE:
+ * *********************************************************
+ * You can load external XHTML using :
+ *
+ * $html = file_get_contents('/path/to/your/file.html');
+ *
+ * External CSS files will be automatically loaded.
+ * Sometimes you need to fix the path of the external CSS.
+ * *********************************************************
+ */
+
+// define some HTML content with style
+$html = <<<EOF
+<!-- EXAMPLE OF CSS STYLE -->
+<style>
+	h1 {
+		color: navy;
+		font-family: times;
+		font-size: 24pt;
+		text-decoration: underline;
+	}
+	p.first {
+		color: #003300;
+		font-family: helvetica;
+		font-size: 12pt;
+	}
+	p.first span {
+		color: #006600;
+		font-style: italic;
+	}
+	p#second {
+		color: rgb(00,63,127);
+		font-family: times;
+		font-size: 12pt;
+		text-align: justify;
+	}
+	p#second > span {
+		background-color: #FFFFAA;
+	}
+	table.first {
+		color: #003300;
+		font-family: helvetica;
+		font-size: 8pt;
+		border-left: 3px solid red;
+		border-right: 3px solid #FF00FF;
+		border-top: 3px solid green;
+		border-bottom: 3px solid blue;
+		background-color: #ccffcc;
+	}
+	td {
+		border: 2px solid blue;
+		background-color: #ffffee;
+	}
+	td.second {
+		border: 2px dashed green;
+	}
+	div.test {
+		color: #CC0000;
+		background-color: #FFFF66;
+		font-family: helvetica;
+		font-size: 10pt;
+		border-style: solid solid solid solid;
+		border-width: 2px 2px 2px 2px;
+		border-color: green #FF00FF blue red;
+		text-align: center;
+	}
+</style>
+
+<h1 class="title">Example of <i style="color:#990000">XHTML + CSS</i></h1>
+
+<p class="first">Example of paragraph with class selector. <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc.</span></p>
+
+<p id="second">Example of paragraph with ID selector. <span>Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.</span></p>
+
+<div class="test">example of DIV with border and fill.<br />Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus.</div>
+
+<br />
+
+<table class="first" cellpadding="4" cellspacing="6">
+ <tr>
+  <td width="30" align="center"><b>No.</b></td>
+  <td width="140" align="center" bgcolor="#FFFF00"><b>XXXX</b></td>
+  <td width="140" align="center"><b>XXXX</b></td>
+  <td width="80" align="center"> <b>XXXX</b></td>
+  <td width="80" align="center"><b>XXXX</b></td>
+  <td width="45" align="center"><b>XXXX</b></td>
+ </tr>
+ <tr>
+  <td width="30" align="center">1.</td>
+  <td width="140" rowspan="6" class="second">XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX</td>
+  <td width="140">XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td width="80">XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+ <tr>
+  <td width="30" align="center" rowspan="3">2.</td>
+  <td width="140" rowspan="3">XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+ <tr>
+  <td width="80">XXXX<br />XXXX<br />XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+ <tr>
+  <td width="80" rowspan="2" >XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+ <tr>
+  <td width="30" align="center">3.</td>
+  <td width="140">XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+ <tr bgcolor="#FFFF80">
+  <td width="30" align="center">4.</td>
+  <td width="140" bgcolor="#00CC00" color="#FFFF00">XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td width="80">XXXX<br />XXXX</td>
+  <td align="center" width="45">XXXX<br />XXXX</td>
+ </tr>
+</table>
+EOF;
+
+// output the HTML content
+$pdf->writeHTML($html, true, false, true, false, '');
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// *******************************************************************
+// HTML TIPS & TRICKS
+// *******************************************************************
+
+// REMOVE CELL PADDING
+//
+// $pdf->SetCellPadding(0);
+// 
+// This is used to remove any additional vertical space inside a 
+// single cell of text.
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// REMOVE TAG TOP AND BOTTOM MARGINS
+//
+// $tagvs = array('p' => array(0 => array('h' => 0, 'n' => 0), 1 => array('h' => 0, 'n' => 0)));
+// $pdf->setHtmlVSpace($tagvs);
+// 
+// Since the CSS margin command is not yet implemented on TCPDF, you
+// need to set the spacing of block tags using the following method.
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// SET LINE HEIGHT
+//
+// $pdf->setCellHeightRatio(1.25);
+// 
+// You can use the following method to fine tune the line height
+// (the number is a percentage relative to font height).
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// CHANGE THE PIXEL CONVERSION RATIO
+//
+// $pdf->setImageScale(0.47);
+// 
+// This is used to adjust the conversion ratio between pixels and 
+// document units. Increase the value to get smaller objects.
+// Since you are using pixel unit, this method is important to set the
+// right zoom factor.
+// 
+// Suppose that you want to print a web page larger 1024 pixels to 
+// fill all the available page width.
+// An A4 page is larger 210mm equivalent to 8.268 inches, if you 
+// subtract 13mm (0.512") of margins for each side, the remaining 
+// space is 184mm (7.244 inches).
+// The default resolution for a PDF document is 300 DPI (dots per 
+// inch), so you have 7.244 * 300 = 2173.2 dots (this is the maximum 
+// number of points you can print at 300 DPI for the given width).
+// The conversion ratio is approximatively 1024 / 2173.2 = 0.47 px/dots
+// If the web page is larger 1280 pixels, on the same A4 page the 
+// conversion ratio to use is 1280 / 2173.2 = 0.59 pixels/dots
+
+// *******************************************************************
+
+// reset pointer to the last page
+$pdf->lastPage();
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_061.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_062.php
@@ -1,1 +1,137 @@
+<?php
+//============================================================+
+// File name   : example_062.php
+// Begin       : 2010-08-25
+// Last Update : 2010-08-25
+//
+// Description : Example 062 for TCPDF class
+//               XObject Template
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: XObject Template
+ * @author Nicola Asuni
+ * @since 2010-08-25
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 062');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 062', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', 'B', 20);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'XObject Templates', '', 0, 'C', 1, 0, false, false, 0);
+
+/*
+ * An XObject Template is a PDF block that is a self-contained 
+ * description of any sequence of graphics objects (including path 
+ * objects, text objects, and sampled images).
+ * An XObject Template may be painted multiple times, either on 
+ * several pages or at several locations on the same page and produces
+ * the same results each time, subject only to the graphics state at 
+ * the time it is invoked.
+ */
+
+// start a new XObject Template
+$template_id = $pdf->startTemplate(60, 60);
+
+
+// create Template content
+// ...................................................................
+//Start Graphic Transformation
+$pdf->StartTransform();
+
+// set clipping mask
+$pdf->StarPolygon(30, 30, 29, 10, 3, 0, 1, 'CNZ');
+
+// draw jpeg image to be clipped
+$pdf->Image('../images/image_demo.jpg', 0, 0, 60, 60, '', '', '', true, 72, '', false, false, 0, false, false, false);
+
+//Stop Graphic Transformation
+$pdf->StopTransform();
+
+$pdf->SetXY(0, 0);
+
+$pdf->SetFont('times', '', 40);
+
+$pdf->SetTextColor(255, 0, 0);
+
+// print a text
+$pdf->Cell(60, 60, 'Template', 0, 0, 'C', false, '', 0, false, 'T', 'M');
+// ...................................................................
+
+
+// end the current Template
+$pdf->endTemplate();
+
+// print the selected Template various times
+
+$pdf->printTemplate($template_id, 15, 50, 20, 20, '', '', false);
+
+$pdf->printTemplate($template_id, 27, 62, 40, 40, '', '', false);
+
+$pdf->printTemplate($template_id, 55, 85, 60, 60, '', '', false);
+
+$pdf->printTemplate($template_id, 95, 125, 80, 80, '', '', false);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_062.pdf', 'I');
+
+//============================================================+
+// END OF FILE                                                
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_063.php
@@ -1,1 +1,132 @@
+<?php
+//============================================================+
+// File name   : example_063.php
+// Begin       : 2010-09-29
+// Last Update : 2010-10-05
+//
+// Description : Example 063 for TCPDF class
+//               Text stretching and spacing (tracking/kerning)
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: Text stretching and spacing (tracking/kerning)
+ * @author Nicola Asuni
+ * @since 2010-09-29
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 063');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 063', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', 'B', 16);
+
+// add a page
+$pdf->AddPage();
+
+$pdf->Write(0, 'Example of Text Stretching and Spacing (tracking/kerning)', '', 0, 'L', true, 0, false, false, 0);
+$pdf->Ln(5);
+
+// create several cells to display all cases of stretching and kerning combinations.
+
+$fonts = array('times', 'dejavuserif');
+$alignments = array('L' => 'LEFT', 'C' => 'CENTER', 'R' => 'RIGHT', 'J' => 'JUSTIFY');
+
+
+// Test all cases using direct stretching/spacing methods
+foreach ($fonts as $fkey => $font) {
+	$pdf->SetFont($font, '', 14);
+	foreach ($alignments as $align_mode => $align_name) {
+		for ($stretching = 90; $stretching <= 110; $stretching += 10) {
+			for ($spacing = -0.254; $spacing <= 0.254; $spacing += 0.254) {
+				$pdf->setFontStretching($stretching);
+				$pdf->setFontSpacing($spacing);
+				$txt = $align_name.' | Stretching = '.$stretching.'% | Spacing = '.sprintf('%+.3F', $spacing).'mm';
+				$pdf->Cell(0, 0, $txt, 1, 1, $align_mode);
+			}
+		}
+	}
+	$pdf->AddPage();
+}
+
+
+// Test all cases using CSS stretching/spacing properties
+foreach ($fonts as $fkey => $font) {
+	$pdf->SetFont($font, '', 11);
+	foreach ($alignments as $align_mode => $align_name) {
+		for ($stretching = 90; $stretching <= 110; $stretching += 10) {
+			for ($spacing = -0.254; $spacing <= 0.254; $spacing += 0.254) {
+				$html = '<span style="font-stretch:'.$stretching.'%;letter-spacing:'.$spacing.'mm;"><span style="color:red;">'.$align_name.'</span> | <span style="color:green;">Stretching = '.$stretching.'%</span> | <span style="color:blue;">Spacing = '.sprintf('%+.3F', $spacing).'mm</span><br />Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</span>';
+				$pdf->writeHTMLCell(0, 0, '', '', $html, 1, 1, false, true, $align_mode, false);
+			}
+		}
+		if (!(($fkey == 1) AND ($align_mode == 'J'))) {
+			$pdf->AddPage();
+		}
+	}
+}
+
+
+// reset font stretching
+$pdf->setFontStretching(100);
+
+// reset font spacing
+$pdf->setFontSpacing(0);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_063.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/example_064.php
@@ -1,1 +1,177 @@
+<?php
+//============================================================+
+// File name   : example_064.php
+// Begin       : 2010-10-13
+// Last Update : 2010-10-15
+//
+// Description : Example 064 for TCPDF class
+//               No-write page regions
+//
+// 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
+//============================================================+
 
+/**
+ * Creates an example PDF TEST document using TCPDF
+ * @package com.tecnick.tcpdf
+ * @abstract TCPDF - Example: No-write page regions
+ * @author Nicola Asuni
+ * @since 2010-10-14
+ */
+
+require_once('../config/lang/eng.php');
+require_once('../tcpdf.php');
+
+// create new PDF document
+$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+
+// set document information
+$pdf->SetCreator(PDF_CREATOR);
+$pdf->SetAuthor('Nicola Asuni');
+$pdf->SetTitle('TCPDF Example 064');
+$pdf->SetSubject('TCPDF Tutorial');
+$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
+
+// set default header data
+$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 064', PDF_HEADER_STRING);
+
+// set header and footer fonts
+$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
+$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
+
+// set default monospaced font
+$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
+
+//set margins
+$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
+$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
+$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
+
+//set auto page breaks
+$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
+
+//set image scale factor
+$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
+
+//set some language-dependent strings
+$pdf->setLanguageArray($l);
+
+// ---------------------------------------------------------
+
+// set font
+$pdf->SetFont('helvetica', '', 8);
+
+
+// define some html content for testing
+$txt = '<p style="text-align:justify;color:blue;font-size:12pt;"><span style="color:red;font-size:14pt;font-weight:bold;">TEST PAGE REGIONS:</span> <span style="color:green;">A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. A region is always aligned on the left or right side of the page ad is defined using a vertical segment. You can set multiple regions for the same page. You can combine several adjacent regions to aproximate curved shapes.</span> Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc.
+Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.
+Integer non sem eget neque mattis accumsan. Maecenas eu nisl mauris, sit amet interdum ipsum. In pharetra erat vel lectus venenatis elementum. Nulla non elit ligula, sit amet mollis urna. Morbi ut gravida est. Mauris tincidunt sem et turpis molestie malesuada. Curabitur vel nulla risus, sed mollis erat. Suspendisse vehicula accumsan purus nec varius. Donec fermentum lorem id felis sodales dictum. Quisque et dolor ipsum. Nam luctus consectetur dui vitae fermentum. Curabitur sodales consequat augue, id ultricies augue tempor ac. Aliquam ac magna id ipsum vehicula bibendum. Sed elementum congue tristique. <img src="../images/image_demo.jpg" width="5mm" height="5mm" /> Phasellus vel lorem eu lectus porta sodales. Etiam neque tortor, sagittis id pharetra quis, laoreet vel arcu.
+Cras quam mi, ornare laoreet laoreet vel, vehicula at lacus. Maecenas a lacus accumsan augue convallis sagittis sed quis odio. Morbi sit amet turpis diam, dictum convallis urna. Cras eget interdum augue. Cras eu nisi sit amet dolor faucibus porttitor. Suspendisse potenti. Nunc vitae dolor risus, at cursus libero. Suspendisse bibendum tellus non nibh hendrerit tristique. Mauris eget orci elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta libero non ante laoreet semper. Proin volutpat sodales mi, ac fermentum erat sagittis in. Vivamus at viverra felis. Ut pretium facilisis ante et pharetra.
+Nulla facilisi. Cras varius quam eget libero aliquam vitae tincidunt leo rutrum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque a nisl massa, quis pretium urna. Proin vel porttitor tortor. Cras rhoncus congue velit in bibendum. Donec pharetra semper augue id lacinia. Quisque magna quam, hendrerit eu aliquam et, pellentesque ut tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas nulla quam, rutrum eu feugiat at, elementum eu libero. Maecenas ullamcorper leo et turpis rutrum ac laoreet eros faucibus. Phasellus condimentum lorem quis neque imperdiet quis molestie enim iaculis. Phasellus risus est, vestibulum ut convallis ultrices, dignissim nec erat. Etiam congue lobortis laoreet. Nulla ut neque sed velit dapibus semper. Quisque nec dolor id nibh eleifend iaculis. Vivamus vitae fermentum odio. Etiam malesuada quam in nulla aliquam sed convallis dui feugiat.</p>';
+
+
+// add a page
+$pdf->AddPage();
+
+// print some graphic content
+$pdf->Image('../images/image_demo.jpg', 155,  30, 40, 40, 'JPG', '', '', true);
+$pdf->Image('../images/image_demo.jpg',  15, 230, 40, 40, 'JPG', '', '', true);
+
+// define some graphic styles
+$styleA = array('width' => 0.254, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0));
+$styleB = array('width' => 0.254, 'cap' => 'butt', 'join' => 'miter', 'dash' => 3, 'color' => array(127, 127, 127));
+$pdf->SetFillColor(220, 255, 220);
+
+// write a trapezoid with some information about no-write page regions
+$pdf->Polygon(array(15,90, 57,90, 67,140, 15,140), 'DF', array($styleB, $styleA, $styleB, $styleB));
+$pdf->SetXY(15, 90);
+$pdf->Cell(42, 0, 'xt,yt', 0, 0, 'R', false, '', 0, false, 'T', 'T');
+$pdf->SetXY(15, 140);
+$pdf->Cell(52, 0, 'xb,yb', 0, 0, 'R', false, '', 0, false, 'B', 'B');
+$pdf->SetXY(15, 115);
+$pdf->Cell(40, 0, 'side', 0, 0, 'R', false, '', 0, false, 'B', 'B');
+$pdf->SetLineStyle(array('width' => 0.254, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
+$pdf->Arrow(60, 115, 35, 115, 2, 5, 15);
+
+// write a trapezoid with some information about no-write page regions
+$pdf->Polygon(array(145,130, 195,130, 195,180, 155,180), 'DF', array($styleB, $styleB, $styleB, $styleA));
+$pdf->SetXY(145, 130);
+$pdf->Cell(42, 0, 'xt,yt', 0, 0, 'L', false, '', 0, false, 'T', 'T');
+$pdf->SetXY(155, 180);
+$pdf->Cell(52, 0, 'xb,yb', 0, 0, 'L', false, '', 0, false, 'B', 'B');
+$pdf->SetXY(160, 155);
+$pdf->Cell(30, 0, 'side', 0, 0, 'L', false, '', 0, false, 'B', 'B');
+$pdf->SetLineStyle(array('width' => 0.254, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
+$pdf->Arrow(155, 155, 180, 155, 2, 5, 15);
+
+// reset x,y position
+$pdf->SetXY(15, 30);
+
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+
+// define no-write page regions to avoid text overlapping images
+/*
+	'page' => page number or empy for current page
+	'xt' => X top
+	'yt' => Y top
+	'yb' => Y bottom
+	'side' => page side ('L' = left or 'R' = right)
+*/
+$regions = array(
+array('page' => '', 'xt' => 153, 'yt' =>  30, 'xb' => 153, 'yb' =>  70, 'side' => 'R'),
+array('page' => '', 'xt' =>  60, 'yt' =>  90, 'xb' =>  70, 'yb' => 140, 'side' => 'L'),
+array('page' => '', 'xt' => 143, 'yt' => 130, 'xb' => 153, 'yb' => 180, 'side' => 'R'),
+array('page' => '', 'xt' =>  58, 'yt' => 230, 'xb' =>  58, 'yb' => 270, 'side' => 'L')
+);
+
+// set page regions, check also getPageRegions(), addPageRegion() and removePageRegion()
+$pdf->setPageRegions($regions);
+
+// write html text
+$pdf->writeHTML($txt, true, false, true, false, '');
+
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// set a circular no-write region on the second page
+$regions = array(
+array('page' => 2, 'xt' => 195, 'yt' => 110, 'xb' => 179.693, 'yb' =>  113.045, 'side' => 'R'),
+array('page' => 2, 'xt' => 179.693, 'yt' => 113.045, 'xb' => 166.716, 'yb' => 121.716, 'side' => 'R'),
+array('page' => 2, 'xt' => 166.716, 'yt' => 121.716, 'xb' => 158.045, 'yb' => 134.693, 'side' => 'R'),
+array('page' => 2, 'xt' => 158.045, 'yt' => 134.693, 'xb' => 155, 'yb' => 150, 'side' => 'R'),
+array('page' => 2, 'xt' => 155, 'yt' => 150, 'xb' => 158.045, 'yb' => 165.307, 'side' => 'R'),
+array('page' => 2, 'xt' => 158.045, 'yt' => 165.307, 'xb' => 166.716, 'yb' => 178.284, 'side' => 'R'),
+array('page' => 2, 'xt' => 166.716, 'yt' => 178.284, 'xb' => 179.693, 'yb' => 186.955, 'side' => 'R'),
+array('page' => 2, 'xt' => 179.693, 'yt' => 186.955, 'xb' => 195, 'yb' => 190, 'side' => 'R')
+);
+$pdf->setPageRegions($regions);
+
+$pdf->Polygon(array(195,110, 179.693,113.045, 166.716,121.716, 158.045,134.693, 155,150, 158.045,165.307, 166.716,178.284, 179.693,186.955, 195,190), 'DF');
+
+$pdf->Ln(15);
+
+// define some html content for testing
+$txt = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc. Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa. Integer non sem eget neque mattis accumsan. Maecenas eu nisl mauris, sit amet interdum ipsum. In pharetra erat vel lectus venenatis elementum. Nulla non elit ligula, sit amet mollis urna. Morbi ut gravida est. Mauris tincidunt sem et turpis molestie malesuada. Curabitur vel nulla risus, sed mollis erat. Suspendisse vehicula accumsan purus nec varius. Donec fermentum lorem id felis sodales dictum. Quisque et dolor ipsum. Nam luctus consectetur dui vitae fermentum. Curabitur sodales consequat augue, id ultricies augue tempor ac. Aliquam ac magna id ipsum vehicula bibendum. Sed elementum congue tristique. Phasellus vel lorem eu lectus porta sodales. Etiam neque tortor, sagittis id pharetra quis, laoreet vel arcu. Cras quam mi, ornare laoreet laoreet vel, vehicula at lacus. Maecenas a lacus accumsan augue convallis sagittis sed quis odio. Morbi sit amet turpis diam, dictum convallis urna. Cras eget interdum augue. Cras eu nisi sit amet dolor faucibus porttitor. Suspendisse potenti. Nunc vitae dolor risus, at cursus libero. Suspendisse bibendum tellus non nibh hendrerit tristique. Mauris eget orci elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta libero non ante laoreet semper. Proin volutpat sodales mi, ac fermentum erat sagittis in. Vivamus at viverra felis. Ut pretium facilisis ante et pharetra. Nulla facilisi. Cras varius quam eget libero aliquam vitae tincidunt leo rutrum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque a nisl massa, quis pretium urna. Proin vel porttitor tortor. Cras rhoncus congue velit in bibendum. Donec pharetra semper augue id lacinia. Quisque magna quam, hendrerit eu aliquam et, pellentesque ut tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas nulla quam, rutrum eu feugiat at, elementum eu libero. Maecenas ullamcorper leo et turpis rutrum ac laoreet eros faucibus. Phasellus condimentum lorem quis neque imperdiet quis molestie enim iaculis. Phasellus risus est, vestibulum ut convallis ultrices, dignissim nec erat. Etiam congue lobortis laoreet. Nulla ut neque sed velit dapibus semper. Quisque nec dolor id nibh eleifend iaculis. Vivamus vitae fermentum odio. Etiam malesuada quam in nulla aliquam sed convallis dui feugiat.'."\n";
+
+// write text
+$pdf->MultiCell(0, 0, $txt, 0, 'J', false, 1, '', '', true, 0, false, true, 0, 'T', false);
+
+// ---------------------------------------------------------
+
+//Close and output PDF document
+$pdf->Output('example_064.pdf', 'I');
+
+//============================================================+
+// END OF FILE
+//============================================================+
+

--- /dev/null
+++ b/tcpdf/examples/index.php
@@ -1,1 +1,89 @@
+<?php
+echo '<'.'?'.'xml version="1.0" encoding="UTF-8"'.'?'.'>';
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
+
+<head>
+<title>TCPDF Examples</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="description" content="TCPDF is a PHP class for generating PDF documents on the fly" />
+<meta name="author" content="Nicola Asuni" />
+<meta name="keywords" content="Examples, TCPDF, PDF, PHP class" />
+</head>
+
+<body>
+
+<h1>TCPDF Examples</h1>
+
+<ol>
+<li>Simple PDF with default Header and Footer: [<a href="example_001.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Simple PDF without Header and Footer: [<a href="example_002.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Custom Header and Footer: [<a href="example_003.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Cell stretching: [<a href="example_004.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Multicell: [<a href="example_005.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>WriteHTML and RTL support: [<a href="example_006.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Independent columns with WriteHTMLCell: [<a href="example_007.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>External UTF-8 text file: [<a href="example_008.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Image: [<a href="example_009.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Multiple columns: [<a href="example_010.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Colored Tables: [<a href="example_011.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Graphic Functions: [<a href="example_012.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Graphic Transformations: [<a href="example_013.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Javascript and Forms: [<a href="example_014.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Bookmarks (Table of Content): [<a href="example_015.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Document Encryption: [<a href="example_016.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Independent columns with MultiCell: [<a href="example_017.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Persian and Arabic language on RTL document: [<a href="example_018.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Non unicode / Alternative config file: [<a href="example_019.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Multicell complex alignment: [<a href="example_020.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>writeHTML alignment: [<a href="example_021.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>CMYK colors: [<a href="example_022.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Page Groups: [<a href="example_023.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Object Visibility: [<a href="example_024.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Object Transparency: [<a href="example_025.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Text Rendering Modes and Text Clipping: [<a href="example_026.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Barcodes: [<a href="example_027.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Multiple page formats: [<a href="example_028.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Set PDF viewer display preferences: [<a href="example_029.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Colour gradients: [<a href="example_030.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Pie Chart Graphic: [<a href="example_031.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>EPS/AI vectorial image: [<a href="example_032.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Mixed font types (TrueType Unicode, core, CID-0): [<a href="example_033.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Clipping masks: [<a href="example_034.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Line styles with cells and multicells: [<a href="example_035.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Text Annotations: [<a href="example_036.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Spot Colors: [<a href="example_037.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>NON-embedded CID-0 CJK font: [<a href="example_038.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>HTML Justification: [<a href="example_039.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Booklet (double-sided pages): [<a href="example_040.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>File attachment: [<a href="example_041.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Image with Alpha Channel Transparency: [<a href="example_042.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Disk caching: [<a href="example_043.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Move, Copy and Delete page: [<a href="example_044.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Table Of Content with Bookmarks: [<a href="example_045.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Text hyphenation: [<a href="example_046.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Transactions and UNDO: [<a href="example_047.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Table header and rowspan: [<a href="example_048.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>TCPDF methods in HTML: [<a href="example_049.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>2D Barcode (QR-Code AND PDF417): [<a href="example_050.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Full page background: [<a href="example_051.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Digital Signature Certification: [<a href="example_052.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Javascript functions: [<a href="example_053.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>XHTML Form: [<a href="example_054.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Font Dump: [<a href="example_055.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Crop Marks and Registration Marks: [<a href="example_056.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Cell vertical alignments and borders: [<a href="example_057.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>SVG Image: [<a href="example_058.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Table Of Content with HTML templates: [<a href="example_059.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Advanced page settings: [<a href="example_060.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>XHTML + CSS: [<a href="example_061.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>XObject Templates: [<a href="example_062.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>Text stretching and spacing (tracking/kerning): [<a href="example_063.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+<li>No-write page regions: [<a href="example_064.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
+</ol>
+
+</body>
+</html>
+

--- /dev/null
+++ b/tcpdf/fonts/README.TXT
@@ -1,1 +1,3 @@
-
+This folder contains fonts descriptions for TCPDF.
+All fonts names must be in lowercase.
+Please read the documentation on subfolders for copyright, license and other information.

 Binary files /dev/null and b/tcpdf/fonts/almohanad.ctg.z differ
--- /dev/null
+++ b/tcpdf/fonts/almohanad.php
@@ -1,1 +1,103 @@
+<?php

+$type='TrueTypeUnicode';

+$name='AlMohanad';

+$desc=array('Ascent'=>1093,'Descent'=>-509,'CapHeight'=>1093,'Flags'=>32,'FontBBox'=>'[-278 -507 1124 1093]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);

+$up=-136;

+$ut=64;

+$dw=600;

+$cw=array(

+	0=>0,32=>139,33=>185,34=>308,35=>278,36=>278,37=>556,38=>463,39=>154,40=>185,41=>185,42=>278,43=>317,44=>139,45=>185,46=>139,

+	47=>154,48=>278,49=>278,50=>278,51=>278,52=>278,53=>278,54=>278,55=>278,56=>278,57=>278,58=>185,59=>185,60=>317,61=>317,62=>317,

+	63=>278,64=>517,65=>401,66=>371,67=>401,68=>402,69=>371,70=>339,71=>432,72=>430,73=>214,74=>278,75=>424,76=>369,77=>524,78=>401,

+	79=>432,80=>339,81=>432,82=>396,83=>309,84=>371,85=>401,86=>401,87=>556,88=>401,89=>401,90=>371,91=>185,92=>154,93=>185,94=>323,

+	95=>278,96=>185,97=>278,98=>309,99=>247,100=>309,101=>247,102=>185,103=>278,104=>309,105=>154,106=>185,107=>309,108=>154,109=>463,110=>309,

+	111=>278,112=>309,113=>309,114=>247,115=>216,116=>185,117=>309,118=>278,119=>401,120=>278,121=>278,122=>247,123=>219,124=>122,125=>219,126=>289,

+	8364=>278,1027=>339,8218=>185,1107=>254,8222=>278,8230=>556,8224=>278,8225=>278,710=>185,8240=>556,352=>309,8249=>185,338=>556,1036=>432,381=>371,1039=>432,

+	8216=>185,8217=>185,8220=>278,8221=>278,8226=>194,8211=>278,8212=>556,732=>185,8482=>556,353=>216,8250=>185,339=>401,1116=>297,382=>247,376=>401,161=>185,

+	162=>278,163=>278,164=>278,165=>278,166=>122,167=>278,168=>185,169=>415,170=>167,171=>278,172=>317,174=>415,175=>185,176=>222,177=>317,178=>167,

+	179=>167,180=>185,181=>309,182=>300,183=>139,184=>185,185=>167,186=>183,187=>278,188=>417,189=>417,190=>417,191=>278,192=>401,193=>401,194=>401,

+	195=>401,196=>401,197=>401,198=>556,199=>401,200=>371,201=>371,202=>371,203=>371,204=>216,205=>216,206=>216,207=>216,208=>401,209=>401,210=>432,

+	211=>432,212=>432,213=>432,214=>432,215=>317,216=>432,217=>401,218=>401,219=>401,220=>401,221=>401,222=>339,223=>309,224=>278,225=>278,226=>278,

+	227=>278,228=>278,229=>278,230=>401,231=>247,232=>247,233=>247,234=>247,235=>247,236=>154,237=>154,238=>154,239=>154,240=>278,241=>309,242=>278,

+	243=>278,244=>278,245=>278,246=>278,247=>317,248=>278,249=>309,250=>309,251=>309,252=>309,253=>278,254=>309,255=>278,256=>401,257=>278,258=>401,

+	259=>278,260=>401,261=>278,262=>401,263=>247,264=>401,265=>247,266=>401,267=>247,268=>401,269=>247,270=>401,271=>309,272=>401,273=>309,274=>371,

+	275=>247,276=>371,277=>247,278=>371,279=>247,280=>371,281=>247,282=>371,283=>247,284=>432,285=>278,286=>432,287=>278,288=>432,289=>278,290=>432,

+	291=>278,292=>432,293=>309,294=>432,295=>309,296=>216,297=>154,298=>216,299=>154,300=>216,301=>154,302=>216,303=>154,304=>216,305=>154,306=>490,

+	307=>270,308=>278,309=>185,310=>432,311=>309,312=>297,313=>371,314=>154,315=>371,316=>154,317=>371,318=>154,319=>371,320=>293,321=>371,322=>154,

+	323=>401,324=>309,325=>401,326=>309,327=>401,328=>309,329=>391,330=>401,331=>309,332=>432,333=>278,334=>432,335=>278,336=>432,337=>278,340=>401,

+	341=>247,342=>401,343=>247,344=>401,345=>247,346=>309,347=>216,348=>309,349=>216,350=>309,351=>216,354=>371,355=>185,356=>371,357=>185,358=>371,

+	359=>185,360=>401,361=>309,362=>401,363=>309,364=>401,365=>309,366=>401,367=>309,368=>401,369=>309,370=>401,371=>309,372=>556,373=>401,374=>401,

+	375=>278,377=>371,378=>247,379=>371,380=>247,383=>185,450=>317,477=>247,484=>432,485=>278,536=>309,537=>216,538=>371,539=>185,658=>282,711=>185,

+	728=>185,729=>185,730=>185,731=>185,733=>185,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=>111,885=>111,890=>0,894=>185,900=>100,901=>183,902=>401,903=>139,904=>451,

+	905=>532,906=>316,908=>451,910=>501,911=>451,912=>183,913=>401,914=>371,915=>339,916=>422,917=>371,918=>371,919=>432,920=>432,921=>216,922=>432,

+	923=>401,924=>524,925=>401,926=>361,927=>432,928=>451,929=>339,931=>361,932=>371,933=>401,934=>482,935=>401,936=>482,937=>451,938=>0,939=>401,

+	940=>336,941=>244,942=>336,943=>183,944=>306,945=>336,946=>306,947=>306,948=>306,949=>244,950=>275,951=>336,952=>306,953=>183,954=>338,955=>275,

+	956=>336,957=>275,958=>275,959=>306,960=>336,961=>306,962=>244,963=>306,964=>244,965=>306,966=>367,967=>275,968=>397,969=>397,970=>183,971=>306,

+	972=>306,973=>306,974=>397,976=>306,977=>306,978=>401,979=>401,980=>401,981=>367,982=>336,986=>283,987=>237,988=>339,989=>261,1024=>371,1025=>371,

+	1026=>371,1028=>401,1029=>309,1030=>216,1031=>216,1032=>278,1033=>573,1034=>573,1035=>449,1037=>432,1038=>401,1040=>401,1041=>371,1042=>371,1043=>328,1044=>432,

+	1045=>371,1046=>615,1047=>313,1048=>429,1049=>429,1050=>424,1051=>432,1052=>524,1053=>432,1054=>432,1055=>430,1056=>339,1057=>401,1058=>371,1059=>401,1060=>444,

+	1061=>401,1062=>429,1063=>432,1064=>618,1065=>618,1066=>482,1067=>539,1068=>350,1069=>401,1070=>619,1071=>408,1072=>278,1073=>278,1074=>279,1075=>246,1076=>309,

+	1077=>247,1078=>417,1079=>227,1080=>319,1081=>319,1082=>297,1083=>302,1084=>376,1085=>309,1086=>278,1087=>309,1088=>309,1089=>247,1090=>274,1091=>278,1092=>458,

+	1093=>278,1094=>309,1095=>309,1096=>454,1097=>454,1098=>340,1099=>423,1100=>284,1101=>247,1102=>439,1103=>284,1104=>247,1105=>247,1106=>309,1108=>247,1109=>216,

+	1110=>154,1111=>154,1112=>185,1113=>440,1114=>437,1115=>309,1117=>309,1118=>278,1119=>309,1164=>339,1165=>284,1166=>339,1167=>309,1168=>339,1169=>254,1170=>339,

+	1171=>254,1172=>339,1173=>254,1174=>615,1175=>417,1176=>322,1177=>216,1178=>432,1179=>297,1180=>432,1181=>297,1182=>432,1183=>297,1184=>537,1185=>352,1186=>432,

+	1187=>309,1188=>563,1189=>408,1190=>432,1191=>461,1192=>401,1193=>247,1194=>401,1195=>247,1196=>371,1197=>274,1198=>401,1199=>278,1200=>401,1201=>278,1202=>401,

+	1203=>278,1204=>581,1205=>432,1206=>432,1207=>309,1208=>432,1209=>309,1210=>432,1211=>309,1212=>367,1213=>247,1214=>367,1215=>247,1216=>216,1217=>615,1218=>417,

+	1219=>432,1220=>297,1223=>432,1224=>309,1227=>432,1228=>309,1232=>401,1233=>278,1234=>401,1235=>278,1236=>556,1237=>401,1238=>371,1239=>247,1240=>367,1241=>247,

+	1242=>367,1243=>247,1244=>615,1245=>417,1246=>313,1247=>227,1248=>322,1249=>216,1250=>432,1251=>309,1252=>432,1253=>309,1254=>432,1255=>278,1256=>432,1257=>278,

+	1258=>432,1259=>278,1260=>401,1261=>247,1262=>401,1263=>278,1264=>401,1265=>278,1266=>401,1267=>278,1268=>432,1269=>309,1272=>548,1273=>423,1488=>280,1489=>280,

+	1490=>174,1491=>280,1492=>280,1493=>158,1494=>158,1495=>280,1496=>280,1497=>158,1498=>287,1499=>280,1500=>280,1501=>280,1502=>280,1503=>156,1504=>158,1505=>280,

+	1506=>280,1507=>292,1508=>280,1509=>273,1510=>280,1511=>305,1512=>285,1513=>299,1514=>280,1548=>195,1563=>246,1567=>340,1569=>392,1570=>306,1571=>247,1572=>447,

+	1573=>247,1574=>602,1575=>192,1576=>635,1577=>369,1578=>635,1579=>635,1580=>548,1581=>1173,1582=>548,1583=>363,1584=>363,1585=>439,1586=>442,1587=>875,1588=>875,

+	1589=>1061,1590=>1061,1591=>811,1592=>811,1593=>549,1594=>547,1600=>389,1601=>755,1602=>574,1603=>717,1604=>555,1605=>423,1606=>532,1607=>371,1608=>454,1609=>633,

+	1610=>643,1611=>-19,1612=>-26,1613=>-20,1614=>-19,1615=>-18,1616=>-19,1617=>-19,1618=>-15,1632=>383,1633=>383,1634=>383,1635=>383,1636=>383,1637=>383,1638=>383,

+	1639=>383,1640=>383,1641=>383,1642=>383,1645=>398,7936=>336,7937=>336,7938=>336,7939=>336,7940=>336,7941=>336,7942=>336,7943=>336,7944=>401,7945=>401,7946=>401,

+	7947=>401,7948=>401,7949=>401,7950=>401,7951=>401,7952=>244,7953=>244,7954=>244,7955=>244,7956=>244,7957=>244,7960=>371,7961=>371,7962=>371,7963=>371,7964=>371,

+	7965=>371,7968=>336,7969=>336,7970=>336,7971=>336,7972=>336,7973=>336,7974=>336,7975=>336,7976=>432,7977=>432,7978=>432,7979=>432,7980=>432,7981=>432,7982=>432,

+	7983=>432,7984=>183,7985=>183,7986=>183,7987=>183,7988=>183,7989=>183,7990=>183,7991=>183,7992=>216,7993=>216,7994=>216,7995=>216,7996=>216,7997=>216,7998=>216,

+	7999=>216,8000=>306,8001=>306,8002=>306,8003=>306,8004=>306,8005=>306,8008=>432,8009=>432,8010=>432,8011=>432,8012=>432,8013=>432,8016=>306,8017=>306,8018=>306,

+	8019=>306,8020=>306,8021=>306,8022=>306,8023=>306,8025=>401,8027=>401,8029=>401,8031=>401,8032=>397,8033=>397,8034=>397,8035=>397,8036=>397,8037=>397,8038=>397,

+	8039=>397,8040=>451,8041=>451,8042=>451,8043=>451,8044=>451,8045=>451,8046=>451,8047=>451,8048=>336,8049=>336,8050=>244,8051=>244,8052=>336,8053=>336,8054=>183,

+	8055=>183,8056=>306,8057=>306,8058=>306,8059=>306,8060=>397,8061=>397,8064=>336,8065=>336,8066=>336,8067=>336,8068=>336,8069=>336,8070=>336,8071=>336,8072=>401,

+	8073=>401,8074=>401,8075=>401,8076=>401,8077=>401,8078=>401,8079=>401,8080=>336,8081=>336,8082=>336,8083=>336,8084=>336,8085=>336,8086=>336,8087=>336,8088=>432,

+	8089=>432,8090=>432,8091=>432,8092=>432,8093=>432,8094=>432,8095=>432,8096=>397,8097=>397,8098=>397,8099=>397,8100=>397,8101=>397,8102=>397,8103=>397,8104=>451,

+	8105=>451,8106=>451,8107=>451,8108=>451,8109=>451,8110=>451,8111=>451,8112=>336,8113=>336,8114=>336,8115=>336,8116=>336,8118=>336,8119=>336,8120=>401,8121=>401,

+	8122=>401,8123=>401,8124=>401,8125=>278,8126=>0,8127=>278,8128=>278,8129=>306,8130=>336,8131=>336,8132=>336,8134=>336,8135=>336,8136=>371,8137=>371,8138=>432,

+	8139=>432,8140=>432,8141=>278,8142=>278,8143=>278,8144=>183,8145=>183,8146=>183,8147=>183,8150=>183,8151=>183,8152=>216,8153=>216,8154=>216,8155=>216,8157=>278,

+	8158=>278,8159=>278,8160=>306,8161=>306,8162=>306,8163=>306,8164=>306,8165=>306,8166=>306,8167=>306,8168=>401,8169=>401,8170=>401,8171=>401,8172=>339,8173=>306,

+	8174=>306,8175=>278,8178=>397,8179=>397,8180=>397,8182=>397,8183=>397,8184=>432,8185=>432,8186=>451,8187=>451,8188=>451,8189=>278,8190=>278,8208=>185,8209=>185,

+	8219=>185,8223=>278,8227=>311,8241=>1011,8248=>261,8251=>404,8253=>386,8255=>529,8256=>529,8257=>188,8258=>517,8259=>185,8260=>93,8261=>184,8262=>184,8267=>300,

+	8308=>167,8309=>556,8321=>167,8322=>167,8323=>167,8324=>167,8352=>394,8353=>401,8354=>435,8355=>339,8356=>278,8357=>463,8358=>401,8359=>389,8361=>556,8470=>530,

+	8471=>415,8479=>401,8483=>401,8486=>451,8487=>451,8494=>306,8498=>339,8543=>417,8706=>274,8710=>340,8721=>396,8722=>317,8730=>305,8734=>418,8800=>317,8804=>317,

+	8805=>317,9674=>274,12353=>556,12354=>556,12355=>556,12356=>556,12357=>556,12358=>556,12359=>556,12360=>556,12361=>556,12362=>556,12363=>556,12364=>556,12365=>556,12366=>556,

+	12367=>556,12368=>556,12369=>556,12370=>556,12371=>556,12372=>556,12373=>556,12374=>556,12375=>556,12376=>556,12377=>556,12378=>556,12379=>556,12380=>556,12381=>556,12382=>556,

+	12383=>556,12384=>556,12385=>556,12386=>556,12387=>556,12388=>556,12389=>556,12390=>556,12391=>556,12392=>556,12393=>556,12394=>556,12395=>556,12396=>556,12397=>556,12398=>556,

+	12399=>556,12400=>556,12401=>556,12402=>556,12403=>556,12404=>556,12405=>556,12406=>556,12407=>556,12408=>556,12409=>556,12410=>556,12411=>556,12412=>556,12413=>556,12414=>556,

+	12415=>556,12416=>556,12417=>556,12418=>556,12419=>556,12420=>556,12421=>556,12422=>556,12423=>556,12424=>556,12425=>556,12426=>556,12427=>556,12428=>556,12429=>556,12430=>556,

+	12431=>556,12432=>556,12433=>556,12434=>556,12435=>556,12449=>556,12450=>556,12451=>556,12452=>556,12453=>556,12454=>556,12455=>556,12456=>556,12457=>556,12458=>556,12459=>556,

+	12460=>556,12461=>556,12462=>556,12463=>556,12464=>556,12465=>556,12466=>556,12467=>556,12468=>556,12469=>556,12470=>556,12471=>556,12472=>556,12473=>556,12474=>556,12475=>556,

+	12476=>556,12477=>556,12478=>556,12479=>556,12480=>556,12481=>556,12482=>556,12483=>556,12484=>556,12485=>556,12486=>556,12487=>556,12488=>556,12489=>556,12490=>556,12491=>556,

+	12492=>556,12493=>556,12494=>556,12495=>556,12496=>556,12497=>556,12498=>556,12499=>556,12500=>556,12501=>556,12502=>556,12503=>556,12504=>556,12505=>556,12506=>556,12507=>556,

+	12508=>556,12509=>556,12510=>556,12511=>556,12512=>556,12513=>556,12514=>556,12515=>556,12516=>556,12517=>556,12518=>556,12519=>556,12520=>556,12521=>556,12522=>556,12523=>556,

+	12524=>556,12525=>556,12526=>556,12527=>556,12528=>556,12529=>556,12530=>556,12531=>556,12532=>556,12533=>556,12534=>556,63033=>278,63034=>278,63035=>278,63036=>278,63037=>278,

+	63038=>278,63039=>278,63040=>278,63041=>278,63171=>185,63196=>278,64256=>309,64257=>309,64258=>309,64259=>463,64260=>463,64262=>402,64606=>0,64607=>0,64608=>0,64609=>0,

+	64610=>0,64830=>467,64831=>467,65010=>814,65152=>392,65153=>306,65154=>281,65155=>247,65156=>250,65157=>447,65158=>412,65159=>247,65160=>222,65161=>602,65162=>535,65163=>360,

+	65164=>329,65165=>192,65166=>220,65167=>635,65168=>644,65169=>338,65170=>321,65171=>369,65172=>419,65173=>635,65174=>644,65175=>345,65176=>336,65177=>635,65178=>644,65179=>393,

+	65180=>345,65181=>548,65182=>553,65183=>637,65184=>652,65185=>548,65186=>546,65187=>637,65188=>656,65189=>548,65190=>544,65191=>637,65192=>656,65193=>363,65194=>439,65195=>363,

+	65196=>439,65197=>440,65198=>471,65199=>439,65200=>474,65201=>875,65202=>871,65203=>608,65204=>588,65205=>875,65206=>871,65207=>609,65208=>587,65209=>1061,65210=>1033,65211=>794,

+	65212=>758,65213=>1061,65214=>1033,65215=>794,65216=>761,65217=>811,65218=>793,65219=>659,65220=>647,65221=>811,65222=>793,65223=>659,65224=>642,65225=>549,65226=>481,65227=>512,

+	65228=>409,65229=>547,65230=>476,65231=>512,65232=>409,65233=>755,65234=>748,65235=>416,65236=>442,65237=>574,65238=>550,65239=>416,65240=>442,65241=>717,65242=>687,65243=>883,

+	65244=>409,65245=>555,65246=>511,65247=>338,65248=>297,65249=>423,65250=>478,65251=>489,65252=>476,65253=>532,65254=>548,65255=>336,65256=>326,65257=>371,65258=>391,65259=>524,

+	65260=>412,65261=>454,65262=>412,65263=>633,65264=>566,65265=>643,65266=>560,65267=>357,65268=>333,65269=>623,65270=>617,65271=>603,65272=>621,65273=>576,65274=>617,65275=>576,

+	65276=>625);

+$enc='';

+$diff='';

+$file='almohanad.z';

+$ctg='almohanad.ctg.z';

+$originalsize=227760;

+// --- EOF ---

 

 Binary files /dev/null and b/tcpdf/fonts/almohanad.z differ
--- /dev/null
+++ b/tcpdf/fonts/arialunicid0.php
@@ -1,1 +1,1770 @@
+<?php

+$type='cidfont0';

+$name='ArialUnicodeMS';

+$desc=array('Ascent'=>1069,'Descent'=>-271,'CapHeight'=>1069,'Flags'=>32,'FontBBox'=>'[-1011 -330 2260 1078]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);

+$up=-100;

+$ut=50;

+$dw=1000;

+$cw=array(

+	32=>278,33=>278,34=>355,35=>556,36=>556,37=>889,38=>667,39=>191,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,

+	48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>278,59=>278,60=>584,61=>584,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=>500,

+	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,

+	1027=>567,8218=>222,402=>278,8222=>333,8230=>1000,8224=>556,8225=>556,710=>333,8240=>1000,352=>667,8249=>333,338=>1000,1036=>584,381=>611,1039=>723,8216=>222,

+	8217=>222,8220=>333,8221=>333,8226=>350,8211=>500,8212=>1000,732=>333,8482=>1000,353=>500,8250=>333,339=>944,1116=>437,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=>500,176=>400,177=>584,

+	178=>333,179=>333,180=>333,181=>556,182=>537,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,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,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556,

+	226=>556,227=>556,228=>556,229=>556,230=>889,231=>500,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>556,241=>556,

+	242=>556,243=>556,244=>556,245=>556,246=>556,247=>584,248=>611,249=>556,250=>556,251=>556,252=>556,253=>500,254=>556,255=>500,256=>667,257=>556,

+	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=>627,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=>556,292=>722,293=>556,294=>722,295=>556,296=>278,297=>222,298=>278,299=>222,300=>278,301=>222,302=>278,303=>222,304=>278,305=>278,

+	306=>751,307=>444,308=>500,309=>222,310=>667,311=>500,312=>437,313=>556,314=>222,315=>556,316=>222,317=>556,318=>222,319=>556,320=>318,321=>556,

+	322=>222,323=>722,324=>556,325=>722,326=>556,327=>722,328=>556,329=>626,330=>723,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=>406,

+	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=>222,384=>556,385=>740,386=>655,387=>556,388=>556,389=>556,390=>722,391=>766,392=>579,

+	393=>722,394=>789,395=>655,396=>556,397=>557,398=>667,399=>729,400=>604,401=>611,403=>791,404=>649,405=>806,406=>245,407=>322,408=>667,409=>500,

+	410=>322,411=>500,412=>833,413=>722,414=>556,415=>778,416=>776,417=>556,418=>1019,419=>782,420=>735,421=>556,422=>722,423=>667,424=>500,425=>602,

+	426=>366,427=>278,428=>571,429=>278,430=>611,431=>776,432=>620,433=>748,434=>667,435=>752,436=>615,437=>611,438=>500,439=>628,440=>628,441=>526,

+	442=>480,443=>556,444=>556,445=>526,446=>556,447=>556,448=>278,449=>464,450=>474,451=>278,452=>1333,453=>1222,454=>1056,455=>1030,456=>778,457=>444,

+	458=>1222,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=>534,495=>534,496=>222,497=>1333,498=>1222,499=>1056,500=>778,501=>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,592=>556,593=>556,594=>556,595=>556,596=>500,597=>500,

+	598=>556,599=>556,600=>556,601=>556,602=>777,603=>485,604=>485,605=>686,606=>519,607=>260,608=>556,609=>556,610=>557,611=>500,612=>500,613=>556,

+	614=>556,615=>556,616=>242,617=>282,618=>356,619=>356,620=>425,621=>222,622=>635,623=>833,624=>833,625=>833,626=>556,627=>556,628=>558,629=>556,

+	630=>715,631=>674,632=>558,633=>333,634=>333,635=>333,636=>333,637=>333,638=>312,639=>312,640=>530,641=>530,642=>500,643=>216,644=>276,645=>216,

+	646=>222,647=>278,648=>278,649=>596,650=>558,651=>556,652=>500,653=>722,654=>500,655=>500,656=>500,657=>564,658=>530,659=>530,660=>464,661=>464,

+	662=>464,663=>500,664=>614,665=>526,666=>519,667=>557,668=>558,669=>222,670=>500,671=>416,672=>556,673=>464,674=>464,675=>966,676=>966,677=>1030,

+	678=>689,679=>484,680=>718,688=>326,689=>326,690=>153,691=>201,692=>201,693=>201,694=>304,695=>389,696=>278,697=>222,698=>372,699=>222,700=>222,

+	701=>222,702=>222,703=>222,704=>250,705=>250,706=>320,707=>320,708=>320,709=>320,711=>333,712=>192,713=>333,714=>333,715=>333,716=>192,717=>333,

+	718=>333,719=>333,720=>300,721=>300,722=>222,723=>222,724=>340,725=>340,726=>280,727=>362,728=>333,729=>333,730=>333,731=>333,733=>333,734=>333,

+	736=>278,737=>153,738=>270,739=>274,740=>325,741=>360,742=>360,743=>360,744=>360,745=>360,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,

+	864=>0,865=>0,884=>308,885=>308,890=>278,894=>278,900=>278,901=>278,902=>667,903=>278,904=>704,905=>759,906=>315,908=>778,910=>746,911=>758,

+	912=>222,913=>667,914=>667,915=>550,916=>682,917=>667,918=>611,919=>722,920=>778,921=>278,922=>667,923=>667,924=>833,925=>722,926=>650,927=>778,

+	928=>722,929=>667,931=>602,932=>611,933=>667,934=>808,935=>667,936=>804,937=>758,938=>278,939=>667,940=>576,941=>434,942=>556,943=>222,944=>551,

+	945=>576,946=>563,947=>500,948=>557,949=>434,950=>440,951=>556,952=>556,953=>222,954=>498,955=>500,956=>553,957=>500,958=>432,959=>556,960=>678,

+	961=>571,962=>472,963=>619,964=>382,965=>551,966=>649,967=>522,968=>729,969=>766,970=>222,971=>551,972=>556,973=>551,974=>766,976=>563,977=>616,

+	978=>631,979=>726,980=>631,981=>644,982=>781,986=>722,988=>578,990=>570,992=>692,994=>880,995=>833,996=>684,997=>558,998=>680,999=>529,1000=>557,

+	1001=>505,1002=>623,1003=>603,1004=>610,1005=>611,1006=>568,1007=>434,1008=>600,1009=>571,1010=>500,1011=>222,1025=>667,1026=>865,1028=>717,1029=>667,1030=>278,

+	1031=>278,1032=>500,1033=>1105,1034=>1009,1035=>867,1038=>635,1040=>667,1041=>655,1042=>667,1043=>567,1044=>677,1045=>667,1046=>923,1047=>604,1048=>722,1049=>722,

+	1050=>584,1051=>705,1052=>833,1053=>722,1054=>778,1055=>723,1056=>667,1057=>722,1058=>611,1059=>635,1060=>760,1061=>667,1062=>740,1063=>684,1064=>920,1065=>939,

+	1066=>793,1067=>883,1068=>655,1069=>717,1070=>1006,1071=>722,1072=>556,1073=>573,1074=>531,1075=>383,1076=>583,1077=>556,1078=>669,1079=>458,1080=>559,1081=>559,

+	1082=>437,1083=>571,1084=>683,1085=>552,1086=>556,1087=>542,1088=>556,1089=>500,1090=>458,1091=>500,1092=>823,1093=>500,1094=>562,1095=>533,1096=>802,1097=>823,

+	1098=>620,1099=>717,1100=>523,1101=>510,1102=>744,1103=>542,1105=>556,1106=>556,1107=>383,1108=>510,1109=>500,1110=>222,1111=>278,1112=>222,1113=>873,1114=>811,

+	1115=>556,1118=>500,1119=>542,1120=>976,1121=>766,1122=>656,1123=>521,1124=>950,1125=>694,1126=>667,1127=>597,1128=>952,1129=>817,1130=>654,1131=>600,1132=>932,

+	1133=>817,1134=>604,1135=>458,1136=>804,1137=>729,1138=>778,1139=>556,1140=>667,1141=>500,1142=>667,1143=>500,1144=>1279,1145=>1060,1146=>778,1147=>556,1148=>976,

+	1149=>766,1150=>976,1151=>766,1152=>722,1153=>514,1154=>686,1155=>334,1156=>382,1157=>334,1158=>334,1168=>435,1169=>339,1170=>567,1171=>383,1172=>656,1173=>556,

+	1174=>923,1175=>669,1176=>604,1177=>458,1178=>584,1179=>437,1180=>584,1181=>437,1182=>584,1183=>437,1184=>764,1185=>537,1186=>741,1187=>573,1188=>900,1189=>670,

+	1190=>736,1191=>560,1192=>778,1193=>560,1194=>722,1195=>500,1196=>611,1197=>458,1198=>667,1199=>500,1200=>667,1201=>500,1202=>667,1203=>500,1204=>916,1205=>661,

+	1206=>684,1207=>533,1208=>684,1209=>533,1210=>684,1211=>556,1212=>829,1213=>667,1214=>829,1215=>667,1216=>278,1217=>923,1218=>669,1219=>584,1220=>437,1223=>735,

+	1224=>570,1227=>684,1228=>533,1232=>667,1233=>556,1234=>667,1235=>556,1236=>1000,1237=>889,1238=>667,1239=>556,1240=>729,1241=>556,1242=>729,1243=>556,1244=>923,

+	1245=>669,1246=>604,1247=>458,1248=>604,1249=>492,1250=>722,1251=>559,1252=>722,1253=>559,1254=>778,1255=>556,1256=>778,1257=>556,1258=>778,1259=>556,1262=>635,

+	1263=>500,1264=>635,1265=>500,1266=>635,1267=>500,1268=>684,1269=>533,1272=>883,1273=>717,1329=>635,1330=>531,1331=>583,1332=>583,1333=>531,1334=>531,1335=>427,

+	1336=>531,1337=>750,1338=>635,1339=>531,1340=>375,1341=>583,1342=>698,1343=>531,1344=>427,1345=>531,1346=>583,1347=>531,1348=>635,1349=>698,1350=>635,1351=>635,

+	1352=>531,1353=>531,1354=>698,1355=>531,1356=>635,1357=>531,1358=>698,1359=>583,1360=>479,1361=>583,1362=>531,1363=>698,1364=>698,1365=>635,1366=>750,1369=>271,

+	1370=>271,1371=>150,1372=>300,1373=>271,1374=>271,1375=>420,1377=>583,1378=>427,1379=>427,1380=>427,1381=>427,1382=>427,1383=>427,1384=>427,1385=>459,1386=>427,

+	1387=>427,1388=>323,1389=>531,1390=>427,1391=>427,1392=>427,1393=>427,1394=>427,1395=>427,1396=>427,1397=>271,1398=>427,1399=>375,1400=>427,1401=>375,1402=>583,

+	1403=>427,1404=>427,1405=>427,1406=>427,1407=>583,1408=>427,1409=>427,1410=>323,1411=>583,1412=>375,1413=>375,1414=>583,1415=>527,1417=>271,1425=>360,1426=>360,

+	1427=>360,1428=>360,1429=>360,1430=>360,1431=>360,1432=>360,1433=>360,1434=>360,1435=>360,1436=>360,1437=>360,1438=>360,1439=>360,1440=>360,1441=>360,1443=>360,

+	1444=>360,1445=>360,1446=>360,1447=>360,1448=>360,1449=>360,1450=>360,1451=>360,1452=>360,1453=>360,1454=>360,1455=>360,1456=>360,1457=>360,1458=>360,1459=>360,

+	1460=>360,1461=>360,1462=>360,1463=>360,1464=>360,1465=>360,1467=>360,1468=>360,1469=>360,1470=>366,1471=>360,1472=>225,1473=>360,1474=>360,1475=>238,1476=>360,

+	1488=>577,1489=>563,1490=>411,1491=>512,1492=>594,1493=>316,1494=>326,1495=>594,1496=>594,1497=>316,1498=>507,1499=>527,1500=>484,1501=>594,1502=>594,1503=>316,

+	1504=>338,1505=>604,1506=>550,1507=>567,1508=>569,1509=>505,1510=>514,1511=>583,1512=>507,1513=>700,1514=>633,1520=>590,1521=>590,1522=>590,1523=>216,1524=>412,

+	1548=>278,1563=>278,1567=>556,1569=>529,1570=>243,1571=>243,1572=>470,1573=>243,1574=>731,1575=>243,1576=>771,1577=>514,1578=>771,1579=>771,1580=>544,1581=>544,

+	1582=>544,1583=>430,1584=>430,1585=>421,1586=>421,1587=>1194,1588=>1194,1589=>1291,1590=>1291,1591=>843,1592=>843,1593=>594,1594=>594,1600=>279,1601=>957,1602=>800,

+	1603=>757,1604=>662,1605=>589,1606=>692,1607=>514,1608=>470,1609=>731,1610=>731,1611=>0,1612=>0,1613=>0,1614=>0,1615=>0,1616=>0,1617=>0,1618=>0,

+	1632=>480,1633=>480,1634=>480,1635=>480,1636=>480,1637=>480,1638=>480,1639=>480,1640=>480,1641=>480,1642=>547,1643=>278,1644=>278,1645=>438,1648=>0,1649=>243,

+	1650=>243,1651=>243,1652=>0,1653=>380,1654=>470,1655=>548,1656=>772,1657=>771,1658=>771,1659=>771,1660=>771,1661=>771,1662=>771,1663=>771,1664=>771,1665=>544,

+	1666=>544,1667=>544,1668=>544,1669=>544,1670=>544,1671=>544,1672=>430,1673=>430,1674=>430,1675=>430,1676=>430,1677=>430,1678=>430,1679=>430,1680=>430,1681=>421,

+	1682=>421,1683=>421,1684=>421,1685=>421,1686=>419,1687=>421,1688=>421,1689=>421,1690=>1194,1691=>1194,1692=>1194,1693=>1291,1694=>1291,1695=>843,1696=>594,1697=>957,

+	1698=>957,1699=>957,1700=>957,1701=>957,1702=>957,1703=>800,1704=>800,1705=>828,1706=>1058,1707=>828,1708=>757,1709=>757,1710=>757,1711=>828,1712=>828,1713=>828,

+	1714=>828,1715=>828,1716=>828,1717=>662,1718=>662,1719=>662,1722=>692,1723=>692,1724=>692,1725=>692,1726=>706,1728=>514,1729=>509,1730=>509,1731=>509,1732=>470,

+	1733=>470,1734=>470,1735=>470,1736=>470,1737=>470,1738=>470,1739=>470,1740=>731,1741=>841,1742=>731,1744=>731,1745=>731,1746=>550,1747=>550,1748=>279,1749=>514,

+	1750=>726,1751=>558,1752=>321,1753=>318,1754=>342,1755=>373,1756=>716,1757=>688,1758=>852,1759=>288,1760=>288,1761=>388,1762=>350,1763=>716,1764=>146,1765=>282,

+	1766=>339,1767=>339,1768=>415,1769=>514,1770=>220,1771=>220,1772=>220,1773=>350,1776=>480,1777=>480,1778=>480,1779=>480,1780=>480,1781=>480,1782=>480,1783=>480,

+	1784=>480,1785=>480,2305=>0,2306=>0,2307=>294,2309=>693,2310=>910,2311=>533,2312=>533,2313=>590,2314=>713,2315=>920,2316=>677,2317=>611,2318=>611,2319=>611,

+	2320=>611,2321=>910,2322=>910,2323=>910,2324=>910,2325=>667,2326=>732,2327=>593,2328=>639,2329=>624,2330=>688,2331=>713,2332=>688,2333=>712,2334=>697,2335=>502,

+	2336=>533,2337=>583,2338=>523,2339=>693,2340=>585,2341=>638,2342=>533,2343=>640,2344=>585,2345=>585,2346=>565,2347=>699,2348=>592,2349=>689,2350=>633,2351=>600,

+	2352=>486,2353=>486,2354=>680,2355=>730,2356=>730,2357=>592,2358=>684,2359=>608,2360=>646,2361=>546,2364=>0,2365=>373,2366=>319,2367=>319,2368=>319,2369=>0,

+	2370=>0,2371=>0,2372=>0,2373=>0,2374=>0,2375=>0,2376=>0,2377=>319,2378=>319,2379=>319,2380=>319,2381=>0,2384=>884,2385=>0,2386=>0,2387=>0,

+	2388=>0,2392=>667,2393=>732,2394=>593,2395=>688,2396=>583,2397=>523,2398=>699,2399=>600,2400=>920,2401=>677,2402=>0,2403=>0,2404=>331,2405=>513,2406=>639,

+	2407=>639,2408=>639,2409=>639,2410=>639,2411=>639,2412=>639,2413=>639,2414=>639,2415=>639,2416=>362,2433=>0,2434=>430,2435=>430,2437=>786,2438=>1030,2439=>582,

+	2440=>603,2441=>648,2442=>757,2443=>758,2444=>630,2447=>685,2448=>746,2451=>711,2452=>776,2453=>779,2454=>655,2455=>606,2456=>645,2457=>661,2458=>554,2459=>585,

+	2460=>729,2461=>752,2462=>893,2463=>567,2464=>625,2465=>648,2466=>567,2467=>598,2468=>680,2469=>645,2470=>609,2471=>596,2472=>595,2474=>635,2475=>780,2476=>593,

+	2477=>677,2478=>621,2479=>601,2480=>593,2482=>640,2486=>598,2487=>596,2488=>637,2489=>582,2492=>0,2494=>245,2495=>245,2496=>245,2497=>0,2498=>0,2499=>0,

+	2500=>0,2503=>309,2504=>309,2507=>932,2508=>932,2509=>0,2519=>245,2524=>648,2525=>553,2527=>596,2528=>758,2529=>630,2530=>0,2531=>335,2534=>610,2535=>559,

+	2536=>595,2537=>711,2538=>610,2539=>661,2540=>661,2541=>559,2542=>661,2543=>600,2544=>593,2545=>593,2546=>601,2547=>567,2548=>601,2549=>699,2550=>661,2551=>267,

+	2552=>610,2553=>424,2554=>548,2562=>0,2565=>691,2566=>936,2567=>803,2568=>803,2569=>678,2570=>678,2575=>557,2576=>691,2579=>678,2580=>691,2581=>602,2582=>567,

+	2583=>641,2584=>688,2585=>565,2586=>592,2587=>603,2588=>591,2589=>541,2590=>558,2591=>543,2592=>581,2593=>596,2594=>640,2595=>640,2596=>591,2597=>564,2598=>640,

+	2599=>564,2600=>581,2602=>564,2603=>551,2604=>560,2605=>549,2606=>558,2607=>652,2608=>540,2610=>677,2611=>677,2613=>601,2614=>558,2616=>558,2617=>549,2620=>0,

+	2622=>246,2623=>246,2624=>246,2625=>0,2626=>0,2631=>0,2632=>0,2635=>0,2636=>0,2637=>0,2649=>567,2650=>690,2651=>591,2652=>591,2654=>581,2662=>591,

+	2663=>591,2664=>591,2665=>591,2666=>591,2667=>591,2668=>591,2669=>591,2670=>591,2671=>591,2672=>0,2673=>0,2674=>557,2675=>678,2676=>894,2689=>0,2690=>0,

+	2691=>300,2693=>781,2694=>1044,2695=>589,2696=>589,2697=>560,2698=>758,2699=>806,2701=>781,2703=>781,2704=>781,2705=>1044,2707=>1044,2708=>1044,2709=>413,2710=>773,

+	2711=>606,2712=>558,2713=>483,2714=>600,2715=>691,2716=>811,2717=>647,2718=>651,2719=>453,2720=>450,2721=>425,2722=>478,2723=>694,2724=>534,2725=>553,2726=>446,

+	2727=>541,2728=>582,2730=>572,2731=>437,2732=>663,2733=>756,2734=>594,2735=>493,2736=>392,2738=>613,2739=>656,2741=>538,2742=>611,2743=>507,2744=>663,2745=>587,

+	2748=>0,2749=>478,2750=>273,2751=>273,2752=>273,2753=>0,2754=>0,2755=>0,2756=>0,2757=>0,2759=>0,2760=>0,2761=>273,2763=>273,2764=>273,2765=>0,

+	2768=>843,2784=>893,2790=>625,2791=>625,2792=>625,2793=>625,2794=>625,2795=>625,2796=>625,2797=>625,2798=>625,2799=>625,2817=>0,2818=>306,2819=>391,2821=>590,

+	2822=>808,2823=>658,2824=>658,2825=>633,2826=>654,2827=>636,2828=>540,2831=>560,2832=>938,2835=>600,2836=>973,2837=>603,2838=>620,2839=>620,2840=>605,2841=>712,

+	2842=>579,2843=>579,2844=>593,2845=>564,2846=>581,2847=>604,2848=>578,2849=>579,2850=>579,2851=>607,2852=>579,2853=>587,2854=>579,2855=>602,2856=>579,2858=>605,

+	2859=>728,2860=>579,2861=>643,2862=>605,2863=>628,2864=>619,2866=>653,2867=>593,2870=>620,2871=>605,2872=>605,2873=>579,2876=>0,2877=>333,2878=>218,2879=>0,

+	2880=>294,2881=>0,2882=>0,2883=>0,2887=>479,2888=>479,2891=>1026,2892=>1026,2893=>0,2902=>0,2903=>218,2908=>579,2909=>579,2911=>599,2912=>636,2913=>540,

+	2918=>578,2919=>480,2920=>480,2921=>622,2922=>506,2923=>605,2924=>529,2925=>548,2926=>512,2927=>528,2928=>561,2946=>0,2947=>742,2949=>1002,2950=>1118,2951=>994,

+	2952=>660,2953=>1012,2954=>1231,2958=>726,2959=>731,2960=>870,2962=>763,2963=>763,2964=>1636,2965=>667,2969=>830,2970=>584,2972=>876,2974=>986,2975=>802,2979=>1295,

+	2980=>656,2984=>630,2985=>1012,2986=>694,2990=>727,2991=>790,2992=>545,2993=>718,2994=>821,2995=>871,2996=>724,2997=>873,2999=>1087,3000=>1098,3001=>1274,3006=>547,

+	3007=>172,3008=>93,3009=>519,3010=>814,3014=>748,3015=>681,3016=>956,3018=>1666,3019=>1666,3020=>1994,3021=>0,3031=>871,3047=>667,3048=>1012,3049=>751,3050=>740,

+	3051=>924,3052=>884,3053=>726,3054=>1002,3055=>825,3056=>717,3057=>719,3058=>774,3073=>365,3074=>601,3075=>346,3077=>720,3078=>786,3079=>567,3080=>1159,3081=>690,

+	3082=>1047,3083=>1299,3084=>913,3086=>625,3087=>625,3088=>712,3090=>655,3091=>655,3092=>862,3093=>515,3094=>680,3095=>526,3096=>943,3097=>655,3098=>684,3099=>684,

+	3100=>670,3101=>1205,3102=>732,3103=>888,3104=>597,3105=>709,3106=>709,3107=>809,3108=>715,3109=>702,3110=>702,3111=>702,3112=>607,3114=>623,3115=>623,3116=>681,

+	3117=>681,3118=>932,3119=>1203,3120=>597,3121=>893,3122=>631,3123=>608,3125=>620,3126=>541,3127=>667,3128=>640,3129=>911,3134=>644,3135=>298,3136=>298,3137=>361,

+	3138=>682,3139=>342,3140=>704,3142=>624,3143=>624,3144=>900,3146=>849,3147=>849,3148=>976,3149=>669,3157=>298,3158=>119,3168=>1620,3169=>1281,3174=>840,3175=>840,

+	3176=>840,3177=>840,3178=>840,3179=>840,3180=>840,3181=>840,3182=>840,3183=>840,3202=>440,3203=>251,3205=>654,3206=>654,3207=>631,3208=>891,3209=>957,3210=>1293,

+	3211=>1044,3212=>744,3214=>650,3215=>650,3216=>659,3218=>667,3219=>667,3220=>667,3221=>462,3222=>749,3223=>543,3224=>779,3225=>674,3226=>682,3227=>660,3228=>667,

+	3229=>1171,3230=>926,3231=>671,3232=>557,3233=>669,3234=>669,3235=>728,3236=>544,3237=>672,3238=>672,3239=>672,3240=>560,3242=>668,3243=>668,3244=>681,3245=>687,

+	3246=>972,3247=>1101,3248=>556,3249=>677,3250=>661,3251=>545,3253=>666,3254=>553,3255=>670,3256=>549,3257=>716,3262=>425,3263=>341,3264=>680,3265=>354,3266=>714,

+	3267=>386,3268=>638,3270=>307,3271=>670,3272=>462,3274=>908,3275=>1251,3276=>434,3277=>336,3285=>344,3286=>404,3294=>673,3296=>1695,3297=>978,3302=>549,3303=>549,

+	3304=>549,3305=>549,3306=>549,3307=>549,3308=>549,3309=>549,3310=>549,3311=>549,3330=>368,3331=>305,3333=>1201,3334=>1351,3335=>905,3336=>1459,3337=>635,3338=>1198,

+	3339=>861,3340=>957,3342=>1211,3343=>1202,3344=>1839,3346=>642,3347=>1114,3348=>1195,3349=>861,3350=>982,3351=>874,3352=>1354,3353=>957,3354=>1016,3355=>1266,3356=>712,

+	3357=>1454,3358=>1215,3359=>563,3360=>565,3361=>1192,3362=>1244,3363=>1268,3364=>878,3365=>966,3366=>545,3367=>879,3368=>879,3370=>1031,3371=>1175,3372=>1334,3373=>546,

+	3374=>643,3375=>949,3376=>642,3377=>555,3378=>945,3379=>631,3380=>553,3381=>959,3382=>936,3383=>1122,3384=>1190,3385=>1112,3390=>475,3391=>418,3392=>442,3393=>340,

+	3394=>340,3395=>473,3398=>640,3399=>530,3400=>1279,3402=>1368,3403=>1258,3404=>1447,3405=>0,3415=>553,3424=>861,3425=>1100,3430=>1095,3431=>929,3432=>854,3433=>1181,

+	3434=>658,3435=>972,3436=>1210,3437=>650,3438=>959,3439=>896,3585=>595,3586=>648,3587=>665,3588=>608,3589=>608,3590=>665,3591=>471,3592=>556,3593=>652,3594=>664,

+	3595=>681,3596=>816,3597=>849,3598=>620,3599=>620,3600=>541,3601=>785,3602=>826,3603=>887,3604=>598,3605=>605,3606=>595,3607=>650,3608=>541,3609=>652,3610=>608,

+	3611=>608,3612=>630,3613=>630,3614=>695,3615=>695,3616=>620,3617=>581,3618=>588,3619=>501,3620=>595,3621=>569,3622=>620,3623=>519,3624=>592,3625=>659,3626=>574,

+	3627=>654,3628=>695,3629=>566,3630=>574,3631=>517,3632=>452,3633=>0,3634=>496,3635=>496,3636=>0,3637=>0,3638=>0,3639=>0,3640=>0,3641=>0,3642=>0,

+	3647=>687,3648=>302,3649=>571,3650=>478,3651=>515,3652=>515,3653=>496,3654=>506,3655=>0,3656=>0,3657=>0,3658=>0,3659=>0,3660=>0,3661=>0,3662=>0,

+	3663=>555,3664=>598,3665=>640,3666=>688,3667=>690,3668=>657,3669=>657,3670=>635,3671=>839,3672=>693,3673=>769,3674=>673,3675=>994,3713=>775,3714=>707,3716=>724,

+	3719=>524,3720=>690,3722=>678,3725=>711,3732=>719,3733=>834,3734=>776,3735=>916,3737=>744,3738=>740,3739=>740,3740=>834,3741=>834,3742=>854,3743=>854,3745=>775,

+	3746=>724,3747=>697,3749=>700,3751=>700,3754=>708,3755=>916,3757=>700,3758=>697,3759=>658,3760=>432,3761=>534,3762=>476,3763=>476,3764=>778,3765=>778,3766=>778,

+	3767=>778,3768=>778,3769=>778,3771=>778,3772=>778,3773=>670,3776=>420,3777=>806,3778=>430,3779=>446,3780=>346,3782=>571,3784=>778,3785=>778,3786=>778,3787=>778,

+	3788=>778,3789=>778,3792=>721,3793=>719,3794=>601,3795=>711,3796=>686,3797=>686,3798=>834,3799=>756,3800=>724,3801=>906,3804=>1272,3805=>1272,3840=>600,3841=>600,

+	3842=>600,3843=>600,3844=>600,3845=>600,3846=>600,3847=>600,3848=>600,3849=>600,3850=>600,3851=>600,3852=>600,3853=>600,3854=>600,3855=>600,3856=>600,3857=>600,

+	3858=>600,3859=>600,3860=>600,3861=>600,3862=>600,3863=>600,3864=>600,3865=>600,3866=>600,3867=>600,3868=>600,3869=>600,3870=>600,3871=>600,3872=>600,3873=>600,

+	3874=>600,3875=>600,3876=>600,3877=>600,3878=>600,3879=>600,3880=>600,3881=>600,3882=>600,3883=>600,3884=>600,3885=>600,3886=>600,3887=>600,3888=>600,3889=>600,

+	3890=>600,3891=>600,3892=>600,3893=>600,3894=>600,3895=>600,3896=>600,3897=>600,3898=>600,3899=>600,3900=>600,3901=>600,3902=>600,3903=>600,3904=>600,3905=>600,

+	3906=>600,3907=>600,3908=>600,3909=>600,3910=>600,3911=>600,3913=>600,3914=>600,3915=>600,3916=>600,3917=>600,3918=>600,3919=>600,3920=>600,3921=>600,3922=>600,

+	3923=>600,3924=>600,3925=>600,3926=>600,3927=>600,3928=>600,3929=>600,3930=>600,3931=>600,3932=>600,3933=>600,3934=>600,3935=>600,3936=>600,3937=>600,3938=>600,

+	3939=>600,3940=>600,3941=>600,3942=>600,3943=>600,3944=>600,3945=>600,3953=>600,3954=>600,3955=>600,3956=>600,3957=>600,3958=>600,3959=>600,3960=>600,3961=>600,

+	3962=>600,3963=>600,3964=>600,3965=>600,3966=>600,3967=>600,3968=>600,3969=>600,3970=>600,3971=>600,3972=>600,3973=>600,3974=>600,3975=>600,3976=>600,3977=>600,

+	3978=>600,3979=>600,3984=>600,3985=>600,3986=>600,3987=>600,3988=>600,3989=>600,3991=>600,3993=>600,3994=>600,3995=>600,3996=>600,3997=>600,3998=>600,3999=>600,

+	4000=>600,4001=>600,4002=>600,4003=>600,4004=>600,4005=>600,4006=>600,4007=>600,4008=>600,4009=>600,4010=>600,4011=>600,4012=>600,4013=>600,4017=>600,4018=>600,

+	4019=>600,4020=>600,4021=>600,4022=>600,4023=>600,4025=>600,4256=>662,4257=>677,4258=>708,4259=>696,4260=>609,4261=>790,4262=>664,4263=>785,4264=>560,4265=>634,

+	4266=>782,4267=>701,4268=>629,4269=>682,4270=>705,4271=>692,4272=>734,4273=>615,4274=>592,4275=>680,4276=>679,4277=>705,4278=>643,4279=>623,4280=>623,4281=>629,

+	4282=>633,4283=>770,4284=>592,4285=>662,4286=>629,4287=>672,4288=>735,4289=>576,4290=>606,4291=>605,4292=>676,4293=>792,4304=>435,4305=>556,4306=>565,4307=>872,

+	4308=>506,4309=>544,4310=>723,4311=>868,4312=>530,4313=>532,4314=>955,4315=>552,4316=>565,4317=>712,4318=>547,4319=>574,4320=>685,4321=>554,4322=>806,4323=>810,

+	4324=>777,4325=>502,4326=>686,4327=>512,4328=>552,4329=>496,4330=>568,4331=>552,4332=>592,4333=>565,4334=>552,4335=>741,4336=>549,4337=>659,4338=>559,4339=>524,

+	4340=>482,4341=>565,4342=>822,4347=>506,4352=>1000,4353=>1000,4354=>1000,4355=>1000,4356=>1000,4357=>1000,4358=>1000,4359=>1000,4360=>1000,4361=>1000,4362=>1000,4363=>1000,

+	4364=>1000,4365=>1000,4366=>1000,4367=>1000,4368=>1000,4369=>1000,4370=>1000,4371=>1000,4372=>1000,4373=>1000,4374=>1000,4375=>1000,4376=>1000,4377=>1000,4378=>1000,4379=>1000,

+	4380=>1000,4381=>1000,4382=>1000,4383=>1000,4384=>1000,4385=>1000,4386=>1000,4387=>1000,4388=>1000,4389=>1000,4390=>1000,4391=>1000,4392=>1000,4393=>1000,4394=>1000,4395=>1000,

+	4396=>1000,4397=>1000,4398=>1000,4399=>1000,4400=>1000,4401=>1000,4402=>1000,4403=>1000,4404=>1000,4405=>1000,4406=>1000,4407=>1000,4408=>1000,4409=>1000,4410=>1000,4411=>1000,

+	4412=>1000,4413=>1000,4414=>1000,4415=>1000,4416=>1000,4417=>1000,4418=>1000,4419=>1000,4420=>1000,4421=>1000,4422=>1000,4423=>1000,4424=>1000,4425=>1000,4426=>1000,4427=>1000,

+	4428=>1000,4429=>1000,4430=>1000,4431=>1000,4432=>1000,4433=>1000,4434=>1000,4435=>1000,4436=>1000,4437=>1000,4438=>1000,4439=>1000,4440=>1000,4441=>1000,4447=>1000,4448=>1000,

+	4449=>1000,4450=>1000,4451=>1000,4452=>1000,4453=>1000,4454=>1000,4455=>1000,4456=>1000,4457=>1000,4458=>1000,4459=>1000,4460=>1000,4461=>1000,4462=>1000,4463=>1000,4464=>1000,

+	4465=>1000,4466=>1000,4467=>1000,4468=>1000,4469=>1000,4470=>1000,4471=>1000,4472=>1000,4473=>1000,4474=>1000,4475=>1000,4476=>1000,4477=>1000,4478=>1000,4479=>1000,4480=>1000,

+	4481=>1000,4482=>1000,4483=>1000,4484=>1000,4485=>1000,4486=>1000,4487=>1000,4488=>1000,4489=>1000,4490=>1000,4491=>1000,4492=>1000,4493=>1000,4494=>1000,4495=>1000,4496=>1000,

+	4497=>1000,4498=>1000,4499=>1000,4500=>1000,4501=>1000,4502=>1000,4503=>1000,4504=>1000,4505=>1000,4506=>1000,4507=>1000,4508=>1000,4509=>1000,4510=>1000,4511=>1000,4512=>1000,

+	4513=>1000,4514=>1000,4520=>1000,4521=>1000,4522=>1000,4523=>1000,4524=>1000,4525=>1000,4526=>1000,4527=>1000,4528=>1000,4529=>1000,4530=>1000,4531=>1000,4532=>1000,4533=>1000,

+	4534=>1000,4535=>1000,4536=>1000,4537=>1000,4538=>1000,4539=>1000,4540=>1000,4541=>1000,4542=>1000,4543=>1000,4544=>1000,4545=>1000,4546=>1000,4547=>1000,4548=>1000,4549=>1000,

+	4550=>1000,4551=>1000,4552=>1000,4553=>1000,4554=>1000,4555=>1000,4556=>1000,4557=>1000,4558=>1000,4559=>1000,4560=>1000,4561=>1000,4562=>1000,4563=>1000,4564=>1000,4565=>1000,

+	4566=>1000,4567=>1000,4568=>1000,4569=>1000,4570=>1000,4571=>1000,4572=>1000,4573=>1000,4574=>1000,4575=>1000,4576=>1000,4577=>1000,4578=>1000,4579=>1000,4580=>1000,4581=>1000,

+	4582=>1000,4583=>1000,4584=>1000,4585=>1000,4586=>1000,4587=>1000,4588=>1000,4589=>1000,4590=>1000,4591=>1000,4592=>1000,4593=>1000,4594=>1000,4595=>1000,4596=>1000,4597=>1000,

+	4598=>1000,4599=>1000,4600=>1000,4601=>1000,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=>556,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=>776,7899=>556,7900=>776,7901=>556,7902=>776,7903=>556,

+	7904=>776,7905=>556,7906=>776,7907=>556,7908=>722,7909=>556,7910=>722,7911=>556,7912=>776,7913=>620,7914=>776,7915=>620,7916=>776,7917=>620,7918=>776,7919=>620,

+	7920=>776,7921=>620,7922=>667,7923=>500,7924=>667,7925=>500,7926=>667,7927=>500,7928=>667,7929=>500,7936=>576,7937=>576,7938=>576,7939=>576,7940=>576,7941=>576,

+	7942=>576,7943=>576,7944=>667,7945=>667,7946=>680,7947=>680,7948=>680,7949=>680,7950=>718,7951=>718,7952=>434,7953=>434,7954=>434,7955=>434,7956=>434,7957=>434,

+	7960=>692,7961=>692,7962=>823,7963=>823,7964=>823,7965=>823,7968=>556,7969=>556,7970=>556,7971=>556,7972=>556,7973=>556,7974=>556,7975=>556,7976=>747,7977=>747,

+	7978=>878,7979=>878,7980=>878,7981=>878,7982=>923,7983=>923,7984=>222,7985=>222,7986=>222,7987=>222,7988=>222,7989=>222,7990=>222,7991=>222,7992=>303,7993=>303,

+	7994=>434,7995=>434,7996=>434,7997=>434,7998=>479,7999=>479,8000=>556,8001=>556,8002=>556,8003=>556,8004=>556,8005=>556,8008=>778,8009=>778,8010=>894,8011=>894,

+	8012=>894,8013=>894,8016=>551,8017=>551,8018=>551,8019=>551,8020=>551,8021=>551,8022=>551,8023=>551,8025=>777,8027=>893,8029=>885,8031=>940,8032=>766,8033=>766,

+	8034=>766,8035=>766,8036=>766,8037=>766,8038=>766,8039=>766,8040=>758,8041=>758,8042=>874,8043=>874,8044=>868,8045=>867,8046=>911,8047=>911,8048=>576,8049=>576,

+	8050=>434,8051=>434,8052=>556,8053=>556,8054=>222,8055=>222,8056=>556,8057=>556,8058=>551,8059=>551,8060=>766,8061=>766,8064=>576,8065=>576,8066=>576,8067=>576,

+	8068=>576,8069=>576,8070=>576,8071=>576,8072=>667,8073=>667,8074=>680,8075=>680,8076=>680,8077=>680,8078=>718,8079=>718,8080=>556,8081=>556,8082=>556,8083=>556,

+	8084=>556,8085=>556,8086=>556,8087=>556,8088=>747,8089=>747,8090=>878,8091=>878,8092=>878,8093=>878,8094=>923,8095=>923,8096=>766,8097=>766,8098=>766,8099=>766,

+	8100=>766,8101=>766,8102=>766,8103=>766,8104=>758,8105=>758,8106=>874,8107=>874,8108=>868,8109=>867,8110=>911,8111=>911,8112=>576,8113=>576,8114=>576,8115=>576,

+	8116=>576,8118=>576,8119=>576,8120=>667,8121=>667,8122=>667,8123=>667,8124=>667,8125=>278,8126=>278,8127=>278,8128=>278,8129=>278,8130=>556,8131=>556,8132=>556,

+	8134=>556,8135=>556,8136=>693,8137=>704,8138=>748,8139=>759,8140=>722,8141=>278,8142=>278,8143=>278,8144=>222,8145=>222,8146=>222,8147=>222,8150=>222,8151=>222,

+	8152=>278,8153=>278,8154=>304,8155=>304,8157=>278,8158=>278,8159=>278,8160=>551,8161=>551,8162=>551,8163=>551,8164=>571,8165=>571,8166=>551,8167=>551,8168=>667,

+	8169=>667,8170=>742,8171=>746,8172=>693,8173=>278,8174=>278,8175=>278,8178=>766,8179=>766,8180=>766,8182=>766,8183=>766,8184=>778,8185=>778,8186=>758,8187=>758,

+	8188=>758,8189=>278,8190=>278,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>333,8197=>250,8198=>167,8199=>556,8200=>278,8201=>100,8202=>50,8203=>0,8204=>0,

+	8205=>0,8208=>333,8209=>333,8210=>556,8213=>564,8214=>428,8215=>500,8219=>222,8223=>333,8227=>350,8228=>278,8229=>556,8231=>278,8232=>0,8233=>0,8241=>1330,

+	8242=>222,8243=>372,8244=>522,8245=>206,8246=>356,8247=>506,8248=>312,8251=>1000,8252=>471,8253=>556,8254=>500,8255=>945,8256=>945,8257=>312,8258=>820,8259=>333,

+	8260=>167,8261=>278,8262=>278,8304=>333,8308=>333,8309=>333,8310=>333,8311=>333,8312=>333,8313=>333,8314=>333,8315=>333,8316=>333,8317=>210,8318=>210,8319=>333,

+	8320=>333,8321=>333,8322=>333,8323=>333,8324=>333,8325=>333,8326=>333,8327=>333,8328=>333,8329=>333,8330=>333,8331=>333,8332=>333,8333=>210,8334=>210,8352=>556,

+	8353=>556,8354=>556,8355=>556,8356=>556,8357=>833,8358=>556,8359=>556,8360=>1024,8361=>940,8362=>784,8363=>556,8400=>600,8401=>600,8402=>600,8403=>600,8404=>700,

+	8405=>700,8406=>600,8407=>600,8408=>600,8409=>600,8410=>600,8411=>600,8412=>600,8413=>900,8414=>900,8415=>900,8416=>900,8417=>700,8448=>889,8449=>889,8450=>667,

+	8451=>1022,8452=>611,8453=>889,8454=>889,8455=>501,8456=>667,8457=>921,8458=>510,8459=>906,8460=>988,8461=>722,8462=>500,8463=>500,8464=>688,8465=>553,8466=>708,

+	8467=>291,8468=>778,8469=>722,8470=>1073,8471=>737,8472=>740,8473=>556,8474=>722,8475=>927,8476=>795,8477=>667,8478=>667,8479=>667,8480=>1000,8481=>1174,8483=>722,

+	8484=>611,8485=>542,8486=>768,8487=>768,8488=>698,8489=>321,8490=>667,8491=>667,8492=>927,8493=>646,8494=>556,8495=>385,8496=>615,8497=>688,8498=>611,8499=>1115,

+	8500=>406,8501=>688,8502=>688,8503=>344,8504=>688,8531=>834,8532=>834,8533=>834,8534=>834,8535=>834,8536=>834,8537=>834,8538=>834,8539=>834,8540=>834,8541=>834,

+	8542=>834,8543=>834,8544=>278,8545=>555,8546=>832,8547=>933,8548=>667,8549=>934,8550=>1031,8551=>1268,8552=>944,8553=>667,8554=>944,8555=>1035,8556=>556,8557=>722,

+	8558=>722,8559=>833,8560=>222,8561=>444,8562=>666,8563=>700,8564=>500,8565=>700,8566=>922,8567=>1144,8568=>712,8569=>500,8570=>712,8571=>934,8572=>222,8573=>500,

+	8574=>556,8575=>833,8576=>983,8577=>722,8578=>983,8592=>713,8593=>713,8594=>713,8595=>713,8596=>713,8597=>713,8598=>713,8599=>713,8600=>713,8601=>713,8602=>713,

+	8603=>713,8604=>713,8605=>713,8606=>713,8607=>713,8608=>713,8609=>713,8610=>713,8611=>713,8612=>713,8613=>713,8614=>713,8615=>713,8616=>713,8617=>713,8618=>713,

+	8619=>713,8620=>713,8621=>813,8622=>813,8623=>713,8624=>713,8625=>713,8626=>713,8627=>713,8628=>713,8629=>713,8630=>713,8631=>713,8632=>713,8633=>713,8634=>800,

+	8635=>800,8636=>713,8637=>713,8638=>713,8639=>713,8640=>713,8641=>713,8642=>713,8643=>713,8644=>713,8645=>713,8646=>713,8647=>713,8648=>713,8649=>713,8650=>713,

+	8651=>713,8652=>713,8653=>713,8654=>950,8655=>713,8656=>713,8657=>713,8658=>713,8659=>713,8660=>863,8661=>713,8662=>713,8663=>713,8664=>713,8665=>713,8666=>713,

+	8667=>713,8668=>813,8669=>813,8670=>713,8671=>713,8672=>713,8673=>713,8674=>713,8675=>713,8676=>713,8677=>713,8678=>713,8679=>713,8680=>713,8681=>713,8682=>713,

+	8704=>600,8705=>600,8706=>494,8707=>600,8708=>600,8709=>800,8710=>612,8711=>612,8712=>549,8713=>549,8714=>549,8715=>549,8716=>549,8717=>549,8718=>549,8719=>823,

+	8720=>823,8721=>713,8722=>584,8723=>584,8724=>584,8725=>167,8726=>278,8727=>389,8728=>400,8729=>400,8730=>600,8731=>600,8732=>600,8733=>549,8734=>549,8735=>584,

+	8736=>584,8737=>584,8738=>584,8739=>260,8740=>444,8741=>418,8742=>602,8743=>561,8744=>561,8745=>561,8746=>561,8747=>506,8748=>806,8749=>1106,8750=>506,8751=>806,

+	8752=>1106,8753=>506,8754=>506,8755=>506,8756=>561,8757=>561,8758=>422,8759=>561,8760=>584,8761=>584,8762=>584,8763=>584,8764=>584,8765=>584,8766=>584,8767=>584,

+	8768=>422,8769=>584,8770=>584,8771=>584,8772=>584,8773=>584,8774=>584,8775=>584,8776=>584,8777=>584,8778=>584,8779=>584,8780=>584,8781=>584,8782=>584,8783=>584,

+	8784=>584,8785=>584,8786=>584,8787=>584,8788=>737,8789=>737,8790=>584,8791=>584,8792=>584,8793=>584,8794=>584,8795=>584,8796=>584,8797=>584,8798=>584,8799=>584,

+	8800=>584,8801=>584,8802=>584,8803=>584,8804=>584,8805=>584,8806=>584,8807=>584,8808=>584,8809=>584,8810=>969,8811=>969,8812=>584,8813=>584,8814=>584,8815=>584,

+	8816=>584,8817=>584,8818=>584,8819=>584,8820=>584,8821=>584,8822=>584,8823=>584,8824=>584,8825=>584,8826=>584,8827=>584,8828=>584,8829=>584,8830=>584,8831=>584,

+	8832=>584,8833=>584,8834=>678,8835=>678,8836=>678,8837=>678,8838=>678,8839=>678,8840=>678,8841=>678,8842=>678,8843=>678,8844=>561,8845=>561,8846=>561,8847=>678,

+	8848=>678,8849=>673,8850=>673,8851=>561,8852=>561,8853=>800,8854=>800,8855=>800,8856=>800,8857=>800,8858=>800,8859=>800,8860=>800,8861=>800,8862=>800,8863=>800,

+	8864=>800,8865=>800,8866=>549,8867=>549,8868=>549,8869=>549,8870=>399,8871=>399,8872=>549,8873=>549,8874=>549,8875=>672,8876=>549,8877=>549,8878=>549,8879=>672,

+	8880=>549,8881=>549,8882=>549,8883=>549,8884=>549,8885=>549,8886=>713,8887=>713,8888=>713,8889=>549,8890=>549,8891=>584,8892=>584,8893=>584,8894=>584,8895=>584,

+	8896=>561,8897=>561,8898=>561,8899=>561,8900=>549,8901=>250,8902=>549,8903=>649,8904=>630,8905=>630,8906=>630,8907=>630,8908=>630,8909=>584,8910=>561,8911=>561,

+	8912=>668,8913=>668,8914=>668,8915=>668,8916=>561,8917=>602,8918=>584,8919=>584,8920=>1354,8921=>1354,8922=>584,8923=>584,8924=>584,8925=>584,8926=>584,8927=>584,

+	8928=>584,8929=>584,8930=>673,8931=>673,8932=>673,8933=>673,8934=>584,8935=>584,8936=>584,8937=>584,8938=>584,8939=>584,8940=>584,8941=>584,8942=>278,8943=>1000,

+	8944=>1000,8945=>1000,8960=>549,8962=>549,8963=>549,8964=>549,8965=>549,8966=>549,8967=>549,8968=>449,8969=>449,8970=>449,8971=>449,8972=>549,8973=>549,8974=>549,

+	8975=>549,8976=>549,8977=>549,8978=>800,8979=>800,8980=>549,8981=>549,8982=>549,8983=>650,8984=>780,8985=>549,8986=>549,8987=>549,8988=>549,8989=>549,8990=>549,

+	8991=>549,8992=>506,8993=>506,8994=>713,8995=>713,8996=>1000,8997=>1000,8998=>1000,8999=>1000,9000=>1000,9001=>329,9002=>329,9003=>1000,9004=>549,9005=>549,9006=>549,

+	9007=>549,9008=>549,9009=>549,9010=>549,9011=>549,9012=>549,9013=>549,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,9109=>600,9216=>600,9217=>600,9218=>600,

+	9219=>600,9220=>600,9221=>600,9222=>600,9223=>600,9224=>600,9225=>600,9226=>600,9227=>600,9228=>600,9229=>600,9230=>600,9231=>600,9232=>600,9233=>600,9234=>600,

+	9235=>600,9236=>600,9237=>600,9238=>600,9239=>600,9240=>600,9241=>600,9242=>600,9243=>600,9244=>600,9245=>600,9246=>600,9247=>600,9248=>600,9249=>600,9250=>600,

+	9251=>600,9252=>600,9280=>604,9281=>604,9282=>604,9283=>604,9284=>604,9285=>604,9286=>750,9287=>750,9288=>750,9289=>750,9290=>604,9312=>1000,9313=>1000,9314=>1000,

+	9315=>1000,9316=>1000,9317=>1000,9318=>1000,9319=>1000,9320=>1000,9321=>1000,9322=>1000,9323=>1000,9324=>1000,9325=>1000,9326=>1000,9327=>1000,9328=>1000,9329=>1000,9330=>1000,

+	9331=>1000,9332=>1000,9333=>1000,9334=>1000,9335=>1000,9336=>1000,9337=>1000,9338=>1000,9339=>1000,9340=>1000,9341=>1000,9342=>1000,9343=>1000,9344=>1000,9345=>1000,9346=>1000,

+	9347=>1000,9348=>1000,9349=>1000,9350=>1000,9351=>1000,9352=>1000,9353=>1000,9354=>1000,9355=>1000,9356=>1000,9357=>1000,9358=>1000,9359=>1000,9360=>1000,9361=>1000,9362=>1000,

+	9363=>1000,9364=>1000,9365=>1000,9366=>1000,9367=>1000,9368=>1000,9369=>1000,9370=>1000,9371=>1000,9372=>1000,9373=>1000,9374=>1000,9375=>1000,9376=>1000,9377=>1000,9378=>1000,

+	9379=>1000,9380=>1000,9381=>1000,9382=>1000,9383=>1000,9384=>1000,9385=>1000,9386=>1000,9387=>1000,9388=>1000,9389=>1000,9390=>1000,9391=>1000,9392=>1000,9393=>1000,9394=>1000,

+	9395=>1000,9396=>1000,9397=>1000,9398=>1000,9399=>1000,9400=>1000,9401=>1000,9402=>1000,9403=>1000,9404=>1000,9405=>1000,9406=>1000,9407=>1000,9408=>1000,9409=>1000,9410=>1000,

+	9411=>1000,9412=>1000,9413=>1000,9414=>1000,9415=>1000,9416=>1000,9417=>1000,9418=>1000,9419=>1000,9420=>1000,9421=>1000,9422=>1000,9423=>1000,9424=>1000,9425=>1000,9426=>1000,

+	9427=>1000,9428=>1000,9429=>1000,9430=>1000,9431=>1000,9432=>1000,9433=>1000,9434=>1000,9435=>1000,9436=>1000,9437=>1000,9438=>1000,9439=>1000,9440=>1000,9441=>1000,9442=>1000,

+	9443=>1000,9444=>1000,9445=>1000,9446=>1000,9447=>1000,9448=>1000,9449=>1000,9450=>1000,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,

+	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,9728=>750,9729=>1000,

+	9730=>750,9731=>750,9732=>1000,9733=>816,9734=>823,9735=>500,9736=>500,9737=>800,9738=>800,9739=>800,9740=>800,9741=>800,9742=>719,9743=>719,9744=>734,9745=>734,

+	9746=>734,9747=>762,9754=>960,9755=>960,9756=>939,9757=>939,9758=>939,9759=>939,9760=>750,9761=>600,9762=>750,9763=>750,9764=>580,9765=>460,9766=>444,9767=>650,

+	9768=>444,9769=>768,9770=>800,9771=>850,9772=>675,9773=>800,9774=>750,9775=>750,9776=>900,9777=>900,9778=>900,9779=>900,9780=>900,9781=>900,9782=>900,9783=>900,

+	9784=>750,9785=>750,9786=>750,9787=>750,9788=>750,9789=>750,9790=>750,9791=>740,9792=>740,9793=>740,9794=>740,9795=>653,9796=>490,9797=>632,9798=>780,9799=>560,

+	9800=>838,9801=>780,9802=>734,9803=>887,9804=>780,9805=>1080,9806=>896,9807=>1080,9808=>804,9809=>868,9810=>922,9811=>696,9812=>1000,9813=>1000,9814=>1000,9815=>1000,

+	9816=>1000,9817=>1000,9818=>1000,9819=>1000,9820=>1000,9821=>1000,9822=>1000,9823=>1000,9824=>722,9825=>734,9826=>674,9827=>804,9828=>722,9829=>734,9830=>674,9831=>804,

+	9832=>860,9833=>423,9834=>592,9835=>750,9836=>750,9837=>439,9838=>439,9839=>439,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,12288=>1000,12289=>1000,12290=>1000,12291=>1000,12292=>1000,12293=>1000,12294=>1000,12295=>1000,

+	12296=>1000,12297=>1000,12298=>1000,12299=>1000,12300=>1000,12301=>1000,12302=>1000,12303=>1000,12304=>1000,12305=>1000,12306=>1000,12307=>1000,12308=>1000,12309=>1000,12310=>1000,12311=>1000,

+	12312=>1000,12313=>1000,12314=>1000,12315=>1000,12316=>1000,12317=>1000,12318=>1000,12319=>1000,12320=>1000,12321=>1000,12322=>1000,12323=>1000,12324=>1000,12325=>1000,12326=>1000,12327=>1000,

+	12328=>1000,12329=>1000,12330=>1000,12331=>1000,12332=>1000,12333=>1000,12334=>1000,12335=>1000,12336=>1000,12337=>1000,12338=>1000,12339=>1000,12340=>1000,12341=>1000,12342=>1000,12343=>1000,

+	12351=>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=>1000,12441=>1000,12442=>1000,12443=>1000,12444=>1000,12445=>1000,12446=>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,12549=>1000,12550=>1000,12551=>1000,12552=>1000,12553=>1000,12554=>1000,12555=>1000,

+	12556=>1000,12557=>1000,12558=>1000,12559=>1000,12560=>1000,12561=>1000,12562=>1000,12563=>1000,12564=>1000,12565=>1000,12566=>1000,12567=>1000,12568=>1000,12569=>1000,12570=>1000,12571=>1000,

+	12572=>1000,12573=>1000,12574=>1000,12575=>1000,12576=>1000,12577=>1000,12578=>1000,12579=>1000,12580=>1000,12581=>1000,12582=>1000,12583=>1000,12584=>1000,12585=>1000,12586=>1000,12587=>1000,

+	12588=>1000,12593=>1000,12594=>1000,12595=>1000,12596=>1000,12597=>1000,12598=>1000,12599=>1000,12600=>1000,12601=>1000,12602=>1000,12603=>1000,12604=>1000,12605=>1000,12606=>1000,12607=>1000,

+	12608=>1000,12609=>1000,12610=>1000,12611=>1000,12612=>1000,12613=>1000,12614=>1000,12615=>1000,12616=>1000,12617=>1000,12618=>1000,12619=>1000,12620=>1000,12621=>1000,12622=>1000,12623=>1000,

+	12624=>1000,12625=>1000,12626=>1000,12627=>1000,12628=>1000,12629=>1000,12630=>1000,12631=>1000,12632=>1000,12633=>1000,12634=>1000,12635=>1000,12636=>1000,12637=>1000,12638=>1000,12639=>1000,

+	12640=>1000,12641=>1000,12642=>1000,12643=>1000,12644=>1000,12645=>1000,12646=>1000,12647=>1000,12648=>1000,12649=>1000,12650=>1000,12651=>1000,12652=>1000,12653=>1000,12654=>1000,12655=>1000,

+	12656=>1000,12657=>1000,12658=>1000,12659=>1000,12660=>1000,12661=>1000,12662=>1000,12663=>1000,12664=>1000,12665=>1000,12666=>1000,12667=>1000,12668=>1000,12669=>1000,12670=>1000,12671=>1000,

+	12672=>1000,12673=>1000,12674=>1000,12675=>1000,12676=>1000,12677=>1000,12678=>1000,12679=>1000,12680=>1000,12681=>1000,12682=>1000,12683=>1000,12684=>1000,12685=>1000,12686=>1000,12688=>1000,

+	12689=>1000,12690=>1000,12691=>1000,12692=>1000,12693=>1000,12694=>1000,12695=>1000,12696=>1000,12697=>1000,12698=>1000,12699=>1000,12700=>1000,12701=>1000,12702=>1000,12703=>1000,12800=>1000,

+	12801=>1000,12802=>1000,12803=>1000,12804=>1000,12805=>1000,12806=>1000,12807=>1000,12808=>1000,12809=>1000,12810=>1000,12811=>1000,12812=>1000,12813=>1000,12814=>1000,12815=>1000,12816=>1000,

+	12817=>1000,12818=>1000,12819=>1000,12820=>1000,12821=>1000,12822=>1000,12823=>1000,12824=>1000,12825=>1000,12826=>1000,12827=>1000,12828=>1000,12832=>1000,12833=>1000,12834=>1000,12835=>1000,

+	12836=>1000,12837=>1000,12838=>1000,12839=>1000,12840=>1000,12841=>1000,12842=>1000,12843=>1000,12844=>1000,12845=>1000,12846=>1000,12847=>1000,12848=>1000,12849=>1000,12850=>1000,12851=>1000,

+	12852=>1000,12853=>1000,12854=>1000,12855=>1000,12856=>1000,12857=>1000,12858=>1000,12859=>1000,12860=>1000,12861=>1000,12862=>1000,12863=>1000,12864=>1000,12865=>1000,12866=>1000,12867=>1000,

+	12896=>1000,12897=>1000,12898=>1000,12899=>1000,12900=>1000,12901=>1000,12902=>1000,12903=>1000,12904=>1000,12905=>1000,12906=>1000,12907=>1000,12908=>1000,12909=>1000,12910=>1000,12911=>1000,

+	12912=>1000,12913=>1000,12914=>1000,12915=>1000,12916=>1000,12917=>1000,12918=>1000,12919=>1000,12920=>1000,12921=>1000,12922=>1000,12923=>1000,12927=>1000,12928=>1000,12929=>1000,12930=>1000,

+	12931=>1000,12932=>1000,12933=>1000,12934=>1000,12935=>1000,12936=>1000,12937=>1000,12938=>1000,12939=>1000,12940=>1000,12941=>1000,12942=>1000,12943=>1000,12944=>1000,12945=>1000,12946=>1000,

+	12947=>1000,12948=>1000,12949=>1000,12950=>1000,12951=>1000,12952=>1000,12953=>1000,12954=>1000,12955=>1000,12956=>1000,12957=>1000,12958=>1000,12959=>1000,12960=>1000,12961=>1000,12962=>1000,

+	12963=>1000,12964=>1000,12965=>1000,12966=>1000,12967=>1000,12968=>1000,12969=>1000,12970=>1000,12971=>1000,12972=>1000,12973=>1000,12974=>1000,12975=>1000,12976=>1000,12992=>1000,12993=>1000,

+	12994=>1000,12995=>1000,12996=>1000,12997=>1000,12998=>1000,12999=>1000,13000=>1000,13001=>1000,13002=>1000,13003=>1000,13008=>1000,13009=>1000,13010=>1000,13011=>1000,13012=>1000,13013=>1000,

+	13014=>1000,13015=>1000,13016=>1000,13017=>1000,13018=>1000,13019=>1000,13020=>1000,13021=>1000,13022=>1000,13023=>1000,13024=>1000,13025=>1000,13026=>1000,13027=>1000,13028=>1000,13029=>1000,

+	13030=>1000,13031=>1000,13032=>1000,13033=>1000,13034=>1000,13035=>1000,13036=>1000,13037=>1000,13038=>1000,13039=>1000,13040=>1000,13041=>1000,13042=>1000,13043=>1000,13044=>1000,13045=>1000,

+	13046=>1000,13047=>1000,13048=>1000,13049=>1000,13050=>1000,13051=>1000,13052=>1000,13053=>1000,13054=>1000,13056=>1000,13057=>1000,13058=>1000,13059=>1000,13060=>1000,13061=>1000,13062=>1000,

+	13063=>1000,13064=>1000,13065=>1000,13066=>1000,13067=>1000,13068=>1000,13069=>1000,13070=>1000,13071=>1000,13072=>1000,13073=>1000,13074=>1000,13075=>1000,13076=>1000,13077=>1000,13078=>1000,

+	13079=>1000,13080=>1000,13081=>1000,13082=>1000,13083=>1000,13084=>1000,13085=>1000,13086=>1000,13087=>1000,13088=>1000,13089=>1000,13090=>1000,13091=>1000,13092=>1000,13093=>1000,13094=>1000,

+	13095=>1000,13096=>1000,13097=>1000,13098=>1000,13099=>1000,13100=>1000,13101=>1000,13102=>1000,13103=>1000,13104=>1000,13105=>1000,13106=>1000,13107=>1000,13108=>1000,13109=>1000,13110=>1000,

+	13111=>1000,13112=>1000,13113=>1000,13114=>1000,13115=>1000,13116=>1000,13117=>1000,13118=>1000,13119=>1000,13120=>1000,13121=>1000,13122=>1000,13123=>1000,13124=>1000,13125=>1000,13126=>1000,

+	13127=>1000,13128=>1000,13129=>1000,13130=>1000,13131=>1000,13132=>1000,13133=>1000,13134=>1000,13135=>1000,13136=>1000,13137=>1000,13138=>1000,13139=>1000,13140=>1000,13141=>1000,13142=>1000,

+	13143=>1000,13144=>1000,13145=>1000,13146=>1000,13147=>1000,13148=>1000,13149=>1000,13150=>1000,13151=>1000,13152=>1000,13153=>1000,13154=>1000,13155=>1000,13156=>1000,13157=>1000,13158=>1000,

+	13159=>1000,13160=>1000,13161=>1000,13162=>1000,13163=>1000,13164=>1000,13165=>1000,13166=>1000,13167=>1000,13168=>1000,13169=>1000,13170=>1000,13171=>1000,13172=>1000,13173=>1000,13174=>1000,

+	13179=>1000,13180=>1000,13181=>1000,13182=>1000,13183=>1000,13184=>1000,13185=>1000,13186=>1000,13187=>1000,13188=>1000,13189=>1000,13190=>1000,13191=>1000,13192=>1000,13193=>1000,13194=>1000,

+	13195=>1000,13196=>1000,13197=>1000,13198=>1000,13199=>1000,13200=>1000,13201=>1000,13202=>1000,13203=>1000,13204=>1000,13205=>1000,13206=>1000,13207=>1000,13208=>1000,13209=>1000,13210=>1000,

+	13211=>1000,13212=>1000,13213=>1000,13214=>1000,13215=>1000,13216=>1000,13217=>1000,13218=>1000,13219=>1000,13220=>1000,13221=>1000,13222=>1000,13223=>1000,13224=>1000,13225=>1000,13226=>1000,

+	13227=>1000,13228=>1000,13229=>1000,13230=>1000,13231=>1000,13232=>1000,13233=>1000,13234=>1000,13235=>1000,13236=>1000,13237=>1000,13238=>1000,13239=>1000,13240=>1000,13241=>1000,13242=>1000,

+	13243=>1000,13244=>1000,13245=>1000,13246=>1000,13247=>1000,13248=>1000,13249=>1000,13250=>1000,13251=>1000,13252=>1000,13253=>1000,13254=>1000,13255=>1000,13256=>1000,13257=>1000,13258=>1000,

+	13259=>1000,13260=>1000,13261=>1000,13262=>1000,13263=>1000,13264=>1000,13265=>1000,13266=>1000,13267=>1000,13268=>1000,13269=>1000,13270=>1000,13271=>1000,13272=>1000,13273=>1000,13274=>1000,

+	13275=>1000,13276=>1000,13277=>1000,13280=>1000,13281=>1000,13282=>1000,13283=>1000,13284=>1000,13285=>1000,13286=>1000,13287=>1000,13288=>1000,13289=>1000,13290=>1000,13291=>1000,13292=>1000,

+	13293=>1000,13294=>1000,13295=>1000,13296=>1000,13297=>1000,13298=>1000,13299=>1000,13300=>1000,13301=>1000,13302=>1000,13303=>1000,13304=>1000,13305=>1000,13306=>1000,13307=>1000,13308=>1000,

+	13309=>1000,13310=>1000,59393=>316,59394=>507,59395=>507,59396=>484,59397=>484,59416=>0,59492=>480,59495=>480,59536=>458,59557=>466,59558=>480,59559=>903,61441=>500,61442=>500,

+	63232=>541,63233=>0,63234=>0,63235=>0,63236=>0,63237=>0,63238=>0,63239=>0,63240=>0,63241=>0,63242=>0,63243=>0,63244=>0,63245=>0,63246=>0,63247=>849,

+	63248=>0,63249=>0,63250=>0,63251=>0,63252=>0,63253=>0,63254=>0,63255=>0,63256=>0,63257=>0,63258=>0,63260=>333,63261=>287,63744=>1000,63745=>1000,63746=>1000,

+	63747=>1000,63748=>1000,63749=>1000,63750=>1000,63751=>1000,63752=>1000,63753=>1000,63754=>1000,63755=>1000,63756=>1000,63757=>1000,63758=>1000,63759=>1000,63760=>1000,63761=>1000,63762=>1000,

+	63763=>1000,63764=>1000,63765=>1000,63766=>1000,63767=>1000,63768=>1000,63769=>1000,63770=>1000,63771=>1000,63772=>1000,63773=>1000,63774=>1000,63775=>1000,63776=>1000,63777=>1000,63778=>1000,

+	63779=>1000,63780=>1000,63781=>1000,63782=>1000,63783=>1000,63784=>1000,63785=>1000,63786=>1000,63787=>1000,63788=>1000,63789=>1000,63790=>1000,63791=>1000,63792=>1000,63793=>1000,63794=>1000,

+	63795=>1000,63796=>1000,63797=>1000,63798=>1000,63799=>1000,63800=>1000,63801=>1000,63802=>1000,63803=>1000,63804=>1000,63805=>1000,63806=>1000,63807=>1000,63808=>1000,63809=>1000,63810=>1000,

+	63811=>1000,63812=>1000,63813=>1000,63814=>1000,63815=>1000,63816=>1000,63817=>1000,63818=>1000,63819=>1000,63820=>1000,63821=>1000,63822=>1000,63823=>1000,63824=>1000,63825=>1000,63826=>1000,

+	63827=>1000,63828=>1000,63829=>1000,63830=>1000,63831=>1000,63832=>1000,63833=>1000,63834=>1000,63835=>1000,63836=>1000,63837=>1000,63838=>1000,63839=>1000,63840=>1000,63841=>1000,63842=>1000,

+	63843=>1000,63844=>1000,63845=>1000,63846=>1000,63847=>1000,63848=>1000,63849=>1000,63850=>1000,63851=>1000,63852=>1000,63853=>1000,63854=>1000,63855=>1000,63856=>1000,63857=>1000,63858=>1000,

+	63859=>1000,63860=>1000,63861=>1000,63862=>1000,63863=>1000,63864=>1000,63865=>1000,63866=>1000,63867=>1000,63868=>1000,63869=>1000,63870=>1000,63871=>1000,63872=>1000,63873=>1000,63874=>1000,

+	63875=>1000,63876=>1000,63877=>1000,63878=>1000,63879=>1000,63880=>1000,63881=>1000,63882=>1000,63883=>1000,63884=>1000,63885=>1000,63886=>1000,63887=>1000,63888=>1000,63889=>1000,63890=>1000,

+	63891=>1000,63892=>1000,63893=>1000,63894=>1000,63895=>1000,63896=>1000,63897=>1000,63898=>1000,63899=>1000,63900=>1000,63901=>1000,63902=>1000,63903=>1000,63904=>1000,63905=>1000,63906=>1000,

+	63907=>1000,63908=>1000,63909=>1000,63910=>1000,63911=>1000,63912=>1000,63913=>1000,63914=>1000,63915=>1000,63916=>1000,63917=>1000,63918=>1000,63919=>1000,63920=>1000,63921=>1000,63922=>1000,

+	63923=>1000,63924=>1000,63925=>1000,63926=>1000,63927=>1000,63928=>1000,63929=>1000,63930=>1000,63931=>1000,63932=>1000,63933=>1000,63934=>1000,63935=>1000,63936=>1000,63937=>1000,63938=>1000,

+	63939=>1000,63940=>1000,63941=>1000,63942=>1000,63943=>1000,63944=>1000,63945=>1000,63946=>1000,63947=>1000,63948=>1000,63949=>1000,63950=>1000,63951=>1000,63952=>1000,63953=>1000,63954=>1000,

+	63955=>1000,63956=>1000,63957=>1000,63958=>1000,63959=>1000,63960=>1000,63961=>1000,63962=>1000,63963=>1000,63964=>1000,63965=>1000,63966=>1000,63967=>1000,63968=>1000,63969=>1000,63970=>1000,

+	63971=>1000,63972=>1000,63973=>1000,63974=>1000,63975=>1000,63976=>1000,63977=>1000,63978=>1000,63979=>1000,63980=>1000,63981=>1000,63982=>1000,63983=>1000,63984=>1000,63985=>1000,63986=>1000,

+	63987=>1000,63988=>1000,63989=>1000,63990=>1000,63991=>1000,63992=>1000,63993=>1000,63994=>1000,63995=>1000,63996=>1000,63997=>1000,63998=>1000,63999=>1000,64000=>1000,64001=>1000,64002=>1000,

+	64003=>1000,64004=>1000,64005=>1000,64006=>1000,64007=>1000,64008=>1000,64009=>1000,64010=>1000,64011=>1000,64012=>1000,64013=>1000,64014=>1000,64015=>1000,64016=>1000,64017=>1000,64018=>1000,

+	64019=>1000,64020=>1000,64021=>1000,64022=>1000,64023=>1000,64024=>1000,64025=>1000,64026=>1000,64027=>1000,64028=>1000,64029=>1000,64030=>1000,64031=>1000,64032=>1000,64033=>1000,64034=>1000,

+	64035=>1000,64036=>1000,64037=>1000,64038=>1000,64039=>1000,64040=>1000,64041=>1000,64042=>1000,64043=>1000,64044=>1000,64045=>1000,64256=>537,64257=>500,64258=>500,64259=>778,64260=>750,

+	64261=>532,64262=>758,64275=>784,64276=>784,64277=>784,64278=>784,64279=>893,64286=>333,64287=>590,64288=>550,64289=>709,64290=>649,64291=>730,64292=>656,64293=>605,64294=>730,

+	64295=>633,64296=>794,64297=>584,64298=>700,64299=>700,64300=>700,64301=>700,64302=>577,64303=>577,64304=>577,64305=>563,64306=>411,64307=>512,64308=>594,64309=>316,64310=>326,

+	64312=>594,64313=>316,64314=>507,64315=>527,64316=>484,64318=>594,64320=>338,64321=>604,64323=>567,64324=>569,64326=>514,64327=>583,64328=>507,64329=>700,64330=>633,64331=>316,

+	64332=>563,64333=>527,64334=>569,64335=>577,64336=>243,64337=>273,64338=>771,64339=>788,64340=>276,64341=>243,64342=>771,64343=>788,64344=>276,64345=>243,64346=>771,64347=>788,

+	64348=>276,64349=>243,64350=>771,64351=>788,64352=>276,64353=>243,64354=>771,64355=>788,64356=>276,64357=>243,64358=>771,64359=>788,64360=>276,64361=>243,64362=>957,64363=>903,

+	64364=>466,64365=>480,64366=>957,64367=>903,64368=>466,64369=>480,64370=>544,64371=>658,64372=>646,64373=>637,64374=>544,64375=>658,64376=>646,64377=>637,64378=>544,64379=>658,

+	64380=>646,64381=>637,64382=>544,64383=>658,64384=>646,64385=>637,64386=>430,64387=>458,64388=>430,64389=>458,64390=>430,64391=>458,64392=>430,64393=>458,64394=>421,64395=>436,

+	64396=>421,64397=>436,64398=>828,64399=>942,64400=>432,64401=>549,64402=>828,64403=>942,64404=>432,64405=>549,64406=>828,64407=>942,64408=>432,64409=>549,64410=>828,64411=>942,

+	64412=>432,64413=>549,64414=>692,64415=>723,64416=>692,64417=>723,64418=>276,64419=>243,64420=>514,64421=>477,64422=>514,64423=>509,64424=>273,64425=>427,64426=>706,64427=>706,

+	64428=>686,64429=>686,64430=>550,64431=>461,64432=>550,64433=>461,64467=>757,64468=>733,64469=>432,64470=>549,64471=>470,64472=>466,64473=>470,64474=>466,64475=>470,64476=>466,

+	64477=>470,64478=>470,64479=>466,64480=>470,64481=>466,64482=>470,64483=>466,64484=>781,64485=>933,64486=>276,64487=>243,64488=>276,64489=>243,64490=>547,64491=>517,64492=>783,

+	64493=>753,64494=>740,64495=>710,64496=>740,64497=>710,64498=>740,64499=>710,64500=>740,64501=>710,64502=>1207,64503=>1177,64504=>517,64505=>1067,64506=>1037,64507=>517,64508=>731,

+	64509=>793,64510=>276,64511=>243,64512=>932,64513=>932,64514=>914,64515=>1067,64516=>1077,64517=>935,64518=>935,64519=>935,64520=>917,64521=>1070,64522=>1080,64523=>932,64524=>932,

+	64525=>932,64526=>914,64527=>1067,64528=>1077,64529=>932,64530=>914,64531=>1067,64532=>1077,64533=>1305,64534=>1287,64535=>1305,64536=>1287,64537=>1305,64538=>1305,64539=>1287,64540=>1429,

+	64541=>1429,64542=>1429,64543=>1411,64544=>1476,64545=>1458,64546=>1476,64547=>1476,64548=>1476,64549=>1458,64550=>1392,64551=>1374,64552=>1374,64553=>1245,64554=>1227,64555=>1245,64556=>1227,

+	64557=>1125,64558=>1125,64559=>1125,64560=>1107,64561=>1260,64562=>1270,64563=>1125,64564=>1107,64565=>1260,64566=>1270,64567=>706,64568=>1091,64569=>1091,64570=>1091,64571=>1106,64572=>1073,

+	64573=>1226,64574=>1236,64575=>932,64576=>932,64577=>932,64578=>914,64579=>1067,64580=>1077,64581=>1140,64582=>1140,64583=>1140,64584=>1122,64585=>1275,64586=>1285,64587=>932,64588=>932,

+	64589=>932,64590=>914,64591=>1067,64592=>1077,64593=>1345,64594=>1327,64595=>1480,64596=>1490,64597=>932,64598=>932,64599=>932,64600=>914,64601=>1067,64602=>1077,64603=>430,64604=>421,

+	64605=>731,64606=>296,64607=>300,64608=>300,64609=>300,64610=>300,64611=>300,64612=>680,64613=>680,64614=>884,64615=>967,64616=>1037,64617=>1047,64618=>680,64619=>680,64620=>884,

+	64621=>967,64622=>1037,64623=>1047,64624=>680,64625=>680,64626=>884,64627=>967,64628=>1037,64629=>1047,64630=>680,64631=>680,64632=>884,64633=>967,64634=>1037,64635=>1047,64636=>1274,

+	64637=>1284,64638=>1274,64639=>1284,64640=>821,64641=>1221,64642=>1188,64643=>1341,64644=>1351,64645=>884,64646=>1037,64647=>1047,64648=>806,64649=>1173,64650=>680,64651=>680,64652=>884,

+	64653=>967,64654=>1037,64655=>1047,64656=>793,64657=>680,64658=>680,64659=>884,64660=>967,64661=>1037,64662=>1047,64663=>911,64664=>911,64665=>911,64666=>806,64667=>679,64668=>911,

+	64669=>911,64670=>911,64671=>806,64672=>679,64673=>911,64674=>911,64675=>911,64676=>806,64677=>679,64678=>806,64679=>1284,64680=>1179,64681=>1284,64682=>1179,64683=>1284,64684=>1179,

+	64685=>1408,64686=>1408,64687=>1408,64688=>1303,64689=>1455,64690=>1455,64691=>1350,64692=>1455,64693=>1455,64694=>1455,64695=>1350,64696=>1371,64697=>1266,64698=>1224,64699=>1119,64700=>1224,

+	64701=>1119,64702=>1104,64703=>1104,64704=>1104,64705=>999,64706=>1104,64707=>999,64708=>1070,64709=>1070,64710=>1070,64711=>676,64712=>965,64713=>911,64714=>911,64715=>911,64716=>806,

+	64717=>679,64718=>1119,64719=>1119,64720=>1119,64721=>1014,64722=>911,64723=>911,64724=>911,64725=>806,64726=>679,64727=>1324,64728=>1219,64729=>686,64730=>911,64731=>911,64732=>911,

+	64733=>806,64734=>679,64735=>776,64736=>649,64737=>776,64738=>649,64739=>776,64740=>649,64741=>776,64742=>649,64743=>1303,64744=>1176,64745=>1303,64746=>1176,64747=>793,64748=>1082,

+	64749=>776,64750=>776,64751=>649,64752=>776,64753=>649,64754=>306,64755=>302,64756=>298,64757=>1527,64758=>1537,64759=>1380,64760=>1390,64761=>1380,64762=>1390,64763=>1564,64764=>1574,

+	64765=>1564,64766=>1574,64767=>1440,64768=>1450,64769=>1440,64770=>1450,64771=>1440,64772=>1450,64773=>1611,64774=>1621,64775=>1611,64776=>1621,64777=>1429,64778=>1429,64779=>1429,64780=>1411,

+	64781=>1207,64782=>1207,64783=>1254,64784=>1254,64785=>1527,64786=>1537,64787=>1348,64788=>1358,64789=>1348,64790=>1358,64791=>1564,64792=>1574,64793=>1564,64794=>1574,64795=>1431,64796=>1441,

+	64797=>1431,64798=>1441,64799=>1431,64800=>1441,64801=>1611,64802=>1621,64803=>1611,64804=>1621,64805=>1429,64806=>1429,64807=>1429,64808=>1411,64809=>1207,64810=>1207,64811=>1254,64812=>1254,

+	64813=>1408,64814=>1408,64815=>1408,64816=>1303,64817=>1176,64818=>1176,64819=>1266,64820=>1408,64821=>1408,64822=>1408,64823=>1408,64824=>1408,64825=>1408,64826=>1266,64827=>1266,64828=>273,

+	64829=>243,64830=>600,64831=>600,64848=>1444,64849=>1541,64850=>1549,64851=>1444,64852=>1444,64853=>1444,64854=>1444,64855=>1444,64856=>1830,64857=>1817,64858=>1975,64859=>1964,64860=>2046,

+	64861=>2046,64862=>2202,64863=>1962,64864=>1941,64865=>1941,64866=>1944,64867=>1836,64868=>2114,64869=>2093,64870=>1991,64871=>2049,64872=>1941,64873=>2212,64874=>1962,64875=>1941,64876=>1944,

+	64877=>1836,64878=>2249,64879=>2096,64880=>1988,64881=>1925,64882=>1904,64883=>1799,64884=>2070,64885=>1833,64886=>1729,64887=>1652,64888=>1881,64889=>1729,64890=>1892,64891=>1881,64892=>1759,

+	64893=>1637,64894=>1670,64895=>1654,64896=>1522,64897=>1686,64898=>1675,64899=>1549,64900=>1541,64901=>1522,64902=>1444,64903=>1436,64904=>1444,64905=>1757,64906=>1652,64907=>1975,64908=>1757,

+	64909=>1652,64910=>1757,64911=>1652,64914=>1757,64915=>1857,64916=>1752,64917=>1444,64918=>1675,64919=>1522,64920=>1444,64921=>1675,64922=>1581,64923=>1570,64924=>1417,64925=>1362,64926=>1686,

+	64927=>1686,64928=>1675,64929=>1686,64930=>1675,64931=>1581,64932=>1570,64933=>1975,64934=>2069,64935=>1964,64936=>2202,64937=>2259,64938=>2212,64939=>2259,64940=>1686,64941=>1581,64942=>1686,

+	64943=>1686,64944=>1581,64945=>1870,64946=>1817,64947=>1686,64948=>1637,64949=>1444,64950=>1892,64951=>1886,64952=>1549,64953=>1975,64954=>1444,64955=>1723,64956=>1522,64957=>1541,64958=>2080,

+	64959=>2080,64960=>1975,64961=>1817,64962=>1686,64963=>1499,64964=>1757,64965=>1883,64966=>2212,64967=>1686,65008=>1523,65009=>1172,65010=>1159,65011=>1356,65012=>2111,65013=>2258,65014=>2130,

+	65015=>1552,65016=>2046,65017=>1856,65018=>1930,65019=>1070,65056=>450,65057=>450,65058=>450,65059=>450,65072=>1000,65073=>1000,65074=>1000,65075=>1000,65076=>1000,65077=>1000,65078=>1000,

+	65079=>1000,65080=>1000,65081=>1000,65082=>1000,65083=>1000,65084=>1000,65085=>1000,65086=>1000,65087=>1000,65088=>1000,65089=>1000,65090=>1000,65091=>1000,65092=>1000,65097=>1000,65098=>1000,

+	65099=>1000,65100=>1000,65101=>1000,65102=>1000,65103=>1000,65104=>167,65105=>250,65106=>167,65108=>167,65109=>167,65110=>334,65111=>167,65112=>600,65113=>200,65114=>200,65115=>200,

+	65116=>200,65117=>200,65118=>200,65119=>334,65120=>400,65121=>233,65122=>350,65123=>200,65124=>350,65125=>350,65126=>350,65128=>167,65129=>334,65130=>533,65131=>609,65136=>300,

+	65137=>298,65138=>296,65140=>298,65142=>300,65143=>298,65144=>300,65145=>302,65146=>298,65147=>296,65148=>306,65149=>306,65150=>154,65151=>154,65152=>529,65153=>243,65154=>273,

+	65155=>243,65156=>273,65157=>470,65158=>466,65159=>243,65160=>273,65161=>731,65162=>793,65163=>276,65164=>243,65165=>243,65166=>273,65167=>771,65168=>788,65169=>276,65170=>243,

+	65171=>514,65172=>477,65173=>771,65174=>788,65175=>276,65176=>243,65177=>771,65178=>788,65179=>276,65180=>243,65181=>544,65182=>658,65183=>646,65184=>637,65185=>544,65186=>658,

+	65187=>646,65188=>637,65189=>544,65190=>658,65191=>646,65192=>637,65193=>430,65194=>458,65195=>430,65196=>458,65197=>421,65198=>436,65199=>421,65200=>436,65201=>1194,65202=>1194,

+	65203=>770,65204=>770,65205=>1194,65206=>1194,65207=>770,65208=>770,65209=>1291,65210=>1291,65211=>817,65212=>817,65213=>1291,65214=>1291,65215=>817,65216=>817,65217=>843,65218=>843,

+	65219=>733,65220=>733,65221=>843,65222=>843,65223=>733,65224=>733,65225=>594,65226=>556,65227=>586,65228=>554,65229=>594,65230=>556,65231=>586,65232=>554,65233=>957,65234=>903,

+	65235=>466,65236=>480,65237=>800,65238=>823,65239=>466,65240=>480,65241=>757,65242=>733,65243=>432,65244=>549,65245=>662,65246=>673,65247=>273,65248=>243,65249=>589,65250=>640,

+	65251=>481,65252=>532,65253=>692,65254=>723,65255=>276,65256=>243,65257=>514,65258=>477,65259=>686,65260=>405,65261=>470,65262=>466,65263=>731,65264=>793,65265=>731,65266=>803,

+	65267=>276,65268=>243,65269=>551,65270=>603,65271=>551,65272=>603,65273=>551,65274=>603,65275=>551,65276=>603,65281=>1000,65282=>1000,65283=>1000,65284=>1000,65285=>1000,65286=>1000,

+	65287=>1000,65288=>1000,65289=>1000,65290=>1000,65291=>1000,65292=>1000,65293=>1000,65294=>1000,65295=>1000,65296=>1000,65297=>1000,65298=>1000,65299=>1000,65300=>1000,65301=>1000,65302=>1000,

+	65303=>1000,65304=>1000,65305=>1000,65306=>1000,65307=>1000,65308=>1000,65309=>1000,65310=>1000,65311=>1000,65312=>1000,65313=>1000,65314=>1000,65315=>1000,65316=>1000,65317=>1000,65318=>1000,

+	65319=>1000,65320=>1000,65321=>1000,65322=>1000,65323=>1000,65324=>1000,65325=>1000,65326=>1000,65327=>1000,65328=>1000,65329=>1000,65330=>1000,65331=>1000,65332=>1000,65333=>1000,65334=>1000,

+	65335=>1000,65336=>1000,65337=>1000,65338=>1000,65339=>1000,65340=>1000,65341=>1000,65342=>1000,65343=>1000,65344=>1000,65345=>1000,65346=>1000,65347=>1000,65348=>1000,65349=>1000,65350=>1000,

+	65351=>1000,65352=>1000,65353=>1000,65354=>1000,65355=>1000,65356=>1000,65357=>1000,65358=>1000,65359=>1000,65360=>1000,65361=>1000,65362=>1000,65363=>1000,65364=>1000,65365=>1000,65366=>1000,

+	65367=>1000,65368=>1000,65369=>1000,65370=>1000,65371=>1000,65372=>1000,65373=>1000,65374=>1000,65377=>500,65378=>500,65379=>500,65380=>500,65381=>500,65382=>500,65383=>500,65384=>500,

+	65385=>500,65386=>500,65387=>500,65388=>500,65389=>500,65390=>500,65391=>500,65392=>500,65393=>500,65394=>500,65395=>500,65396=>500,65397=>500,65398=>500,65399=>500,65400=>500,

+	65401=>500,65402=>500,65403=>500,65404=>500,65405=>500,65406=>500,65407=>500,65408=>500,65409=>500,65410=>500,65411=>500,65412=>500,65413=>500,65414=>500,65415=>500,65416=>500,

+	65417=>500,65418=>500,65419=>500,65420=>500,65421=>500,65422=>500,65423=>500,65424=>500,65425=>500,65426=>500,65427=>500,65428=>500,65429=>500,65430=>500,65431=>500,65432=>500,

+	65433=>500,65434=>500,65435=>500,65436=>500,65437=>500,65438=>500,65439=>500,65440=>500,65441=>500,65442=>500,65443=>500,65444=>500,65445=>500,65446=>500,65447=>500,65448=>500,

+	65449=>500,65450=>500,65451=>500,65452=>500,65453=>500,65454=>500,65455=>500,65456=>500,65457=>500,65458=>500,65459=>500,65460=>500,65461=>500,65462=>500,65463=>500,65464=>500,

+	65465=>500,65466=>500,65467=>500,65468=>500,65469=>500,65470=>500,65474=>500,65475=>500,65476=>500,65477=>500,65478=>500,65479=>500,65482=>500,65483=>500,65484=>500,65485=>500,

+	65486=>500,65487=>500,65490=>500,65491=>500,65492=>500,65493=>500,65494=>500,65495=>500,65498=>500,65499=>500,65500=>500,65504=>1000,65505=>1000,65506=>1000,65507=>1000,65508=>1000,

+	65509=>1000,65510=>1000,65512=>500,65513=>500,65514=>500,65515=>500,65516=>500,65517=>500,65518=>500,65532=>1000,65533=>1000,19968=>1000,19969=>1000,19970=>1000,19971=>1000,19972=>1000,

+	19973=>1000,19974=>1000,19975=>1000,19976=>1000,19977=>1000,19978=>1000,19979=>1000,19980=>1000,19981=>1000,19982=>1000,19983=>1000,19984=>1000,19985=>1000,19986=>1000,19987=>1000,19988=>1000,

+	19989=>1000,19990=>1000,19991=>1000,19992=>1000,19993=>1000,19994=>1000,19995=>1000,19996=>1000,19997=>1000,19998=>1000,19999=>1000,20000=>1000,20001=>1000,20002=>1000,20003=>1000,20004=>1000,

+	20005=>1000,20006=>1000,20007=>1000,20008=>1000,20009=>1000,20010=>1000,20011=>1000,20012=>1000,20013=>1000,20014=>1000,20015=>1000,20016=>1000,20017=>1000,20018=>1000,20019=>1000,20020=>1000,

+	20021=>1000,20022=>1000,20023=>1000,20024=>1000,20025=>1000,20026=>1000,20027=>1000,20028=>1000,20029=>1000,20030=>1000,20031=>1000,20032=>1000,20033=>1000,20034=>1000,20035=>1000,20036=>1000,

+	20037=>1000,20038=>1000,20039=>1000,20040=>1000,20041=>1000,20042=>1000,20043=>1000,20044=>1000,20045=>1000,20046=>1000,20047=>1000,20048=>1000,20049=>1000,20050=>1000,20051=>1000,20052=>1000,

+	20053=>1000,20054=>1000,20055=>1000,20056=>1000,20057=>1000,20058=>1000,20059=>1000,20060=>1000,20061=>1000,20062=>1000,20063=>1000,20064=>1000,20065=>1000,20066=>1000,20067=>1000,20068=>1000,

+	20069=>1000,20070=>1000,20071=>1000,20072=>1000,20073=>1000,20074=>1000,20075=>1000,20076=>1000,20077=>1000,20078=>1000,20079=>1000,20080=>1000,20081=>1000,20082=>1000,20083=>1000,20084=>1000,

+	20085=>1000,20086=>1000,20087=>1000,20088=>1000,20089=>1000,20090=>1000,20091=>1000,20092=>1000,20093=>1000,20094=>1000,20095=>1000,20096=>1000,20097=>1000,20098=>1000,20099=>1000,20100=>1000,

+	20101=>1000,20102=>1000,20103=>1000,20104=>1000,20105=>1000,20106=>1000,20107=>1000,20108=>1000,20109=>1000,20110=>1000,20111=>1000,20112=>1000,20113=>1000,20114=>1000,20115=>1000,20116=>1000,

+	20117=>1000,20118=>1000,20119=>1000,20120=>1000,20121=>1000,20122=>1000,20123=>1000,20124=>1000,20125=>1000,20126=>1000,20127=>1000,20128=>1000,20129=>1000,20130=>1000,20131=>1000,20132=>1000,

+	20133=>1000,20134=>1000,20135=>1000,20136=>1000,20137=>1000,20138=>1000,20139=>1000,20140=>1000,20141=>1000,20142=>1000,20143=>1000,20144=>1000,20145=>1000,20146=>1000,20147=>1000,20148=>1000,

+	20149=>1000,20150=>1000,20151=>1000,20152=>1000,20153=>1000,20154=>1000,20155=>1000,20156=>1000,20157=>1000,20158=>1000,20159=>1000,20160=>1000,20161=>1000,20162=>1000,20163=>1000,20164=>1000,

+	20165=>1000,20166=>1000,20167=>1000,20168=>1000,20169=>1000,20170=>1000,20171=>1000,20172=>1000,20173=>1000,20174=>1000,20175=>1000,20176=>1000,20177=>1000,20178=>1000,20179=>1000,20180=>1000,

+	20181=>1000,20182=>1000,20183=>1000,20184=>1000,20185=>1000,20186=>1000,20187=>1000,20188=>1000,20189=>1000,20190=>1000,20191=>1000,20192=>1000,20193=>1000,20194=>1000,20195=>1000,20196=>1000,

+	20197=>1000,20198=>1000,20199=>1000,20200=>1000,20201=>1000,20202=>1000,20203=>1000,20204=>1000,20205=>1000,20206=>1000,20207=>1000,20208=>1000,20209=>1000,20210=>1000,20211=>1000,20212=>1000,

+	20213=>1000,20214=>1000,20215=>1000,20216=>1000,20217=>1000,20218=>1000,20219=>1000,20220=>1000,20221=>1000,20222=>1000,20223=>1000,20224=>1000,20225=>1000,20226=>1000,20227=>1000,20228=>1000,

+	20229=>1000,20230=>1000,20231=>1000,20232=>1000,20233=>1000,20234=>1000,20235=>1000,20236=>1000,20237=>1000,20238=>1000,20239=>1000,20240=>1000,20241=>1000,20242=>1000,20243=>1000,20244=>1000,

+	20245=>1000,20246=>1000,20247=>1000,20248=>1000,20249=>1000,20250=>1000,20251=>1000,20252=>1000,20253=>1000,20254=>1000,20255=>1000,20256=>1000,20257=>1000,20258=>1000,20259=>1000,20260=>1000,

+	20261=>1000,20262=>1000,20263=>1000,20264=>1000,20265=>1000,20266=>1000,20267=>1000,20268=>1000,20269=>1000,20270=>1000,20271=>1000,20272=>1000,20273=>1000,20274=>1000,20275=>1000,20276=>1000,

+	20277=>1000,20278=>1000,20279=>1000,20280=>1000,20281=>1000,20282=>1000,20283=>1000,20284=>1000,20285=>1000,20286=>1000,20287=>1000,20288=>1000,20289=>1000,20290=>1000,20291=>1000,20292=>1000,

+	20293=>1000,20294=>1000,20295=>1000,20296=>1000,20297=>1000,20298=>1000,20299=>1000,20300=>1000,20301=>1000,20302=>1000,20303=>1000,20304=>1000,20305=>1000,20306=>1000,20307=>1000,20308=>1000,

+	20309=>1000,20310=>1000,20311=>1000,20312=>1000,20313=>1000,20314=>1000,20315=>1000,20316=>1000,20317=>1000,20318=>1000,20319=>1000,20320=>1000,20321=>1000,20322=>1000,20323=>1000,20324=>1000,

+	20325=>1000,20326=>1000,20327=>1000,20328=>1000,20329=>1000,20330=>1000,20331=>1000,20332=>1000,20333=>1000,20334=>1000,20335=>1000,20336=>1000,20337=>1000,20338=>1000,20339=>1000,20340=>1000,

+	20341=>1000,20342=>1000,20343=>1000,20344=>1000,20345=>1000,20346=>1000,20347=>1000,20348=>1000,20349=>1000,20350=>1000,20351=>1000,20352=>1000,20353=>1000,20354=>1000,20355=>1000,20356=>1000,

+	20357=>1000,20358=>1000,20359=>1000,20360=>1000,20361=>1000,20362=>1000,20363=>1000,20364=>1000,20365=>1000,20366=>1000,20367=>1000,20368=>1000,20369=>1000,20370=>1000,20371=>1000,20372=>1000,

+	20373=>1000,20374=>1000,20375=>1000,20376=>1000,20377=>1000,20378=>1000,20379=>1000,20380=>1000,20381=>1000,20382=>1000,20383=>1000,20384=>1000,20385=>1000,20386=>1000,20387=>1000,20388=>1000,

+	20389=>1000,20390=>1000,20391=>1000,20392=>1000,20393=>1000,20394=>1000,20395=>1000,20396=>1000,20397=>1000,20398=>1000,20399=>1000,20400=>1000,20401=>1000,20402=>1000,20403=>1000,20404=>1000,

+	20405=>1000,20406=>1000,20407=>1000,20408=>1000,20409=>1000,20410=>1000,20411=>1000,20412=>1000,20413=>1000,20414=>1000,20415=>1000,20416=>1000,20417=>1000,20418=>1000,20419=>1000,20420=>1000,

+	20421=>1000,20422=>1000,20423=>1000,20424=>1000,20425=>1000,20426=>1000,20427=>1000,20428=>1000,20429=>1000,20430=>1000,20431=>1000,20432=>1000,20433=>1000,20434=>1000,20435=>1000,20436=>1000,

+	20437=>1000,20438=>1000,20439=>1000,20440=>1000,20441=>1000,20442=>1000,20443=>1000,20444=>1000,20445=>1000,20446=>1000,20447=>1000,20448=>1000,20449=>1000,20450=>1000,20451=>1000,20452=>1000,

+	20453=>1000,20454=>1000,20455=>1000,20456=>1000,20457=>1000,20458=>1000,20459=>1000,20460=>1000,20461=>1000,20462=>1000,20463=>1000,20464=>1000,20465=>1000,20466=>1000,20467=>1000,20468=>1000,

+	20469=>1000,20470=>1000,20471=>1000,20472=>1000,20473=>1000,20474=>1000,20475=>1000,20476=>1000,20477=>1000,20478=>1000,20479=>1000,20480=>1000,20481=>1000,20482=>1000,20483=>1000,20484=>1000,

+	20485=>1000,20486=>1000,20487=>1000,20488=>1000,20489=>1000,20490=>1000,20491=>1000,20492=>1000,20493=>1000,20494=>1000,20495=>1000,20496=>1000,20497=>1000,20498=>1000,20499=>1000,20500=>1000,

+	20501=>1000,20502=>1000,20503=>1000,20504=>1000,20505=>1000,20506=>1000,20507=>1000,20508=>1000,20509=>1000,20510=>1000,20511=>1000,20512=>1000,20513=>1000,20514=>1000,20515=>1000,20516=>1000,

+	20517=>1000,20518=>1000,20519=>1000,20520=>1000,20521=>1000,20522=>1000,20523=>1000,20524=>1000,20525=>1000,20526=>1000,20527=>1000,20528=>1000,20529=>1000,20530=>1000,20531=>1000,20532=>1000,

+	20533=>1000,20534=>1000,20535=>1000,20536=>1000,20537=>1000,20538=>1000,20539=>1000,20540=>1000,20541=>1000,20542=>1000,20543=>1000,20544=>1000,20545=>1000,20546=>1000,20547=>1000,20548=>1000,

+	20549=>1000,20550=>1000,20551=>1000,20552=>1000,20553=>1000,20554=>1000,20555=>1000,20556=>1000,20557=>1000,20558=>1000,20559=>1000,20560=>1000,20561=>1000,20562=>1000,20563=>1000,20564=>1000,

+	20565=>1000,20566=>1000,20567=>1000,20568=>1000,20569=>1000,20570=>1000,20571=>1000,20572=>1000,20573=>1000,20574=>1000,20575=>1000,20576=>1000,20577=>1000,20578=>1000,20579=>1000,20580=>1000,

+	20581=>1000,20582=>1000,20583=>1000,20584=>1000,20585=>1000,20586=>1000,20587=>1000,20588=>1000,20589=>1000,20590=>1000,20591=>1000,20592=>1000,20593=>1000,20594=>1000,20595=>1000,20596=>1000,

+	20597=>1000,20598=>1000,20599=>1000,20600=>1000,20601=>1000,20602=>1000,20603=>1000,20604=>1000,20605=>1000,20606=>1000,20607=>1000,20608=>1000,20609=>1000,20610=>1000,20611=>1000,20612=>1000,

+	20613=>1000,20614=>1000,20615=>1000,20616=>1000,20617=>1000,20618=>1000,20619=>1000,20620=>1000,20621=>1000,20622=>1000,20623=>1000,20624=>1000,20625=>1000,20626=>1000,20627=>1000,20628=>1000,

+	20629=>1000,20630=>1000,20631=>1000,20632=>1000,20633=>1000,20634=>1000,20635=>1000,20636=>1000,20637=>1000,20638=>1000,20639=>1000,20640=>1000,20641=>1000,20642=>1000,20643=>1000,20644=>1000,

+	20645=>1000,20646=>1000,20647=>1000,20648=>1000,20649=>1000,20650=>1000,20651=>1000,20652=>1000,20653=>1000,20654=>1000,20655=>1000,20656=>1000,20657=>1000,20658=>1000,20659=>1000,20660=>1000,

+	20661=>1000,20662=>1000,20663=>1000,20664=>1000,20665=>1000,20666=>1000,20667=>1000,20668=>1000,20669=>1000,20670=>1000,20671=>1000,20672=>1000,20673=>1000,20674=>1000,20675=>1000,20676=>1000,

+	20677=>1000,20678=>1000,20679=>1000,20680=>1000,20681=>1000,20682=>1000,20683=>1000,20684=>1000,20685=>1000,20686=>1000,20687=>1000,20688=>1000,20689=>1000,20690=>1000,20691=>1000,20692=>1000,

+	20693=>1000,20694=>1000,20695=>1000,20696=>1000,20697=>1000,20698=>1000,20699=>1000,20700=>1000,20701=>1000,20702=>1000,20703=>1000,20704=>1000,20705=>1000,20706=>1000,20707=>1000,20708=>1000,

+	20709=>1000,20710=>1000,20711=>1000,20712=>1000,20713=>1000,20714=>1000,20715=>1000,20716=>1000,20717=>1000,20718=>1000,20719=>1000,20720=>1000,20721=>1000,20722=>1000,20723=>1000,20724=>1000,

+	20725=>1000,20726=>1000,20727=>1000,20728=>1000,20729=>1000,20730=>1000,20731=>1000,20732=>1000,20733=>1000,20734=>1000,20735=>1000,20736=>1000,20737=>1000,20738=>1000,20739=>1000,20740=>1000,

+	20741=>1000,20742=>1000,20743=>1000,20744=>1000,20745=>1000,20746=>1000,20747=>1000,20748=>1000,20749=>1000,20750=>1000,20751=>1000,20752=>1000,20753=>1000,20754=>1000,20755=>1000,20756=>1000,

+	20757=>1000,20758=>1000,20759=>1000,20760=>1000,20761=>1000,20762=>1000,20763=>1000,20764=>1000,20765=>1000,20766=>1000,20767=>1000,20768=>1000,20769=>1000,20770=>1000,20771=>1000,20772=>1000,

+	20773=>1000,20774=>1000,20775=>1000,20776=>1000,20777=>1000,20778=>1000,20779=>1000,20780=>1000,20781=>1000,20782=>1000,20783=>1000,20784=>1000,20785=>1000,20786=>1000,20787=>1000,20788=>1000,

+	20789=>1000,20790=>1000,20791=>1000,20792=>1000,20793=>1000,20794=>1000,20795=>1000,20796=>1000,20797=>1000,20798=>1000,20799=>1000,20800=>1000,20801=>1000,20802=>1000,20803=>1000,20804=>1000,

+	20805=>1000,20806=>1000,20807=>1000,20808=>1000,20809=>1000,20810=>1000,20811=>1000,20812=>1000,20813=>1000,20814=>1000,20815=>1000,20816=>1000,20817=>1000,20818=>1000,20819=>1000,20820=>1000,

+	20821=>1000,20822=>1000,20823=>1000,20824=>1000,20825=>1000,20826=>1000,20827=>1000,20828=>1000,20829=>1000,20830=>1000,20831=>1000,20832=>1000,20833=>1000,20834=>1000,20835=>1000,20836=>1000,

+	20837=>1000,20838=>1000,20839=>1000,20840=>1000,20841=>1000,20842=>1000,20843=>1000,20844=>1000,20845=>1000,20846=>1000,20847=>1000,20848=>1000,20849=>1000,20850=>1000,20851=>1000,20852=>1000,

+	20853=>1000,20854=>1000,20855=>1000,20856=>1000,20857=>1000,20858=>1000,20859=>1000,20860=>1000,20861=>1000,20862=>1000,20863=>1000,20864=>1000,20865=>1000,20866=>1000,20867=>1000,20868=>1000,

+	20869=>1000,20870=>1000,20871=>1000,20872=>1000,20873=>1000,20874=>1000,20875=>1000,20876=>1000,20877=>1000,20878=>1000,20879=>1000,20880=>1000,20881=>1000,20882=>1000,20883=>1000,20884=>1000,

+	20885=>1000,20886=>1000,20887=>1000,20888=>1000,20889=>1000,20890=>1000,20891=>1000,20892=>1000,20893=>1000,20894=>1000,20895=>1000,20896=>100