HTML2pdf converts html to html, and the images in html are lost. there is no pdf in html, but I use regular expressions to replace the images and insert them into the image $ pattern & lt; img .*? Src [|] (. *? (? : 2.16.gif |. jpg |. png]) [|]. *? []? & Gt; I; & nbsp; preg HTML2pdf convert html into pdf html and the image is lost.
Html contains images
The converted pdf file does not exist.
I use regular expressions to replace the image and insert it into the image.
$ Pattern = "// 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 );
Error
Please give me some advice.
------ Solution ----------------------
The following png mode is not supported
Interlacing)
Alpha channel