32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-11-26 06:17:33 +00:00
This commit is contained in:
nicolaasuni 2011-05-18 08:40:32 +02:00
parent 53aa39ca0c
commit 2a40458bd5
3 changed files with 39 additions and 7 deletions

View File

@ -1,3 +1,7 @@
5.9.081 (2011-05-18)
- Method resetHeaderTemplate() was added to reset the xobject template used by Header() method.
- Method setHeaderTemplateAutoreset() was added to automatically reset the xobject template used by Header() method at each page.
5.9.080 (2011-05-17) 5.9.080 (2011-05-17)
- A problem related to file path calculation for images was fixed. - A problem related to file path calculation for images was fixed.
- A problem related to unsupressed getimagesize() error was fixed. - A problem related to unsupressed getimagesize() error was fixed.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 5.9.080 Version: 5.9.081
Release date: 2011-05-17 Release date: 2011-05-18
Author: Nicola Asuni Author: Nicola Asuni
Copyright (c) 2002-2011: Copyright (c) 2002-2011:

View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : tcpdf.php // File name : tcpdf.php
// Version : 5.9.080 // Version : 5.9.081
// Begin : 2002-08-03 // Begin : 2002-08-03
// Last Update : 2011-05-17 // Last Update : 2011-05-18
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com // Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3 + YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE GENERATED PDF DOCUMENTS. // License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3 + YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE GENERATED PDF DOCUMENTS.
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -134,7 +134,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.080 * @version 5.9.081
*/ */
// 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.
@ -146,7 +146,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.080 * @version 5.9.081
* @author Nicola Asuni - info@tecnick.com * @author Nicola Asuni - info@tecnick.com
*/ */
class TCPDF { class TCPDF {
@ -157,7 +157,7 @@ class TCPDF {
* Current TCPDF version. * Current TCPDF version.
* @private * @private
*/ */
private $tcpdf_version = '5.9.080'; private $tcpdf_version = '5.9.081';
// Protected properties // Protected properties
@ -572,6 +572,12 @@ class TCPDF {
*/ */
protected $header_xobjid = -1; protected $header_xobjid = -1;
/**
* If true reset the Header Xobject template at each page
* @protected
*/
protected $header_xobj_autoreset = false;
/** /**
* Minimum distance between header and top page margin. * Minimum distance between header and top page margin.
* @protected * @protected
@ -1912,6 +1918,7 @@ class TCPDF {
$this->file_id = md5($this->getRandomSeed('TCPDF'.$orientation.$unit.$format.$encoding)); $this->file_id = md5($this->getRandomSeed('TCPDF'.$orientation.$unit.$format.$encoding));
// get default graphic vars // get default graphic vars
$this->default_graphic_vars = $this->getGraphicVars(); $this->default_graphic_vars = $this->getGraphicVars();
$this->header_xobj_autoreset = false;
} }
/** /**
@ -4003,6 +4010,23 @@ class TCPDF {
return $this->img_rb_y; return $this->img_rb_y;
} }
/**
* Reset the xobject template used by Header() method.
* @public
*/
public function resetHeaderTemplate() {
$this->header_xobjid = -1;
}
/**
* Set a flag to automatically reset the xobject template used by Header() method at each page.
* @param $val (boolean) set to true to reset Header xobject template at each page, false otherwise.
* @public
*/
public function setHeaderTemplateAutoreset($val=true) {
$this->header_xobj_autoreset = $val;
}
/** /**
* This method is used to render the page header. * This method is used to render the page header.
* It is automatically called by AddPage() and could be overwritten in your own inherited class. * It is automatically called by AddPage() and could be overwritten in your own inherited class.
@ -4074,6 +4098,10 @@ class TCPDF {
$x = 0 + $dx; $x = 0 + $dx;
} }
$this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false); $this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false);
if ($this->header_xobj_autoreset) {
// reset header xobject template at each page
$this->header_xobjid = -1;
}
} }
/** /**