Codeigniter Create PDF for more than 1000 lines

I tried to create a PDF file from CodeIgniter using PHPExcel, mPDF, TCPDF and HTML2PDF, but there was a problem for generating more than 1000 rows from MySQL. The problem started with running out of memory, and my xampp server needed to restart. Please share with me if you have successfully created a PDF with more than 1000 lines. Thanks for the tips.

+4
source share
3 answers

The XAMPP copy of php uses only a fixed amount of RAM, which can be anywhere near your available resources. You can increase it based on your system.

File: \xampp\php\php.ini memory_limit = 512M 

Or any other amount (in MB) of available RAM that you would like to allow PHP.

+1
source

You can try to generate the html file and pass it through htmldoc. But if you work in an environment with low memory, even this may not work.

0
source

I use fpdf for my PDF creation and hit a lot over 1000 lines.

I would suggest that the problem is the phase of creating data from what you say above. Can you print 1000 lines in HTML?

If you do not send SQL, etc. and look at it,

0
source

All Articles