Print margins in DOMPDF

The following style will effectively set the margins of your document to 0: @page { margin: 0px; } body { margin: 0px; } @page is used by dompdf 0.6.0, body by dompdf 0.5.1. You can modify the margin of the page and body independently, though right now the margin of the two together acts as … Read more

how to save DOMPDF generated content to file? [closed]

I have just used dompdf and the code was a little different but it worked. Here it is: require_once(“./pdf/dompdf_config.inc.php”); $files = glob(“./pdf/include/*.php”); foreach($files as $file) include_once($file); $html=”<html><body>”. ‘<p>Put your html here, or generate it with your favourite ‘. ‘templating system.</p>’. ‘</body></html>’; $dompdf = new DOMPDF(); $dompdf->load_html($html); $dompdf->render(); $output = $dompdf->output(); file_put_contents(‘Brochure.pdf’, $output); Only difference here … Read more