mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-22 12:55:10 +00:00
5.8.010
This commit is contained in:
parent
cc627080c0
commit
13989d33c3
@ -1,3 +1,7 @@
|
||||
5.8.010 (2010-08-20)
|
||||
- Documentation of unhtmlentities() was fixed.
|
||||
- The 'fitwidth' option was added and border color problem was fixed on write1DBarcode() method (check the example n. 27).
|
||||
|
||||
5.8.009 (2010-08-20)
|
||||
- Internal object numbering was improved.
|
||||
- Some errors in object encryption were fixed.
|
||||
|
@ -8,7 +8,7 @@ http: sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 5.8.009
|
||||
Version: 5.8.010
|
||||
Release date: 2010-08-20
|
||||
Author: Nicola Asuni
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 20 Aug 2010 14:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +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 Fri, 20 Aug 2010 14:33:42 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +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 Fri, 20 Aug 2010 14:33:42 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:32 +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 Fri, 20 Aug 2010 14:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +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 Fri, 20 Aug 2010 14:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +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 Fri, 20 Aug 2010 14:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +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 Fri, 20 Aug 2010 14:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +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 Fri, 20 Aug 2010 14:33:47 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:37 +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 Fri, 20 Aug 2010 14:33:42 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +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 Fri, 20 Aug 2010 14:33:42 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +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 Fri, 20 Aug 2010 14:33:42 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:32 +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.8.009</td>
|
||||
<td><b>version:</b> </td><td>5.8.010</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.8.009 (http://www.tcpdf.org)'</code>
|
||||
<code>PDF_PRODUCER = 'TCPDF 5.8.010 (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 Fri, 20 Aug 2010 14:33:43 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:33 +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 Fri, 20 Aug 2010 14:33:47 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:37 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -2044,7 +2044,7 @@
|
||||
<a href="elementindex.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 20 Aug 2010 14:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -2076,7 +2076,7 @@
|
||||
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 20 Aug 2010 14:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -36,10 +36,10 @@
|
||||
<a name="tcpdf.php"></a>
|
||||
<h1>tcpdf.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 10327</b> - Unknown tag "@DEPRECATED" used<br>
|
||||
<b>Warning on line 10328</b> - Unknown tag "@DEPRECATED" used<br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Fri, 20 Aug 2010 14:33:47 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:37 +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 Fri, 20 Aug 2010 14:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +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 Fri, 20 Aug 2010 14:33:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Fri, 20 Aug 2010 16:32:31 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -2,7 +2,7 @@
|
||||
//============================================================+
|
||||
// File name : example_027.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2010-08-19
|
||||
// Last Update : 2010-08-20
|
||||
//
|
||||
// Description : Example 027 for TCPDF class
|
||||
// 1D Barcodes
|
||||
@ -82,6 +82,7 @@ $pdf->AddPage();
|
||||
$style = array(
|
||||
'position' => '',
|
||||
'align' => '',
|
||||
'fitwidth' => false,
|
||||
'stretch' => true,
|
||||
'border' => true,
|
||||
'padding' => 'auto',
|
||||
@ -277,41 +278,70 @@ $pdf->write1DBarcode('105', 'PHARMA2T', '', '', 20, 25, 0.4, $style, 'N');
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// set a background color
|
||||
$style['bgcolor'] = array(255,255,240);
|
||||
$style['fgcolor'] = array(128,0,0);
|
||||
|
||||
// Left position
|
||||
$style['position'] = 'L';
|
||||
$pdf->write1DBarcode('LEFT', 'C128A', '', '', 50, 30, 0.4, $style, 'N');
|
||||
$pdf->write1DBarcode('LEFT', 'C128A', '', '', 50, 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// Center position
|
||||
$style['position'] = 'C';
|
||||
$pdf->write1DBarcode('CENTER', 'C128A', '', '', 50, 30, 0.4, $style, 'N');
|
||||
$pdf->write1DBarcode('CENTER', 'C128A', '', '', 50, 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// Right position
|
||||
$style['position'] = 'R';
|
||||
$pdf->write1DBarcode('RIGHT', 'C128A', '', '', 50, 30, 0.4, $style, 'N');
|
||||
$pdf->write1DBarcode('RIGHT', 'C128A', '', '', 50, 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln(10);
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
$style['stretch'] = false;
|
||||
$style['fgcolor'] = array(0,128,0);
|
||||
$style['position'] = '';
|
||||
$style['stretch'] = false; // disable stretch
|
||||
|
||||
// Left alignment
|
||||
$style['align'] = 'L';
|
||||
$pdf->write1DBarcode('LEFT', 'C128A', '', '', '', 30, 0.4, $style, 'N');
|
||||
$pdf->write1DBarcode('LEFT', 'C128A', '', '', '', 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// Center alignment
|
||||
$style['align'] = 'C';
|
||||
$pdf->write1DBarcode('CENTER', 'C128A', '', '', '', 30, 0.4, $style, 'N');
|
||||
$pdf->write1DBarcode('CENTER', 'C128A', '', '', '', 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// Right alignment
|
||||
$style['align'] = 'R';
|
||||
$pdf->write1DBarcode('RIGHT', 'C128A', '', '', '', 30, 0.4, $style, 'N');
|
||||
$pdf->write1DBarcode('RIGHT', 'C128A', '', '', '', 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln(10);
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
$style['fgcolor'] = array(0,0,128);
|
||||
$style['fitwidth'] = true; // enable fitwidth
|
||||
|
||||
// Left alignment
|
||||
$style['position'] = 'L';
|
||||
$pdf->write1DBarcode('LEFT', 'C128A', '', '', '', 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// Center alignment
|
||||
$style['position'] = 'C';
|
||||
$pdf->write1DBarcode('CENTER', 'C128A', '', '', '', 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// Right alignment
|
||||
$style['position'] = 'R';
|
||||
$pdf->write1DBarcode('RIGHT', 'C128A', '', '', '', 20, 0.4, $style, 'N');
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// TEST BARCODE STYLES
|
||||
@ -323,6 +353,7 @@ $pdf->AddPage();
|
||||
$style = array(
|
||||
'position' => '',
|
||||
'align' => '',
|
||||
'fitwidth' => false,
|
||||
'stretch' => true,
|
||||
'border' => true,
|
||||
'padding' => 'auto',
|
||||
@ -336,7 +367,8 @@ $style = array(
|
||||
|
||||
// CODE 39 EXTENDED + CHECKSUM
|
||||
$pdf->Cell(0, 0, 'CODE 39 EXTENDED + CHECKSUM', 0, 1);
|
||||
$pdf->write1DBarcode('CODE 39 E+', 'C39E+', '', '', 100, 25, 0.4, $style, 'N');
|
||||
$pdf->SetLineStyle(array('width' => 1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0)));
|
||||
$pdf->write1DBarcode('CODE 39 E+', 'C39E+', '', '', 120, 25, 0.4, $style, 'N');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
42
tcpdf.php
42
tcpdf.php
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Version : 5.8.009
|
||||
// Version : 5.8.010
|
||||
// Begin : 2002-08-03
|
||||
// Last Update : 2010-08-20
|
||||
// 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.8.009
|
||||
* @version 5.8.010
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -150,14 +150,14 @@ if (!class_exists('TCPDF', false)) {
|
||||
/**
|
||||
* define default PDF document producer
|
||||
*/
|
||||
define('PDF_PRODUCER', 'TCPDF 5.8.009 (http://www.tcpdf.org)');
|
||||
define('PDF_PRODUCER', 'TCPDF 5.8.010 (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.8.009
|
||||
* @version 5.8.010
|
||||
* @author Nicola Asuni - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
@ -3765,6 +3765,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
$style = array(
|
||||
'position' => $this->rtl?'R':'L',
|
||||
'align' => $this->rtl?'R':'L',
|
||||
'fitwidth' => false,
|
||||
'stretch' => false,
|
||||
'border' => false,
|
||||
'padding' => 0,
|
||||
@ -10868,8 +10869,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
/**
|
||||
* Reverse function for htmlentities.
|
||||
* Convert entities in UTF-8.
|
||||
* @param $text_to_convert Text to convert.
|
||||
* @return string converted
|
||||
* @param string $text_to_convert Text to convert.
|
||||
* @return string converted text string
|
||||
* @access public
|
||||
*/
|
||||
public function unhtmlentities($text_to_convert) {
|
||||
@ -15830,7 +15831,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
* @param int $w width in user units
|
||||
* @param int $h height in user units
|
||||
* @param float $xres width of the smallest bar in user units
|
||||
* @param array $style array of options:<ul><li>boolean $style['border'] if true prints a border around the barcode</li><li>int $style['padding'] padding to leave around the barcode in user units (set to 'auto' for automatic padding)</li><li>array $style['fgcolor'] color array for bars and text</li><li>mixed $style['bgcolor'] color array for background or false for transparent</li><li>boolean $style["text"] boolean if true prints text below the barcode</li><li>string $style['font'] font name for text</li><li>int $style['fontsize'] font size for text</li><li>int $style['stretchtext']: 0 = disabled; 1 = horizontal scaling only if necessary; 2 = forced horizontal scaling; 3 = character spacing only if necessary; 4 = forced character spacing</li><li>string $style['position'] barcode position on the page: L = left margin; C = center; R = right margin.</li><li>string $style['align'] barcode position on the containing rectangle: L = left; C = center; R = right.</li><li>string $style['stretch'] if true stretch the barcode to best fit the available width, otherwise uses $xres resolution for a single bar.</li></ul>
|
||||
* @param array $style array of options:<ul><li>boolean $style['border'] if true prints a border</li><li>int $style['padding'] padding to leave around the barcode in user units (set to 'auto' for automatic padding)</li><li>array $style['fgcolor'] color array for bars and text</li><li>mixed $style['bgcolor'] color array for background or false for transparent</li><li>boolean $style["text"] boolean if true prints text below the barcode</li><li>string $style['font'] font name for text</li><li>int $style['fontsize'] font size for text</li><li>int $style['stretchtext']: 0 = disabled; 1 = horizontal scaling only if necessary; 2 = forced horizontal scaling; 3 = character spacing only if necessary; 4 = forced character spacing</li><li>string $style['position'] barcode position on the page: L = left margin; C = center; R = right margin.</li><li>string $style['align'] barcode position on the containing rectangle: L = left; C = center; R = right.</li><li>string $style['fitwidth'] if true reduce the width to fit the barcode + padding width (stretch doesn't work with this option enabled).</li><li>string $style['stretch'] if true stretch the barcode to best fit the available width, otherwise uses $xres resolution for a single bar.</li></ul>
|
||||
* @param string $align Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>
|
||||
* @author Nicola Asuni
|
||||
* @since 3.1.000 (2008-06-09)
|
||||
@ -15859,6 +15860,12 @@ if (!class_exists('TCPDF', false)) {
|
||||
if (!isset($style['stretch'])) {
|
||||
$style['stretch'] = false;
|
||||
}
|
||||
if (!isset($style['fitwidth'])) {
|
||||
$style['fitwidth'] = false;
|
||||
} elseif($style['fitwidth']) {
|
||||
// disable stretch
|
||||
$style['stretch'] = false;
|
||||
}
|
||||
if (!isset($style['fgcolor'])) {
|
||||
$style['fgcolor'] = array(0,0,0); // default black
|
||||
}
|
||||
@ -15881,9 +15888,6 @@ if (!class_exists('TCPDF', false)) {
|
||||
if (!isset($style['stretchtext'])) {
|
||||
$style['stretchtext'] = 4;
|
||||
}
|
||||
// set foreground color
|
||||
$this->SetDrawColorArray($style['fgcolor']);
|
||||
$this->SetTextColorArray($style['fgcolor']);
|
||||
if ($x === '') {
|
||||
$x = $this->x;
|
||||
}
|
||||
@ -15897,10 +15901,6 @@ if (!class_exists('TCPDF', false)) {
|
||||
$w = $this->w - $this->rMargin - $this->x;
|
||||
}
|
||||
}
|
||||
if (($h === '') OR ($h <= 0)) {
|
||||
// set default horizontal aspect ratio
|
||||
$h = $w / 3;
|
||||
}
|
||||
// padding
|
||||
if (!isset($style['padding'])) {
|
||||
$padding = 0;
|
||||
@ -15925,7 +15925,14 @@ if (!class_exists('TCPDF', false)) {
|
||||
$padding = 5 * $xres;
|
||||
}
|
||||
}
|
||||
// maximum bar height
|
||||
if ($style['fitwidth']) {
|
||||
$w = (($arrcode['maxw'] * $xres) + (2 * $padding));
|
||||
}
|
||||
// height
|
||||
if (($h === '') OR ($h <= 0)) {
|
||||
// set default horizontal aspect ratio
|
||||
$h = $w / 3;
|
||||
}
|
||||
$barh = $h - ($this->cell_height_ratio * $fontsize / $this->k) - (2 * $padding);
|
||||
// fit the barcode on available space
|
||||
$this->fitBlock($w, $h, $x, $y, false);
|
||||
@ -15981,6 +15988,9 @@ if (!class_exists('TCPDF', false)) {
|
||||
} elseif ($style['border']) {
|
||||
$this->Rect($xpos_rect, $y, $w, $h, 'D');
|
||||
}
|
||||
// set foreground color
|
||||
$this->SetDrawColorArray($style['fgcolor']);
|
||||
$this->SetTextColorArray($style['fgcolor']);
|
||||
// print bars
|
||||
foreach ($arrcode['bcode'] as $k => $v) {
|
||||
$bw = ($v['w'] * $xres);
|
||||
@ -16050,6 +16060,8 @@ if (!class_exists('TCPDF', false)) {
|
||||
$xres = 1 / $xres;
|
||||
$newstyle = array(
|
||||
'position' => '',
|
||||
'align' => '',
|
||||
'fitwidth' => false,
|
||||
'stretch' => false,
|
||||
'border' => false,
|
||||
'padding' => 0,
|
||||
|
Loading…
Reference in New Issue
Block a user