Skip to content

Commit 7a27012

Browse files
authored
Merge pull request #837 from tecnickcom/bulkmerge
Merge multiple PRs
2 parents ca5b6de + ebd81c1 commit 7a27012

File tree

8 files changed

+37
-28
lines changed

8 files changed

+37
-28
lines changed

.github/workflows/lint-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
lint-docs:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
- name: lint php documentation
20-
uses: sudo-bot/action-doctum@dev
20+
uses: sudo-bot/action-doctum@v5
2121
with:
2222
config-file: scripts/doctum.php
2323
method: "parse"

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
php-version: ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
25+
php-version: ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]
2626
os: [ubuntu-latest]
2727
experimental: [false]
2828
php-extensions: ["bcmath, curl, imagick, gd"]
@@ -31,12 +31,12 @@ jobs:
3131
include:
3232
#- { php-version: '8.2', experimental: false, os: macos-latest, php-extensions: 'bcmath, curl, imagick, gd', coverage-extension: 'none' }
3333
- { php-version: '8.2', experimental: false, os: windows-latest, php-extensions: 'bcmath, curl, imagick, gd', coverage-extension: 'none' }
34-
- { php-version: '8.4', experimental: true, os: ubuntu-latest, php-extensions: 'bcmath, curl, imagick, gd', coverage-extension: 'pcov' }
34+
- { php-version: '8.5', experimental: true, os: ubuntu-latest, php-extensions: 'bcmath, curl, imagick, gd', coverage-extension: 'pcov' }
3535
- { php-version: 'nightly', experimental: true, os: ubuntu-latest, php-extensions: 'bcmath, curl, imagick, gd', coverage-extension: 'pcov' }
3636
env:
3737
PDFINFO_BINARY: ${{ (matrix.os == 'ubuntu-latest') && '/usr/bin/pdfinfo' || ((matrix.os == 'macos-latest') && '/usr/local/bin/pdfinfo' || 'C:\ProgramData\Chocolatey\bin\pdfinfo.exe') }}
3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v5
4040
- name: Install pdfinfo, pdftopng or pdftoppm
4141
uses: ConorMacBride/install-package@v1
4242
with:
@@ -90,7 +90,7 @@ jobs:
9090
# For debugging issues
9191
- name: Archive test results
9292
if: failure()
93-
uses: actions/upload-artifact@v4
93+
uses: actions/upload-artifact@v5
9494
with:
9595
name: test-run-output-${{ matrix.php-version }}-${{ matrix.os }}
9696
retention-days: 1
@@ -100,7 +100,7 @@ jobs:
100100
name: Static Analysis
101101
runs-on: ubuntu-latest
102102
steps:
103-
- uses: actions/checkout@v4
103+
- uses: actions/checkout@v5
104104
- name: Use php 8.2
105105
uses: shivammathur/setup-php@v2
106106
with:

