From 6f7597646794e6876582df709d55e486c79bcf82 Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Tue, 18 Oct 2022 12:56:56 -0700 Subject: [PATCH] Apply workaround for SVG images on PDFs (#359) --- src/bb-modules/Invoice/Service.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bb-modules/Invoice/Service.php b/src/bb-modules/Invoice/Service.php index eb542e4b9..e6acb4f51 100644 --- a/src/bb-modules/Invoice/Service.php +++ b/src/bb-modules/Invoice/Service.php @@ -1300,7 +1300,12 @@ class Service implements InjectionAwareInterface $options->set('isRemoteEnabled',true); } } - $html .= ""; + // Workaround to get SVG images to render. Please see https://github.com/dompdf/dompdf/issues/320 + if ('.svg' === substr($url, -4)) { + $html .= ''; + } else { + $html .= ''; + } $html .= '
'; }