I have 104 html paragraphs which are entered into my db using a text editor. Some paragraphs take one or one and half pages and some takes only few lines. When I try to generate a pdf for the whole set, it gives me 'Server error' , but when i try to print few paragraphs it does a good job. Then i tried increasing the paragraph count one by one and i got stuck with 85 paragraphs. After that it gives me server error. Does anyone know how to fix this issue ? because i got another set of html tables other than these paragraphs. Thank You.
There may be a case of time limit for execution
set_time_limit(0);
if you add this in the code , max execution time is set to unlimited and TCPDF can process all paragraphs
Check that your server isn't running out of memory.. TCPDF can use alot of memory when rendering
Try
memory_limit = 64M
in your php.ini file..
I checked the server error log file, then i found the error,it was "Maximum execution time of 30 seconds exceeded in /XXXXXXX/includes/tcpdf/tcpdf.php on line 5036" . So i set execution time using
set_time_limit(180);
And it worked for me.