mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-06-04 23:10:46 +00:00
6.0.079 (2014-05-19)
- Patch item #69 "Named destinations, HTML internal and external links" was merged. - Bug item #920 "hyphenateText() should not hyphenate the content of style-tags in HTML mode" was fixed. - Image method now trigs an error in case the cache is now writeable. - Fixed issue with layer default status.
This commit is contained in:
parent
e1cbda79b9
commit
78b7610910
|
@ -1,3 +1,9 @@
|
||||||
|
6.0.079 (2014-05-19)
|
||||||
|
- Patch item #69 "Named destinations, HTML internal and external links" was merged.
|
||||||
|
- Bug item #920 "hyphenateText() should not hyphenate the content of style-tags in HTML mode" was fixed.
|
||||||
|
- Image method now trigs an error in case the cache is now writeable.
|
||||||
|
- Fixed issue with layer default status.
|
||||||
|
|
||||||
6.0.078 (2014-05-12)
|
6.0.078 (2014-05-12)
|
||||||
- A warning issue in addTTFfont() method was fixed.
|
- A warning issue in addTTFfont() method was fixed.
|
||||||
- Fonts were updated to include cbbox metrics.
|
- Fonts were updated to include cbbox metrics.
|
||||||
|
|
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
||||||
Name: TCPDF
|
Name: TCPDF
|
||||||
Version: 6.0.078
|
Version: 6.0.079
|
||||||
Release date: 2014-05-12
|
Release date: 2014-05-19
|
||||||
Author: Nicola Asuni
|
Author: Nicola Asuni
|
||||||
|
|
||||||
Copyright (c) 2002-2014:
|
Copyright (c) 2002-2014:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "tecnick.com/tcpdf",
|
"name": "tecnick.com/tcpdf",
|
||||||
"version": "6.0.078",
|
"version": "6.0.079",
|
||||||
"homepage": "http://www.tcpdf.org/",
|
"homepage": "http://www.tcpdf.org/",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"description": "TCPDF is a PHP class for generating PDF documents.",
|
"description": "TCPDF is a PHP class for generating PDF documents.",
|
||||||
|
|
|
@ -55,7 +55,7 @@ class TCPDF_STATIC {
|
||||||
* Current TCPDF version.
|
* Current TCPDF version.
|
||||||
* @private static
|
* @private static
|
||||||
*/
|
*/
|
||||||
private static $tcpdf_version = '6.0.078';
|
private static $tcpdf_version = '6.0.079';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* String alias for total number of pages.
|
* String alias for total number of pages.
|
||||||
|
@ -1569,7 +1569,7 @@ class TCPDF_STATIC {
|
||||||
$length = strlen($name);
|
$length = strlen($name);
|
||||||
for ($i = 0; $i < $length; ++$i) {
|
for ($i = 0; $i < $length; ++$i) {
|
||||||
$chr = $name[$i];
|
$chr = $name[$i];
|
||||||
if (preg_match('/[0-9a-zA-Z]/', $chr) == 1) {
|
if (preg_match('/[0-9a-zA-Z#_=-]/', $chr) == 1) {
|
||||||
$escname .= $chr;
|
$escname .= $chr;
|
||||||
} else {
|
} else {
|
||||||
$escname .= sprintf('#%02X', ord($chr));
|
$escname .= sprintf('#%02X', ord($chr));
|
||||||
|
|
39
tcpdf.php
39
tcpdf.php
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// File name : tcpdf.php
|
// File name : tcpdf.php
|
||||||
// Version : 6.0.078
|
// Version : 6.0.079
|
||||||
// Begin : 2002-08-03
|
// Begin : 2002-08-03
|
||||||
// Last Update : 2014-05-06
|
// Last Update : 2014-05-19
|
||||||
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
// 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>
|
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @version 6.0.078
|
* @version 6.0.079
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TCPDF configuration
|
// 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>
|
* 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
|
* @package com.tecnick.tcpdf
|
||||||
* @brief PHP class for generating PDF documents without requiring external extensions.
|
* @brief PHP class for generating PDF documents without requiring external extensions.
|
||||||
* @version 6.0.078
|
* @version 6.0.079
|
||||||
* @author Nicola Asuni - info@tecnick.com
|
* @author Nicola Asuni - info@tecnick.com
|
||||||
*/
|
*/
|
||||||
class TCPDF {
|
class TCPDF {
|
||||||
|
@ -6861,6 +6861,9 @@ class TCPDF {
|
||||||
$original_file = $file;
|
$original_file = $file;
|
||||||
$file = TCPDF_STATIC::getObjFilename('img');
|
$file = TCPDF_STATIC::getObjFilename('img');
|
||||||
$fp = fopen($file, 'w');
|
$fp = fopen($file, 'w');
|
||||||
|
if (!$fp) {
|
||||||
|
$this->Error('Unable to write file: '.$file);
|
||||||
|
}
|
||||||
fwrite($fp, $imgdata);
|
fwrite($fp, $imgdata);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
unset($imgdata);
|
unset($imgdata);
|
||||||
|
@ -9713,17 +9716,13 @@ class TCPDF {
|
||||||
//$out .= ' /PieceInfo <<>>';
|
//$out .= ' /PieceInfo <<>>';
|
||||||
if (!empty($this->pdflayers)) {
|
if (!empty($this->pdflayers)) {
|
||||||
$lyrobjs = '';
|
$lyrobjs = '';
|
||||||
$lyrobjs_print = '';
|
$lyrobjs_off = '';
|
||||||
$lyrobjs_view = '';
|
|
||||||
$lyrobjs_lock = '';
|
$lyrobjs_lock = '';
|
||||||
foreach ($this->pdflayers as $layer) {
|
foreach ($this->pdflayers as $layer) {
|
||||||
$layer_obj_ref = ' '.$layer['objid'].' 0 R';
|
$layer_obj_ref = ' '.$layer['objid'].' 0 R';
|
||||||
$lyrobjs .= $layer_obj_ref;
|
$lyrobjs .= $layer_obj_ref;
|
||||||
if ($layer['print']) {
|
if ($layer['view'] === false) {
|
||||||
$lyrobjs_print .= $layer_obj_ref;
|
$lyrobjs_off .= $layer_obj_ref;
|
||||||
}
|
|
||||||
if ($layer['view']) {
|
|
||||||
$lyrobjs_view .= $layer_obj_ref;
|
|
||||||
}
|
}
|
||||||
if ($layer['lock']) {
|
if ($layer['lock']) {
|
||||||
$lyrobjs_lock .= $layer_obj_ref;
|
$lyrobjs_lock .= $layer_obj_ref;
|
||||||
|
@ -9734,8 +9733,7 @@ class TCPDF {
|
||||||
$out .= ' /Name '.$this->_textstring('Layers', $oid);
|
$out .= ' /Name '.$this->_textstring('Layers', $oid);
|
||||||
$out .= ' /Creator '.$this->_textstring('TCPDF', $oid);
|
$out .= ' /Creator '.$this->_textstring('TCPDF', $oid);
|
||||||
$out .= ' /BaseState /ON';
|
$out .= ' /BaseState /ON';
|
||||||
$out .= ' /ON ['.$lyrobjs_print.']';
|
$out .= ' /OFF ['.$lyrobjs_off.']';
|
||||||
$out .= ' /OFF ['.$lyrobjs_view.']';
|
|
||||||
$out .= ' /Locked ['.$lyrobjs_lock.']';
|
$out .= ' /Locked ['.$lyrobjs_lock.']';
|
||||||
$out .= ' /Intent /View';
|
$out .= ' /Intent /View';
|
||||||
$out .= ' /AS [';
|
$out .= ' /AS [';
|
||||||
|
@ -21995,7 +21993,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||||
if (isset($dictionary[$word_string])) {
|
if (isset($dictionary[$word_string])) {
|
||||||
return TCPDF_FONTS::UTF8StringToArray($dictionary[$word_string], $this->isunicode, $this->CurrentFont);
|
return TCPDF_FONTS::UTF8StringToArray($dictionary[$word_string], $this->isunicode, $this->CurrentFont);
|
||||||
}
|
}
|
||||||
// suround word with '_' characters
|
// surround word with '_' characters
|
||||||
$tmpword = array_merge(array(95), $word, array(95));
|
$tmpword = array_merge(array(95), $word, array(95));
|
||||||
$tmpnumchars = $numchars + 2;
|
$tmpnumchars = $numchars + 2;
|
||||||
$maxpos = $tmpnumchars - $charmin;
|
$maxpos = $tmpnumchars - $charmin;
|
||||||
|
@ -22055,6 +22053,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||||
$word = array(); // last word
|
$word = array(); // last word
|
||||||
$txtarr = array(); // text to be returned
|
$txtarr = array(); // text to be returned
|
||||||
$intag = false; // true if we are inside an HTML tag
|
$intag = false; // true if we are inside an HTML tag
|
||||||
|
$skip = false; // true to skip hyphenation
|
||||||
if (!is_array($patterns)) {
|
if (!is_array($patterns)) {
|
||||||
$patterns = TCPDF_STATIC::getHyphenPatternsFromTEX($patterns);
|
$patterns = TCPDF_STATIC::getHyphenPatternsFromTEX($patterns);
|
||||||
}
|
}
|
||||||
|
@ -22062,7 +22061,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||||
$unichars = TCPDF_FONTS::UTF8StringToArray($text, $this->isunicode, $this->CurrentFont);
|
$unichars = TCPDF_FONTS::UTF8StringToArray($text, $this->isunicode, $this->CurrentFont);
|
||||||
// for each char
|
// for each char
|
||||||
foreach ($unichars as $char) {
|
foreach ($unichars as $char) {
|
||||||
if ((!$intag) AND TCPDF_FONT_DATA::$uni_type[$char] == 'L') {
|
if ((!$intag) AND (!$skip) AND TCPDF_FONT_DATA::$uni_type[$char] == 'L') {
|
||||||
// letter character
|
// letter character
|
||||||
$word[] = $char;
|
$word[] = $char;
|
||||||
} else {
|
} else {
|
||||||
|
@ -22079,6 +22078,16 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||||
} elseif ($intag AND (chr($char) == '>')) {
|
} elseif ($intag AND (chr($char) == '>')) {
|
||||||
// end of HTML tag
|
// end of HTML tag
|
||||||
$intag = false;
|
$intag = false;
|
||||||
|
// check for style tag
|
||||||
|
if (empty(array_diff(array_slice($txtarr, -6, 5), array(115, 116, 121, 108, 101)))) { // = 'style'
|
||||||
|
if (empty(array_diff(array_slice($txtarr, -7, 1), array(47)))) { // '/' = 47
|
||||||
|
// closing style tag
|
||||||
|
$skip = false;
|
||||||
|
} else {
|
||||||
|
// opening style tag
|
||||||
|
$skip = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user