From: maxious Date: Mon, 28 Feb 2011 14:48:22 +0000 Subject: Beginnings of PDF timetable renderer X-Git-Url: https://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=55f347e891ecfc10e0428353083235f6a6c02c9e --- Beginnings of PDF timetable renderer --- --- a/feedback.php +++ b/feedback.php @@ -31,18 +31,22 @@

Add/Move/Delete a Bus Stop Location

StopID: or StopCode: + if you click on feedback from a stop page, these will get filled in automatically. else describe the location/street of the stop Suggested Stop Location (lat/long or words): + if your device supports javascript, you can pick a location from the map above Submit!

Bug Report/Feedback

+Please leave feedback about bugs/errors or general suggestions about improvements that could be made to the way the data is presented! --- a/layar_api.php +++ b/layar_api.php @@ -26,7 +26,7 @@ $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()."&limit=4"; + $url = $APIurl."/json/stoptrips?stop=".$row[0]."&time=".midnight_seconds()."&service_period=".service_period()."&limit=4&time_range=".str(90*60); $trips = json_decode(getPage($url)); debug(print_r($trips,true)); foreach ($trips as $key => $row) --- a/schedule_viewer.py +++ b/schedule_viewer.py @@ -421,23 +421,57 @@ if s.stop_id.lower() == query: return StopToTuple(s) return [] + + 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 = 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 --- /dev/null +++ b/stop.pdf.php @@ -1,1 +1,185 @@ +

'.staticmap(Array(0 => Array($stop[2],$stop[3])), 0,"iconb", false).'

'; +$html .= ' '; +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 +//============================================================+ +?> + --- /dev/null +++ b/tcpdf/2dbarcodes.php @@ -1,1 +1,173 @@ +. +// +// 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: + * @param $code (string) code to print + * @param $type (string) type of barcode: + */ + 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: + * @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 (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

" 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
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

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 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.: ...). + +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 & 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
 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.
+	-  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 
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 "..." 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

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.