How to link image in dynamicPDF plugin in HTTPS

57 Views Asked by At

I am generating dynamic PDF for the user in which i am printing the images of user gallery it was working fine in shared hosting with HTTP but not working in AWS EC2, it show "image not found or unknown type"?

1

There are 1 best solutions below

0
Pettis Brandon On

If you haven't done this. Documentation here says you need to set the option 'isRemoteEnabled' => true.

return PDF::loadTemplate('renatio::invoice', ['file' => $file])
->setOptions(['isRemoteEnabled' => true])
->stream();

Test your link to the image outside of the PDF. For using Dynamic PDF I test my layouts and templates both in normal html and PDF code. That helps me debug most errors. Not that the html and PDF stream are 100% similar but close enough.