Welcome Guest Search | Active Topics | Sign In | Register

EO.Pdf engine unable to render image Options
RMS Admin
Posted: Thursday, February 22, 2018 9:07:16 AM
Rank: Newbie
Groups: Member

Joined: 5/22/2013
Posts: 2
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=0


Thanks,
Ken
eo_support
Posted: Thursday, February 22, 2018 9:19:59 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,082
Hi,

Please update to the latest build and see if it works. The most likely reason for this is the TLS version of the web server. Your version uses a much older browser engine that only supports TLS 1.0. Many web servers nowadays only supports higher version of TLS and no longer supports TLS 1.0. This causes it not able to establish a HTTPS connection with client that only supports TLS 1.0. Thus failing to serve the image to the converter.

The current version is based on a much more up to date browser engine and does support higher version of TLS. So it should not have this problem.

Thanks!
RMS Admin
Posted: Thursday, February 22, 2018 12:15:27 PM
Rank: Newbie
Groups: Member

Joined: 5/22/2013
Posts: 2
That was indeed the issue. Downloading the latest version resolved it. Thanks for the quick response.

eo_support
Posted: Thursday, February 22, 2018 1:00:08 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,082
You are very welcome. Please feel free to let us know if there is anything else.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.