title: WkHTMLtoPDF not loading local CSS and images
body: <p>I've seen multiple questions that are very <em>similar</em> to this one, so I was hesitant at first to post it. But nothing suggested resolved my issue and I can't seem to figure out what's wrong myself.</p>
  
  <p>For a project I made for one client they wanted to ability to convert quotes for their customers (generated using an online form) to PDFs. Simple enough. As the entire project was in PHP, I used the following simple process:</p>
  
  <ol>
  <li>Save the quote as a temporary HTML file</li>
  <li>Use WkHTMLtoPDF to convert the HTML file to a PDF</li>
  <li>Output this PDF file</li>
  <li>Clean up (delete temporary files)</li>
  </ol>
  
  <p>This worked until they changed servers. The new server has a firewall.</p>
  
  <p>At first the PDF conversion step was returning a firewall page saying that the server couldn't make outbound connections. To resolve this I fed the HTML file directly instead of linking to it (/var/www/mysite/temp/18382.html instead of www.example.com/temp/18382.html). This converted the HTML, but the firewall prevented the loading of CSS and images</p>
  
  <p>I can overcome the CSS by simply embedding it directly in the site instead of linking to it (using the <code>&lt;style&gt;</code> tags), but this doesn't work for images</p>
  
  <p>I tried using relative links first. I changed <code>&lt;img src="http://www.example.com/temp/image.jpg" /&gt;</code> to <code>&lt;img src="./image.jpg" /&gt;</code>. This didn't work.</p>
  
  <p>Next I tried <code>&lt;img src="file:///var/www/mysite/temp/image.jpg" /&gt;</code> but this didn't work, either</p>
  
  <p>I read around and look through the WkHTMLtoPDF manual and I tried several different command line arguments like <code>--enable-local-file-access</code>, <code>--enable /var/www/mysite/temp/</code>, and <code>--images</code> but nothing seems to fix it</p>