Welcome Guest Search | Active Topics | Sign In | Register

HtmlToPdf Performance Options
Sara
Posted: Wednesday, July 25, 2012 1:47:13 PM
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
Sara
Posted: Wednesday, July 25, 2012 5:07:09 PM
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!
eo_support
Posted: Wednesday, July 25, 2012 5:26:46 PM
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!
Sara
Posted: Thursday, July 26, 2012 9:46:00 AM
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!
eo_support
Posted: Thursday, July 26, 2012 9:48:02 AM
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!


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.