1
votes

We are using TCPDF library for generating pdf for our html with image, but when we enabled image code under this then it gives error :

"500 Internal Server Error"

if we are commenting image code then it is working fine.

Used Code :

$image1 = 'upload/graph/image1.png';
$image2 = 'upload/graph/image2.png';

$pdf->Image($image1, 15, 140, 75, 113, 'PNG', '', '', true, 150, '', false, false, 1, false, false, false);
$pdf->Image($image2, 15, 140, 75, 113, 'PNG', '', '', true, 150, '', false, false, 1, false, false, false);

but it is not working.

1

1 Answers

0
votes

It could be a memory limit issue because of the size of the image.

Try to increase the memory limit on your page and see if it works.

ini_set('memory_limit','512M');