{"id":4294,"date":"2017-12-01T13:55:57","date_gmt":"2017-12-01T12:55:57","guid":{"rendered":"https:\/\/demos.welaunch.io\/woocommerce-print-products\/?post_type=faq&#038;p=317"},"modified":"2020-07-30T10:44:05","modified_gmt":"2020-07-30T08:44:05","slug":"print-products-pdf-images-not-loaded","status":"publish","type":"faq","link":"https:\/\/www.welaunch.io\/en\/knowledge-base\/faq\/print-products-pdf-images-not-loaded\/","title":{"rendered":"Print Products PDF images are not loaded?"},"content":{"rendered":"<p>First\u00a0 please make sure, that you are not on a <strong>localhost<\/strong> AND do not have any <strong>.htaccess \/ .passwd<\/strong> on your sever. Because our plugin uses HTTP to get the images for the PDF creation and if your server blocks the images from public it won&#8217;t work.<\/p>\n<p>Problem not solves? Read further:<\/p>\n<p class=\"answer\">Please make sure you have installed \/ configured the following in your Server PHP Extensions:<\/p>\n<ol>\n<li>CURL Enabled (php_curl.dll enabled)<\/li>\n<li>PHP.ini (allow_url_fopen = On)<\/li>\n<li>GD Library installed<\/li>\n<\/ol>\n<p>If images still do not display you can solve the issue by the following ways:<\/p>\n<p><strong>Quick and Dirty:<\/strong><\/p>\n<p>Add the following to the mpdf.php file on line 12954 -&gt; function:\u00a0file_get_contents_by_curl()<\/p>\n<pre>curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);<\/pre>\n<p>Source:\u00a0https:\/\/stackoverflow.com\/questions\/5657382\/curl-php-restful-service-always-returning-false<\/p>\n<p><strong>Better:<\/strong><\/p>\n<p>The better solution is to manually add only the certificate(s) or CA(s) you want to accept<\/p>\n<pre>;;;;;;;;;;;;;;;;;;;;\n; php.ini Options  ;\n;;;;;;;;;;;;;;;;;;;;\n\ncurl.cainfo = \"C:\\xampp\\php\\extras\\ssl\\cacert.pem\"\n<\/pre>\n<p>Source:\u00a0https:\/\/stackoverflow.com\/questions\/24611640\/curl-60-ssl-certificate-unable-to-get-local-issuer-certificate<\/p>\n<p><strong>On Nginx?<\/strong><\/p>\n<p>Some nginx server disallow some agents in the CURL header. Therefore you will need to change the header. Go to plugin-folder\/includes\/mpdf\/mpdf.php &gt; Line: 12965.<\/p>\n<p>Then change the\u00a0CURLOPT_USERAGENT value to\u00a0&#8216;User-Agent: curl\/7.39.0&#8217;<\/p>\n<p>Example:<\/p>\n<pre>curl_setopt($ch, CURLOPT_USERAGENT, 'User-Agent: curl\/7.39.0');<\/pre>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","product_cat":[],"class_list":["post-4294","faq","type-faq","status-publish","hentry","faq_topics-print-products-faq"],"_links":{"self":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/4294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/comments?post=4294"}],"version-history":[{"count":1,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/4294\/revisions"}],"predecessor-version":[{"id":5557,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/4294\/revisions\/5557"}],"wp:attachment":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/media?parent=4294"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/product_cat?post=4294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}