mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-05 14:43:36 +09:00
Apply workaround for SVG images on PDFs (#359)
This commit is contained in:
1 parent
e10c5ee4e5
commit
6f75976467
1 file changed
+6
-1
@@ -1300,7 +1300,12 @@ class Service implements InjectionAwareInterface
|
||||
$options->set('isRemoteEnabled',true);
|
||||
}
|
||||
}
|
||||
$html .= "<img src=\"$url\" height=\"50\" class=\"CompanyLogo\"></img>";
|
||||
// Workaround to get SVG images to render. Please see https://github.com/dompdf/dompdf/issues/320
|
||||
if ('.svg' === substr($url, -4)) {
|
||||
$html .= '<img src="data:image/svg+xml;base64,' . base64_encode(file_get_contents($url)) .'" height="50" class="CompanyLogo"></img>';
|
||||
} else {
|
||||
$html .= '<img src="'. $url .'" height="50" class="CompanyLogo"></img>';
|
||||
}
|
||||
$html .= '<hr class="Rounded">';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user