Welcome Guest Search | Active Topics | Sign In | Register

HtmlToPdf exception Options
Aaron Fischer
Posted: Friday, November 20, 2015 1:15:15 PM
Rank: Newbie
Groups: Member

Joined: 8/6/2013
Posts: 4
we have customers getting an exception when loading a html file with no url or external content.
Eo.Pdf.HtmlToPdfException: Conversion failed. The operation has timed out. ---> System.Exception: The operation has timed out.

What causes this exception?
eo_support
Posted: Friday, November 20, 2015 4:26:37 PM
Rank: Administration
Groups: Administration

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

This can be a simple server overload or a problem in the converter. If you see this problem sporadically, then most likely it's a temporarly server overload. In that case the only solution is to reduce load. However if you see this problem very often and once it happens, the converter does not recover (for example, the converter no longer works until restart), then please try to create a test project to reproduce the problem. Once we have the test project, we will look into it as soon as possible. See here for more information on how to send us test project:

http://www.essentialobjects.com/forum/moderate_index.aspx

Thanks!
Aaron Fischer
Posted: Monday, November 23, 2015 5:12:11 PM
Rank: Newbie
Groups: Member

Joined: 8/6/2013
Posts: 4
Not every computer seems to see this issue. but we read a file from disk and load it's content into a string that we then pass to the eo object HtmlToPdf::ConvertHtml. the html pages are self contained so they don't have any additional resources to load. So I don't think this will be a server issue?

Thanks
eo_support
Posted: Tuesday, November 24, 2015 10:28:19 AM
Rank: Administration
Groups: Administration

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

Please download the latest build from our download page (2015.3.24.0) and see if that resolves the issue. We have just fixed an issue that can cause this problem. The root of the problem is internally we were holding a lock longer than needed, that in turn would cause some conversions to timeout in a heavy load environment. That part is optimized in the new build if that is the same cause for your case, then the new build should reduce the number of failures.

Thanks!
Aaron Fischer
Posted: Tuesday, November 24, 2015 11:15:39 AM
Rank: Newbie
Groups: Member

Joined: 8/6/2013
Posts: 4
On the new build we are now getting a converted file back but the component seems to still be running in the background and about 10-15 minutes after we run the code we get


Unknown Error

The details are as follows:

EO.Pdf.HtmlToPdfException: Conversion failed. The operation has timed out. ---> System.Exception: The operation has timed out.

at EO.Internal.aiw.a(alh A_0)

at EO.Internal.aiw.a(aiw A_0, alh A_1)

at EO.Internal.aiw.a(abc A_0, Boolean A_1, a41 A_2)

at EO.Internal.aiw.a(abc A_0, a41 A_1)

--- End of inner exception stack trace ---

at EO.Internal.aiw.a(abc A_0, a41 A_1)

at EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions A_0)

at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)

at EO.Pdf.HtmlToPdf.ConvertHtml(String html, String pdfFileName, HtmlToPdfOptions options)

at EO.Pdf.HtmlToPdf.ConvertHtml(String html, String pdfFileName)


The other thing of note is that our application is just desktop software and we process on file at a time synchronously.
eo_support
Posted: Tuesday, November 24, 2015 11:18:07 AM
Rank: Administration
Groups: Administration

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

Can you try to isolate the problem into a test project and send the test project to us? Please see here for more details on how to send test project to us:

http://www.essentialobjects.com/forum/test_project.aspx

Thanks!
Aaron Fischer
Posted: Tuesday, November 24, 2015 5:06:57 PM
Rank: Newbie
Groups: Member

Joined: 8/6/2013
Posts: 4
I'll work on getting a reproducible project but this is difficult not all systems see this. Below is our calling code.

CString str;
GetTempFileName(TempDir(), "Tra", 0, str.GetBuffer(MAX_PATH));
CString tempFile = TempDir() + "\\" + GetSplittedPath(str, PNT_FILE) + ".BigTrashToDelete.123.pdf";

EO::Pdf::HtmlToPdf::ConvertHtml(System::IO::File::ReadAllText(gcnew System::String(draggedFile)), gcnew System::String(tempFile));
eo_support
Posted: Tuesday, November 24, 2015 6:15:16 PM
Rank: Administration
Groups: Administration

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

We will try to reproduce it here. If we find anything we will reply again. For this kind of problem it's almost pointless without a reproducing project because without it we can't even confirm whether whatever we come up indeed fixes the problem. So if you come across something that would help reproducing the problem, please feel free to let us know.

Thanks!
Panda
Posted: Wednesday, November 25, 2015 10:14:04 PM
Rank: Advanced Member
Groups: Member

Joined: 10/7/2015
Posts: 35
From our experience, you should try v15.2.65 - which works for us, where all later versions produce this error.
eo_support
Posted: Thursday, December 10, 2015 9:45:18 PM
Rank: Administration
Groups: Administration

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

Please try the latest build from our download page (v15.3.43). I believe this build fixed this problem.

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.