php - Create PDF file with BIG html CODE -



php - Create PDF file with BIG html CODE -

i have generate pdf document big html code (created 1000 or more pages). standard method limited me - memory. standard method:

$html = generatepdf($data_to_pdf); $dompdf = new dompdf(); $dompdf->load_html($html); $dompdf->set_paper('a4', 'landscape'); $dompdf->render(); $pdf = $dompdf->output(); file_put_contents('pdf/' . $tmp_name . '.pdf', $pdf);

the memory little need save info in part. how generate pdf page page? or that? how prepare memory problem?

try taking @ this: https://pdfmerger.codeplex.com/

then, split html, render each part separate file, , merge them afterwards..

php memory pdf-generation dompdf memory-limit

Comments

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -