Converting HTML to PDF takes a long time

Hello,


I’m converting an html document to pdf using the following code and it is taking well over a minute to generate the file using aspose.pdf 11.3.0.0 but only 6-8 seconds when using Aspose.pdf.generator. Are there any settings I can modify to reduce the amount of processing time?

var options = new HtmlLoadOptions();
options.PageInfo.IsLandscape = true;
options.PageInfo.Width = PageSize.A2.Height;
options.PageInfo.Height = PageSize.A2.Width;
options.PageInfo.Margin.Left = 10;
options.PageInfo.Margin.Right = 10;
options.PageInfo.Margin.Top = 265;
options.PageInfo.Margin.Bottom = 100;
options.InputEncoding = “UTF-8”;

var doc = new Document(@“c:\body2.html”, options);

(html and css are attached)

Hi Torre,


Thanks for contacting support.

I have tested the scenario and I am able to
notice the same problem that conversion process takes around 52 seconds when using new DOM approach of Aspose.Pdf namespace. For the sake of correction, I have logged this problem
as
PDFNEWNET-40364 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.

The issues you have found earlier (filed as PDFNET-40364) have been fixed in Aspose.PDF for .NET 22.6.