mPDF 5.7.1 - image displays as a broken [x]

后端 未结 11 1186
没有蜡笔的小新
没有蜡笔的小新 2020-12-29 05:59

I have a small issue with mPDF (version 5.7.1).

This code should generate PDF with image file:

 $mpdf = new mPDF();
 $html = \'

        
11条回答
  •  隐瞒了意图╮
    2020-12-29 06:35

    In my project i fix problem and solution is:

    Set src absolute path on the server example: src="/var/www/myproject/images/logo.png" if image is on the same server. If image is from external server src is absolute path example: src="https://www.google.bg/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png". Hope this will help someone.

提交回复
热议问题