30
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-06-05 07:10:48 +00:00
This commit is contained in:
nicolaasuni 2009-07-10 17:38:54 +02:00
parent ee7c4d018f
commit e96d5607e1
17 changed files with 405 additions and 272 deletions

View File

@ -1,3 +1,7 @@
4.6.018 (2009-07-10)
- Bug item #2819319 "Text over text" was fixed.
- Method Arrow() was added to print graphic arrows (example 12 was updated).
4.6.017 (2009-07-05)
- Bug item #2816079 "Example 48 not working" was fixed.
- The signature of the checkPageBreak() was changed. The parameter $addpage was added to turn off the automatic page creation.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 4.6.017
Release date: 2009-07-05
Version: 4.6.018
Release date: 2009-07-10
Author: Nicola Asuni
Copyright (c) 2001-2009:

View File

@ -45,7 +45,7 @@
<div class="credit">
<hr />
Documentation generated on Sun, 05 Jul 2009 22:05:56 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:40 +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

View File

@ -1368,7 +1368,7 @@ $type)</code>
<div class="credit">
<hr />
Documentation generated on Sun, 05 Jul 2009 22:05:56 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -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 Sun, 05 Jul 2009 22:05:56 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -507,7 +507,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Sun, 05 Jul 2009 22:06:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:46 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -88,7 +88,7 @@ Array of WEB safe colors.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Sun, 05 Jul 2009 22:05:56 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -73,7 +73,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>4.6.017</td>
<td><b>version:</b>&nbsp;&nbsp;</td><td>4.6.018</td>
</tr>
<tr>
<td><b>copyright:</b>&nbsp;&nbsp;</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.6.017 (http://www.tcpdf.org)'</code>
<code>PDF_PRODUCER = 'TCPDF 4.6.018 (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 Sun, 05 Jul 2009 22:05:56 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -237,7 +237,7 @@ Unicode Include file for TCPDF.<br /><br /><br /><br />
<div class="credit">
<hr />
Documentation generated on Sun, 05 Jul 2009 22:06:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:46 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -95,6 +95,8 @@
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodAliasNumPage">TCPDF::AliasNumPage()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines an alias for the page number.</dd>
<dt><b>Annotation</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodAnnotation">TCPDF::Annotation()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Puts a markup annotation on a rectangular area of the page.</dd>
<dt><b>Arrow</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodArrow">TCPDF::Arrow()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Draws a grahic arrow.</dd>
<dt><b>arrUTF8ToUTF16BE</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodarrUTF8ToUTF16BE">TCPDF::arrUTF8ToUTF16BE()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Converts array of UTF-8 characters to UTF16-BE string.<br /></dd>
</dl>
@ -1366,7 +1368,7 @@
<a href="elementindex.html#top">top</a><br>
<div class="credit">
<hr />
Documentation generated on Sun, 05 Jul 2009 22:05:56 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -246,6 +246,8 @@
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodAliasNumPage">TCPDF::AliasNumPage()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines an alias for the page number.</dd>
<dt><b>Annotation</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodAnnotation">TCPDF::Annotation()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Puts a markup annotation on a rectangular area of the page.</dd>
<dt><b>Arrow</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodArrow">TCPDF::Arrow()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Draws a grahic arrow.</dd>
<dt><b>arrUTF8ToUTF16BE</b></dt>
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodarrUTF8ToUTF16BE">TCPDF::arrUTF8ToUTF16BE()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Converts array of UTF-8 characters to UTF16-BE string.<br /></dd>
</dl>
@ -1389,7 +1391,7 @@
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
<div class="credit">
<hr />
Documentation generated on Sun, 05 Jul 2009 22:05:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</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 Sun, 05 Jul 2009 22:06:02 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:46 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -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 Sun, 05 Jul 2009 22:05:56 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -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 Sun, 05 Jul 2009 22:05:56 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
Documentation generated on Fri, 10 Jul 2009 17:38:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>

View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_012.php
// Begin : 2008-03-04
// Last Update : 2009-03-18
// Last Update : 2009-07-10
//
// Description : Example 012 for TCPDF class
// Graphic Functions
@ -151,7 +151,14 @@ $pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'da
$pdf->RoundedRect(5, 255, 40, 30, 3.50, '1111', 'DF');
$pdf->RoundedRect(50, 255, 40, 30, 6.50, '1000');
$pdf->RoundedRect(95, 255, 40, 30, 10.0, '1111', null, $style6);
$pdf->RoundedRect(140, 255, 40, 30, 8.0, '0101', 'DF', $style6, array(200, 200, 200));
$pdf->RoundedRect(140, 255, 40, 30, 8.0, '0101', 'DF', $style6, array(200, 200, 200));
// Arrows
$pdf->Text(190, 252, 'Arrows');
$pdf->SetLineStyle($style5);
$pdf->Arrow($x0=200, $y0=280, $x1=190, $y1=260, $head_style=0, $arm_size=5, $arm_angle=15);
$pdf->Arrow($x0=200, $y0=280, $x1=195, $y1=260, $head_style=1, $arm_size=5, $arm_angle=15);
$pdf->Arrow($x0=200, $y0=280, $x1=200, $y1=260, $head_style=2, $arm_size=5, $arm_angle=15);
// ---------------------------------------------------------

View File

@ -2,9 +2,9 @@
//============================================================+
// File name : tcpdf.php
// Begin : 2002-08-03
// Last Update : 2009-07-05
// Last Update : 2009-07-10
// Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org
// Version : 4.6.017
// Version : 4.6.018
// License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
// ----------------------------------------------------------------------------
// Copyright (C) 2002-2009 Nicola Asuni - Tecnick.com S.r.l.
@ -126,7 +126,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.6.017
* @version 4.6.018
*/
/**
@ -150,14 +150,14 @@ if (!class_exists('TCPDF', false)) {
/**
* define default PDF document producer
*/
define('PDF_PRODUCER', 'TCPDF 4.6.017 (http://www.tcpdf.org)');
define('PDF_PRODUCER', 'TCPDF 4.6.018 (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.6.017
* @version 4.6.018
* @author Nicola Asuni - info@tecnick.com
* @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL
@ -2508,6 +2508,8 @@ if (!class_exists('TCPDF', false)) {
}
if (!$this->empty_string($this->thead)) {
// set margins
$prev_lMargin = $this->lMargin;
$prev_rMargin = $this->rMargin;
$this->lMargin = $this->pagedim[$this->page]['olm'];
$this->rMargin = $this->pagedim[$this->page]['orm'];
$this->cMargin = $this->theadMargins['cmargin'];
@ -2520,6 +2522,8 @@ if (!class_exists('TCPDF', false)) {
$this->tMargin = $this->y;
$this->pagedim[$this->page]['tm'] = $this->tMargin;
$this->lasth = 0;
$this->lMargin = $prev_lMargin;
$this->rMargin = $prev_rMargin;
}
}
@ -8341,7 +8345,42 @@ if (!class_exists('TCPDF', false)) {
}
$this->_out($op);
}
}
}
/**
* Draws a grahic arrow.
* @parameter float $x0 Abscissa of first point.
* @parameter float $y0 Ordinate of first point.
* @parameter float $x0 Abscissa of second point.
* @parameter float $y1 Ordinate of second point.
* @parameter int $head_style (0 = draw only arrowhead arms, 1 = draw closed arrowhead, but no fill, 2 = closed and filled arrowhead)
* @parameter float $arm_size length of arrowhead arms
* @parameter int $arm_angle angle between an arm and the shaft
* @author Piotr Galecki, Nicola Asuni
* @since 4.6.018 (2009-07-10)
*/
public function Arrow($x0, $y0, $x1, $y1, $head_style=0, $arm_size=5, $arm_angle=15) {
//main arrow line / shaft
$this->Line($x0, $y0, $x1, $y1);
//getting arrow direction angle
$dir_angle = rad2deg(atan2(($y0 - $y1), ($x0 - $x1)));
//0 angle is when both arms go along X axis. angle grows clockwise.
//left arrowhead arm tip
$x2L = $x1 + ($arm_size * cos(deg2rad($dir_angle + $arm_angle)));
$y2L = $y1 + ($arm_size * sin(deg2rad($dir_angle + $arm_angle)));
//right arrowhead arm tip
$x2R = $x1 + ($arm_size * cos(deg2rad($dir_angle - $arm_angle)));
$y2R = $y1 + ($arm_size * sin(deg2rad($dir_angle - $arm_angle)));
if($head_style > 0) {
//closed arrowhead
$this->Polygon(array($x1, $y1, $x2L, $y2L, $x2R, $y2R), (($head_style === 1) ? 'D' : 'DF'), array(), array());
} else { //just arms
//left arm
$this->Line($x1, $y1, $x2L, $y2L);
//right arm
$this->Line($x1, $y1, $x2R, $y2R);
}
}
// END GRAPHIC FUNCTIONS SECTION -----------------------