PHP – dompdf render() timeout problem

I found a very good post which demonstrate how to integrate dompdf in CodeIgniter.
CodeIgniter Wiki – PDF generation using dompdf

For some unknown reasons, i found that the the pdf_create() function will get stuck when i try to create a pdf file and this results in timeout error. I located the problem which is caused by $dompdf->render(). After searching for a while. i finally found the failure reason @ Google Groups dompdf – Max execution time error.

The timeout problem occurs when your pdf template view file has a nested table! The problem is resolved after i removed the nested table.

Reference:

Advertisements

6 thoughts on “PHP – dompdf render() timeout problem”

  1. GENIUS!
    I had simple table with one image per row and it timeouted with max execution time set to 600 seconds!
    I removed table and…. EUREKA! IT WORKS! (wtf btw 😉 )

    Like

      1. Nested table means a table inside table. So make sure u don’t there is no table tag wrapper by another table tag.

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s