30
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-05-31 21:30:47 +00:00
This commit is contained in:
nicolaasuni 2010-07-29 17:31:21 +02:00
parent e0d7ab903c
commit 1e1e022c6d
22 changed files with 334 additions and 323 deletions

View File

@ -1,3 +1,8 @@
5.5.015 (2010-07-29)
- Automatic fix for unclosed self-closing tag.
- Support for deprecated 's' and 'strike' tags was added.
- Empty list items problem was fixed.
5.5.014 (2010-07-15)
- Support for external images was improved.

View File

@ -8,8 +8,8 @@ http: sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 5.5.014
Release date: 2010-07-15
Version: 5.5.015
Release date: 2010-07-29
Author: Nicola Asuni
Copyright (c) 2002-2010:

View File

@ -60,7 +60,7 @@
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -1003,7 +1003,7 @@ $code)</code>
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -5551,7 +5551,7 @@ $frame)</code>
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:17 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:10 +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

View File

@ -299,7 +299,7 @@ $type)</code>
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -1377,7 +1377,7 @@ $type)</code>
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -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 Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -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 Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -542,7 +542,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:22 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:15 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -97,7 +97,7 @@ Array of WEB safe colors.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -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 Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -480,7 +480,7 @@ string $string, [int $split_length = 1])</code>
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:17 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:10 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -82,7 +82,7 @@ This is a PHP class for generating PDF documents without requiring external exte
<td><b>author:</b>&nbsp;&nbsp;</td><td>Nicola Asuni</td>
</tr>
<tr>
<td><b>version:</b>&nbsp;&nbsp;</td><td>5.5.014</td>
<td><b>version:</b>&nbsp;&nbsp;</td><td>5.5.015</td>
</tr>
<tr>
<td><b>copyright:</b>&nbsp;&nbsp;</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.5.014 (http://www.tcpdf.org)'</code>
<code>PDF_PRODUCER = 'TCPDF 5.5.015 (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 Thu, 15 Jul 2010 20:09:18 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:11 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -246,7 +246,7 @@ Unicode data for TCPDF library.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:22 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:15 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -1582,7 +1582,7 @@
<dt><b>SetProtection</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetProtection">TCPDF::SetProtection()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set document protection Remark: the protection against modification is for people who have the full Acrobat product.</dd>
<dt><b>setRasterizeVectorImages</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetRasterizeVectorImages">TCPDF::setRasterizeVectorImages()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable/disable rasterization of SVG images using ImageMagick library.</dd>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetRasterizeVectorImages">TCPDF::setRasterizeVectorImages()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable/disable rasterization of vector images using ImageMagick library.</dd>
<dt><b>SetRightMargin</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetRightMargin">TCPDF::SetRightMargin()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the right margin. The method can be called before creating the first page.</dd>
<dt><b>setRTL</b></dt>
@ -2034,7 +2034,7 @@
<a href="elementindex.html#top">top</a><br>
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -1780,7 +1780,7 @@
<dt><b>SetProtection</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetProtection">TCPDF::SetProtection()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Set document protection Remark: the protection against modification is for people who have the full Acrobat product.</dd>
<dt><b>setRasterizeVectorImages</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetRasterizeVectorImages">TCPDF::setRasterizeVectorImages()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable/disable rasterization of SVG images using ImageMagick library.</dd>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodsetRasterizeVectorImages">TCPDF::setRasterizeVectorImages()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable/disable rasterization of vector images using ImageMagick library.</dd>
<dt><b>SetRightMargin</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodSetRightMargin">TCPDF::SetRightMargin()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the right margin. The method can be called before creating the first page.</dd>
<dt><b>setRTL</b></dt>
@ -2066,7 +2066,7 @@
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -35,7 +35,7 @@
<a href="#Post-parsing">Post-parsing</a><br>
<div class="credit">
<hr />
Documentation generated on Thu, 15 Jul 2010 20:09:22 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:15 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -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 Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -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 Thu, 15 Jul 2010 20:09:16 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Thu, 29 Jul 2010 17:31:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 5.5.014
// Version : 5.5.015
// Begin : 2002-08-03
// Last Update : 2010-07-15
// Last Update : 2010-07-29
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
@ -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.5.014
* @version 5.5.015
*/
/**
@ -150,14 +150,14 @@ if (!class_exists('TCPDF', false)) {
/**
* define default PDF document producer
*/
define('PDF_PRODUCER', 'TCPDF 5.5.014 (http://www.tcpdf.org)');
define('PDF_PRODUCER', 'TCPDF 5.5.015 (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.5.014
* @version 5.5.015
* @author Nicola Asuni - info@tecnick.com
* @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL
@ -3261,7 +3261,7 @@ if (!class_exists('TCPDF', false)) {
public function SetCompression($compress) {
//Set page compression
if (function_exists('gzcompress')) {
$this->compress = $compress;
$this->compress = $compress ? true : false;
} else {
$this->compress = false;
}
@ -6505,6 +6505,8 @@ if (!class_exists('TCPDF', false)) {
//First use of image, get info
if ($type == '') {
$type = $this->getImageFileType($file, $imsize);
} elseif ($type == 'jpg') {
$type = 'jpeg';
}
$mqr = $this->get_mqr();
$this->set_mqr(false);
@ -15371,7 +15373,7 @@ if (!class_exists('TCPDF', false)) {
/**
* Embed vector-based Adobe Illustrator (AI) or AI-compatible EPS files.
* NOTE: EPS is not yet fully implemented, use the setRasterizeVectorImages() method to enable/disable rasterization of SVG images using ImageMagick library.
* NOTE: EPS is not yet fully implemented, use the setRasterizeVectorImages() method to enable/disable rasterization of vector images using ImageMagick library.
* Only vector drawing is supported, not text or bitmap.
* Although the script was successfully tested with various AI format versions, best results are probably achieved with files that were exported in the AI3 format (tested with Illustrator CS2, Freehand MX and Photoshop CS2).
* @param string $file Name of the file containing the image.
@ -16526,8 +16528,10 @@ if (!class_exists('TCPDF', false)) {
$html = preg_replace('/<style([^\>]*)>([^\<]*)<\/style>/isU', '', $html);
// define block tags
$blocktags = array('blockquote','br','dd','dl','div','dt','h1','h2','h3','h4','h5','h6','hr','li','ol','p','pre','ul','tcpdf','table','tr','td');
// define self-closing tags
$selfclosingtags = array('area','base','basefont','br','hr','input','img','link','meta');
// remove all unsupported tags (the line below lists all supported tags)
$html = strip_tags($html, '<marker/><a><b><blockquote><body><br><br/><dd><del><div><dl><dt><em><font><form><h1><h2><h3><h4><h5><h6><hr><hr/><i><img><input><label><li><ol><option><p><pre><select><small><span><strong><sub><sup><table><tablehead><tcpdf><td><textarea><th><thead><tr><tt><u><ul>');
$html = strip_tags($html, '<marker/><a><b><blockquote><body><br><br/><dd><del><div><dl><dt><em><font><form><h1><h2><h3><h4><h5><h6><hr><hr/><i><img><input><label><li><ol><option><p><pre><s><select><small><span><strike><strong><sub><sup><table><tablehead><tcpdf><td><textarea><th><thead><tr><tt><u><ul>');
//replace some blank characters
$html = preg_replace('/<pre/', '<xre', $html); // preserve pre tag
$html = preg_replace('/<(table|tr|td|th|tcpdf|blockquote|dd|div|dl|dt|form|h1|h2|h3|h4|h5|h6|br|hr|li|ol|ul|p)([^\>]*)>[\n\r\t]+/', '<\\1\\2>', $html);
@ -16588,6 +16592,7 @@ if (!class_exists('TCPDF', false)) {
$html = preg_replace('/<xre/', '<pre', $html); // restore pre tag
$html = preg_replace('/<textarea([^\>]*)>/xi', '<textarea\\1 value="', $html);
$html = preg_replace('/<\/textarea>/', '" />', $html);
$html = preg_replace('/<li([^\>]*)><\/li>/', '<li\\1>&nbsp;</li>', $html);
// trim string
$html = preg_replace('/^'.$this->re_space['p'].'+/'.$this->re_space['m'], '', $html);
$html = preg_replace('/'.$this->re_space['p'].'+$/'.$this->re_space['m'], '', $html);
@ -16707,15 +16712,16 @@ if (!class_exists('TCPDF', false)) {
$dom[($dom[$key]['parent'])]['thead'] .= '</tablehead>';
}
} else {
// *** opening html tag
// *** opening or self-closing html tag
$dom[$key]['opening'] = true;
$dom[$key]['parent'] = end($level);
if (substr($element, -1, 1) != '/') {
// not self-closing tag
if ((substr($element, -1, 1) == '/') OR (in_array($dom[$key]['value'], $selfclosingtags))) {
// self-closing tag
$dom[$key]['self'] = true;
} else {
// opening tag
array_push($level, $key);
$dom[$key]['self'] = false;
} else {
$dom[$key]['self'] = true;
}
// copy some values from parent
$parentkey = 0;
@ -16976,7 +16982,7 @@ if (!class_exists('TCPDF', false)) {
if ($dom[$key]['value'] == 'u') {
$dom[$key]['fontstyle'] .= 'U';
}
if ($dom[$key]['value'] == 'del') {
if (($dom[$key]['value'] == 'del') OR ($dom[$key]['value'] == 's') OR ($dom[$key]['value'] == 'strike')) {
$dom[$key]['fontstyle'] .= 'D';
}
if (!isset($dom[$key]['style']['text-decoration']) AND ($dom[$key]['value'] == 'a')) {
@ -21105,7 +21111,7 @@ if (!class_exists('TCPDF', false)) {
}
/**
* Enable/disable rasterization of SVG images using ImageMagick library.
* Enable/disable rasterization of vector images using ImageMagick library.
* @param boolean $mode if true enable rasterization, false otherwise.
* @access public
* @since 5.0.000 (2010-04-27)
@ -21234,7 +21240,7 @@ if (!class_exists('TCPDF', false)) {
/**
* Embedd a Scalable Vector Graphics (SVG) image.
* NOTE: SVG standard is not yet fully implemented, use the setRasterizeVectorImages() method to enable/disable rasterization of SVG images using ImageMagick library.
* NOTE: SVG standard is not yet fully implemented, use the setRasterizeVectorImages() method to enable/disable rasterization of vector images using ImageMagick library.
* @param string $file Name of the SVG file.
* @param float $x Abscissa of the upper-left corner.
* @param float $y Ordinate of the upper-left corner.