From e4330085c7d090ee1e40f3e9f405f1b93d8f8ed3 Mon Sep 17 00:00:00 2001 From: storbahn Date: Fri, 16 Aug 2024 17:33:38 +0200 Subject: [PATCH 1/3] Update Chromium.php fix bug if no chromiumSettings available --- src/Processor/Chromium.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Processor/Chromium.php b/src/Processor/Chromium.php index b09ca7d..157f8df 100644 --- a/src/Processor/Chromium.php +++ b/src/Processor/Chromium.php @@ -33,7 +33,7 @@ class Chromium extends Processor protected function buildPdf(PrintAbstract $document, object $config): string { $web2printConfig = Config::getWeb2PrintConfig(); - $chromiumConfig = $web2printConfig['chromiumSettings']; + $chromiumConfig = $web2printConfig['chromiumSettings'] ?? ''; $chromiumConfig = json_decode($chromiumConfig, true); $params = [ From beeffd66f93b148cd8b573b987f4519a2ae1e7dc Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Wed, 13 Nov 2024 19:45:27 +0100 Subject: [PATCH 2/3] [Task]: Update Gotenberg options documentation link (#90) * Update settings.js * Apply php-cs-fixer changes --------- Co-authored-by: kingjia90 --- public/js/settings.js | 2 +- src/Processor.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/js/settings.js b/public/js/settings.js index 1f72883..ffeb70c 100644 --- a/public/js/settings.js +++ b/public/js/settings.js @@ -274,7 +274,7 @@ pimcore.bundle.web2print.settings = Class.create({ autoEl:{ tag: 'a', target: '_blank', - href: "https://gotenberg.dev/docs/modules/chromium#routes", + href: "https://gotenberg.dev/docs/routes#page-properties-chromium", } },{ xtype: "displayfield", diff --git a/src/Processor.php b/src/Processor.php index caab45c..de7425f 100644 --- a/src/Processor.php +++ b/src/Processor.php @@ -40,16 +40,16 @@ public static function getInstance(): PdfReactor|Gotenberg|Chromium|Processor { $config = Config::getWeb2PrintConfig(); - if($config['generalTool'] == 'pdfreactor') { + if ($config['generalTool'] == 'pdfreactor') { return new PdfReactor(); - } elseif($config['generalTool'] == 'chromium') { + } elseif ($config['generalTool'] == 'chromium') { return new Chromium(); - } elseif($config['generalTool'] == 'gotenberg') { + } elseif ($config['generalTool'] == 'gotenberg') { return new Gotenberg(); } else { - if(class_exists($config['generalTool'])) { + if (class_exists($config['generalTool'])) { $generalToolClass = new $config['generalTool'](); - if($generalToolClass instanceof Processor) { + if ($generalToolClass instanceof Processor) { return $generalToolClass; } } From 331801e79d1931aebb42940ecec65bb9c1331c14 Mon Sep 17 00:00:00 2001 From: Christian Fasching Date: Thu, 14 Nov 2024 22:23:16 +0100 Subject: [PATCH 3/3] exclude PDFreactor client from cs fixer --- .php-cs-fixer.dist.php | 1 + 1 file changed, 1 insertion(+) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index a385b84..d6bb1ca 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -10,6 +10,7 @@ ->exclude([ __DIR__ . '/tests/_output', __DIR__ . '/tests/Support/_generated', + __DIR__ . '/src/Processor/Api/PDFreactor.class.php', ]) ;