1

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…

Community
  • 1
  • 1
Cropje
  • 67
  • 1
  • 7
  • No, it just keeps loading. var_dump on all parameters gives the same output in the one that is working as in the one that isn't... – Cropje Jul 14 '15 at 04:51
  • Try some other images. Will it work? Maybe quite rare bug related with image type details. – Bogdan Burym Jul 14 '15 at 05:07
  • But the images work when the query is hard-coded.... doesn't that mean they are fine? – Cropje Jul 14 '15 at 05:25
  • I think they may be processed different ways in this 2 different cases – Bogdan Burym Jul 14 '15 at 05:31
  • Ok, so if I use [link](http://0adb8101b7ae4114a392-dfaacb9b5d3eae26a1de1132d02b2b65.r33.cf3.rackcdn.com/coffee-beans-10020788.jpg) the pdf is rendered perfectly. So I resized all my pictures to 85x127px, still not working... – Cropje Jul 14 '15 at 07:32

0 Answers0