Greetings!
I was working with PHP Version 5.4.3 and with DOMPDF (to print the pdf form in pdf format); When I upgrade to PHP Version 7.2.1 I get the following error:
Fatal error: Uncaught DOMPDF_Exception: No block-level parent found. Not good. in C: \ xampp \ htdocs \ ctacobro_6 \ production \ dompdf \ include \ inline_positioner.cls.php: 38 Stack trace: # 0 C: \ xampp \ htdocs \ ctacobro_6 \ production \ dompdf \ include \ frame_decorator.cls.php (546 ): Inline_Positioner-> position () # 1 C: \ xampp \ htdocs \ ctacobro_6 \ production \ dompdf \ include \ text_frame_reflower.cls.php (331): Frame_Decorator-> position () # 2 C: \ xampp \ htdocs \ ctacobro_6 \ production \ dompdf \ include \ frame_decorator.cls.php (556): Text_Frame_Reflower-> reflow (NULL) # 3 C: \ xampp \ htdocs \ ctacobro_6 \ production \ dompdf \ include \ page_frame_reflower.cls.php (138 ): Frame_Decorator-> reflow () # 4 C: \ xampp \ htdocs \ ctacobro_6 \ production \ dompdf \ include \ frame_decorator.cls.php (556): Page_Frame_Reflower-> reflow (NULL) # 5 C: \ xampp \ htdocs \ ctacobro_6 \ production \ dompdf \ include \ dompdf.cls.php (817): Frame_Decorator-> reflow () # 6 C: \ xampp \ htdocs \ ctacobro_6 \ production \ Impresion.php (859): DOMPDF- > render () # 7 {main} thrown in C: \ xampp \ htdocs \ ctacobro_6 \ production \ dompdf \ include \ inline_positioner.cls.php on line 38
here is the code:
<?php
$code='aquí va el html'
// se crea una nueva instancia al DOMPDF
$dompdf = new Dompdf();
// se carga el codigo html
$dompdf->load_html(utf8_decode($code));
// aumentamos memoria del servidor si es necesario
ini_set("memory_limit","50M");
// lanzamos a render
$dompdf->render();
// guardamos a PDF
$dompdf->stream("PA03-PR04-F02.pdf");
$bd_certsup2->close();
?>
The Dompdf 0.8.1 and Dompdf 0.8.2 versions do not work for me either.
Thank you very much!