When converting .html documents to PDF using Spire.Office 10.8.0 with QTPlugin in a .NET Framework 4.8 WCF application, the conversion completes successfully but the Html2Pdf.exe process started during conversion never terminates.
Each subsequent .html conversion spawns a new Html2Pdf.exe process, which remains active, leading to progressive RAM consumption until the server runs out of memory.
Environment:
- Product: Spire.Office 10.8.0
Framework: .NET Framework 4.8 (v4.8.04161)
OS: Windows Server 2022 Standard, Version 21H2, OS Build 20348.3932
Architecture: x64
Application Type: WCF Application
Technical Details:
- Faulting Application: Html2Pdf.exe
Faulting Module: Qt5WebEngineCore.dll (v5.14.2.0)
Exception Code: 0x80000003
Fault Offset: 0x000000000020620ee
Event Viewer: Application Error (Event 1000) and Windows Error Reporting (Event 1001) attached.
Reference code:
- Code: Select all
using (MemoryStream ms = new MemoryStream())
{
HtmlConverter.Convert(
url: <html string>,
stream: ms,
enableJavaScript: false,
timeout: 100000,
pageSize: PdfPageSize.A4,
margins: new PdfMargins(0),
urlHtml: LoadHtmlType.SourceCode);
return ms.ToArray();
}