We are using EO.PDF version 4.0.68.2 in our web product to convert HTML to PDFs.
Calling EO.Pdf.HtmlToPdf.ConvertHtml() with the html snippet below produces a PDF with the 1st and 3rd images rendered. But the 2nd "carrillo" image is not rendered.
The image is accessible when the url "https://ucsb-hdae.github.io/virtual-tours/carrillo-entrance/images/carrillo-entrance_o_3.jpg" is entered directly in a browser but the EO.Pdf engine cannot retrieve the image to place in the PDF. This happens on our customer's web server and on our test servers so it is not a limitation of an individual server being unable to hit the URL.
<img alt="1st" src="https://preview.ibb.co/f5D6B6/test.jpg" />
<br />
<br />carrillo is below
<br />
<img alt="2nd" src="https://ucsb-hdae.github.io/virtual-tours/carrillo-entrance/images/carrillo-entrance_o_3.jpg" />
<br />
<br />
carrillo is above
<br />
<img alt="3rd" src="https://ucsb.box.com/shared/static/y412u1s98ou7g4c4v58pnchvqajnhnnp.png" />
What is it about that URL that prevents the EO engine from including it in the PDF?
The code used to retrieve the image is:
// EOPdf implementation
using (MemoryStream mem = new MemoryStream())
{
EO.Pdf.PdfDocument eoPDF = new EO.Pdf.PdfDocument();
eoPDF.EmbedFont = m_EmbedFontsInPDF;
EO.Pdf.HtmlToPdfOptions opts = new EO.Pdf.HtmlToPdfOptions();
opts.JpegQualityLevel = 80;
// if base url is set, add as option
if (!string.IsNullOrEmpty(m_BaseUrl))
{
opts.BaseUrl = m_BaseUrl;
}
EO.Pdf.HtmlToPdf.ConvertHtml(html, eoPDF, opts);
eoPDF.Save(mem);
byte[] pdfBytes = mem.ToArray();
return pdfBytes;
}
Value of m_EmbedFontsInPDF is true.
Value of m_BaseUrl is an empty string.
The PDF that EO renders is available at:
https://www.dropbox.com/s/0er2xzjd4xgnpma/ImageTest.pdf?dl=0Thanks,
Ken