title: Problem loading images into PDF using HtmlRenderer.PdfSharp
body: <p>This is a bit of a longshot, but maybe someone might have some ideas.</p>
  
  <p>For reference - see <a href="https://stackoverflow.com/questions/41730662/images-dont-display-in-pdf">Images don&#39;t display in PDF</a>, a similar question.</p>
  
  <p>I'm using the Htmlrenderer.PdfSharp library to create PDF files from HTML content. Everything works perfectly, with the sole exception of the images. They simply display a big red box.</p>
  
  <p>The PDF works fine when running locally in debug mode, but not when deployed on the server. I've a small bit of extra information that might help - when executing the command to create the PDF:</p>
  
  <pre><code>        using (MemoryStream ms = new MemoryStream())
          {
              var pdf = TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.GeneratePdf(htmlContent, PdfSharp.PageSize.A4);
              pdf.Save(ms);
              res = ms.ToArray();
          }
  </code></pre>
  
  <p>On the server, I get a few of the following errors:</p>
  
  <pre><code>Exception thrown: 'System.Security.Authentication.AuthenticationException' in System.dll
  </code></pre>
  
  <p>Running locally I don't get those errors. I have a feeling it has something to do with the .NET engine not being able to properly resolve the image URL. That being said, the image URL is fully-qualified. It is, however, behind HTTPS, if that helps.</p>
  
  <p>I'm unable to go any further with my debugging. If anyone has any ideas, I'd love to hear them - even if it is just more places I can try hunting for clues.</p>