尝试使用笨,以显示TCPDF的画面时,我有一个问题,无法获取图像(笨,TCPDF,PHP)的大小
这是我的PDF查看:
$base_url=base_url();
// NON-BREAKING ROWS (nobr="true")
$tbleauproduct = <<<EOD
<br /><br /><br />
<table border="1" align="center">
<tr>
<th>picture</th>
<th>Product name</th>
<th>Price</th>
<th>Quantity</th>
</tr>
<tr>
<td><img src="$base_url/assets/$picture" /></td>
<td>$name</td>
<td>$price</td>
<td>$qty</td>
</tr>
</table>
EOD;
$pdf->writeHTML($tbleauproduct, true, false, true, false, '');
和这是结果:
TCPDF ERROR: [Image] Unable to get the size of the image: http://localhost:8888/open_bay//assets/130501153059-htc-one-1024x576.jpeg
PDF不是图像。 – Narf
可能重复的[TCPDF错误:无法获取图像的大小](http://stackoverflow.com/questions/27060947/tcpdf-error-unable-to-get-the-size-of-the-image) –
避免张贴图像的代码。始终将代码作为文本发布。我已经替换了你的图片。 – mickmackusa