Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Apr 28, 2021 12:07 pm

I can reproduce this with

static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Stopwatch watch = new Stopwatch();
string html = @"<strong>This is a test for converting HTML string to PDF </strong>";
HtmlConverter.PluginPath = "C:\\SpirePDFConvert\\plugins";
Spire.License.LicenseProvider.SetLicenseFileFullPath("C:\\SpirePDFConvert\\license.elic.xml");
using var ms = new MemoryStream();
for (int i = 0; i < 10; i++)
{
watch.Start();
Spire.Pdf.HtmlConverter.Qt.HtmlConverter.Convert(html, ms,false,10 * 1000,PdfPageSize.A4,new PdfMargins(0, 0),Spire.Pdf.HtmlConverter.LoadHtmlType.SourceCode);
watch.Stop();
long total = watch.ElapsedMilliseconds;
watch.Reset();
Console.WriteLine($"{total} ms");
}

}

This is an anonymous email - so I do not get spammed
Running slow on Windows Server 2016 Standard, running fine on a Windows Server 2016 Datacenter. both plenty of ram, disk and cpu

Output:
Hello World!
30598 ms
30161 ms

hizebob22
 
Posts: 2
Joined: Tue Apr 27, 2021 6:03 pm

Thu Apr 29, 2021 9:34 am

Hello Bob,

Thanks for your feedback.
I tested your code with the Windows Server 2016 Standard, but did not reproduce your problem. The conversion only cost 4178 ms, 3378 ms.... You mentioned that the Windows Server 2016 Datacenter has no problem, what is the time spent on this server? Here I uploaded my testing demo for your check. Please tell me the time you got while testing my demo. You could test the application several times to see if there's any difference. Looking forward to your feedback.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Thu May 06, 2021 9:13 am

Hello Bob,

Greetings from e-iceblue.
How is your issue going? Did you test the application and see a difference? Can you give us some feedback at your convenience? Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.PDF

cron