Hi Zhao,
Document pdf = new
Document();<o:p></o:p>
Aspose.Pdf.Page page = pdf.Pages.Add();
var html = new HtmlFragment("
for (int i = 0; i < 100; i++)
{
page.Paragraphs.Add(html);
}
pdf.Save(myDir+"HtmlFragmenttest.pdf");
Hi Tilal Ahmad,
Thanks for your reply.I think I probably know the reason.In my real machine test and 13 seconds.But the same code to test in the virtual machine is 40 seconds.
My virtual machine memory is 16G.So I think it has nothing to do with memory size.I guess our efficiency and memory on the actual performance?
Because of the virtual machine memory and the actual machine after all not the same.Because customers can install our products in their virtual machine.
So I think the problem still need to improve the best.Can be in your virtual machine test this problem.Look forward to your reply.Attachment is my virtual machine configuration information.
Hi Zhao,
Hi Zaho,
Stopwatch sw = new Stopwatch();<o:p></o:p>
sw.Start();
Document pdf = new Document();
Aspose.Pdf.Page page = pdf.Pages.Add();
var html = new HtmlFragment("
for (int i = 0; i < 100; i++)
{
page.Paragraphs.Add(html);
}
pdf.Save("C:/temp/HtmlFragmenttest.pdf");
sw.Stop();
Console.WriteLine(sw.Elapsed.TotalSeconds);
Console.ReadLine();
We are sorry for the inconvenience caused.
Best Regards,
Hi Tilal,
Hi Zhao,
Hi Zhao,
The issues you have found earlier (filed as PDFNET-40200) have been fixed in Aspose.PDF for .NET 18.5. This message was posted using BugNotificationTool by asad.ali
We also have this issue.
Using the latest Aspose,PDF for .net 18.5, it takes about 180 seconds for 1000 htmlfragments. This is the code I am using. Is there something I am doing wrong? Is this issue resolved?
This is the code I am using:
Stopwatch sw = new Stopwatch();
Aspose.Pdf.License license = new Aspose.Pdf.License()
{
Embedded = true
};
license.SetLicense("Aspose.Pdf.lic");
sw.Start();
Document pdf = new Document();
Page page = pdf.Pages.Add();
for (int i = 0; i < 1000; i++)
{
page.Paragraphs.Add(new HtmlFragment("aaa"));
}
pdf.Save("C:/temp/HtmlFragmenttest1.pdf");
sw.Stop();
Console.WriteLine(sw.Elapsed.TotalSeconds);
Console.ReadLine();
Machine is a i5-5300U with 12GB of RAM
Thanks for contacting support.
We managed to observe the delay in PDF Generation while using HtmlFragment
and logged a performance issue as PDFNET-44828 in our issue tracking system. We will further investigate the reasons behind this behavior of the API and keep you informed with the status of ticket resolution. Please be patient and spare us little time.
We are sorry for the inconvenience.