Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have a big table and it's broken! in version 0.5.1 #17

Closed
PhenX opened this issue Dec 6, 2012 · 33 comments
Closed

I have a big table and it's broken! in version 0.5.1 #17

PhenX opened this issue Dec 6, 2012 · 33 comments

Comments

@PhenX
Copy link
Member

PhenX commented Dec 6, 2012

Original author: ah.casim...@gmail.com (May 12, 2009 21:31:48)

the title says all.

Original issue: http://code.google.com/p/dompdf/issues/detail?id=10

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From ryan.mas...@gmail.com on May 12, 2009 21:38:42
Please attach your code.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From carlcarl...@gmail.com on May 21, 2009 19:02:48
I have the same problem. I have a SQL query that generates a very simple HTML table
and the Apache process crashes!

I am running
Windows Server 2003 SP2
Apache/2.0.55
PHP 5.2.8

This is it, there is no style sheets or anything, just this basic HTML:

Could it be the colspans? or simply the number of rows?? I noticed my colspans are
not the proper number.

<table>
<thead>
<tr>
<td valign="top" align="left" class="report-header">Col1</td>
<td valign="top" align="left" class="report-header">Col2</td>
<td valign="top" align="left" class="report-header">Col3</td>
<td valign="top" align="left" class="report-header">Col4</td>
<td valign="top" align="left" class="report-header">Col5</td>
</tr>
</thead>
<tbody>

%%%%%%%%%%%%%%%%%%%%%%%%
%% Repeated for each row: (x100 for a typical result)
%%%%%%%%%%%%%%%%%%%%%%%%
<tr>
<td colspan=6><hr></td>
</tr>
<tr>
<td valign="top" align="left">'.$row['q'].'</td>
<td valign="top" align="left">'.$row['t'].'</td>
<td valign="top" align="left">'.$row['qd'].'</td>
<td valign="top" align="left">'.$row['cn'].'</td>
<td valign="top" align="left">'.$row['jn'].'</td>
</tr><tr>
<td valign="top" colspan=2>'.$row['ld'].'</td>
<td colspan="4" valign="top"> '.$row['ln'].' </td>
</tr>
%%%%%%%%%%%%%%%%%%%%%%%%

</tbody>
</table>

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From eclecticgeek on May 29, 2009 15:49:04
carlcarlson: What is the error reported by apache when the process crashes? Have you
tried taking DOMPDF out of the script to see if the crash still occurs?

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From carlcarl...@gmail.com on June 17, 2009 20:44:41
Yes, it is definitely dompdf causing the crash. If I only have 1 row in the table it
will output just fine.

I have since rewritten my script for FPDF.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From m...@davidreade.co.uk on June 18, 2009 08:25:10
Check your memory usage - I had a similar problem with tables and high res images.
Got it to work fine by up'ing my memory limit. Also, you could try removing all your
data, and just see if the table loads fine - use single letters or numbers to see
where your cells are in the final PDF copy.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From tosc...@gmail.com on June 18, 2009 13:02:04
I am more or less having the same problem (FreeBSD 6.2 release p3, PHP version
5.2.8). It happens when rendering bigger pieces of HTML code (about 20kb and up).

