Search code examples
phpcodeignitermpdf

How to add watermark Image using MPDF in codeigniter


here is the pdf image

I want to add this kind of background image to my PDF using MPDF. But also i want to reduce the background image opacity.


Solution

  • Try this-

    $mpdf->SetWatermarkImage(
      'assets/dist/img/ExampleLogo1.png',
       0.3,                 // this for transparency
       array(x,y),      // Alignment
    );