mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-29 07:33:54 +00:00
5.9.071
This commit is contained in:
parent
3973541cfa
commit
4adf3d7499
@ -1,4 +1,4 @@
|
|||||||
5.9.070 (2011-04-19)
|
5.9.071 (2011-04-19)
|
||||||
- Bug #3288574 "<br/> trouble" was fixed.
|
- Bug #3288574 "<br/> trouble" was fixed.
|
||||||
|
|
||||||
5.9.069 (2011-04-19)
|
5.9.069 (2011-04-19)
|
||||||
|
@ -8,7 +8,7 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
|||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
||||||
Name: TCPDF
|
Name: TCPDF
|
||||||
Version: 5.9.070
|
Version: 5.9.071
|
||||||
Release date: 2011-04-19
|
Release date: 2011-04-19
|
||||||
Author: Nicola Asuni
|
Author: Nicola Asuni
|
||||||
|
|
||||||
|
31
tcpdf.php
31
tcpdf.php
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// File name : tcpdf.php
|
// File name : tcpdf.php
|
||||||
// Version : 5.9.070
|
// Version : 5.9.071
|
||||||
// Begin : 2002-08-03
|
// Begin : 2002-08-03
|
||||||
// Last Update : 2011-04-19
|
// Last Update : 2011-04-19
|
||||||
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||||
@ -134,7 +134,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 5.9.070
|
* @version 5.9.071
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
|
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
|
||||||
@ -146,7 +146,7 @@ require_once(dirname(__FILE__).'/config/tcpdf_config.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 5.9.070
|
* @version 5.9.071
|
||||||
* @author Nicola Asuni - info@tecnick.com
|
* @author Nicola Asuni - info@tecnick.com
|
||||||
*/
|
*/
|
||||||
class TCPDF {
|
class TCPDF {
|
||||||
@ -157,7 +157,7 @@ class TCPDF {
|
|||||||
* Current TCPDF version.
|
* Current TCPDF version.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private $tcpdf_version = '5.9.070';
|
private $tcpdf_version = '5.9.071';
|
||||||
|
|
||||||
// Protected properties
|
// Protected properties
|
||||||
|
|
||||||
@ -18087,12 +18087,10 @@ class TCPDF {
|
|||||||
*/
|
*/
|
||||||
protected function getCSSdataArray($dom, $key, $css) {
|
protected function getCSSdataArray($dom, $key, $css) {
|
||||||
$cssarray = array(); // style to be returned
|
$cssarray = array(); // style to be returned
|
||||||
// get list of parent CSS selectors
|
// get parent CSS selectors
|
||||||
$parent_selectors = array();
|
$selectors = array();
|
||||||
if (isset($dom[($dom[$key]['parent'])]['cssdata'])) {
|
if (isset($dom[($dom[$key]['parent'])]['csssel'])) {
|
||||||
foreach ($dom[($dom[$key]['parent'])]['cssdata'] as $k => $v) {
|
$selectors = $dom[($dom[$key]['parent'])]['csssel'];
|
||||||
$parent_selectors[] = $v['k'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// get all styles that apply
|
// get all styles that apply
|
||||||
foreach($css as $selector => $style) {
|
foreach($css as $selector => $style) {
|
||||||
@ -18103,9 +18101,10 @@ class TCPDF {
|
|||||||
$selector = substr($selector, $pos);
|
$selector = substr($selector, $pos);
|
||||||
// check if this selector apply to current tag
|
// check if this selector apply to current tag
|
||||||
if ($this->isValidCSSSelectorForTag($dom, $key, $selector)) {
|
if ($this->isValidCSSSelectorForTag($dom, $key, $selector)) {
|
||||||
if (!in_array($selector, $parent_selectors)) {
|
if (!in_array($selector, $selectors)) {
|
||||||
// add style if not already added on parent selector
|
// add style if not already added on parent selector
|
||||||
$cssarray[] = array('k' => $selector, 's' => $specificity, 'c' => $style);
|
$cssarray[] = array('k' => $selector, 's' => $specificity, 'c' => $style);
|
||||||
|
$selectors[] = $selector;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -18114,14 +18113,14 @@ class TCPDF {
|
|||||||
$cssarray[] = array('k' => '', 's' => '1000', 'c' => $dom[$key]['attribute']['style']);
|
$cssarray[] = array('k' => '', 's' => '1000', 'c' => $dom[$key]['attribute']['style']);
|
||||||
}
|
}
|
||||||
// order the css array to account for specificity
|
// order the css array to account for specificity
|
||||||
$ordered = array();
|
$cssordered = array();
|
||||||
foreach ($cssarray as $key => $val) {
|
foreach ($cssarray as $key => $val) {
|
||||||
$skey = sprintf('%04d', $key);
|
$skey = sprintf('%04d', $key);
|
||||||
$ordered[$val['s'].'_'.$skey] = $val;
|
$cssordered[$val['s'].'_'.$skey] = $val;
|
||||||
}
|
}
|
||||||
// sort selectors alphabetically to account for specificity
|
// sort selectors alphabetically to account for specificity
|
||||||
ksort($ordered, SORT_STRING);
|
ksort($cssordered, SORT_STRING);
|
||||||
return $ordered;
|
return array($selectors, $cssordered);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18811,7 +18810,7 @@ class TCPDF {
|
|||||||
}
|
}
|
||||||
if (!empty($css)) {
|
if (!empty($css)) {
|
||||||
// merge CSS style to current style
|
// merge CSS style to current style
|
||||||
$dom[$key]['cssdata'] = $this->getCSSdataArray($dom, $key, $css);
|
list($dom[$key]['csssel'], $dom[$key]['cssdata']) = $this->getCSSdataArray($dom, $key, $css);
|
||||||
$dom[$key]['attribute']['style'] = $this->getTagStyleFromCSSarray($dom[$key]['cssdata']);
|
$dom[$key]['attribute']['style'] = $this->getTagStyleFromCSSarray($dom[$key]['cssdata']);
|
||||||
}
|
}
|
||||||
// split style attributes
|
// split style attributes
|
||||||
|
Loading…
Reference in New Issue
Block a user