|
Rank: Newbie Groups: Member
Joined: 7/26/2012 Posts: 5
|
I'm using HtmlToPdf to convert a very small string of html to a PDF and am getting the error "The operation has timed out" with the following detail: at EO.Pdf.Internal.lo.a(a A_0) at EO.Pdf.Internal.lo.a(cp A_0) at EO.Pdf.HtmlToPdfSession.Dispose() at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, String pdfFileName)
I'm using the following code: EO.Pdf.HtmlToPdf.Options.PageSize = new System.Drawing.SizeF((float)3, (float)2); EO.Pdf.HtmlToPdf.ConvertHtml("<html><body><b>Test Message</b></body></html>", WebFileSaveLocation + "Test.pdf");
WebFileSaveLocation is a directory in the website. I've experimented writing files and I don't believe it is a file permissions issue with the output PDF.
The code works fine in our development and test environments, but it becomes an issue in our production environment.
I'm running version 4.0.23.2 in all the environments and am using a license key we bought approx 2 weeks ago.
Let me know if there is any additional information you need.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Do you get the problem every time you call ConvertHtml or it only occurs randomly?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/26/2012 Posts: 5
|
It happens every time.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We have not been able to reproduce this problem. Will you be able to create a test project on your server to demonstrate the problem and give us FTP access to that test project?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/26/2012 Posts: 5
|
I'm not sure if I'm going to get permission with the ftp access but I'm still trying. Does the dll make any attempt to call out to verify the license information? We're wondering if it requires some ports to be open for it to communicate back to you.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
No. It doesn't call out. Make sure you update to the latest build first though. We have fixed something similar (but with a different error message) recently, it might be related to your issue. So try that first.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/26/2012 Posts: 5
|
The issue ended up being that I wasn't setting OutputArea. If the PageSize was small, it wasn't a problem, but when I started getting to larger PageSizes like 3 inches x 3 inches, it was causing the dll to hang when trying to produce the PDF. Once I started setting the OutputArea, I haven't had any problems on any size.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Glad that you got it working. However your solution does not make sense. Setting OutputArea has nothing to do with time out.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 7/26/2012 Posts: 5
|
The only thing I could think was that it was timing out because it was encountering some kind of an error inside the dll that wasn't being handled. I didn't know how many people actually use the component to do pdfs smaller than a full page size so I figured maybe the scenario I was using hasn't been used/tested much. However, that is obviously a wild guess on my part. And like you said, I got it working so I didn't try to make too much sense out of it.
Even with this small snag, you component has been a saved me tons of development time and aggrivation over the other method we started with.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Glad to hear that! Please feel free to let us know if there is anything else.
|
|