clearChromiumArguments(); // $pdf->addChromiumArguments(config('ninja.snappdf_chromium_arguments')); $pdf->addChromiumArguments(implode(' ', $chrome_flags)); // } if (config('ninja.snappdf_chromium_path')) { $pdf->setChromiumPath(config('ninja.snappdf_chromium_path')); } $html = str_ireplace(['file:/', 'iframe', '', '/etc/'], '', $html); // nlog($html); $generated = $pdf ->setHtml($html) ->generate(); if ($generated) { return $generated; } throw new InternalPDFFailure('There was an issue generating the PDF locally'); } }