mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-12-23 08:58:55 +00:00
4.8.008
This commit is contained in:
parent
6946dfad17
commit
816c00b2a3
@ -1,3 +1,7 @@
|
||||
4.8.008 (2009-09-29)
|
||||
- Example 49 was updated.
|
||||
- Underline and linethrough now works with cell stretching mode.
|
||||
|
||||
4.8.007 (2009-09-23)
|
||||
- Infinite loop problem caused by nobr attribute was fixed.
|
||||
|
||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 4.8.007
|
||||
Release date: 2009-09-23
|
||||
Version: 4.8.008
|
||||
Release date: 2009-09-29
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2001-2009:
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 23 Sep 2009 20:02:48 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</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 Wed, 23 Sep 2009 20:02:48 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</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 Wed, 23 Sep 2009 20:02:48 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</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 Wed, 23 Sep 2009 20:02:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</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 Wed, 23 Sep 2009 20:02:49 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</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.007</td>
|
||||
<td><b>version:</b> </td><td>4.8.008</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.007 (http://www.tcpdf.org)'</code>
|
||||
<code>PDF_PRODUCER = 'TCPDF 4.8.008 (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 Wed, 23 Sep 2009 20:02:49 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</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 Wed, 23 Sep 2009 20:02:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -1325,8 +1325,12 @@
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_dochecks">TCPDF::_dochecks()</a><br> Check for locale-related bug</dd>
|
||||
<dt><b>_dolinethrough</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_dolinethrough">TCPDF::_dolinethrough()</a><br> Line through text.</dd>
|
||||
<dt><b>_dolinethroughw</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_dolinethroughw">TCPDF::_dolinethroughw()</a><br> Line through for rectangular text area.</dd>
|
||||
<dt><b>_dounderline</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_dounderline">TCPDF::_dounderline()</a><br> Underline text.</dd>
|
||||
<dt><b>_dounderlinew</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_dounderlinew">TCPDF::_dounderlinew()</a><br> Underline for rectangular text area.</dd>
|
||||
<dt><b>_enddoc</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_enddoc">TCPDF::_enddoc()</a><br> Output end of document (EOF).</dd>
|
||||
<dt><b>_endpage</b></dt>
|
||||
@ -1440,7 +1444,7 @@
|
||||
<a href="elementindex.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 23 Sep 2009 20:02:48 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -100,8 +100,12 @@
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_dochecks">TCPDF::_dochecks()</a><br> Check for locale-related bug</dd>
|
||||
<dt><b>_dolinethrough</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_dolinethrough">TCPDF::_dolinethrough()</a><br> Line through text.</dd>
|
||||
<dt><b>_dolinethroughw</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_dolinethroughw">TCPDF::_dolinethroughw()</a><br> Line through for rectangular text area.</dd>
|
||||
<dt><b>_dounderline</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_dounderline">TCPDF::_dounderline()</a><br> Underline text.</dd>
|
||||
<dt><b>_dounderlinew</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_dounderlinew">TCPDF::_dounderlinew()</a><br> Underline for rectangular text area.</dd>
|
||||
<dt><b>_enddoc</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#method_enddoc">TCPDF::_enddoc()</a><br> Output end of document (EOF).</dd>
|
||||
<dt><b>_endpage</b></dt>
|
||||
@ -1463,7 +1467,7 @@
|
||||
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 23 Sep 2009 20:02:48 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</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 Wed, 23 Sep 2009 20:02:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -58,7 +58,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.1</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 23 Sep 2009 20:02:48 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -58,7 +58,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.1</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 23 Sep 2009 20:02:48 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 29 Sep 2009 13:19:27 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -2,7 +2,7 @@
|
||||
//============================================================+
|
||||
// File name : example_049.php
|
||||
// Begin : 2009-04-03
|
||||
// Last Update : 2009-04-03
|
||||
// Last Update : 2009-09-25
|
||||
//
|
||||
// Description : Example 049 for TCPDF class
|
||||
// WriteHTML with TCPDF callback functions
|
||||
@ -75,10 +75,28 @@ $pdf->SetFont('helvetica', '', 10);
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
/*
|
||||
NOTE:
|
||||
When using TCPDF methods embedded on XHTML code, you have to escape special
|
||||
characters with equivalent HTML entities:
|
||||
|
||||
- replace double quotes with: "
|
||||
- replace single quote with: \'
|
||||
- replace > with: >
|
||||
- replace < with: <
|
||||
|
||||
Note that the single quote escape contains an additional back-slash character.
|
||||
*/
|
||||
|
||||
$htmlcontent = <<<EOF
|
||||
<h1>Test TCPDF Methods in HTML</h1>
|
||||
<h2>write1DBarcode method in HTML</h2>
|
||||
<tcpdf method="write1DBarcode" params="'CODE 39', 'C39', '', '', 80, 30, 0.4, array('position'=>'S', 'border'=>true, 'padding'=>4, 'fgcolor'=>array(0,0,0), 'bgcolor'=>array(255,255,255), 'text'=>true, 'font'=>'helvetica', 'fontsize'=>8, 'stretchtext'=>4), 'N'" />
|
||||
<tcpdf method="write1DBarcode" params="'CODE 128C+ " \'',
|
||||
'C128C', '', '', 80, 30, 0.4, array('position'=>'S', 'border'=>true,
|
||||
'padding'=>4, 'fgcolor'=>array(0,0,0),
|
||||
'bgcolor'=>array(255,255,255), 'text'=>true, 'font'=>'helvetica',
|
||||
'fontsize'=>8, 'stretchtext'=>4), 'N'" />
|
||||
<tcpdf method="AddPage" />
|
||||
<h2> Graphic Functions</h2>
|
||||
<tcpdf method="SetDrawColor" params="0" />
|
||||
|
48
tcpdf.php
48
tcpdf.php
@ -2,9 +2,9 @@
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Begin : 2002-08-03
|
||||
// Last Update : 2009-09-23
|
||||
// Last Update : 2009-09-29
|
||||
// Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org
|
||||
// Version : 4.8.007
|
||||
// Version : 4.8.008
|
||||
// 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.007
|
||||
* @version 4.8.008
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -152,14 +152,14 @@ if (!class_exists('TCPDF', false)) {
|
||||
/**
|
||||
* define default PDF document producer
|
||||
*/
|
||||
define('PDF_PRODUCER', 'TCPDF 4.8.007 (http://www.tcpdf.org)');
|
||||
define('PDF_PRODUCER', 'TCPDF 4.8.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 4.8.007
|
||||
* @version 4.8.008
|
||||
* @author Nicola Asuni - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
@ -3545,7 +3545,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
// bidirectional algorithm (some chars may be changed affecting the line length)
|
||||
$s = $this->utf8Bidi($this->UTF8StringToArray($txt), $txt, $this->tmprtl);
|
||||
$l = $this->GetArrStringWidth($s);
|
||||
$xr = $this->w - $x - $this->GetArrStringWidth($s);
|
||||
$xr = $this->w - $x - $l;
|
||||
} else {
|
||||
$xr = $x;
|
||||
}
|
||||
@ -3854,10 +3854,10 @@ if (!class_exists('TCPDF', false)) {
|
||||
$xdx = $this->x + $dx;
|
||||
}
|
||||
if ($this->underline) {
|
||||
$s .= ' '.$this->_dounderline($xdx, $basefonty, $txt);
|
||||
$s .= ' '.$this->_dounderlinew($xdx, $basefonty, $width);
|
||||
}
|
||||
if ($this->linethrough) {
|
||||
$s .= ' '.$this->_dolinethrough($xdx, $basefonty, $txt);
|
||||
$s .= ' '.$this->_dolinethroughw($xdx, $basefonty, $width);
|
||||
}
|
||||
if ($this->ColorFlag) {
|
||||
$s .= ' Q';
|
||||
@ -7219,10 +7219,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
* @access protected
|
||||
*/
|
||||
protected function _dounderline($x, $y, $txt) {
|
||||
$up = $this->CurrentFont['up'];
|
||||
$ut = $this->CurrentFont['ut'];
|
||||
$w = $this->GetStringWidth($txt);
|
||||
return sprintf('%.2F %.2F %.2F %.2F re f', $x * $this->k, ($this->h - ($y - $up / 1000 * $this->FontSize)) * $this->k, $w * $this->k, -$ut / 1000 * $this->FontSizePt);
|
||||
return $this->_dounderlinew($x, $y, $w);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -7233,9 +7231,35 @@ if (!class_exists('TCPDF', false)) {
|
||||
* @access protected
|
||||
*/
|
||||
protected function _dolinethrough($x, $y, $txt) {
|
||||
$w = $this->GetStringWidth($txt);
|
||||
return $this->_dolinethroughw($x, $y, $w);
|
||||
}
|
||||
|
||||
/**
|
||||
* Underline for rectangular text area.
|
||||
* @param int $x X coordinate
|
||||
* @param int $y Y coordinate
|
||||
* @param int $w width to underline
|
||||
* @access protected
|
||||
* @since 4.8.008 (2009-09-29)
|
||||
*/
|
||||
protected function _dounderlinew($x, $y, $w) {
|
||||
$up = $this->CurrentFont['up'];
|
||||
$ut = $this->CurrentFont['ut'];
|
||||
return sprintf('%.2F %.2F %.2F %.2F re f', $x * $this->k, ($this->h - ($y - $up / 1000 * $this->FontSize)) * $this->k, $w * $this->k, -$ut / 1000 * $this->FontSizePt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Line through for rectangular text area.
|
||||
* @param int $x X coordinate
|
||||
* @param int $y Y coordinate
|
||||
* @param string $txt text to linethrough
|
||||
* @access protected
|
||||
* @since 4.8.008 (2009-09-29)
|
||||
*/
|
||||
protected function _dolinethroughw($x, $y, $w) {
|
||||
$up = $this->CurrentFont['up'];
|
||||
$ut = $this->CurrentFont['ut'];
|
||||
$w = $this->GetStringWidth($txt);
|
||||
return sprintf('%.2F %.2F %.2F %.2F re f', $x * $this->k, ($this->h - ($y - ($this->FontSize/2) - $up / 1000 * $this->FontSize)) * $this->k, $w * $this->k, -$ut / 1000 * $this->FontSizePt);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user