Jump to content
Fórum Script Brasil
  • 0

DOMPDF trava



Pessoal, estou com um documento, que quando gera mais de 5 paginas, ele trava, não vai, e retorna o erro:

Maximum execution time of 30 seconds exceeded in /var/www/dompdf/include/frame.cls.php on line 914df.


As vezes na erro ao carregar a pagina, mas ai é quando demora bem mais.


o codigo é este

    $html = ob_get_contents();
      $dompdf = new DOMPDF();
      //$dompdf->set_paper('letter', 'landscape'); 
      $pdf = $dompdf->render();
      $canvas = $dompdf->get_canvas();
      $data =  date("d/m/Y H:i ");
      $font = Font_Metrics::get_font("helvetica", "bold"); 
      $canvas->page_text (510, 18, "Pag. {PAGE_NUM}/{PAGE_COUNT}", $font, 6, array(0,0,0)); //header
      $canvas->page_text (160, 792, "Copyright @ 2015 - Empresa", $font, 6, array(0,0,0)); //footer
      $canvas->page_text (335, 792, $data, $font, 6, array(0,0,0)); //footer
      header("Content-type: application/pdf");     
    // echo $dompdf->output();
     $dompdf->stream("Consulta-Pedido.pdf"); //realiza o download 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...