From 5d110781bde6f5be95f07f11d32ace1064187f77 Mon Sep 17 00:00:00 2001 From: Calin Blaga Date: Tue, 25 May 2021 13:16:17 +0300 Subject: [PATCH 1/3] feat(BE-1914): fork and adapt the library Signed-off-by: Calin Blaga --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6fb46f81..d18b23da 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "psliwa/php-pdf", + "name": "jobcloud/psliwa-php-pdf", "description": "Pdf and graphic files generator library for PHP.", "keywords": ["PDF", "PHPPdf"], "type": "library", From 2781a6523e586110fde74b0d57ea06e6f063fae8 Mon Sep 17 00:00:00 2001 From: Calin Blaga Date: Tue, 25 May 2021 13:32:56 +0300 Subject: [PATCH 2/3] feat(BE-1914): makes it php 7.4 compatible Signed-off-by: Calin Blaga --- lib/PHPPdf/Core/Formatter/StandardPositionFormatter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PHPPdf/Core/Formatter/StandardPositionFormatter.php b/lib/PHPPdf/Core/Formatter/StandardPositionFormatter.php index 22f440e1..5516ac05 100644 --- a/lib/PHPPdf/Core/Formatter/StandardPositionFormatter.php +++ b/lib/PHPPdf/Core/Formatter/StandardPositionFormatter.php @@ -27,7 +27,7 @@ public function format(Nodes\Node $node, Document $document) list($x, $y) = $boundary->getFirstPoint()->toArray(); $attributesSnapshot = $node->getAttributesSnapshot(); - $diffWidth = $node->getWidth() - $attributesSnapshot['width']; + $diffWidth = $node->getWidth() - ($attributesSnapshot['width'] ?? 0); $width = $node->getWidth(); $x += $width; $yEnd = $y - $node->getHeight(); From 459abf1a91b7cc72644ff6f42d05f83429026f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20H=C3=A4ber?= Date: Thu, 27 May 2021 14:13:56 +0200 Subject: [PATCH 3/3] feat(BE-1914): introduce laminas --- composer.json | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index d18b23da..df779c54 100644 --- a/composer.json +++ b/composer.json @@ -12,19 +12,20 @@ } ], "require": { - "zendframework/zendpdf": "~2.0.0", - "zendframework/zend-cache": "^2.0" + "zendframework/zendpdf": "~2.0.0", + "laminas/laminas-cache": "^2.0", + "laminas/laminas-zendframework-bridge": "^1.1" }, "require-dev": { - "zendframework/zend-barcode": "^2.0", - "zendframework/zend-validator": "^2.0", - "imagine/Imagine": ">=0.2.0,<0.6.0", + "laminas/laminas-barcode": "^2.0", + "laminas/laminas-validator": "^2.0", + "imagine/imagine": ">=0.2.0,<0.6.0", "phpunit/phpunit": ">=4,<5.4.0" }, "suggest": { - "zendframework/zend-barcode": "If you want to use barcodes", - "zendframework/zend-validator": "If you want to use barcodes (required by zend-barcode)", - "imagine/Imagine": "If you want to use image generating (required version: >=v0.2.6)" + "laminas/laminas-barcode": "If you want to use barcodes", + "laminas/laminas-validator": "If you want to use barcodes (required by zend-barcode)", + "imagine/imagine": "If you want to use image generating (required version: >=v0.2.6)" }, "autoload": { "psr-0": { "PHPPdf": "lib/", "Imagine": "lib/" }