Closed m00nh3ck closed 3 years ago
Since upgrading to latest version from I am not able to have picture displayed in the PDF.
It works fine on HTML but when exported the picture is missing.
Is there any know issues or this functionality has been removed ?
"name": "kartik-v/yii2-mpdf", "version": "v1.0.6",
"require": { "mpdf/mpdf": "~8.0" },
Pictures which should be emplemed
Html::img('/logo-red.gif');
Tried few thinkgs using @web direct link to picture etc.
'exportConfig' => [ 'pdf' => [ // same as on the panel configuration Ref: http://demos.krajee.com/grid#default-export-config] 'showFooter' => false, 'mime' => 'application/pdf', 'filename' => $customer->company." - ".$invoice_ref, 'config' => [ 'contentBefore' => $contentBefore, 'contentAfter' => $contentAfter, 'mode' => 'c', 'options' =>[ // 'showWatermarkImage' => [true], //'title' => $invoice_ref, //'subject' => Yii::t('kvgrid', $invoice_ref), //'keywords' => Yii::t('kvgrid', 'export, pdf') ], 'methods' => [ 'SetHeader' => [$heading], 'SetFooter' => [$footer], // 'SetWatermarkImage' => ['logo-red.gif'], ], ], ],
Setting permission to 777 also didn't not fix this problem
The fix this is to decode image to base64 instead of using url.
Since upgrading to latest version from I am not able to have picture displayed in the PDF.
It works fine on HTML but when exported the picture is missing.
Is there any know issues or this functionality has been removed ?
"name": "kartik-v/yii2-mpdf", "version": "v1.0.6",
"require": { "mpdf/mpdf": "~8.0" },
Pictures which should be emplemed
Html::img('/logo-red.gif');
Tried few thinkgs using @web direct link to picture etc.
'exportConfig' => [
'pdf' => [ // same as on the panel configuration Ref: http://demos.krajee.com/grid#default-export-config] 'showFooter' => false, 'mime' => 'application/pdf', 'filename' => $customer->company." - ".$invoice_ref,
'config' => [
'contentBefore' => $contentBefore, 'contentAfter' => $contentAfter, 'mode' => 'c', 'options' =>[ // 'showWatermarkImage' => [true], //'title' => $invoice_ref, //'subject' => Yii::t('kvgrid', $invoice_ref), //'keywords' => Yii::t('kvgrid', 'export, pdf') ], 'methods' => [ 'SetHeader' => [$heading], 'SetFooter' => [$footer],
// 'SetWatermarkImage' => ['logo-red.gif'],
],
], ],