Welcome Guest Search | Active Topics | Sign In | Register

htmlToPDFException: Failed to get the body element of the document Options
soppie
Posted: Tuesday, November 6, 2018 6:23:09 AM
Rank: Newbie
Groups: Member

Joined: 11/6/2018
Posts: 9
upgraded to the latest available EO.pdf for .NET version to get an old project up and running again in a windows 10 environment.
Now getting error "EO.pdf.htmlToPDFException Failed to get the body element of the document" when testing with HtmlToPdf.ConvertURL("https://www.google.com", "c:\result.pdf")

any ideas?
eo_support
Posted: Tuesday, November 6, 2018 8:35:31 AM
Rank: Administration
Groups: Administration

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

We tested it here and it works fine. You may want to check whether the page is indeed reachable from your computer. You can also run our EOPdfDemo application, then go to All Demos -> HTML to PDF -> Basic -> Convert Url demo to run the demo on Google's home page and see if it works.

Thanks!
soppie
Posted: Wednesday, November 7, 2018 3:10:03 AM
Rank: Newbie
Groups: Member

Joined: 11/6/2018
Posts: 9
the computer where this project is being modified has a functional internet connection. We're using eo pdf .net since 2012 without any problem. The only thing changed now is the removal of the EO.pdf.dll and EO.pdf.Html.dll and the adding of EO.base, EO.Pdf, EO.webbrowser and EO.Webengine dll. And the license key value. Funny thing is we upgraded another project on a completely different develop and production server, and experienced a similiar problem. We got it up and running by adding a hostfile entry to the servers to test and then there was no problem. But also: these servers have full connectivity to the outside world. Again, all other code used to generate a pdf didn't change.

again: any ideas?
eo_support
Posted: Wednesday, November 7, 2018 10:15:11 AM
Rank: Administration
Groups: Administration

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

This has to be related to your machine or your network environment, especially when the issue can be resolved by modifying your host file. You will receive this error when the browser engine did not receive a valid HTML file from the server. Most likely you have some kind of firewall/router/proxy server configuration in your environment that somehow blocked the request from your application. As such you may want to work with your network administrator to see if you can find out exactly what that is. We would also recommend you to use a traffic monitor such as Fiddler to monitor the traffic between the converter and the web server. That usually can tell you right away what went wrong.

Thanks!


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.