dongqiongjiong4740 2018-02-01 11:30 采纳率: 0%
浏览 190
已采纳

HTML2PDF图片代码无效

I have following HTML code being displayed in pdf but image tag not working

$html.= "<h2>Header</h2>
";
$html.= "<p>Text</p>
";
$html.= "<img src=" . $path1 .">
";

 $pdf=new PDF_HTML();
    $pdf->SetFont('Arial','',12);
    $pdf->WriteHTML($html);
    $pdf->Output('F',$filename);
  • 写回答

1条回答 默认 最新

  • doumiang0597 2018-02-01 11:34
    关注

    You have to use pdf->image for image to display. For Ex:-

    $pdf->Image('logo.png',10,10,-300);
    

    For referency, You can study here

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?