From ca988bc0b586d38fa03e63b8c77e5857bbde94d4 Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Mon, 12 Feb 2024 15:03:49 +0100 Subject: [PATCH] Update Chromium.php --- src/Processor/Chromium.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Processor/Chromium.php b/src/Processor/Chromium.php index 4d1b25a..970bb58 100644 --- a/src/Processor/Chromium.php +++ b/src/Processor/Chromium.php @@ -132,11 +132,10 @@ public function getPdfFromString(string $html, array $params = [], bool $returnF } else { $output = base64_decode($pdf->getBase64()); } + $page->close(); } catch (\Throwable $e) { Logger::debug('Could not create pdf with chromium: '. print_r($e, true)); - $output = (string) $e; - } finally { - $page->close(); + $output = (string) $e; } return $output;