Rank: Member Groups: Member
Joined: 6/22/2011 Posts: 22
|
Hello. We recently upgraded from version 3.0.48.2 to version 4.0.12.2. We are experiencing performance issues with HtmlToPdf.ConvertHtml with the new version that we did not have with the old version.
To give you an example, I can pass "<html><head></head><body></body></html>" to the new version and it will take 14 seconds to convert. I pass this same string to the old version and it completes in under a second.
Any thoughts?
Thank you!
Sara
|
Rank: Member Groups: Member
Joined: 6/22/2011 Posts: 22
|
I did a little more testing an narrowed this issue down to setting the 'NoScript' option.
Consider this code: Console.ReadLine(); string html = "<html><head></head><body></body></html>"; PdfDocument doc = new PdfDocument(); doc.Info.Author = "x"; doc.Info.Subject = "x"; doc.Info.Title = "x"; doc.Info.Keywords = "x"; doc.Info.Creator = "x"; doc.Info.Producer = "x"; doc.Info.CreationDate = DateTime.Now; doc.Info.ModifiedDate = DateTime.Now;
HtmlToPdf.Options.BaseUrl = "http\\www.something.com"; HtmlToPdf.Options.OutputArea = new RectangleF(0.5F, 0.4F, 7.5F, 10.6F); HtmlToPdf.Options.NoLink = true; HtmlToPdf.Options.NoScript = true;
while (quit.ToUpper() != "X") { Console.WriteLine(string.Format("calling html to pdf: {0}", DateTime.Now)); HtmlToPdf.ConvertHtml(html, doc); Console.WriteLine(string.Format("html to pdf done: {0}", DateTime.Now)); quit = Console.ReadLine(); }
If I run this without setting HtmlToPdf.Options.NoScript , it runs just fine with either version of EO.Pdf. If I keep this setting, the 4.0.12.2 version takes a 14 seconds or so to render, while the 3.0.48.2 version renders just fine.
Thanks!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
I believe this is a bug that has already been fixed. Please download the latest build from our download page and see if that works for you.
Thanks!
|
Rank: Member Groups: Member
Joined: 6/22/2011 Posts: 22
|
Thank you! That does fix the issue. I apologize for not looking for a newer release and trying that first!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
No problem. Please feel free to let us know if there is anything else.
Thanks!
|