Images in FPDF using php and MySqli

让人想犯罪 __ 提交于 2019-12-13 00:49:45

问题


My other question (Using a PHP variable before a MYSQL query) was getting too long.

I’m trying to make a pdf file with images in it using FPDF in PHP with MySqli. When I type in the MySqli query without parameters (just plain text), the pdf is rendered fine, with about 100 images (all the same size) in it. When I use php parameters in the MySqli query, the pdf keeps “Loading...” (the loading pictogram is not filling up).

This does work:

echo '<img src="fotos/geenfoto.jpg" width=100>';

This doesn't:

$pdf->Image("fotos/geenfoto.jpg",0,0,30);

I tried making the pdf with 100 pictures, but I tried with just adding one picture as well, it isn’t working either way.

When I change it to:

//$pdf->Image("fotos/geenfoto.jpg",0,0,30);

The rest of the pdf is perfectly rendered.

I’ve spent way too much time on this already, but I’d really like to know the answer…

来源:https://stackoverflow.com/questions/31397748/images-in-fpdf-using-php-and-mysqli

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!