fpdf Output(name) not working if adding Image()

Viewed 40

I here trying to create a pdf with fpdf and want to display and rename the web title with Output(name) it worked fine before, but after I added Image() it didn't work, did I do something wrong?

    require('../libs/fpdf/fpdf.php');

    $no_ref = 'TJ100001';
    $dir    = 'https://www.vuien.my.id/assets/img/logo.png';
    $pdf    = new FPDF('l','mm','A5');

    $pdf->AddPage();

    $pdf->Image($dir,10,7,10);
 
    $filename = 'Invoice '.$no_ref.'.pdf';
    $pdf->Output($filename,'I', true);

with add Image() :

screenshot

With no add Image() :

screenshot

0 Answers
Related