I have a file that extracts some information from a database and creates some relatively simple dynamic HTML.
The file can then be used by DOMPDF to turn it into a PDF document. DOMDPF uses GET variables to achieve a basic implementation.
ob_start();
include_once("report.php?id=1249642977");
require_once("dompdf/dompdf_config.inc.php");
$dompdf = new DOMPDF();
$dompdf->load_html(ob_get_contents());
$dompdf->render();
$dompdf->stream("sample.pdf", array('Attachment'=>'0'));
ob_end_clean();
I thought I could use something like this to achieve the goal, but it is not surprising that this did not work.
So, how can I read the HTML that is output to the browser if you have to download the file directly to a line for use with the DOMPDF class?
source
share