I'm trying to convert a 40mb html file into PDF using DOMPDF. Even with a timeout of 3600 seconds, it does not generate the file, nor do I put it as a cron job 1x a day or run it on the command line.
My script
<?php
require_once 'dompdf/autoload.inc.php';
use Dompdf\Dompdf;
// instantiate and use the dompdf class
$dompdf = new Dompdf();
$dompdf->loadHtml($html);
// (Optional) Setup the paper size and orientation
$dompdf->setPaper('A4', 'landscape');
// Render the HTML as PDF
$dompdf->render();
// Output the generated PDF to Browser
$dompdf->stream();
?>
where the variable $html
is all contents of my 40 mega file.
I would like to know if someone has some more efficient conversion class, works well with large files or if DOMpdf itself has this support