Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

codeigniter dom-pdf - No block-level parent found. Not good

Tags:

dompdf

Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'No block-level parent found. Not good.' system/library/dompdf/include/inline_positioner.cls.php:37

like image 520
Jaydeep Dobariya Avatar asked Jan 25 '18 05:01

Jaydeep Dobariya


People also ask

What is Dom-PDF error – no block-level parent found in Laravel?

Laravel DOM-PDF Error – No block-level parent found. Not good. I received this error when using a system called FusionInvoice. This relates to DOM PDF which is a Laravel vendor to allow PDFs to be created.

What are some common dompdf errors?

php - Dompdf error "No block-level parent found. Not good." - Stack Overflow Dompdf error "No block-level parent found. Not good."

How to enable HTML5 parser in dompdf?

go to configuration file dompdf_config.custom.inc.php and uncomment define ("DOMPDF_ENABLE_HTML5PARSER", true); and check, basically it requires html5 parser enabled in your configuration file. Just uncomment define ("DOMPDF_ENABLE_HTML5PARSER", true); this line from dompdf_config.custom.inc.php this file.

Why is my HTML content nulled before by dompdf?

There have been issues in the past where a bug in the HTML processing would result in the HTML content being nulled before by dompdf, but I believe those have been cleared up with the latest release. Do you see any notices or warnings thrown by PHP besides the initial one.


1 Answers

Remove <thead> and <tbody> tags and remove space between <html><head> , </head><body> and </body></html>

It will works fine.!

like image 153
Amit Nadiyapara Avatar answered Oct 17 '22 15:10

Amit Nadiyapara