Max execution time error

3,658 views
Skip to first unread message

Eric

unread,
Jul 23, 2009, 7:00:51 AM7/23/09
to dompdf
Hi Brian, I'm excited about this app but am having problems rendering.
I gathered the nested and long table issues, but it is timing out with
a single cell and a lot of text (more than 1 page). Shouldn't it just
spill over to the next page?


require_once("dompdf_config.inc.php");
$html =
'<html><head><style>body{margin:0;padding:0;}td.tdbg
{ background:#cccccc; }</style></head><body>'.
'<table><tr><td class="tdbg"><p><font size="25">Put your html
here, or generate it with your favourite templating system.</font></
p>';

$html .=<<<EOD
That was my read on the most recent quarter of venture-capital data,
which to me was indicative about what a sorry state this arm of
finance is currently in, especially when it comes to investing in
clean-tech companies.

Remember the clean-tech industry? It was lauded as the nation's new
growth engine, with thousands of start-up companies forming over the
last several years to help develop a more efficient energy
infrastructure.

[SNIP -- A LOT OF TEXT -- MAYBE 3 PAGES WORTH]

In other words, some companies seem to be bottomless pits needing tons
of cash. Electri
EOD;
$html .= '</td></tr></table></body></html>';

$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("sample.pdf", array("Attachment"=>0));

BrianS

unread,
Jul 23, 2009, 4:49:18 PM7/23/09
to dompdf
On Jul 23, 7:00 am, Eric <eric.winch...@gmail.com> wrote:
> Hi Brian, I'm excited about this app but am having problems rendering.
> I gathered the nested and long table issues, but it is timing out with
> a single cell and a lot of text (more than 1 page). Shouldn't it just
> spill over to the next page?

You are correct, DOMPDF will attempt to continue the text on the next
page. I think the problem in your case is just DOMPDF's inability to
work with tables efficiently. It's something we'll need to address in
a future release.

Testing an HTML document similar to yours on my own system also causes
a time-out. Your document structure isn't too complex, however, and I
found that using a DIV tag instead of a table made it possible for
DOMPDF to render correctly.

-b

Eric

unread,
Jul 23, 2009, 5:25:35 PM7/23/09
to dompdf
Great, thanks! I'll just avoid using nested tables for now.

This is a great script. I plan to use it for creating a mostly-
automated print version of a website.
Reply all
Reply to author
Forward
0 new messages