30
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-06-06 15:50:47 +00:00
This commit is contained in:
nicolaasuni 2010-10-08 15:55:30 +02:00
parent 3cfedc5c36
commit c91cb496b2
23 changed files with 420 additions and 413 deletions

View File

@ -1,3 +1,6 @@
5.9.002 (2010-10-08)
- Cell method was improved to preserve the font stretching and spacing values when using the $stretch parameter (see example n. 4).
5.9.001 (2010-10-07)
- The problem of blank page for nobr table higher than a single page was fixed.

View File

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

View File

@ -60,7 +60,7 @@
<div class="credit">
<hr />
Documentation generated on Thu, 07 Oct 2010 12:47:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:18 +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, 07 Oct 2010 12:47:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:19 +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, 07 Oct 2010 12:47:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:19 +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, 07 Oct 2010 12:47:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:18 +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, 07 Oct 2010 12:47:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:18 +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, 07 Oct 2010 12:47:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:18 +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, 07 Oct 2010 12:47:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:18 +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, 07 Oct 2010 12:47:39 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:24 +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, 07 Oct 2010 12:47:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:19 +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, 07 Oct 2010 12:47:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:19 +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, 07 Oct 2010 12:47:33 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:19 +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.9.001</td>
<td><b>version:</b>&nbsp;&nbsp;</td><td>5.9.002</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.9.001 (http://www.tcpdf.org)'</code>
<code>PDF_PRODUCER = 'TCPDF 5.9.002 (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, 07 Oct 2010 12:47:34 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:20 +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, 07 Oct 2010 12:47:39 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -2094,7 +2094,7 @@
<a href="elementindex.html#top">top</a><br>
<div class="credit">
<hr />
Documentation generated on Thu, 07 Oct 2010 12:47:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:18 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -2126,7 +2126,7 @@
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
<div class="credit">
<hr />
Documentation generated on Thu, 07 Oct 2010 12:47:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:18 +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, 07 Oct 2010 12:47:39 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:24 +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, 07 Oct 2010 12:47:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:18 +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, 07 Oct 2010 12:47:32 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
Documentation generated on Fri, 08 Oct 2010 15:55:18 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>

View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_004.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2010-10-08
//
// Description : Example 004 for TCPDF class
// Cell stretching
@ -70,7 +70,7 @@ $pdf->setLanguageArray($l);
// ---------------------------------------------------------
// set font
$pdf->SetFont('times', 'B', 12);
$pdf->SetFont('times', '', 11);
// add a page
$pdf->AddPage();
@ -78,18 +78,41 @@ $pdf->AddPage();
//Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
// test Cell stretching
$pdf->Cell(0, 10, 'TEST CELL STRETCH: no stretch', 1, 1, 'C', 0, '', 0);
$pdf->Cell(0, 10, 'TEST CELL STRETCH: scaling', 1, 1, 'C', 0, '', 1);
$pdf->Cell(0, 10, 'TEST CELL STRETCH: force scaling', 1, 1, 'C', 0, '', 2);
$pdf->Cell(0, 10, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3);
$pdf->Cell(0, 10, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Cell(0, 0, 'TEST CELL STRETCH: no stretch', 1, 1, 'C', 0, '', 0);
$pdf->Cell(0, 0, 'TEST CELL STRETCH: scaling', 1, 1, 'C', 0, '', 1);
$pdf->Cell(0, 0, 'TEST CELL STRETCH: force scaling', 1, 1, 'C', 0, '', 2);
$pdf->Cell(0, 0, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3);
$pdf->Cell(0, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(10);
$pdf->Ln(5);
$pdf->Cell(60, 10, 'TEST CELL STRETCH: scaling', 1, 1, 'C', 0, '', 1);
$pdf->Cell(60, 10, 'TEST CELL STRETCH: force scaling', 1, 1, 'C', 0, '', 2);
$pdf->Cell(60, 10, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3);
$pdf->Cell(60, 10, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Cell(45, 0, 'TEST CELL STRETCH: scaling', 1, 1, 'C', 0, '', 1);
$pdf->Cell(45, 0, 'TEST CELL STRETCH: force scaling', 1, 1, 'C', 0, '', 2);
$pdf->Cell(45, 0, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3);
$pdf->Cell(45, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4);
$pdf->AddPage();
// example using general stretching and spacing
for ($stretching = 90; $stretching <= 110; $stretching += 10) {
for ($spacing = -0.254; $spacing <= 0.254; $spacing += 0.254) {
// set general stretching (scaling) value
$pdf->setFontStretching($stretching);
// set general spacing value
$pdf->setFontSpacing($spacing);
$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, no stretch', 1, 1, 'C', 0, '', 0);
$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);
$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);
$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);
$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Ln(2);
}
}
// ---------------------------------------------------------
@ -97,5 +120,5 @@ $pdf->Cell(60, 10, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4);
$pdf->Output('example_004.pdf', 'I');
//============================================================+
// END OF FILE
// END OF FILE
//============================================================+

View File

@ -1,7 +1,7 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 5.9.001
// Version : 5.9.002
// Begin : 2002-08-03
// Last Update : 2010-10-07
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
@ -132,7 +132,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.9.001
* @version 5.9.002
*/
/**
@ -156,14 +156,14 @@ if (!class_exists('TCPDF', false)) {
/**
* define default PDF document producer
*/
define('PDF_PRODUCER', 'TCPDF 5.9.001 (http://www.tcpdf.org)');
define('PDF_PRODUCER', 'TCPDF 5.9.002 (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.9.001
* @version 5.9.002
* @author Nicola Asuni - info@tecnick.com
* @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL
@ -5128,7 +5128,7 @@ if (!class_exists('TCPDF', false)) {
* @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul>
* @param boolean $fill Indicates if the cell background must be painted (true) or transparent (false).
* @param mixed $link URL or identifier returned by AddLink().
* @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
* @param int $stretch font stretch mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if text is larger than cell width</li><li>2 = forced horizontal scaling to fit cell width</li><li>3 = character spacing only if text is larger than cell width</li><li>4 = forced character spacing to fit cell width</li></ul> General font stretching and scaling values will be preserved when possible.
* @param boolean $ignore_min_height if true ignore automatic minimum height value.
* @param string $calign cell vertical alignment relative to the specified Y value. Possible values are:<ul><li>T : cell top</li><li>A : font top</li><li>L : font baseline</li><li>D : font bottom</li><li>B : cell bottom</li></ul>
* @param string $valign text vertical alignment inside the cell. Possible values are:<ul><li>T : top</li><li>C : center</li><li>B : bottom</li></ul>
@ -5256,7 +5256,7 @@ if (!class_exists('TCPDF', false)) {
* @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul>
* @param boolean $fill Indicates if the cell background must be painted (true) or transparent (false).
* @param mixed $link URL or identifier returned by AddLink().
* @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
* @param int $stretch font stretch mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if text is larger than cell width</li><li>2 = forced horizontal scaling to fit cell width</li><li>3 = character spacing only if text is larger than cell width</li><li>4 = forced character spacing to fit cell width</li></ul> General font stretching and scaling values will be preserved when possible.
* @param boolean $ignore_min_height if true ignore automatic minimum height value.
* @param string $calign cell vertical alignment relative to the specified Y value. Possible values are:<ul><li>T : cell top</li><li>C : center</li><li>B : cell bottom</li><li>A : font top</li><li>L : font baseline</li><li>D : font bottom</li></ul>
* @param string $valign text vertical alignment inside the cell. Possible values are:<ul><li>T : top</li><li>C : center</li><li>B : bottom</li></ul>
@ -5291,7 +5291,7 @@ if (!class_exists('TCPDF', false)) {
* @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul>
* @param boolean $fill Indicates if the cell background must be painted (true) or transparent (false).
* @param mixed $link URL or identifier returned by AddLink().
* @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
* @param int $stretch font stretch mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if text is larger than cell width</li><li>2 = forced horizontal scaling to fit cell width</li><li>3 = character spacing only if text is larger than cell width</li><li>4 = forced character spacing to fit cell width</li></ul> General font stretching and scaling values will be preserved when possible.
* @param boolean $ignore_min_height if true ignore automatic minimum height value.
* @param string $calign cell vertical alignment relative to the specified Y value. Possible values are:<ul><li>T : cell top</li><li>C : center</li><li>B : cell bottom</li><li>A : font top</li><li>L : font baseline</li><li>D : font bottom</li></ul>
* @param string $valign text vertical alignment inside the cell. Possible values are:<ul><li>T : top</li><li>M : middle</li><li>B : bottom</li></ul>
@ -5498,51 +5498,41 @@ if (!class_exists('TCPDF', false)) {
}
}
$txt2 = $this->_escape($txt2);
// get current text width (considering general font stretching and spacing)
$txwidth = $this->GetStringWidth($txt);
$width = $txwidth;
// check for stretch mode
if ($stretch > 0) {
$this->font_stretching = 100;
$this->font_spacing = 0;
// text length
$txwidth = $this->GetStringWidth($txt);
$width = $txwidth;
// ratio between cell length and text length
// calculate ratio between cell width and text width
if ($width <= 0) {
$ratio = 1;
} else {
$ratio = ($w - $this->cell_padding['L'] - $this->cell_padding['R']) / $width;
$ratio = (($w - $this->cell_padding['L'] - $this->cell_padding['R']) / $width);
}
// stretch text if required
// check if stretching is required
if (($ratio < 1) OR (($ratio > 1) AND (($stretch % 2) == 0))) {
// the text will be stretched to fit cell width
if ($stretch > 2) {
// spacing
// calculate character spacing in points
$char_space = (($w - $width - $this->cell_padding['L'] - $this->cell_padding['R']) * $this->k) / max(($this->GetNumChars($txt) - 1), 1);
// set character spacing
$rs .= sprintf('BT %.2F Tc ET ', $char_space);
// set new character spacing
$this->font_spacing += ($w - $this->cell_padding['L'] - $this->cell_padding['R'] - $width) / (max(($this->GetNumChars($txt) - 1), 1) * ($this->font_stretching / 100));
} else {
// scaling
// calculate horizontal scaling
$horiz_scale = $ratio * 100.0;
// set horizontal scaling
$rs .= sprintf('BT %.2F Tz ET ', $horiz_scale);
// set new horizontal stretching
$this->font_stretching *= $ratio;
}
$align = '';
// recalculate text width (the text fills the entire cell)
$width = $w - $this->cell_padding['L'] - $this->cell_padding['R'];
} else {
$stretch == 0;
}
} else {
// text length
$txwidth = $this->GetStringWidth($txt);
$width = $txwidth;
if ($this->font_stretching != 100) {
// fixed stretching mode
$rs .= sprintf('BT %.2F Tz ET ', $this->font_stretching);
}
if ($this->font_spacing != 0) {
// increase/decrease font spacing
$rs .= sprintf('BT %.2F Tc ET ', ($this->font_spacing * $this->k));
// reset alignment
$align = '';
}
}
if ($this->font_stretching != 100) {
// apply font stretching
$rs .= sprintf('BT %.2F Tz ET ', $this->font_stretching);
}
if ($this->font_spacing != 0) {
// increase/decrease font spacing
$rs .= sprintf('BT %.2F Tc ET ', ($this->font_spacing * $this->k));
}
if ($this->ColorFlag) {
$s .= 'q '.$this->TextColor.' ';
}
@ -5661,22 +5651,13 @@ if (!class_exists('TCPDF', false)) {
if ($s) {
// output cell
$rs .= $s;
// reset text stretching
if ($stretch > 2) {
// reset character horizontal spacing
if ($this->font_spacing != 0) {
// reset font spacing mode
$rs .= ' BT 0 Tc ET';
} elseif ($stretch > 0) {
// reset character horizontal scaling
}
if ($this->font_stretching != 100) {
// reset font stretching mode
$rs .= ' BT 100 Tz ET';
} else {
if ($this->font_spacing != 0) {
// reset fixed kerning mode
$rs .= ' BT 0 Tc ET';
}
if ($this->font_stretching != 100) {
// reset fixed stretching mode
$rs .= ' BT 100 Tz ET';
}
}
}
// reset word spacing
@ -5917,7 +5898,7 @@ if (!class_exists('TCPDF', false)) {
* @param float $x x position in user units
* @param float $y y position in user units
* @param boolean $reseth if true reset the last cell height (default true).
* @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
* @param int $stretch font stretch mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if text is larger than cell width</li><li>2 = forced horizontal scaling to fit cell width</li><li>3 = character spacing only if text is larger than cell width</li><li>4 = forced character spacing to fit cell width</li></ul> General font stretching and scaling values will be preserved when possible.
* @param boolean $ishtml set to true if $txt is HTML content (default = false).
* @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width.
* @param float $maxh maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false.
@ -6446,7 +6427,7 @@ if (!class_exists('TCPDF', false)) {
* @param boolean $fill Indicates if the cell background must be painted (true) or transparent (false).
* @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul>
* @param boolean $ln if true set cursor at the bottom of the line, otherwise set cursor at the top of the line.
* @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
* @param int $stretch font stretch mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if text is larger than cell width</li><li>2 = forced horizontal scaling to fit cell width</li><li>3 = character spacing only if text is larger than cell width</li><li>4 = forced character spacing to fit cell width</li></ul> General font stretching and scaling values will be preserved when possible.
* @param boolean $firstline if true prints only the first line and return the remaining string.
* @param boolean $firstblock if true the string is the starting of a line.
* @param float $maxh maximum height. The remaining unprinted text will be returned. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature.