Rectangle 27 0

php Create PDF file with BIG html CODE?


ini_set("memory_limit", 64MB);
$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);

This should work for you in this case.

Note
Rectangle 27 0

php Create PDF file with BIG html CODE?


Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

Then, divide the html, render each part into a separate file, and then merge them afterwards..

Note