mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-12-23 08:58:55 +00:00
4.6.021
This commit is contained in:
parent
532122354c
commit
d5cb055a0d
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 4.6.020
|
||||
Release date: 2009-07-16
|
||||
Version: 4.6.021
|
||||
Release date: 2009-07-20
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2001-2009:
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:05 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:26 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1368,7 +1368,7 @@ $type)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:05 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:26 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -96,7 +96,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:05 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:26 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -507,7 +507,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:14 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -88,7 +88,7 @@ Array of WEB safe colors.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -73,7 +73,7 @@ This is a PHP class for generating PDF documents without requiring external exte
|
||||
<td><b>author:</b> </td><td>Nicola Asuni</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>version:</b> </td><td>4.6.020</td>
|
||||
<td><b>version:</b> </td><td>4.6.021</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>copyright:</b> </td><td>2002-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com</td>
|
||||
@ -104,7 +104,7 @@ unicode data<br /><br /></div>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_PRODUCER = 'TCPDF 4.6.020 (http://www.tcpdf.org)'</code>
|
||||
<code>PDF_PRODUCER = 'TCPDF 4.6.021 (http://www.tcpdf.org)'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
@ -115,7 +115,7 @@ unicode data<br /><br /></div>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:06 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -237,7 +237,7 @@ Unicode Include file for TCPDF.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:14 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -179,6 +179,8 @@
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$cell_height_ratio">TCPDF::$cell_height_ratio</a><br> Default cell height ratio.</dd>
|
||||
<dt><b>$cMargin</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$cMargin">TCPDF::$cMargin</a></dd>
|
||||
<dt><b>$cntmrk</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$cntmrk">TCPDF::$cntmrk</a><br> Array used to store content positions inside the pages buffer.</dd>
|
||||
<dt><b>$ColorFlag</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$ColorFlag">TCPDF::$ColorFlag</a></dd>
|
||||
<dt><b>$compress</b></dt>
|
||||
@ -919,6 +921,8 @@
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetCellPadding">TCPDF::SetCellPadding()</a><br> Set the internal Cell padding.</dd>
|
||||
<dt><b>SetCompression</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetCompression">TCPDF::SetCompression()</a><br> Activates or deactivates page compression. When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document. Compression is on by default.</dd>
|
||||
<dt><b>setContentMark</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetContentMark">TCPDF::setContentMark()</a><br> Set start-writing mark on selected page.</dd>
|
||||
<dt><b>SetCreator</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetCreator">TCPDF::SetCreator()</a><br> Defines the creator of the document. This is typically the name of the application that generates the PDF.</dd>
|
||||
<dt><b>SetDefaultMonospacedFont</b></dt>
|
||||
@ -1368,7 +1372,7 @@
|
||||
<a href="elementindex.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:05 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:26 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -330,6 +330,8 @@
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$cell_height_ratio">TCPDF::$cell_height_ratio</a><br> Default cell height ratio.</dd>
|
||||
<dt><b>$cMargin</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$cMargin">TCPDF::$cMargin</a></dd>
|
||||
<dt><b>$cntmrk</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$cntmrk">TCPDF::$cntmrk</a><br> Array used to store content positions inside the pages buffer.</dd>
|
||||
<dt><b>$ColorFlag</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$ColorFlag">TCPDF::$ColorFlag</a></dd>
|
||||
<dt><b>$compress</b></dt>
|
||||
@ -1070,6 +1072,8 @@
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetCellPadding">TCPDF::SetCellPadding()</a><br> Set the internal Cell padding.</dd>
|
||||
<dt><b>SetCompression</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetCompression">TCPDF::SetCompression()</a><br> Activates or deactivates page compression. When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document. Compression is on by default.</dd>
|
||||
<dt><b>setContentMark</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetContentMark">TCPDF::setContentMark()</a><br> Set start-writing mark on selected page.</dd>
|
||||
<dt><b>SetCreator</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetCreator">TCPDF::SetCreator()</a><br> Defines the creator of the document. This is typically the name of the application that generates the PDF.</dd>
|
||||
<dt><b>SetDefaultMonospacedFont</b></dt>
|
||||
@ -1391,7 +1395,7 @@
|
||||
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:04 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:26 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -35,7 +35,7 @@
|
||||
<a href="#Post-parsing">Post-parsing</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:15 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -58,7 +58,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.1</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:05 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:26 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -58,7 +58,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.1</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Thu, 16 Jul 2009 14:48:05 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Mon, 20 Jul 2009 15:44:26 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
109
tcpdf.php
109
tcpdf.php
@ -2,9 +2,9 @@
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Begin : 2002-08-03
|
||||
// Last Update : 2009-07-16
|
||||
// Last Update : 2009-07-20
|
||||
// Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org
|
||||
// Version : 4.6.020
|
||||
// Version : 4.6.021
|
||||
// License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (C) 2002-2009 Nicola Asuni - Tecnick.com S.r.l.
|
||||
@ -126,7 +126,7 @@
|
||||
* @copyright 2002-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @version 4.6.020
|
||||
* @version 4.6.021
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -150,14 +150,14 @@ if (!class_exists('TCPDF', false)) {
|
||||
/**
|
||||
* define default PDF document producer
|
||||
*/
|
||||
define('PDF_PRODUCER', 'TCPDF 4.6.020 (http://www.tcpdf.org)');
|
||||
define('PDF_PRODUCER', 'TCPDF 4.6.021 (http://www.tcpdf.org)');
|
||||
|
||||
/**
|
||||
* This is a PHP class for generating PDF documents without requiring external extensions.<br>
|
||||
* TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br>
|
||||
* @name TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @version 4.6.020
|
||||
* @version 4.6.021
|
||||
* @author Nicola Asuni - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
@ -974,7 +974,15 @@ if (!class_exists('TCPDF', false)) {
|
||||
* @access protected
|
||||
* @since 3.2.000 (2008-06-26)
|
||||
*/
|
||||
protected $intmrk = array();
|
||||
protected $intmrk = array();
|
||||
|
||||
/**
|
||||
* Array used to store content positions inside the pages buffer.
|
||||
* keys are the page numbers
|
||||
* @access protected
|
||||
* @since 4.6.021 (2009-07-20)
|
||||
*/
|
||||
protected $cntmrk = array();
|
||||
|
||||
/**
|
||||
* Array used to store footer positions of each page.
|
||||
@ -1087,7 +1095,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
* @access protected
|
||||
* @since 4.2.000 (2008-10-29)
|
||||
*/
|
||||
protected $feps = 0.001;
|
||||
protected $feps = 0.005;
|
||||
|
||||
/**
|
||||
* Array used for custom vertical spaces for HTML tags
|
||||
@ -1319,8 +1327,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
}
|
||||
// set disk caching
|
||||
$this->diskcache = $diskcache ? true : false;
|
||||
// set language direction
|
||||
$this->rtl = $this->l['a_meta_dir']=='rtl' ? true : false;
|
||||
// set language direction
|
||||
$this->rtl = false;
|
||||
$this->tmprtl = false;
|
||||
//Some checks
|
||||
$this->_dochecks();
|
||||
@ -1419,8 +1427,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
// \p{Z} or \p{Separator}: any kind of Unicode whitespace or invisible separator.
|
||||
// \p{Lo} or \p{Other_Letter}: a Unicode letter or ideograph that does not have lowercase and uppercase variants.
|
||||
// \p{Lo} is needed because Chinese characters are packed next to each other without spaces in between.
|
||||
//$this->re_spaces = '/[\s\p{Z}\p{Lo}]/';
|
||||
$this->re_spaces = '/[\s\p{Z}]/';
|
||||
//$this->re_spaces = '/[\s\p{Z}\p{Lo}]/u';
|
||||
$this->re_spaces = '/[\s\p{Z}]/u';
|
||||
} else {
|
||||
// PCRE unicode support is turned OFF
|
||||
$this->re_spaces = '/[\s]/';
|
||||
@ -2241,9 +2249,27 @@ if (!class_exists('TCPDF', false)) {
|
||||
* @since 4.0.016 (2008-07-30)
|
||||
*/
|
||||
public function setPageMark() {
|
||||
$this->intmrk[$this->page] = $this->pagelen[$this->page];
|
||||
$this->intmrk[$this->page] = $this->pagelen[$this->page];
|
||||
$this->setContentMark();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set start-writing mark on selected page.
|
||||
* @param int $page page number (default is the current page)
|
||||
* @access protected
|
||||
* @since 4.6.021 (2009-07-20)
|
||||
*/
|
||||
protected function setContentMark($page=0) {
|
||||
if ($page <= 0) {
|
||||
$page = $this->page;
|
||||
}
|
||||
if (isset($this->footerlen[$page])) {
|
||||
$this->cntmrk[$page] = $this->pagelen[$page] - $this->footerlen[$page];
|
||||
} else {
|
||||
$this->cntmrk[$page] = $this->pagelen[$page];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set header data.
|
||||
* @param string $ln header image logo
|
||||
@ -3819,7 +3845,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
$this->setPage($startpage);
|
||||
$this->y = $y;
|
||||
$this->SetX($x + $w);
|
||||
}
|
||||
}
|
||||
$this->setContentMark();
|
||||
return $nl;
|
||||
}
|
||||
|
||||
@ -4564,7 +4591,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
$this->x = $bx;
|
||||
$this->y = $by;
|
||||
}
|
||||
if ($link) {
|
||||
if ($link) {
|
||||
$this->Link($ximg, $y, $w, $h, $link, 0);
|
||||
}
|
||||
// set pointer to align the successive text/objects
|
||||
@ -5530,7 +5557,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
case 'link': {
|
||||
if(is_string($pl['txt'])) {
|
||||
// external URI link
|
||||
$annots .= ' /A <</S /URI /URI '.$this->_datastring($pl['txt']).'>>';
|
||||
$annots .= ' /A <</S /URI /URI '.$this->_datastring($this->unhtmlentities($pl['txt'])).'>>';
|
||||
} else {
|
||||
// internal link
|
||||
$l = $this->links[$pl['txt']];
|
||||
@ -5683,7 +5710,6 @@ if (!class_exists('TCPDF', false)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$annots .= '>>';
|
||||
}
|
||||
$annots .= "\n]";
|
||||
@ -6911,8 +6937,12 @@ if (!class_exists('TCPDF', false)) {
|
||||
* @since 1.1
|
||||
*/
|
||||
public function setLanguageArray($language) {
|
||||
$this->l = $language;
|
||||
$this->rtl = $this->l['a_meta_dir']=='rtl' ? true : false;
|
||||
$this->l = $language;
|
||||
if (isset($this->l['a_meta_dir'])) {
|
||||
$this->rtl = $this->l['a_meta_dir']=='rtl' ? true : false;
|
||||
} else {
|
||||
$this->rtl = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -7595,7 +7625,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
if (isset($dash)) {
|
||||
$dash_string = '';
|
||||
if ($dash) {
|
||||
if (ereg('^.+,', $dash)) {
|
||||
if (preg_match('/^.+,/', $dash) > 0) {
|
||||
$tab = explode(',', $dash);
|
||||
} else {
|
||||
$tab = array($dash);
|
||||
@ -11062,7 +11092,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
if (isset($dom[$key]['style']['font-family'])) {
|
||||
// font family
|
||||
if (isset($dom[$key]['style']['font-family'])) {
|
||||
$fontslist = split(',', strtolower($dom[$key]['style']['font-family']));
|
||||
$fontslist = preg_split('/[,]/', strtolower($dom[$key]['style']['font-family']));
|
||||
foreach ($fontslist as $font) {
|
||||
$font = trim(strtolower($font));
|
||||
if (in_array($font, $this->fontlist) OR in_array($font, $this->fontkeys)) {
|
||||
@ -11176,7 +11206,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
if ($dom[$key]['value'] == 'font') {
|
||||
// font family
|
||||
if (isset($dom[$key]['attribute']['face'])) {
|
||||
$fontslist = split(',', strtolower($dom[$key]['attribute']['face']));
|
||||
$fontslist = preg_split('/[,]/', strtolower($dom[$key]['attribute']['face']));
|
||||
foreach ($fontslist as $font) {
|
||||
$font = trim(strtolower($font));
|
||||
if (in_array($font, $this->fontlist) OR in_array($font, $this->fontkeys)) {
|
||||
@ -11377,7 +11407,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
$this->checkPageBreak($imgh);
|
||||
}
|
||||
if ($this->page > $startlinepage) {
|
||||
// fix lines splitted over two pages
|
||||
// fix line splitted over two pages
|
||||
if (isset($this->footerlen[$startlinepage])) {
|
||||
$curpos = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage];
|
||||
}
|
||||
@ -11386,34 +11416,39 @@ if (!class_exists('TCPDF', false)) {
|
||||
$linebeg = substr($pagebuff, $startlinepos, ($curpos - $startlinepos));
|
||||
$tstart = substr($pagebuff, 0, $startlinepos);
|
||||
$tend = substr($this->getPageBuffer($startlinepage), $curpos);
|
||||
// remove line start from previous page
|
||||
// remove line from previous page
|
||||
$this->setPageBuffer($startlinepage, $tstart.''.$tend);
|
||||
$pagebuff = $this->getPageBuffer($this->page);
|
||||
$tstart = substr($pagebuff, 0, $this->intmrk[$this->page]);
|
||||
$tend = substr($pagebuff, $this->intmrk[$this->page]);
|
||||
$tstart = substr($pagebuff, 0, $this->cntmrk[$this->page]);
|
||||
$tend = substr($pagebuff, $this->cntmrk[$this->page]);
|
||||
// add line start to current page
|
||||
$yshift = $minstartliney - $this->y;
|
||||
$try = sprintf('1 0 0 1 0 %.3F cm', ($yshift * $this->k));
|
||||
$this->setPageBuffer($this->page, $tstart."\nq\n".$try."\n".$linebeg."\nQ\n".$tend);
|
||||
// shift the annotations and links
|
||||
if (isset($this->PageAnnots[$this->page])) {
|
||||
$next_pask = count($this->PageAnnots[$this->page]);
|
||||
} else {
|
||||
$next_pask = 0;
|
||||
}
|
||||
if (isset($this->PageAnnots[$startlinepage])) {
|
||||
foreach ($this->PageAnnots[$startlinepage] as $pak => $pac) {
|
||||
if ($pak >= $pask) {
|
||||
$this->PageAnnots[$this->page][] = $pac;
|
||||
unset($this->PageAnnots[$startlinepage][$pak]);
|
||||
$npak = count($this->PageAnnots[$this->page]) - 1;
|
||||
$this->PageAnnots[$this->page][$npak]['y'] -= $yshift;
|
||||
$npak = count($this->PageAnnots[$this->page]) - 1;
|
||||
$this->PageAnnots[$this->page][$npak]['y'] -= $yshift;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$startlinepos = $this->intmrk[$this->page];
|
||||
$pask = $next_pask;
|
||||
$startlinepos = $this->cntmrk[$this->page];
|
||||
$startlinepage = $this->page;
|
||||
$startliney = $this->y;
|
||||
}
|
||||
|
||||
$this->y += (($curfontsize / $this->k) - $imgh);
|
||||
$minstartliney = min($this->y, $minstartliney);
|
||||
|
||||
$minstartliney = min($this->y, $minstartliney);
|
||||
} elseif (isset($dom[$key]['fontname']) OR isset($dom[$key]['fontstyle']) OR isset($dom[$key]['fontsize'])) {
|
||||
// account for different font size
|
||||
$pfontname = $curfontname;
|
||||
@ -11443,13 +11478,18 @@ if (!class_exists('TCPDF', false)) {
|
||||
// remove line start from previous page
|
||||
$this->setPageBuffer($startlinepage, $tstart.''.$tend);
|
||||
$pagebuff = $this->getPageBuffer($this->page);
|
||||
$tstart = substr($pagebuff, 0, $this->intmrk[$this->page]);
|
||||
$tend = substr($pagebuff, $this->intmrk[$this->page]);
|
||||
$tstart = substr($pagebuff, 0, $this->cntmrk[$this->page]);
|
||||
$tend = substr($pagebuff, $this->cntmrk[$this->page]);
|
||||
// add line start to current page
|
||||
$yshift = $minstartliney - $this->y;
|
||||
$try = sprintf('1 0 0 1 0 %.3F cm', ($yshift * $this->k));
|
||||
$this->setPageBuffer($this->page, $tstart."\nq\n".$try."\n".$linebeg."\nQ\n".$tend);
|
||||
// shift the annotations and links
|
||||
if (isset($this->PageAnnots[$this->page])) {
|
||||
$next_pask = count($this->PageAnnots[$this->page]);
|
||||
} else {
|
||||
$next_pask = 0;
|
||||
}
|
||||
if (isset($this->PageAnnots[$startlinepage])) {
|
||||
foreach ($this->PageAnnots[$startlinepage] as $pak => $pac) {
|
||||
if ($pak >= $pask) {
|
||||
@ -11460,6 +11500,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
}
|
||||
}
|
||||
}
|
||||
$pask = $next_pask;
|
||||
}
|
||||
$this->y += (($curfontsize - $fontsize) / $this->k);
|
||||
$minstartliney = min($this->y, $minstartliney);
|
||||
|
Loading…
Reference in New Issue
Block a user