Images will not be created, when working with https
-
Hi Emili!
The problem still in your code, after update to version 1.9.7 you have the
same error again, that images will not be included in a pdf.Here is the solution, which is working for me:
Please add the following lines in dk-pdf/vendor/mpdf/mpdf/src/Mpdf.php
LineNo ..... 11849 11850 function getFileContentsByCurl($url, &$data) 11851 { 11852 $this->logger->debug(sprintf('Fetching (cURL) content of remote URL "%s"', $url), ['context' => LogContext::REMOTE_CONTENT]); 11853 11854 $ch = curl_init($url); 11855 11856 /**** Added by ET***/ 11857 $p = parse_url($url); 11858 if ($p['scheme']=='https') { 11859 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 11860 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 11861 } 11862 /**** End Add ****/ 11863 curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1'); // mPDF 5.7.4 .....If these Curl-options are set, the picture are created, otherwise the place is left blank.
Greetings karlte
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Images will not be created, when working with https’ is closed to new replies.