2 weeks ago

DOMPDF - "Maximum function nesting level of '512' reached, aborting!

Posted 2 weeks ago by stever

I am using 'PDF' => Barryvdh\DomPDF\Facade::class, to generate PDFs. In the controller,

             use PDF;

            $pdf = PDF::loadView('patient.requisition');

I bumped up the nesting level to 16K and am still getting the error.

[email protected]:/etc/php/7.3/mods-available$ more xdebug.ini
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.remote_port = 9000
xdebug.max_nesting_level = 16384

The error is thrown in:

     * @return FontMetrics
    public function getFontMetrics()
        return $this->fontMetrics;

I am guessing that there is an infinite loop somewhere but I don't where to look. I don't have a lot invested in this PDF generator so if there is no quick solution can someone recommend a different PDF generator?

thanks steve

Please sign in or create an account to participate in this conversation.