DOMPDF does its work on smaller HTML files, but when the HTML code that needs parsing
gets too big, it throws a 500 Internal Server Error. It seems to have happened after
a PHP server update (DOMPDF didn't seem to have this problem on PHP version 5.2.6).

I've maximized the memory_limit and execution_time settings and they didn't solve the
problem. Any thoughts?

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From m...@davidreade.co.uk on June 21, 2009 01:53:24
Check your error_log file - HTTP 500 errors should be logged there.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From mindfulb...@gmail.com on June 29, 2009 18:18:48
I am having the same issue.

  • No error is reported in the error log, though error logging is turned on
  • A blank screen is displayed in the browser when I am generating a PDF that is more
    than one page
  • One-page PDFs work fine
  • Works fine with PHP version 5.2.4 (test server), but no-go on 5.2.8

PHP.INI
memory limit is 1.5 GB
max_execution_time is 600 seconds

I'm on Linux/Ubuntu

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From zwa...@gmail.com on August 12, 2009 15:05:40
I have the same problem as mentioned in issue 54.

I recogniced that with PHP version 5.2.9 it will work again.
It would be fine if anyone can help us...

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From beh...@gmail.com on August 20, 2009 17:21:36
same problem here.
After struggling for hours i discovered that it doesn't work when the the content in
the table is too big.
When the table exceeds the page size, the pageload stays looping, nothing happens.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From mindfulb...@gmail.com on August 20, 2009 17:39:50
I can confirm that upgrading PHP to version 5.2.9 corrects this issue completely. I
do sympathize, however, with those who do not have deep enough access to their server
to do this upgrade...

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From beh...@gmail.com on August 21, 2009 06:18:36
AHA! Will try it, and leave a messagre if that's the case with me also.
Thanx anyway for the tip!

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From beh...@gmail.com on August 21, 2009 06:25:08
bugger ... i already have PHP 5.2.10

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From joshidom...@gmail.com on October 27, 2009 15:08:43
yes me too have the same problem. if the table not fit a page it will break.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From arif....@gmail.com on November 16, 2009 19:46:34
i have a similar kinda problem. but it happens no matter how big the table is.

i get internal server error and no pdf is generated for the html file if php version is
5.2.11. when i change to php 5.3 everything works fine. i change nothing else .. just
click on wamp manager and select php version as 5.3.0 and it generates pdf.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From michele....@gmail.com on November 18, 2009 00:00:07
Same problem: if the table exceeds the page size (just one more line) loops until
max_execution_time and no output is give!

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From srbrown1...@yahoo.com on February 23, 2010 11:58:42
Has anyone found a fix to this yet? I am having the same problem. 1 page pdf's work
just fine but anything beyond that is hit or miss - sometimes it works and other
times it does not....

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From steelcas...@gmail.com on February 23, 2010 13:54:02
What are the alternatives? I too am seeing this problem and need a fix. I tried the
alpha code and it does seem to resolve this issue but others issues arise and thus I
cannot use it. Should we look into an alternative for html to pdf processing?

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From fabien.menager on April 07, 2010 19:54:00
Has anybody tested its code with the latest revision from the trunk ? A few changes
have been made for this issue.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From bjorn.ro...@itcnet.nu on April 07, 2010 20:35:39
I just tried it after updating from the trunk. Testfile is "table_height.html" with
added content. Works fine until the table wraps to the second page, then processor
goes up to 100% for 60 seconds and I get this message:

Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs
\dompdf_svn\dompdf\include\text_frame_reflower.cls.php on line 100

Included are the HTML file that causes this.
Call like this:
http://localhost/dompdf_svn/dompdf/dompdf.php?base_path=www%2Ftest
%2F&input_file=table_height2.html

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From eclecticgeek on April 07, 2010 21:29:41
This does still appear to be a problem. I tested on my dev system and saw memory
usage rise steadily until the script timed out.

I haven't delved into the code yet to confirm the problem, but I suspect DOMPDF is
trying to keep the contents of each cell on a single page and failing when one of the
table cells is too large to fit on a single page. When this happens DOMPDF will enter
an infinite loop because it continuously pushes the current row to the next page.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From stride.a...@gmail.com on April 21, 2010 21:05:20
This problem still exists on the current trunk. I am using php 5.2.9, but have tested
it on machines with newer versions with no luck.

I can verify that it is only when a cell grows over the size of one page. I will look
through the code to see if I can find anything.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From eclecticgeek on April 24, 2010 01:59:59
Based on the comments there may be multiple issues being discussed here. The large table cell problem has
been reported in Issue 91. For this particular problem please refer to that issue.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From farozenb...@gmail.com on June 27, 2010 02:38:33
I use with small size (one or two pages) and work well.
When I try to use with multiples pages (10, 20 o 30) doesn't run.
Depending of the quantity of pages there are not error or internal server error 500.
I increase the memory limit.
I create the PDF from HTML. The HTML is one Table by page. Yes, I sum the rows and end the table and break the page.
I use windows 2003 (updated today), Apache 2.2.13 and php 5.2.8 in production and VMWare XP (updated today), Apache 2.2.13 and php 5.2.11.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From Justin.B...@gmail.com on July 06, 2010 16:23:01
I'm getting 500 Internal Server Error as well, I'm on php 5.2.8 but I'm on GoDaddy shared hosting and don't have a clue on how to upgrade to 5.2.9. CAN ANYONE HELP ME UPGRADE. I read about yum, but this stuff is above my level of knowledge. HELP PLEASE!!

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From ivon.web...@gmail.com on November 02, 2010 23:06:57
Seems I found where is a problem:
In my case I had white page without response. So problem was in next:
My html was more then 1 PDF page and was in on General < table > < / table >. I've just break this one table on several tables so before next page I've close table and open next table.
Hope this is help someone

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From Lng...@gmail.com on January 20, 2011 16:12:10
Got the same issue today.

@just BREAK DOWN YOUR HTML TABLES SO THAT THEY ARE NOT SPAN ON > 1 PAGE

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From bj...@kvartersmenyn.com on January 20, 2011 16:17:49
Breaking up tables is not always possible since you don't always know how big a page is or how many rows you can fit. Especially if the cells can be more than one line long because of word-wrapping occuring. But never mind, I found another PDF-creator that can do this. It's much slower but at least it works. mpdf is the name if anyone is interested.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From germac...@gmail.com on January 30, 2011 17:56:02
So? we have to migrate to another pdf creator until this bug it's fix??

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From epana...@gmail.com on February 26, 2011 03:28:51
Perhaps this isn't the optimum solution but t may help someone.
We made sure the html data was valid, then, we increased the memory_limit in the php.ini file to 1024 and restarted the php process. dompdf was able to create a 16 page pdf. It took awhile but the pdf was created. Normally we create pdfs that range from one page to about four containing one huge table with nine columns. This file was a little larger, 10 pages.
Evan

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From far...@askwhyweb.com on May 17, 2011 11:38:16
Yes somewhat similar problem to this i had faced.
Lets see how longer it takes to fix this bug

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

This issue is a duplicate of #91

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From rashid...@gmail.com on March 13, 2012 21:36:54
This happens for the memory limit of server and the maximun execution time.
There's that increase these, for example:

ini_set("memory_limit", "999M");
ini_set("max_execution_time", "999");

Do this before you instantiate the class, $dompdf = new DOMPDF();

Sorry for my English!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant