Jeckky / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

memory limit exhausted trying to generate pdf in DOMPDF #402

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.generate pdf from database which have images and text and roughly 80 rows
2.i have set memory limit by $old_limit = ini_set('memory_limit', '1000M'); but 
still get the error
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
i am using dompdf 0.5.1 and winxp sp2

Please provide the HTML source code you want to convert, or any additional
information.
I am attaching the file for more information

Original issue reported on code.google.com by san...@creationetinfosystems.com on 28 Dec 2011 at 8:27

Attachments:

GoogleCodeExporter commented 9 years ago
I don't see anything particularly problematic about your code, but it would be 
easier to debug seeing the HTML dompdf is attempting to process.

First thing we would recommend is to try dompdf 0.6.0 (currently at beta 2). 
Though still in beta it's recommended over 0.5.1 due to additional 
functionality and improved stability.

That being said, a memory overload when you've allocated 1GB seems unlikely 
unless you're running into the bug outlined in issue 91.

Original comment by eclecticgeek on 28 Dec 2011 at 7:59

GoogleCodeExporter commented 9 years ago
thanks for your quick response.Now that i upgraded to 0.6(beta) it still shows 
up with the same error.however when i generate the pdf using the same code of 
fewer rows/data then it works fine.Also there is no memory limit set as in .5.1 
in the latest release. so is it because of the amount of data or amount of 
images i am putting in the pdf??please help as it is very necessary to solve 
the issue ..
thanks again for your response

Original comment by san...@creationetinfosystems.com on 29 Dec 2011 at 6:04

GoogleCodeExporter commented 9 years ago
my php version in the server is 5.2.17
is it causing a problem??

Original comment by san...@creationetinfosystems.com on 29 Dec 2011 at 8:50

GoogleCodeExporter commented 9 years ago
PHP 5.2.17 should work fine. It's hard to determine where the error is 
occurring without seeing the HTML dompdf is trying to parse. Can you point us 
to a URL online? If not, can you attach a sample HTML document that causes the 
problem. In v0.6.0 you can call $dompdf->output_html() to retrieve the HTML 
dompdf is attempting to render.

Original comment by eclecticgeek on 3 Jan 2012 at 10:51

GoogleCodeExporter commented 9 years ago
Fatal error: Out of memory (allocated 68157440) (tried to allocate 171192 
bytes) in /home/crea09/public_html/handicraft/admin/lib/class.pdf.php on line 
1612

I am giving you the html file generated by  $dompdf->output_html()
but as this file contained images you may not see the file properly
Please reply 

Original comment by san...@creationetinfosystems.com on 5 Jan 2012 at 12:56

Attachments:

GoogleCodeExporter commented 9 years ago
In class.pdf.php? This is not usually where an out-of-memory error occurs. It 
does point to a general overloading of what dompdf can handle. What is the KB 
size of your images, on average? Can you optimize them in any way?

FYI, 68157440 bytes is 65MB. So PHP is not taking the 1000M memory limit you 
have set. Are you on a virtual host. Your host admin could have 
administratively set the limit, in which case you would be unable to change it.

Original comment by eclecticgeek on 5 Jan 2012 at 6:01

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00