I am trying to set a background for a page with mPDF (8.0.0). The problem is that mPDF does not show the image. With some images I get it working, with others not. Why?
Working Image: https://public.skyworx.io/file.svg
Not working Image: https://public.skyworx.io/firefox-logo.svg
<?php
require_once __DIR__ . '/vendor/autoload.php';
$pdfOptions = array(
'mode' => 'utf-8',
'format' => 'A4',
'img_dpi' => 300,
'dpi' => 300,
'tempDir' => __DIR__ . '/tmp'
);
$pdf = new MpdfMpdf( $pdfOptions );
$pdf->SetDefaultBodyCSS('background', "url('https://public.skyworx.io/firefox-logo.svg')");
//$pdf->SetDefaultBodyCSS('background', "url('https://public.skyworx.io/file.svg')");
$pdf->SetDefaultBodyCSS('background-image-resize', 6);
$html = '';
$pdf->WriteHTML( $html, 2 );
$pdf->debug = true;
$pdf->showImageErrors = true;
$pdf->Output();
question from:
https://stackoverflow.com/questions/65940399/mpdf-does-not-show-svg-image 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…