mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-12-23 08:58:55 +00:00
6.0.054 (2014-01-13)
- Bug #877 "Parenteses causing corrupt text" was fixed.
This commit is contained in:
parent
4a7678a1ad
commit
9c04ada91f
@ -1,3 +1,6 @@
|
||||
6.0.054 (2014-01-13)
|
||||
- Bug #877 "Parenteses causing corrupt text" was fixed.
|
||||
|
||||
6.0.053 (2014-01-03)
|
||||
- Bug #876 "Cell padding should not be multiplied with number of lines in getStringHeight" was fixed.
|
||||
- Patch #68 "Empty img src attribute leads to access of uninitialized string offset" was applied.
|
||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 6.0.053
|
||||
Release date: 2014-01-03
|
||||
Version: 6.0.054
|
||||
Release date: 2014-01-13
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2002-2014:
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tecnick.com/tcpdf",
|
||||
"version": "6.0.053",
|
||||
"version": "6.0.054",
|
||||
"homepage": "http://www.tcpdf.org/",
|
||||
"type": "library",
|
||||
"description": "TCPDF is a PHP class for generating PDF documents.",
|
||||
|
@ -2,7 +2,7 @@
|
||||
//============================================================+
|
||||
// File name : example_039.php
|
||||
// Begin : 2008-10-16
|
||||
// Last Update : 2013-05-14
|
||||
// Last Update : 2014-01-13
|
||||
//
|
||||
// Description : Example 039 for TCPDF class
|
||||
// HTML justification
|
||||
@ -75,7 +75,7 @@ $pdf->SetFont('helvetica', 'B', 20);
|
||||
$pdf->Write(0, 'Example of HTML Justification', '', 0, 'L', true, 0, false, false, 0);
|
||||
|
||||
// create some HTML content
|
||||
$html = '<span style="text-align:justify;">a <u>abc</u> abcdefghijkl abcdef abcdefg <b>abcdefghi</b> a abc abcd <img src="images/logo_example.png" border="0" height="41" width="41" /> <img src="images/tiger.ai" alt="test alt attribute" width="100" height="100" border="0" /> abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a <u>abc</u> abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg abcdefghi a abc abcd <a href="http://tcpdf.org">abcdef abcdefg</a> start a abc before <span style="background-color:yellow">yellow color</span> after a abc abcd abcdef abcdefg abcdefghi a abc abcd end abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi<br />abcd abcdef abcdefg abcdefghi<br />abcd abcde abcdef</span>';
|
||||
$html = '<span style="text-align:justify;">a <u>abc</u> abcdefghijkl (abcdef) abcdefg <b>abcdefghi</b> a ((abc)) abcd <img src="images/logo_example.png" border="0" height="41" width="41" /> <img src="images/tiger.ai" alt="test alt attribute" width="100" height="100" border="0" /> abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a <u>abc</u> abcd abcdef abcdefg <b>abcdefghi</b> a abc \(abcd\) abcdef abcdefg <b>abcdefghi</b> a abc \\\(abcd\\\) abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg abcdefghi a abc abcd <a href="http://tcpdf.org">abcdef abcdefg</a> start a abc before <span style="background-color:yellow">yellow color</span> after a abc abcd abcdef abcdefg abcdefghi a abc abcd end abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi<br />abcd abcdef abcdefg abcdefghi<br />abcd abcde abcdef</span>';
|
||||
|
||||
// set core font
|
||||
$pdf->SetFont('helvetica', '', 10);
|
||||
|
24
tcpdf.php
24
tcpdf.php
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Version : 6.0.053
|
||||
// Version : 6.0.054
|
||||
// Begin : 2002-08-03
|
||||
// Last Update : 2014-01-03
|
||||
// Last Update : 2014-01-13
|
||||
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||
// -------------------------------------------------------------------
|
||||
@ -104,7 +104,7 @@
|
||||
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
|
||||
* @package com.tecnick.tcpdf
|
||||
* @author Nicola Asuni
|
||||
* @version 6.0.053
|
||||
* @version 6.0.054
|
||||
*/
|
||||
|
||||
// TCPDF configuration
|
||||
@ -128,7 +128,7 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.php');
|
||||
* 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>
|
||||
* @package com.tecnick.tcpdf
|
||||
* @brief PHP class for generating PDF documents without requiring external extensions.
|
||||
* @version 6.0.053
|
||||
* @version 6.0.054
|
||||
* @author Nicola Asuni - info@tecnick.com
|
||||
*/
|
||||
class TCPDF {
|
||||
@ -6226,7 +6226,7 @@ class TCPDF {
|
||||
}
|
||||
$this->adjustCellPadding($border);
|
||||
$lines = $this->getNumLines($txt, $w, $reseth, $autopadding, $cellpadding, $border);
|
||||
$height = $this->getCellHeight(($lines * $this->FontSize), $autopadding);
|
||||
$height = $lines * $this->getCellHeight($this->FontSize, $autopadding);
|
||||
$this->cell_padding = $prev_cell_padding;
|
||||
$this->lasth = $prev_lasth;
|
||||
return $height;
|
||||
@ -17768,14 +17768,20 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
$spacew /= ($this->font_stretching / 100);
|
||||
}
|
||||
// escape special characters
|
||||
$pos = 0;
|
||||
$pmid = preg_replace('/[\\\][\(]/x', '\\#!#OP#!#', $pmid);
|
||||
$pmid = preg_replace('/[\\\][\)]/x', '\\#!#CP#!#', $pmid);
|
||||
if (preg_match_all('/\[\(([^\)]*)\)\]/x', $pmid, $pamatch) > 0) {
|
||||
foreach($pamatch[0] as $pk => $pmatch) {
|
||||
$pmatch = str_replace('#!#OP#!#', '(', $pmatch);
|
||||
$pmatch = str_replace('#!#CP#!#', ')', $pmatch);
|
||||
$newpmid = '[('.str_replace(chr(0).chr(32), ') '.sprintf('%F', $spacew).' (', $pamatch[1][$pk]).')]';
|
||||
$pmid = str_replace($pmatch, $newpmid, $pmid);
|
||||
$replace = $pamatch[1][$pk];
|
||||
$replace = str_replace('#!#OP#!#', '(', $replace);
|
||||
$replace = str_replace('#!#CP#!#', ')', $replace);
|
||||
$newpmid = '[('.str_replace(chr(0).chr(32), ') '.sprintf('%F', $spacew).' (', $replace).')]';
|
||||
$pos = strpos($pmid, $pmatch, $pos);
|
||||
if ($pos !== FALSE) {
|
||||
$pmid = substr_replace($pmid, $newpmid, $pos, strlen($pmatch));
|
||||
}
|
||||
++$pos;
|
||||
}
|
||||
unset($pamatch);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user