mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-25 22:07:33 +00:00
4.8.017
This commit is contained in:
parent
2a1846749f
commit
7408b6472d
@ -1,3 +1,9 @@
|
||||
4.8.017 (2009-11-27)
|
||||
- THEAD problem when table is used on header/footer was fixed.
|
||||
- A first line alignment on HTML justification was fixed.
|
||||
- Method getImageFileType() was added.
|
||||
- Images with unknown extension and type are now supported via ImageMagick PHP extension.
|
||||
|
||||
4.8.016 (2009-11-21)
|
||||
- Document Information Dictionary was fixed.
|
||||
- CSS attributes 'page-break-before', 'page-break-after' and 'page-break-inside' are now supported.
|
||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 4.8.016
|
||||
Release date: 2009-11-21
|
||||
Version: 4.8.017
|
||||
Release date: 2009-11-27
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2001-2009:
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 21 Nov 2009 11:44:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:11 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</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 Sat, 21 Nov 2009 11:44:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:11 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</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 Sat, 21 Nov 2009 11:44:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:11 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</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 Sat, 21 Nov 2009 11:45:06 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:17 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</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 Sat, 21 Nov 2009 11:44:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:12 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</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.8.016</td>
|
||||
<td><b>version:</b> </td><td>4.8.017</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.8.016 (http://www.tcpdf.org)'</code>
|
||||
<code>PDF_PRODUCER = 'TCPDF 4.8.017 (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 Sat, 21 Nov 2009 11:44:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:12 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</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 Sat, 21 Nov 2009 11:45:06 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:18 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -441,6 +441,8 @@
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodgetHTMLUnitToUnits">TCPDF::getHTMLUnitToUnits()</a><br> convert html string containing value and unit of measure to user's units or points.</dd>
|
||||
<dt><b>getImageBuffer</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodgetImageBuffer">TCPDF::getImageBuffer()</a><br> Get image buffer content.</dd>
|
||||
<dt><b>getImageFileType</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodgetImageFileType">TCPDF::getImageFileType()</a><br> Return the image type given the file name and path</dd>
|
||||
<dt><b>getImageRBX</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodgetImageRBX">TCPDF::getImageRBX()</a><br> Return the right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image</dd>
|
||||
<dt><b>getImageRBY</b></dt>
|
||||
@ -1446,7 +1448,7 @@
|
||||
<a href="elementindex.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 21 Nov 2009 11:44:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:11 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -600,6 +600,8 @@
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodgetHTMLUnitToUnits">TCPDF::getHTMLUnitToUnits()</a><br> convert html string containing value and unit of measure to user's units or points.</dd>
|
||||
<dt><b>getImageBuffer</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodgetImageBuffer">TCPDF::getImageBuffer()</a><br> Get image buffer content.</dd>
|
||||
<dt><b>getImageFileType</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodgetImageFileType">TCPDF::getImageFileType()</a><br> Return the image type given the file name and path</dd>
|
||||
<dt><b>getImageRBX</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodgetImageRBX">TCPDF::getImageRBX()</a><br> Return the right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image</dd>
|
||||
<dt><b>getImageRBY</b></dt>
|
||||
@ -1469,7 +1471,7 @@
|
||||
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 21 Nov 2009 11:44:58 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:11 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</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 Sat, 21 Nov 2009 11:45:06 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:18 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -58,7 +58,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 21 Nov 2009 11:44:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:11 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -58,7 +58,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 21 Nov 2009 11:44:59 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 27 Nov 2009 15:28:11 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
60
tcpdf.php
60
tcpdf.php
@ -2,9 +2,9 @@
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Begin : 2002-08-03
|
||||
// Last Update : 2009-11-21
|
||||
// Last Update : 2009-11-27
|
||||
// Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org
|
||||
// Version : 4.8.016
|
||||
// Version : 4.8.017
|
||||
// License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (C) 2002-2009 Nicola Asuni - Tecnick.com S.r.l.
|
||||
@ -128,7 +128,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.8.016
|
||||
* @version 4.8.017
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -152,14 +152,14 @@ if (!class_exists('TCPDF', false)) {
|
||||
/**
|
||||
* define default PDF document producer
|
||||
*/
|
||||
define('PDF_PRODUCER', 'TCPDF 4.8.016 (http://www.tcpdf.org)');
|
||||
define('PDF_PRODUCER', 'TCPDF 4.8.017 (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.8.016
|
||||
* @version 4.8.017
|
||||
* @author Nicola Asuni - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
@ -2670,6 +2670,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
*/
|
||||
protected function setHeader() {
|
||||
if ($this->print_header) {
|
||||
$temp_thead = $this->thead;
|
||||
$temp_theadMargins = $this->theadMargins;
|
||||
$lasth = $this->lasth;
|
||||
$this->_out('q');
|
||||
$this->rMargin = $this->original_rMargin;
|
||||
@ -2691,6 +2693,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
}
|
||||
$this->_out('Q');
|
||||
$this->lasth = $lasth;
|
||||
$this->thead = $temp_thead;
|
||||
$this->theadMargins = $temp_theadMargins;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2707,6 +2711,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
$this->footerpos[$this->page] = $this->pagelen[$this->page];
|
||||
$this->_out("\n");
|
||||
if ($this->print_footer) {
|
||||
$temp_thead = $this->thead;
|
||||
$temp_theadMargins = $this->theadMargins;
|
||||
$lasth = $this->lasth;
|
||||
$this->_out('q');
|
||||
$this->rMargin = $this->original_rMargin;
|
||||
@ -2729,6 +2735,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
}
|
||||
$this->_out('Q');
|
||||
$this->lasth = $lasth;
|
||||
$this->thead = $temp_thead;
|
||||
$this->theadMargins = $temp_theadMargins;
|
||||
}
|
||||
// restore graphic settings
|
||||
$this->setGraphicVars($gvars);
|
||||
@ -4659,6 +4667,24 @@ if (!class_exists('TCPDF', false)) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the image type given the file name and path
|
||||
* @param string $imgfile image file name
|
||||
* @return string image type
|
||||
* @since 4.8.017 (2009-11-27)
|
||||
*/
|
||||
public function getImageFileType($imgfile) {
|
||||
$type = ''; // default type
|
||||
$fileinfo = pathinfo($imgfile);
|
||||
if (isset($fileinfo['extension']) AND (!$this->empty_string($fileinfo['extension']))) {
|
||||
$type = strtolower($fileinfo['extension']);
|
||||
}
|
||||
if ($type == 'jpg') {
|
||||
$type = 'jpeg';
|
||||
}
|
||||
return $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Puts an image in the page.
|
||||
* The upper-left corner must be given.
|
||||
@ -4737,16 +4763,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
if (!in_array($file, $this->imagekeys)) {
|
||||
//First use of image, get info
|
||||
if ($type == '') {
|
||||
$fileinfo = pathinfo($file);
|
||||
if (isset($fileinfo['extension']) AND (!$this->empty_string($fileinfo['extension']))) {
|
||||
$type = $fileinfo['extension'];
|
||||
} else {
|
||||
$this->Error('Image file has no extension and no type was specified: '.$file);
|
||||
}
|
||||
}
|
||||
$type = strtolower($type);
|
||||
if ($type == 'jpg') {
|
||||
$type = 'jpeg';
|
||||
$type = $this->getImageFileType($file);
|
||||
}
|
||||
$mqr = $this->get_mqr();
|
||||
$this->set_mqr(false);
|
||||
@ -13424,8 +13441,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
$t_x = $this->lMargin - $this->endlinex;
|
||||
}
|
||||
$one_space_width = $this->GetStringWidth(chr(32));
|
||||
$no = 0;
|
||||
$ns = 0;
|
||||
$no = 0; // spaces without trim
|
||||
$ns = 0; // spaces with trim
|
||||
$pmidtemp = $pmid;
|
||||
// escape special characters
|
||||
$pmidtemp = preg_replace('/[\\\][\(]/x', '\\#!#OP#!#', $pmidtemp);
|
||||
@ -13460,8 +13477,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
}
|
||||
// calculate additional space to add to each space
|
||||
$spacelen = $one_space_width;
|
||||
$spacewidth = (($tw - $linew + (($no - $ns) * $spacelen)) / ($ns?$ns:1)) * $this->k;
|
||||
$spacewidthu = -1000 * ($tw - $linew + ($no * $spacelen)) / ($ns?$ns:1) / $this->FontSize;
|
||||
$spacewidth = ((($tw - $linew) + (($no - $ns) * $spacelen)) / ($ns?$ns:1)) * $this->k;
|
||||
$spacewidthu = -1000 * (($tw - $linew) + ($ns * $spacelen)) / ($ns?$ns:1) / $this->FontSize;
|
||||
$nsmax = $ns;
|
||||
$ns = 0;
|
||||
reset($lnstring);
|
||||
@ -14213,10 +14230,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
$fileinfo = pathinfo($tag['attribute']['src']);
|
||||
if (isset($fileinfo['extension']) AND (!$this->empty_string($fileinfo['extension']))) {
|
||||
$type = strtolower($fileinfo['extension']);
|
||||
}
|
||||
$type = $this->getImageFileType($tag['attribute']['src']);
|
||||
$prevy = $this->y;
|
||||
$xpos = $this->GetX();
|
||||
if (isset($dom[($key - 1)]) AND ($dom[($key - 1)]['value'] == ' ')) {
|
||||
|
Loading…
Reference in New Issue
Block a user