You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So i am running the tutorial script as in the readme.md and am receiving this error:
Notice: Trying to get property 'size' of non-object in /Users/devleaf/OneDrive/Work/Devleaf/Development/devleaf.local:5757/build/vendor/dompdf/dompdf/src/Dompdf.php on line 735
Fatal error: Uncaught Dompdf\Exception: No block-level parent found. Not good. in /Users/devleaf/OneDrive/Work/Devleaf/Development/devleaf.local:5757/build/vendor/dompdf/dompdf/src/Positioner/Inline.php:44 Stack trace: # 0 /Users/devleaf/OneDrive/Work/Devleaf/Development/devleaf.local:5757/build/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(873): Dompdf\Positioner\Inline->position(Object(Dompdf\FrameDecorator\Inline)) # 1 /Users/devleaf/OneDrive/Work/Devleaf/Development/devleaf.local:5757/build/vendor/dompdf/dompdf/src/FrameReflower/Inline.php(51): Dompdf\FrameDecorator\AbstractFrameDecorator->position() # 2 /Users/devleaf/OneDrive/Work/Devleaf/Development/devleaf.local:5757/build/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(894): Dompdf\FrameReflower\Inline->reflow(NULL) # 3 /Users/devleaf/OneDrive/Work/Devleaf/Development/devleaf.local:5757/build/vendor/dompdf/dompdf/src/FrameReflower/Page.php(141): Dompdf\FrameDecorator\AbstractFrameDecorator->reflow() # 4 /Users/devleaf/OneDrive/Work/Devleaf/Development/devleaf.co in /Users/devleaf/OneDrive/Work/Devleaf/Development/devleaf.local:5757/build/vendor/dompdf/dompdf/src/Positioner/Inline.php on line 44
I used composer to install the library and my code is as follows:
use Dompdf\Dompdf;
ob_clean();
$pdf = new Dompdf();
$pdf->set_option('isHtml5ParserEnabled', true);
$pdf->loadHtml('Hello World');
$pdf->setPaper('A4', 'landscape');
$pdf->render();
$pdf->stream();
exit('Pdf should run');
I have also tried: $pdf->loadHtml('<p>Hello World</p>');
which does not lead to any success.
Any help would be appreciated. As there is nothing which should stop the tutorial code from working except a bug in the code.
The text was updated successfully, but these errors were encountered:
ghost
changed the title
Fatal error: Uncaught Dompdf\Exception: No block-level parent found. Not good.
(Tutorial) Fatal error: Uncaught Dompdf\Exception: No block-level parent found. Not good.
Apr 2, 2018
ghost
changed the title
(Tutorial) Fatal error: Uncaught Dompdf\Exception: No block-level parent found. Not good.
(Attempting Tutorial) Fatal error: Uncaught Dompdf\Exception: No block-level parent found. Not good.
Apr 2, 2018
Not sure about the notice, maybe related to #1705?
Which version of dompdf are you using? We were seeing a lot of "block-level parent not found" errors recently and it was due to the version of libxml (#1560). 0.8.2 included a patch against that particular issue.
Thanks for your reply bsweeney. Yeah the notice shouldn't be anything to worry about, it was more so the fatal error.
Currently running v0.8.2 of dompdf with the following requirement versions:
sabberworm/php-css-parser: 8.1.0
phenx/php-svg-lib: v0.3
phnnx/php-font-lib: 0.5.1
and as stated previously php v7.2.1. Tried doing a bit of digging around but can't seem to notice any issues with conflict.
So i am running the tutorial script as in the readme.md and am receiving this error:
I used composer to install the library and my code is as follows:
I have also tried:
$pdf->loadHtml('<p>Hello World</p>');
which does not lead to any success.
My setup is as follows:
OS: MacOS 10.13.3
Programs: MAMP PRO 4.4.1, Codekit 3.5.2
PHP Version: PHP 7.2.1
Any help would be appreciated. As there is nothing which should stop the tutorial code from working except a bug in the code.
The text was updated successfully, but these errors were encountered: