diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 180c048..425033e 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,7 @@ +6.0.081 (2014-05-22) + - Bug item #922 "writehtml tables thead repeating" was fixed. + - Patch #71 "External and internal links, local and remote" wa applied. + 6.0.080 (2014-05-20) - Bug item #921 "Fatal error in hyphenateText() function" was fixed. - Bug item #923 "Automatic Hyphenation error" was fixed. diff --git a/README.TXT b/README.TXT index 1efab8d..c69cc74 100644 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 6.0.080 -Release date: 2014-05-20 +Version: 6.0.081 +Release date: 2014-05-22 Author: Nicola Asuni Copyright (c) 2002-2014: diff --git a/composer.json b/composer.json index 04b3dcc..e8c2c40 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "tecnick.com/tcpdf", - "version": "6.0.080", + "version": "6.0.081", "homepage": "http://www.tcpdf.org/", "type": "library", "description": "TCPDF is a PHP class for generating PDF documents.", diff --git a/include/tcpdf_static.php b/include/tcpdf_static.php index 844ff1f..fccc9d8 100644 --- a/include/tcpdf_static.php +++ b/include/tcpdf_static.php @@ -55,7 +55,7 @@ class TCPDF_STATIC { * Current TCPDF version. * @private static */ - private static $tcpdf_version = '6.0.080'; + private static $tcpdf_version = '6.0.081'; /** * String alias for total number of pages. diff --git a/tcpdf.php b/tcpdf.php index 59693d6..5480ebf 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.0.080 + * @version 6.0.081 */ // TCPDF configuration @@ -128,7 +128,7 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.php'); * TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
* @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 6.0.080 + * @version 6.0.081 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -8401,8 +8401,20 @@ class TCPDF { $jsa = 'var D=event.target.doc;var MyData=D.dataObjects;for (var i in MyData) if (MyData[i].path=="'.$filename.'") D.exportDataObject( { cName : MyData[i].name, nLaunch : 2});'; $annots .= ' /A << /S /JavaScript /JS '.$this->_textstring($jsa, $annot_obj_id).'>>'; } else { - // external URI link - $annots .= ' /A <_datastring($this->unhtmlentities($pl['txt']), $annot_obj_id).'>>'; + $parsedUrl = parse_url($pl['txt']); + if (empty($parsedUrl['scheme']) AND (strtolower(substr($parsedUrl['path'], -4)) == '.pdf')) { + // relative link to a PDF file + $dest = '[0 /Fit]'; // default page 0 + if (!empty($parsedUrl['fragment'])) { + // check for named destination + $tmp = explode('=', $parsedUrl['fragment']); + $dest = '('.((count($tmp) == 2) ? $tmp[1] : $tmp[0]).')'; + } + $annots .= ' /A <_datastring($this->unhtmlentities($parsedUrl['path']), $annot_obj_id).' /NewWindow true>>'; + } else { + // external URI link + $annots .= ' /A <_datastring($this->unhtmlentities($pl['txt']), $annot_obj_id).'>>'; + } } } elseif (isset($this->links[$pl['txt']])) { // internal link ID @@ -18443,6 +18455,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: foreach ($this_method_vars as $vkey => $vval) { $$vkey = $vval; } + if (!empty($dom[$key]['thead'])) { + $this->inthead = true; + } // add a page (or trig AcceptPageBreak() for multicolumn mode) $pre_y = $this->y; if ((!$this->checkPageBreak($this->PageBreakTrigger + 1)) AND ($this->y < $pre_y)) {