Home >Backend Development >PHP Tutorial >HTML2pdf将html转为pdf html里头图片丢失

HTML2pdf将html转为pdf html里头图片丢失

WBOY
WBOYOriginal
2016-06-13 12:15:151392browse

HTML2pdf将html转为pdf html里面图片丢失
html里面有图片

转成的pdf却没有

而我用正则将里面的图片替换出来再插入图片
$pattern="/HTML2pdf将html转为pdf html里头图片丢失/i";
    preg_match_all($pattern,$file,$match);
    var_dump($match); 
    for($i=0;$i      $img_url=preg_match("/^http:\/\//",$match[1][$i])?$$match[1][$i]:"http://file.aconf.org".$match[1][$i];
      preg_replace($match[0][$i], $pdf->Image($img_url, 5, 5, 200, 150,$type='',$link="",$paint=true), $file);
    }
   $pdf->Image($img_url, 5, 5, 200, 150,$type='',$link="",$paint=true);
出现错误

求大神指点迷津啊
------解决思路----------------------
不支持 png 的下述模式
Interlacing (交错式) 
Alpha channel 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn