|
1 | 1 | <?php |
2 | 2 | //============================================================+ |
3 | 3 | // File name : tcpdf.php |
4 | | -// Version : 6.9.4 |
| 4 | +// Version : 6.9.5 |
5 | 5 | // Begin : 2002-08-03 |
6 | | -// Last Update : 2025-04-18 |
| 6 | +// Last Update : 2025-05-27 |
7 | 7 | // Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - [email protected] |
8 | 8 | // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) |
9 | 9 | // ------------------------------------------------------------------- |
|
104 | 104 | * Tools to encode your unicode fonts are on fonts/utils directory.</p> |
105 | 105 | * @package com.tecnick.tcpdf |
106 | 106 | * @author Nicola Asuni |
107 | | - * @version 6.9.4 |
| 107 | + * @version 6.9.5 |
108 | 108 | */ |
109 | 109 |
|
110 | 110 | // TCPDF configuration |
|
128 | 128 | * 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> |
129 | 129 | * @package com.tecnick.tcpdf |
130 | 130 | * @brief PHP class for generating PDF documents without requiring external extensions. |
131 | | - * @version 6.9.4 |
| 131 | + * @version 6.9.5 |
132 | 132 | * @author Nicola Asuni - [email protected] |
133 | 133 | * @IgnoreAnnotation("protected") |
134 | 134 | * @IgnoreAnnotation("public") |
@@ -17427,6 +17427,9 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal |
17427 | 17427 | } |
17428 | 17428 | } |
17429 | 17429 | if ($key == $maxel) break; |
| 17430 | + if ($dom[$key]['tag'] AND $dom[$key]['opening'] AND !empty($dom[$key]['attribute']['id'])) { |
| 17431 | + $this->setDestination($dom[$key]['attribute']['id']); |
| 17432 | + } |
17430 | 17433 | if ($dom[$key]['tag'] AND isset($dom[$key]['attribute']['pagebreak'])) { |
17431 | 17434 | // check for pagebreak |
17432 | 17435 | if (($dom[$key]['attribute']['pagebreak'] == 'true') OR ($dom[$key]['attribute']['pagebreak'] == 'left') OR ($dom[$key]['attribute']['pagebreak'] == 'right')) { |
@@ -19151,7 +19154,7 @@ protected function openHTMLTagHandler($dom, $key, $cell) { |
19151 | 19154 | $imglink = ''; |
19152 | 19155 | if (isset($this->HREF['url']) AND !TCPDF_STATIC::empty_string($this->HREF['url'])) { |
19153 | 19156 | $imglink = $this->HREF['url']; |
19154 | | - if ($imglink[0] == '#' AND is_numeric($imglink[1])) { |
| 19157 | + if ($imglink[0] == '#' AND isset($imglink[1]) AND is_numeric($imglink[1])) { |
19155 | 19158 | // convert url to internal link |
19156 | 19159 | $lnkdata = explode(',', $imglink); |
19157 | 19160 | if (isset($lnkdata[0])) { |
@@ -20012,7 +20015,7 @@ protected function closeHTMLTagHandler($dom, $key, $cell, $maxbottomliney=0) { |
20012 | 20015 | } |
20013 | 20016 | } |
20014 | 20017 | if (!$in_table_head) { // we are not inside a thead section |
20015 | | - $this->cell_padding = isset($table_el['old_cell_padding']) ? $table_el['old_cell_padding'] : null; |
| 20018 | + $this->cell_padding = isset($table_el['old_cell_padding']) ? $table_el['old_cell_padding'] : array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0); |
20016 | 20019 | // reset row height |
20017 | 20020 | $this->resetLastH(); |
20018 | 20021 | if (($this->page == ($this->numpages - 1)) AND ($this->pageopen[$this->numpages])) { |
@@ -23479,6 +23482,8 @@ protected function setSVGStyles($svgstyle, $prevsvgstyle, $x=0, $y=0, $w=1, $h=1 |
23479 | 23482 | $fill_color = TCPDF_COLORS::convertHTMLColorToDec($svgstyle['fill'], $this->spot_colors); |
23480 | 23483 | if ($svgstyle['fill-opacity'] != 1) { |
23481 | 23484 | $this->setAlpha($this->alpha['CA'], 'Normal', $svgstyle['fill-opacity'], false); |
| 23485 | + } elseif (preg_match('/rgba\(\d+%?,\s*\d+%?,\s*\d+%?,\s*(\d+(?:\.\d+)?)\)/i', $svgstyle['fill'], $rgba_matches)) { |
| 23486 | + $this->setAlpha($this->alpha['CA'], 'Normal', $rgba_matches[1], false); |
23482 | 23487 | } |
23483 | 23488 | $this->setFillColorArray($fill_color); |
23484 | 23489 | if ($svgstyle['fill-rule'] == 'evenodd') { |
|
0 commit comments