Skip to navigation
DOMPDF: Image not found or type unknown
28.08.20
If you are using DOMPDF on a server environment that has a self-signed security certificate, or perhaps the certificate name doesn’t match what it should, DOMPDF will not load images or other assets without specifically creating a stream context that allows it to do so. // DOMPDF version 0.7.0 use Dompdf\Dompdf; use Dompdf\Options; require_once 'dompdf/autoload.inc.php'; $options = new Options(); $options->set('isRemoteEnabled', TRUE); $dompdf = new Dompdf($options); $contxt = stream_context_create([ 'ssl' => [ 'verify_peer' => FALSE, 'verify_peer_name' => FALSE, 'allow_self_signed'=> TRUE ] ]); $dompdf->setHttpContext($contxt); // ...
https://blog.skunkbad.com/php/dompdf-image-not-found-or-type-unknown
Reply
Anonymous
Information Epoch 1752617005
Live free or die.
Home
Notebook
Contact us