|
Rank: Member Groups: Member
Joined: 9/5/2013 Posts: 10
|
I am having trouble with eo.pdf. It works fine on my local computer, but when I deploy it to a production server (windows server 2003) then it times out, so I'm assuming that it is locking for some reason. I can open the html in a browser on the production server and it works fine. The error message that it returns is:
Unhandled Exception: EO.Pdf.HtmlToPdfException: Convertion failed. The operation has timed out. ---> System.Exception: The operation has timed out. at EO.Pdf.Internal.lr.a(a A_0) at EO.Pdf.HtmlToPdfSession.a(a A_0) at EO.Pdf.Internal.lx.b(String A_0) at EO.Pdf.Internal.lx.d() --- End of inner exception stack trace --- at EO.Pdf.HtmlToPdfException.b(Exception A_0) at EO.Pdf.Internal.lx.d() at EO.Pdf.HtmlToPdfSession.RenderAsPDF(PdfDocument doc) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, String pdfFileName, HtmlToPdfOptions options) at EOPDF.Program.Main(String[] args) in c:\Users\braden.eriksen\Documents\Visual Studio 2012\Projects\EOPDF\EOPDF\Program.cs:line 22
The application is very simple:
var html = "<img src='http://www.buffalocomputerconsulting.com/images/computer.jpg'/><img src='http://westfordcomputer.com/images/Understanding-Your-Computer.jpg'/>";
var savePath = "test.pdf";
HtmlToPdf.ConvertHtml(html, savePath, options);
I can provide a test application if that would help, but it is working everywhere except for one server, which can access the two images being referenced. The application will work when the html only contains one of those images, but not both.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
|
|
Rank: Member Groups: Member
Joined: 9/5/2013 Posts: 10
|
If you are asking if I can access the 2 images from the server that this is having a problem on, then yes I can. The conversion also works fine if I include only one of the listed images (either one works), but fails when both are present, which would indicate that eo.pdf is able to reach both of those images from the server.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
That's still not normal because only two pictures should not take that long. You can increase HtmlToPdf.Options.MaxLoadWaitTime to increase the time out value, but you definitely want to find out why it takes so long to load a picture. You may want to check your IIS log to see if you can find out what's taking time. For the converter side, it spends most of the time waiting your server to send the picture, so usually a time out error is caused by the server being slow to respond the request.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 9/5/2013 Posts: 10
|
Those images load very quickly. They're not even mine, they're from other sites that are publicly accessible. The conversion works very quickly if only 1 image is included in the html, or if I include both images and run it from any other location but this one server. It's also not specific to these 2 images either. I've tried with other images and get the same result, that when a specific threshold of number of external images are included, the conversion fails on this one server.
Also, increasing the MaxLoadWaitTime is not a valid solution, since it already sits there and waits around 5 minutes by default for these 2 images to load before timing out.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
I am not sure what else to tell you. If the converter runs fine without delay from any other server but not from that server, then its almost certain that there is some network problem on that server. There is no option or whatsoever that we can make it work on the converter if the underlying network has a problem. I would recommend you to run a network analyzer (package monitor) to monitor the network traffic while the converter runs to see if you can find out what's causing the delay.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 9/5/2013 Posts: 10
|
We installed a packet sniffer on the server with the issue and tracked the application. We were able to see a web request for both of the images along with a final 200 status for both of them, signifying that eo.pdf downloaded both images successfully, however eo.pdf still threw the timeout error. This does not appear to be a problem with the network on that server.
|
|
Rank: Member Groups: Member
Joined: 9/5/2013 Posts: 10
|
Any further thoughts on what the problem could be? We have purchased the enterprise license, but that doesn't really help us if we can't use it on our production server...
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
The only thing we can do is to take a look of your server. Logically it is not possible for you to receive time out error if both images are served by your web server very quickly, and as a matter of fact, we have never seen that happen before. As far as we know, when you receive a time out error with just two images (assuming they are not humongous images such as 100M each), it's always a network problem. Obviously we are not in a position to troubleshoot a network error on your server, it's both beyond the scope of our responsibility and the scope of our expertise.
If you really believe this has to do with our product, you can open up terminal service on your server and send us the login information through private message, along with steps to reproduce the problem and information about the tools that you use to track the packages. We will login into your server to run the test and see what we can find. If it is indeed a problem on our side, we will try to track to the root of the problem, fix it and also need to use the same environment to positively verify the fix does resolve the problem for you.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 9/5/2013 Posts: 10
|
It looks like I am now starting to go backwards. I can no longer get any eo.pdf application to run on this server. It just throws this error:
Unhandled Exception: EO.Pdf.HtmlToPdfException: Convertion failed. Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at EO.Pdf.Internal.gf.a(Char A_0, Boolean A_1) at EO.Pdf.Internal.fo.a(String A_0, Boolean A_1, gf A_2, Single A_3, Int32[] A_4, Int32 A_5, Single& A_6) at EO.Pdf.Internal.fo.b(kd A_0) at EO.Pdf.Internal.fo.a(ka[] A_0) at EO.Pdf.Internal.fo..ctor(lx A_0, Boolean A_1, Int32 A_2, kz A_3, Int32 A_4, Single A_5, Rectangle A_6, PdfPage A_7, fe A_8, Int32 A_9, Graphics A_10, Dictionary`2 A_11) at EO.Pdf.Internal.lx.a(PdfPage A_0, Boolean A_1, Int32 A_2, Rectangle A_3, kz A_4, hd A_5, Graphics A_6) at EO.Pdf.Internal.lx.a(Int32 A_0, HtmlToPdfResult A_1) at EO.Pdf.Internal.lx.d() --- End of inner exception stack trace --- at EO.Pdf.HtmlToPdfException.b(Exception A_0) at EO.Pdf.Internal.lx.d() at EO.Pdf.HtmlToPdfSession.RenderAsPDF(PdfDocument doc) 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) at EOPDF.Program.Main(String[] args)
My application is as simple as this:
var html = "<div>Hello World!</div>"; var pdf = "test.pdf"; HtmlToPdf.ConvertHtml(html, pdf);
This works locally and on another server that we have just fine. It is only throwing the exception on the one server.
|
|
Rank: Member Groups: Member
Joined: 9/5/2013 Posts: 10
|
I also tried to download the free conversion tool that you publish, and was able to get it to run on my local computer without a problem. When I deployed it to the server with the problem though, it threw this error while it was trying to download the update.
Error while downloading updates from the server :Unable to read data from the transport connection: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.. Please try again later.
After saying ok, this other error pops up:
An error has occurred. Error message:System.ApplicationException: Zip-file is broken at EO.Pdf.ManagedLoader.UnZipper.LimitedStream.SeekToEnd() at EO.Pdf.ManagedLoader.UnZipper.<UnZip>d__0.MoveNext() at EO.Pdf.ManagedLoader.UnZipper.UnZipTo(Stream zipStream, String destinationPath) at EO.Pdf.ManagedLoader.UnZipper.UnZipTo(String zipFilePath, String destinationPath) at EO.Apps.Package.Install() at EO.Apps.Main.UnsafeStart(String[] args) at EO.Apps.Main.Start(String[] args)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
There is definitely something wrong with that server. The first error occurs when there is no glyph table in the default font (which should be "Times New Roman"). The second error indicated the file the package that the free HTML to PDF tool downloads from our server is corrupted (the free tool is just a small exe that downloads the actually conversion code and the relatively big EO.Pdf.dll from our server and then call that to do the conversion). Both indicates some serious problems with your server. The first problem might be related to permissions. So you will want to try to run your test app with administrator permissions and see if it works. The second problem should be something that your network administrator can troubleshoot easily: why a simple HTTP download ends up with a corrupted file. This might be the same root problem that was causing the initial time out error for you.
Thanks!
|
|