mirror of
https://github.com/vdm-io/tcpdf.git
synced 2025-02-15 06:51:37 +00:00
5.3.008
This commit is contained in:
parent
c077b4c6c6
commit
95726d2d6e
@ -1,3 +1,6 @@
|
||||
5.3.008 (2010-06-13)
|
||||
- This version improves support for vector image rasterization.
|
||||
|
||||
5.3.007 (2010-06-13)
|
||||
- This version improves SVG support.
|
||||
|
||||
|
@ -8,7 +8,7 @@ http: sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 5.3.007
|
||||
Version: 5.3.008
|
||||
Release date: 2010-06-13
|
||||
Author: Nicola Asuni
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -1003,7 +1003,7 @@ $code)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -5551,7 +5551,7 @@ $frame)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:33 +0200 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
@ -299,7 +299,7 @@ $type)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -1377,7 +1377,7 @@ $type)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -105,7 +105,7 @@ PHP class to creates array representations for 2D barcodes to be used with TCPDF
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -105,7 +105,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -542,7 +542,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:38 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -97,7 +97,7 @@ Array of WEB safe colors.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -157,7 +157,7 @@ Class to create PDF417 barcode arrays for TCPDF class.<br /><br /><p>PDF417 (ISO
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -480,7 +480,7 @@ string $string, [int $split_length = 1])</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -82,7 +82,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>5.3.007</td>
|
||||
<td><b>version:</b> </td><td>5.3.008</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>copyright:</b> </td><td>2002-2010 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>
|
||||
@ -113,7 +113,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 5.3.007 (http://www.tcpdf.org)'</code>
|
||||
<code>PDF_PRODUCER = 'TCPDF 5.3.008 (http://www.tcpdf.org)'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
@ -124,7 +124,7 @@ unicode data<br /><br /></div>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:29 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:34 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -246,7 +246,7 @@ Unicode data for TCPDF library.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:38 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -2020,7 +2020,7 @@
|
||||
<a href="elementindex.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -2052,7 +2052,7 @@
|
||||
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sun, 13 Jun 2010 10:20:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:32 +0200 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 Sun, 13 Jun 2010 10:20:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:38 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -67,7 +67,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 Sun, 13 Jun 2010 10:20:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -67,7 +67,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 Sun, 13 Jun 2010 10:20:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Sun, 13 Jun 2010 14:40:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
37
tcpdf.php
37
tcpdf.php
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Version : 5.3.007
|
||||
// Version : 5.3.008
|
||||
// Begin : 2002-08-03
|
||||
// Last Update : 2010-06-13
|
||||
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
@ -126,7 +126,7 @@
|
||||
* @copyright 2002-2010 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 5.3.007
|
||||
* @version 5.3.008
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -150,14 +150,14 @@ if (!class_exists('TCPDF', false)) {
|
||||
/**
|
||||
* define default PDF document producer
|
||||
*/
|
||||
define('PDF_PRODUCER', 'TCPDF 5.3.007 (http://www.tcpdf.org)');
|
||||
define('PDF_PRODUCER', 'TCPDF 5.3.008 (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 5.3.007
|
||||
* @version 5.3.008
|
||||
* @author Nicola Asuni - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
@ -6385,22 +6385,31 @@ if (!class_exists('TCPDF', false)) {
|
||||
// get width and height
|
||||
$regs = array();
|
||||
if (preg_match('/<svg([^\>]*)>/si', $svgimg, $regs)) {
|
||||
$svgtag = $regs[1];
|
||||
$tmp = array();
|
||||
if (preg_match('/[\s]+width[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) {
|
||||
$ow = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false) * $dpi / 72;
|
||||
$svgimg = preg_replace('/[\s]+width[\s]*=[\s]*"[^"]*"/si', ' width="'.$ow.$this->pdfunit.'"', $svgimg);
|
||||
if (preg_match('/[\s]+width[\s]*=[\s]*"([^"]*)"/si', $svgtag, $tmp)) {
|
||||
$ow = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false);
|
||||
$owu = sprintf('%.3F', ($ow * $dpi / 72)).$this->pdfunit;
|
||||
$svgtag = preg_replace('/[\s]+width[\s]*=[\s]*"[^"]*"/si', ' width="'.$owu.'"', $svgtag, 1);
|
||||
} else {
|
||||
$ow = $w * $this->k;
|
||||
}
|
||||
$tmp = array();
|
||||
if (preg_match('/[\s]+height[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) {
|
||||
$oh = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false) * $dpi / 72;
|
||||
$svgimg = preg_replace('/[\s]+height[\s]*=[\s]*"[^"]*"/si', ' height="'.$oh.$this->pdfunit.'"', $svgimg);
|
||||
if (preg_match('/[\s]+height[\s]*=[\s]*"([^"]*)"/si', $svgtag, $tmp)) {
|
||||
$oh = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false);
|
||||
$ohu = sprintf('%.3F', ($oh * $dpi / 72)).$this->pdfunit;
|
||||
$svgtag = preg_replace('/[\s]+height[\s]*=[\s]*"[^"]*"/si', ' height="'.$ohu.'"', $svgtag, 1);
|
||||
} else {
|
||||
$oh = $h * $this->k;
|
||||
}
|
||||
$tmp = array();
|
||||
if (!preg_match('/[\s]+viewBox[\s]*=[\s]*"[\s]*([0-9\.]+)[\s]+([0-9\.]+)[\s]+([0-9\.]+)[\s]+([0-9\.]+)[\s]*"/si', $regs[1], $tmp)) {
|
||||
$vbw = $ow * (72 / $dpi) * $this->imgscale * $this->k;
|
||||
$vbh = $oh * (72 / $dpi) * $this->imgscale * $this->k;
|
||||
$svgimg = preg_replace('/<svg/si', '<svg viewBox="0 0 '.$vbw.' '.$vbh.'"', $svgimg);
|
||||
if (!preg_match('/[\s]+viewBox[\s]*=[\s]*"[\s]*([0-9\.]+)[\s]+([0-9\.]+)[\s]+([0-9\.]+)[\s]+([0-9\.]+)[\s]*"/si', $svgtag, $tmp)) {
|
||||
$vbw = ($ow * $this->imgscale * $this->k);
|
||||
$vbh = ($oh * $this->imgscale * $this->k);
|
||||
$vbox = sprintf(' viewBox="0 0 %.3F %.3F" ', $vbw, $vbh);
|
||||
$svgtag = $vbox.$svgtag;
|
||||
}
|
||||
$svgimg = preg_replace('/<svg([^\>]*)>/si', '<svg'.$svgtag.'>', $svgimg, 1);
|
||||
}
|
||||
$img->readImageBlob($svgimg);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user