kartik-v / yii2-mpdf

A Yii2 wrapper component for the mPDF library which generates PDF files from UTF-8 encoded HTML.
http://demos.krajee.com/mpdf
Other
161 stars 150 forks source link

Unable to get Water mark image #46

Closed tejrajs closed 5 years ago

tejrajs commented 7 years ago

who to get water mark Image? $pdf->getApi()->SetWatermarkImage('image link');

artempetrovjava commented 7 years ago

The same problem

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

seisvalt commented 3 years ago

U

who to get water mark Image? $pdf->getApi()->SetWatermarkImage('image link');

a little late,:

$mpdf = $pdf->getApi(); $mpdf->SetWatermarkImage('img/theimage.png',0.3, '',[10,150]); $mpdf->showWatermarkImage = true; return $pdf->render();

More info params

https://mpdf.github.io/reference/mpdf-functions/setwatermarkimage.html