Hi,
Using EO.Pdf 2013.0.112/5.0.87.2 with Corporate License.
Test Code:
Code: C#
var options = new HtmlToPdfOptions();
options.TriggerMode = HtmlToPdfTriggerMode.Auto;
options.PageSize = PdfPageSizes.Letter;
options.OutputArea = new RectangleF(0.25f, 0.25f, PdfPageSizes.Letter.Width - (2f * 0.25f), PdfPageSizes.Letter.Height - (2f * 0.25f));
options.NoScript = false;
options.NoCache = false;
options.NoLink = false;
options.PreserveHighResImages = false;
options.MinLoadWaitTime = 250;
options.MaxLoadWaitTime = 300000;
var html = File.ReadAllText(@"C:\testfile.html");
using (var ms = new MemoryStream())
{
HtmlToPdf.ConvertHtml(html, ms, options);
File.WriteAllBytes(@"C:\testfile.pdf", ms.ToArray());
}
1st Run, ConvertHtml time: 8.4 seconds
2nd Run, ConvertHtml time: 7.4 seconds
Test File:
Test File -
Test File (mirror)I am investigating "slowness" with generating very large PDFs from HTML. I was curious if you could guide me on any improvements I could make to reduce time. And possibly profile the library to see if there are any real bottlenecks or issues. A welcome enhancement to the library would be a way to output metrics (Elapsed time) of the actions during the conversion process.
This test file is a very basic file, it has no links, images or styles. The html we use in production are more complex with styles and images so their time is greater and we want to go bigger. We were getting around 18 seconds total time that the conversion takes but they also had to fetch js, css, and images and generally more complex. It would be great to reduce the time overall.
Thanks.