CHANGELOG.TXT

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
6.10.1 (2025-11-21)
2+
- cI: Add 8.5 to CI matrix - PR #836
3+
- Fix PHP 8.5 deprecation for xml_parser_free - PR #835
4+
- Fix bad text-align from HTML source - PR #833
5+
- Fix image on footer problems - PR #823
6+
- Preserving percentage gradient decimals and correctly clamp coordinates - PR #815
7+
- Enables compression for PDF/A - PR #820
8+
19
6.10.0 (2025-05-27)
210
- Embedded files support (Factur-X 1.07 / ZUGFeRD 2.3) #789
311

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.10.0
1+
6.10.1

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"barcodes"
1313
],
1414
"homepage": "http://www.tcpdf.org/",
15-
"version": "6.10.0",
15+
"version": "6.10.1",
1616
"license": "LGPL-3.0-or-later",
1717
"authors": [
1818
{

examples/example_001.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<h1>Welcome to <a href="http://www.tcpdf.org" style="text-decoration:none;background-color:#CC0000;color:black;">&nbsp;<span style="color:black;">TC</span><span style="color:white;">PDF</span>&nbsp;</a>!</h1>
9393
<i>This is the first example of TCPDF library.</i>
9494
<p>This text is printed using the <i>writeHTMLCell()</i> method but you can also use: <i>Multicell(), writeHTML(), Write(), Cell() and Text()</i>.</p>
95-
<p>Please check the source code documentation and other examples for further information.</p>
95+
<p style="text-align: ;">Please check the source code documentation and other examples for further information.</p>
9696
<p style="color:#CC0000;">TO IMPROVE AND EXPAND TCPDF I NEED YOUR SUPPORT, PLEASE <a href="http://sourceforge.net/donate/index.php?group_id=128076">MAKE A DONATION!</a></p>
9797
EOD;
9898

include/tcpdf_static.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class TCPDF_STATIC {
5555
* Current TCPDF version.
5656
* @private static
5757
*/
58-
private static $tcpdf_version = '6.10.0';
58+
private static $tcpdf_version = '6.10.1';
5959

6060
/**
6161
* String alias for total number of pages.

tcpdf.php

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
//============================================================+
33
// File name : tcpdf.php
4-
// Version : 6.10.0
4+
// Version : 6.10.1
55
// Begin : 2002-08-03
6-
// Last Update : 2025-05-27
6+
// Last Update : 2025-11-21
77
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - [email protected]
88
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
99
// -------------------------------------------------------------------
@@ -104,7 +104,7 @@
104104
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
105105
* @package com.tecnick.tcpdf
106106
* @author Nicola Asuni
107-
* @version 6.10.0
107+
* @version 6.10.1
108108
*/
109109

110110
// TCPDF configuration
@@ -128,7 +128,7 @@
128128
* 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>
129129
* @package com.tecnick.tcpdf
130130
* @brief PHP class for generating PDF documents without requiring external extensions.
131-
* @version 6.10.0
131+
* @version 6.10.1
132132
* @author Nicola Asuni - [email protected]
133133
* @IgnoreAnnotation("protected")
134134
* @IgnoreAnnotation("public")
@@ -2910,9 +2910,7 @@ public function setCompression($compress=true) {
29102910
$this->compress = false;
29112911
if (function_exists('gzcompress')) {
29122912
if ($compress) {
2913-
if ( !$this->pdfa_mode) {
2914-
$this->compress = true;
2915-
}
2913+
$this->compress = true;
29162914
}
29172915
}
29182916
}
@@ -5001,11 +4999,10 @@ protected function _putEmbeddedFiles() {
50014999
$filter = '';
50025000
if ($this->compress) {
50035001
$data = gzcompress($data);
5004-
$filter = ' /Filter /FlateDecode';
5002+
$filter .= ' /Filter /FlateDecode';
50055003
}
5006-
50075004
if ($this->pdfa_version == 3) {
5008-
$filter = ' /Subtype /text#2Fxml';
5005+
$filter .= ' /Subtype /text#2Fxml';
50095006
}
50105007

50115008
$stream = $this->_getrawstream($data, $filedata['n']);
@@ -6925,8 +6922,8 @@ protected function fitBlock($w, $h, $x, $y, $fitonpage=false) {
69256922
// fallback to avoid division by zero
69266923
$h = $h == 0 ? 1 : $h;
69276924
$ratio_wh = ($w / $h);
6928-
if (($y + $h) > $this->PageBreakTrigger) {
6929-
$h = $this->PageBreakTrigger - $y;
6925+
if (($y + $h) > $this->PageBreakTrigger + $this->bMargin) {
6926+
$h = $this->PageBreakTrigger + $this->bMargin - $y;
69306927
$w = ($h * $ratio_wh);
69316928
}
69326929
if ((!$this->rtl) AND (($x + $w) > ($this->w - $this->rMargin))) {
@@ -16918,7 +16915,7 @@ protected function getHtmlDomArray($html) {
1691816915
$dom[$key]['height'] = $dom[$key]['style']['height'];
1691916916
}
1692016917
// check for text alignment
16921-
if (isset($dom[$key]['style']['text-align'])) {
16918+
if (isset($dom[$key]['style']['text-align'][0])) {
1692216919
$dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align'][0]);
1692316920
}
1692416921
// check for CSS border properties
@@ -23268,8 +23265,11 @@ public function ImageSVG($file, $x=null, $y=null, $w=0, $h=0, $link='', $align='
2326823265
$error_message = sprintf('SVG Error: %s at line %d', xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser));
2326923266
$this->Error($error_message);
2327023267
}
23271-
// free this XML parser
23272-
xml_parser_free($parser);
23268+
23269+
// free this XML parser (does nothing in PHP >= 8.0)
23270+
if (function_exists('xml_parser_free') && PHP_VERSION_ID < 80000) {
23271+
xml_parser_free($parser);
23272+
}
2327323273

2327423274
// >= PHP 7.0.0 "explicitly unset the reference to parser to avoid memory leaks"
2327523275
unset($parser);
@@ -23500,7 +23500,8 @@ protected function setSVGStyles($svgstyle, $prevsvgstyle, $x=0, $y=0, $w=1, $h=1
2350023500
$gradient['coords'][4] /= $w;
2350123501
} elseif ($gradient['mode'] == 'percentage') {
2350223502
foreach($gradient['coords'] as $key => $val) {
23503-
$gradient['coords'][$key] = (intval($val) / 100);
23503+
$val = floatval($val) / 100;
23504+
$gradient['coords'][$key] = $val;
2350423505
if ($val < 0) {
2350523506
$gradient['coords'][$key] = 0;
2350623507
} elseif ($val > 1) {
@@ -24737,7 +24738,7 @@ protected function startSVGElementHandler($parser, $name, $attribs, $ctm=array()
2473724738
*/
2473824739
protected function endSVGElementHandler($parser, $name) {
2473924740
$name = $this->removeTagNamespace($name);
24740-
if ($this->svgdefsmode AND !in_array($name, array('defs', 'clipPath', 'linearGradient', 'radialGradient', 'stop'))) {;
24741+
if ($this->svgdefsmode AND !in_array($name, array('defs', 'clipPath', 'linearGradient', 'radialGradient', 'stop'))) {
2474124742
if (end($this->svgdefs) !== FALSE) {
2474224743
$last_svgdefs_id = key($this->svgdefs);
2474324744
if (isset($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'])) {

0 commit comments

Comments
 (0)