1

I used the following code but getting the error as "fatal error allowed memory size of bytes exhausted (tried to allocate bytes)".

include 'mpdf60/mpdf.php';
ob_clean(); 
$abc=new mPDF();
$temp=//some html code
$final=$temp;//.
$abc->WriteHTML($final);
$abc->Output();
exit();

My output having bunch of records. its not getting all the records on the pdf. How can I do it?

John Conde
  • 217,595
  • 99
  • 455
  • 496
  • [How can I get a multiple page pdf output from php file?](http://stackoverflow.com/questions/4096582/allowed-memory-size-of-x-bytes-exhausted) – pathe.kiran May 15 '15 at 11:42

1 Answers1

0

The message : fatal error allowed memory size of bytes exhausted

is telling you to increase the memory you can do it directly in your script

ini_set('memory_limit', '-1');
Vindic
  • 627
  • 6
  • 8
  • You are right, is better to put the right value for example if it needs 512 MB of ram you should put : ini_set('memory_limit', '512M'); the -1 will use what it needs to. Its easier when you are testing and developping. – Vindic May 14 '15 at 06:03