Save report summary view server side with dompdf

Hello, there is a way to save server side pdf report view? How can i get with the same format of printer-friendly (that view is perfect yet)?I can get a good pdf only with printer friendly export, but i need the same format on pdf with dompdf (or other way if exist) to save server side automatically.I tried to insert this code at the start of Summary Report CustomTemplateHeader:

$DompdfAutoloader = new \Dompdf\Autoloader();
$DompdfAutoloader->register();

ob_start();


------

here the report components generated 

----
and this code at the end of of Summary Report CustomTemplateFooter:

$html = ob_get_clean();
$dompdf1 = $dompdf = new \Dompdf\Dompdf(array("pdf_backend" => "Cpdf"));
$dompdf1->set_paper("A4","portrait");
$dompdf1->load_html($html);
$dompdf1->render();
$output = $dompdf1->output();
$filename = 'files/xxx/'.date("YmdHis").'.pdf';

file_put_contents($filename, $output);

Everithing is ok but in pdf body (saved server side) there is different css format and data is not displayedSome one can help me?
I think i tried a lot of way but i have the same problem still…

Please follow this topic from PHPMaker Help menu: Tutorial - Custom Template for Summary Report.

Since you use CustomTemplateHeader and CustomTemplateFooter, are you trying to export a Custom Template? If so, your code will not work because Custom Template is client side JavaScript but your code run on the server (before the page content is sent to the browser and the Custom Template is rendered). Your code only exports the original HTML of the report (not rendered HTML of Custom Template). The original HTML only includes stylesheet of the browser, the CSS is too complicated for dompdf to understand, that’s why another .css (ewpdf.css) is used by the dompdf extension. Your $html should include a .css that dompdf can parse, you may start with the ewpdf.css and customize.

If you have already followed and read it, then it has the related topic to Custom Templates which is:Custom Template does NOT support the following: Export to CSV/HTML/XML/PDF and Export to EXCEL (the data is exported in original tabular format).

Yes I tring to save server side a pdf summary report custom template with custom font, logo and qr code. When i export from the browser everything is ok (i understand now, because the html is rendered, thank you), printer friendly is ok and pdf is ok with right font and right elements.I tried to cusom ewpdf.css but custom font does not work.But there is a way to call server side ExportReportPdf (class, function)?

How can i get $page object in summaryreport to pass in invoke function?or form every way is ok in this moment, how can take the html rendered stream to pass in dompdf? Printer-friendly html generated will be perfect, but if i call with file_get_content it seem i have no the permission to access.