mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-29 15:43:53 +00:00
5.9.200 (2012-12-05)
- Bug item #768 "Rowspan with Pagebreak error" was fixed. - Page regions now works also with limited MultiCell() cells.
This commit is contained in:
parent
7a65d321c3
commit
e63b80dfc2
@ -1,4 +1,8 @@
|
|||||||
5.9.1998 (2012-11-29)
|
5.9.200 (2012-12-05)
|
||||||
|
- Bug item #768 "Rowspan with Pagebreak error" was fixed.
|
||||||
|
- Page regions now works also with limited MultiCell() cells.
|
||||||
|
|
||||||
|
5.9.199 (2012-11-29)
|
||||||
- Internal setImageBuffer() method was improved.
|
- Internal setImageBuffer() method was improved.
|
||||||
|
|
||||||
5.9.198 (2012-11-19)
|
5.9.198 (2012-11-19)
|
||||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
|||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
||||||
Name: TCPDF
|
Name: TCPDF
|
||||||
Version: 5.9.199
|
Version: 5.9.200
|
||||||
Release date: 2012-11-29
|
Release date: 2012-12-05
|
||||||
Author: Nicola Asuni
|
Author: Nicola Asuni
|
||||||
|
|
||||||
Copyright (c) 2002-2012:
|
Copyright (c) 2002-2012:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tecnick.com/tcpdf",
|
"name": "tecnick.com/tcpdf",
|
||||||
"version": "5.9.199",
|
"version": "5.9.200",
|
||||||
"homepage": "http://www.tcpdf.org/",
|
"homepage": "http://www.tcpdf.org/",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"description": "TCPDF is a PHP class for generating PDF documents.",
|
"description": "TCPDF is a PHP class for generating PDF documents.",
|
||||||
|
90
tcpdf.php
90
tcpdf.php
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// File name : tcpdf.php
|
// File name : tcpdf.php
|
||||||
// Version : 5.9.199
|
// Version : 5.9.200
|
||||||
// Begin : 2002-08-03
|
// Begin : 2002-08-03
|
||||||
// Last Update : 2012-11-29
|
// Last Update : 2012-12-05
|
||||||
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
|
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
|
||||||
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3
|
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
@ -139,7 +139,7 @@
|
|||||||
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
|
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @version 5.9.199
|
* @version 5.9.200
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
|
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
|
||||||
@ -151,7 +151,7 @@ require_once(dirname(__FILE__).'/config/tcpdf_config.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.<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>
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @brief PHP class for generating PDF documents without requiring external extensions.
|
* @brief PHP class for generating PDF documents without requiring external extensions.
|
||||||
* @version 5.9.199
|
* @version 5.9.200
|
||||||
* @author Nicola Asuni - info@tecnick.com
|
* @author Nicola Asuni - info@tecnick.com
|
||||||
*/
|
*/
|
||||||
class TCPDF {
|
class TCPDF {
|
||||||
@ -162,7 +162,7 @@ class TCPDF {
|
|||||||
* Current TCPDF version.
|
* Current TCPDF version.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private $tcpdf_version = '5.9.199';
|
private $tcpdf_version = '5.9.200';
|
||||||
|
|
||||||
// Protected properties
|
// Protected properties
|
||||||
|
|
||||||
@ -274,18 +274,30 @@ class TCPDF {
|
|||||||
*/
|
*/
|
||||||
protected $lMargin;
|
protected $lMargin;
|
||||||
|
|
||||||
/**
|
|
||||||
* Top margin.
|
|
||||||
* @protected
|
|
||||||
*/
|
|
||||||
protected $tMargin;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Right margin.
|
* Right margin.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected $rMargin;
|
protected $rMargin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cell left margin (used by regions).
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
protected $clMargin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cell right margin (used by regions).
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
protected $crMargin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Top margin.
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
protected $tMargin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Page break margin.
|
* Page break margin.
|
||||||
* @protected
|
* @protected
|
||||||
@ -1653,6 +1665,12 @@ class TCPDF {
|
|||||||
*/
|
*/
|
||||||
protected $page_regions = array();
|
protected $page_regions = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Boolean value true when page region check is active.
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
protected $check_page_regions = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array containing HTML color names and values.
|
* Array containing HTML color names and values.
|
||||||
* @protected
|
* @protected
|
||||||
@ -2034,6 +2052,8 @@ class TCPDF {
|
|||||||
// page margins (1 cm)
|
// page margins (1 cm)
|
||||||
$margin = 28.35 / $this->k;
|
$margin = 28.35 / $this->k;
|
||||||
$this->SetMargins($margin, $margin);
|
$this->SetMargins($margin, $margin);
|
||||||
|
$this->clMargin = $this->lMargin;
|
||||||
|
$this->crMargin = $this->rMargin;
|
||||||
// internal cell padding
|
// internal cell padding
|
||||||
$cpadding = $margin / 10;
|
$cpadding = $margin / 10;
|
||||||
$this->setCellPaddings($cpadding, 0, $cpadding, 0);
|
$this->setCellPaddings($cpadding, 0, $cpadding, 0);
|
||||||
@ -6726,30 +6746,32 @@ class TCPDF {
|
|||||||
// apply margins
|
// apply margins
|
||||||
$oy = $y + $mc_margin['T'];
|
$oy = $y + $mc_margin['T'];
|
||||||
if ($this->rtl) {
|
if ($this->rtl) {
|
||||||
$ox = $this->w - $x - $mc_margin['R'];
|
$ox = ($this->w - $x - $mc_margin['R']);
|
||||||
} else {
|
} else {
|
||||||
$ox = $x + $mc_margin['L'];
|
$ox = ($x + $mc_margin['L']);
|
||||||
}
|
}
|
||||||
$this->x = $ox;
|
$this->x = $ox;
|
||||||
$this->y = $oy;
|
$this->y = $oy;
|
||||||
// set width
|
// set width
|
||||||
if ($this->empty_string($w) OR ($w <= 0)) {
|
if ($this->empty_string($w) OR ($w <= 0)) {
|
||||||
if ($this->rtl) {
|
if ($this->rtl) {
|
||||||
$w = $this->x - $this->lMargin - $mc_margin['L'];
|
$w = ($this->x - $this->lMargin - $mc_margin['L']);
|
||||||
} else {
|
} else {
|
||||||
$w = $this->w - $this->x - $this->rMargin - $mc_margin['R'];
|
$w = ($this->w - $this->x - $this->rMargin - $mc_margin['R']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// store original margin values
|
// store original margin values
|
||||||
$lMargin = $this->lMargin;
|
$lMargin = $this->lMargin;
|
||||||
$rMargin = $this->rMargin;
|
$rMargin = $this->rMargin;
|
||||||
if ($this->rtl) {
|
if ($this->rtl) {
|
||||||
$this->rMargin = $this->w - $this->x;
|
$this->rMargin = ($this->w - $this->x);
|
||||||
$this->lMargin = $this->x - $w;
|
$this->lMargin = ($this->x - $w);
|
||||||
} else {
|
} else {
|
||||||
$this->lMargin = $this->x;
|
$this->lMargin = ($this->x);
|
||||||
$this->rMargin = $this->w - $this->x - $w;
|
$this->rMargin = ($this->w - $this->x - $w);
|
||||||
}
|
}
|
||||||
|
$this->clMargin = $this->lMargin;
|
||||||
|
$this->crMargin = $this->rMargin;
|
||||||
if ($autopadding) {
|
if ($autopadding) {
|
||||||
// add top padding
|
// add top padding
|
||||||
$this->y += $mc_padding['T'];
|
$this->y += $mc_padding['T'];
|
||||||
@ -6832,6 +6854,9 @@ class TCPDF {
|
|||||||
if ($this->num_columns == 0) {
|
if ($this->num_columns == 0) {
|
||||||
$this->num_columns = 1;
|
$this->num_columns = 1;
|
||||||
}
|
}
|
||||||
|
// disable page regions check
|
||||||
|
$check_page_regions = $this->check_page_regions;
|
||||||
|
$this->check_page_regions = false;
|
||||||
// get border modes
|
// get border modes
|
||||||
$border_start = $this->getBorderMode($border, $position='start');
|
$border_start = $this->getBorderMode($border, $position='start');
|
||||||
$border_end = $this->getBorderMode($border, $position='end');
|
$border_end = $this->getBorderMode($border, $position='end');
|
||||||
@ -6975,6 +7000,8 @@ class TCPDF {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // end for each page
|
} // end for each page
|
||||||
|
// restore page regions check
|
||||||
|
$this->check_page_regions = $check_page_regions;
|
||||||
// Get end-of-cell Y position
|
// Get end-of-cell Y position
|
||||||
$currentY = $this->GetY();
|
$currentY = $this->GetY();
|
||||||
// restore previous values
|
// restore previous values
|
||||||
@ -7009,6 +7036,8 @@ class TCPDF {
|
|||||||
$this->setContentMark();
|
$this->setContentMark();
|
||||||
$this->cell_padding = $prev_cell_padding;
|
$this->cell_padding = $prev_cell_padding;
|
||||||
$this->cell_margin = $prev_cell_margin;
|
$this->cell_margin = $prev_cell_margin;
|
||||||
|
$this->clMargin = $this->lMargin;
|
||||||
|
$this->crMargin = $this->rMargin;
|
||||||
return $nl;
|
return $nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23835,6 +23864,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
$cs = 0;
|
$cs = 0;
|
||||||
$dom[$key]['rowspans'] = array();
|
$dom[$key]['rowspans'] = array();
|
||||||
if (!isset($dom[$key]['attribute']['nested']) OR ($dom[$key]['attribute']['nested'] != 'true')) {
|
if (!isset($dom[$key]['attribute']['nested']) OR ($dom[$key]['attribute']['nested'] != 'true')) {
|
||||||
|
$this->htmlvspace = 0;
|
||||||
// set table header
|
// set table header
|
||||||
if (!$this->empty_string($dom[$key]['thead'])) {
|
if (!$this->empty_string($dom[$key]['thead'])) {
|
||||||
// set table header
|
// set table header
|
||||||
@ -24585,12 +24615,12 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
// update row-spanned cells
|
// update row-spanned cells
|
||||||
if (isset($dom[($dom[$key]['parent'])]['rowspans'])) {
|
if (isset($dom[($dom[$key]['parent'])]['rowspans'])) {
|
||||||
foreach ($dom[($dom[$key]['parent'])]['rowspans'] as $k => $trwsp) {
|
foreach ($dom[($dom[$key]['parent'])]['rowspans'] as $k => $trwsp) {
|
||||||
if ($trwsp['trid'] == $trkey) {
|
if (isset($prevtrkey) AND ($trwsp['trid'] == $prevtrkey) AND ($trwsp['mrowspan'] > 0)) {
|
||||||
$dom[($dom[$key]['parent'])]['rowspans'][$k]['mrowspan'] -= 1;
|
|
||||||
}
|
|
||||||
if (isset($prevtrkey) AND ($trwsp['trid'] == $prevtrkey) AND ($trwsp['mrowspan'] >= 0)) {
|
|
||||||
$dom[($dom[$key]['parent'])]['rowspans'][$k]['trid'] = $trkey;
|
$dom[($dom[$key]['parent'])]['rowspans'][$k]['trid'] = $trkey;
|
||||||
}
|
}
|
||||||
|
if ($dom[($dom[$key]['parent'])]['rowspans'][$k]['trid'] == $trkey) {
|
||||||
|
$dom[($dom[$key]['parent'])]['rowspans'][$k]['mrowspan'] -= 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($prevtrkey) AND ($dom[$trkey]['startpage'] > $dom[$prevtrkey]['endpage'])) {
|
if (isset($prevtrkey) AND ($dom[$trkey]['startpage'] > $dom[$prevtrkey]['endpage'])) {
|
||||||
@ -27975,7 +28005,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
if ($y === '') {
|
if ($y === '') {
|
||||||
$y = $this->y;
|
$y = $this->y;
|
||||||
}
|
}
|
||||||
if (empty($this->page_regions)) {
|
if (!$this->check_page_regions OR empty($this->page_regions)) {
|
||||||
// no page regions defined
|
// no page regions defined
|
||||||
return array($x, $y);
|
return array($x, $y);
|
||||||
}
|
}
|
||||||
@ -27990,15 +28020,15 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
}
|
}
|
||||||
if ($this->num_columns > 1) {
|
if ($this->num_columns > 1) {
|
||||||
if ($this->rtl) {
|
if ($this->rtl) {
|
||||||
$this->lMargin = $this->columns[$this->current_column]['x'] - $this->columns[$this->current_column]['w'];
|
$this->lMargin = ($this->columns[$this->current_column]['x'] - $this->columns[$this->current_column]['w']);
|
||||||
} else {
|
} else {
|
||||||
$this->rMargin = $this->w - $this->columns[$this->current_column]['x'] - $this->columns[$this->current_column]['w'];
|
$this->rMargin = ($this->w - $this->columns[$this->current_column]['x'] - $this->columns[$this->current_column]['w']);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($this->rtl) {
|
if ($this->rtl) {
|
||||||
$this->lMargin = $this->original_lMargin;
|
$this->lMargin = max($this->clMargin, $this->original_lMargin);
|
||||||
} else {
|
} else {
|
||||||
$this->rMargin = $this->original_rMargin;
|
$this->rMargin = max($this->crMargin, $this->original_rMargin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// adjust coordinates and page margins
|
// adjust coordinates and page margins
|
||||||
@ -28017,7 +28047,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
if ($this->lMargin < $new_margin) {
|
if ($this->lMargin < $new_margin) {
|
||||||
if ($this->rtl) {
|
if ($this->rtl) {
|
||||||
// adjust left page margin
|
// adjust left page margin
|
||||||
$this->lMargin = $new_margin;
|
$this->lMargin = max(0, $new_margin);
|
||||||
}
|
}
|
||||||
if ($x < $new_margin) {
|
if ($x < $new_margin) {
|
||||||
// adjust x position
|
// adjust x position
|
||||||
@ -28033,7 +28063,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
if (($this->w - $this->rMargin) > $new_margin) {
|
if (($this->w - $this->rMargin) > $new_margin) {
|
||||||
if (!$this->rtl) {
|
if (!$this->rtl) {
|
||||||
// adjust right page margin
|
// adjust right page margin
|
||||||
$this->rMargin = ($this->w - $new_margin);
|
$this->rMargin = max(0, ($this->w - $new_margin));
|
||||||
}
|
}
|
||||||
if ($x > $new_margin) {
|
if ($x > $new_margin) {
|
||||||
// adjust x position
|
// adjust x position
|
||||||
|
Loading…
Reference in New Issue
Block a user