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 Jul 13, 2022 1:41 pm

I have created a .net core 3.1 web application to convert html string into PDF. All working fine on my local machine as well as in the 64 bit server (Hosted in IIS). It just two pages pdf.

But in the server it always has multiple Html2Pdf.exe in task manager and the converting process is very slow.

I could not find any reason for this. So I requested a trace from IT department when generating the pdf and saw lot of no successful results. Please take a look at the attached file and advise me what needs to be done to prevent this.

Please note this is not live yet because of this issue. Please help as soon as possible.

arshathshameer
 
Posts: 4
Joined: Wed Jul 13, 2022 1:18 pm

Thu Jul 14, 2022 1:26 am

Hello,

Thanks for your inquiry.

I did some simple tests and didn't run into this problem. Can you please tell me the specific system version of your server? I will try to reproduce this issue.
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Thu Jul 14, 2022 3:35 am

Server details: 2019 64 bit server.

My concern here is attached in the excel sheet. Please look into it. Html2Pdf.exe process complaining about many things. Am i missing something on the server?

For an example it says ACCESS DENIED for RegOpenKey "HKLM\System\CurrentControlSet\Services\WinSock2\Parameters"

Please filter by "Result" header in the attached excel and get back to me, if you see any solution for me please. This is urgent for me.

arshathshameer
 
Posts: 4
Joined: Wed Jul 13, 2022 1:18 pm

Thu Jul 14, 2022 9:58 am

Hello.

Sorry for the late reply.
I looked at the log information in your attachment, but I didn't find any useful clues. I created a virtual machine of Windows Server 2019. Then created a .NET CORE 3.1 based Web API project for converting HTML strings to PDF and tested it several times in Windows Server 2019. But I don't see multiple "Html2Pdf.exe" in task manager. I suggest you try to update Spire.PDF and QT plugin first. You can search Spire.PDF directly from Nuget to get the latest version of it. For newer versions of the QT plugin, you can get it via the link I've shared below. Hope it helps you.

Code: Select all
https://drive.google.com/file/d/1EL7tkC3RmS3ouuXORXVREZ2-oShtJGLR/view?usp=sharing
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Thu Jul 14, 2022 10:18 am

Yes I have updated the plugin to latest 8.2.0 and also pointing to plugin folder through the path using below code.

HtmlConverter.PluginPath = "path of the new plugin folder".

But still I encounter the slowness and task manager has multiple "Html2Pdf.exe" processes.

Do I need to check anything in the server? I have installed .net core 3.1 hosting bundle. Do you think it needs .net core 2. hosting bundle as well?

I have attached how I'm merging two PDF pages as well after converting it to pdf. let me know if anything needs to be done over there. But this is working fine in my local environment.

arshathshameer
 
Posts: 4
Joined: Wed Jul 13, 2022 1:18 pm

Thu Jul 14, 2022 10:31 am

Installing .net core 2.2 hosting bundle also did not help

arshathshameer
 
Posts: 4
Joined: Wed Jul 13, 2022 1:18 pm

Mon Jul 18, 2022 6:19 am

Hi,

Sorry for the late reply.

According to your code I did some tests but still not reproduce the issue. And the lastest version of Spire.PDF is v8.7.2 instead of v8.2.0. You can download it from the links below. Please give it a try.
Website:
Code: Select all
https://www.e-iceblue.com/Download/download-pdf-for-net-now.html

Nuget:
Code: Select all
https://www.nuget.org/packages/Spire.PDF/8.7.2


Here are some screenshots for my test.

Below is my server information.
OS_info.png

Below is my test code. I modified only the file names and paths.
TestCode.png

Below is the status of task manager when converting html to pdf. There is only one "Html2Pdf.exe" and it disappeared soon after the result PDF files generated.
taskmanager_when_converting.png
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Return to Spire.PDF