32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-11-22 21:05:10 +00:00
This commit is contained in:
nicolaasuni 2011-06-16 11:05:25 +02:00
parent 1d0e33ed68
commit 52280496ff
3 changed files with 30 additions and 9 deletions

View File

@ -1,3 +1,6 @@
5.9.093 (2011-06-16)
- Method setStartingPageNumber() was added to set starting page number (for automatic page numbering).
5.9.092 (2011-06-15)
- Method _putpages() was improved.
- Bug item #3316678 "Memory overflow when use Rotate and SetAutoPageBreak" was fixed.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 5.9.092
Release date: 2011-06-15
Version: 5.9.093
Release date: 2011-06-16
Author: Nicola Asuni
Copyright (c) 2002-2011:

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 5.9.092
// Version : 5.9.093
// Begin : 2002-08-03
// Last Update : 2011-06-15
// Last Update : 2011-06-16
// 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.
// -------------------------------------------------------------------
@ -134,7 +134,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 5.9.092
* @version 5.9.093
*/
// 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>
* @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions.
* @version 5.9.092
* @version 5.9.093
* @author Nicola Asuni - info@tecnick.com
*/
class TCPDF {
@ -157,7 +157,7 @@ class TCPDF {
* Current TCPDF version.
* @private
*/
private $tcpdf_version = '5.9.092';
private $tcpdf_version = '5.9.093';
// Protected properties
@ -513,6 +513,12 @@ class TCPDF {
*/
protected $creator = '';
/**
* Starting page number.
* @protected
*/
protected $starting_page_number = 1;
/**
* String alias for total number of pages.
* @protected
@ -8522,7 +8528,7 @@ class TCPDF {
// get internal aliases for page numbers
$pnalias = $this->getInternalPageNumberAliases();
$num_pages = $this->numpages;
$ptpa = $this->formatPageNumber($num_pages);
$ptpa = $this->formatPageNumber(($this->starting_page_number + $num_pages - 1));
$ptpu = $this->UTF8ToUTF16BE($ptpa, false);
$pagegroupnum = 0;
$groupnum = 0;
@ -8531,8 +8537,10 @@ class TCPDF {
$temppage = $this->getPageBuffer($n);
$pagelen = strlen($temppage);
// set replacements for total pages number
$pnpa = $this->formatPageNumber($n);
$pnpa = $this->formatPageNumber(($this->starting_page_number + $n - 1));
$pnpu = $this->UTF8ToUTF16BE($pnpa, false);
$ptgu = 1;
$ptga = 1;
if (!empty($this->pagegroups)) {
if (isset($this->newpagegroup[$n])) {
$pagegroupnum = 0;
@ -15860,6 +15868,16 @@ class TCPDF {
*/
public function AliasNumPage($s='') {}
/**
* Set the starting page number.
* @param $num (int) Starting page number.
* @since 5.9.093 (2011-06-16)
* @public
*/
public function setStartingPageNumber($num=1) {
$this->starting_page_number = max(0, intval($num));
}
/**
* Returns the string alias used for the total number of pages.
* If the current font is unicode type, the returned string is surrounded by additional curly braces.