PDF converter fails to convert Smartform to PDF
kbt142230
PRODUCTIssue
Using the Save as PDF control to convert the Smartform to PDF causes the Form to freeze and the PDF is not created.Symptoms
1. From the Windows Task Manager, it shows high CPU utilization by the ExpertPDF HTML to PDF Engine process.
2. When you forcibly kill the process, the error below appears in the Host Server logs and Sourcecode.SmartObjects.Services.PDFConverter.error file:
"System.Exception: Could not get conversion result header. Data receive timeout.
at ExpertPdf.HtmlToPdf.ImgConverter.GetMetafileFromUrlWithWebKit(String url, ᦔ[]& fonts, ᥱ& htmlParseInfo) at ExpertPdf.HtmlToPdf.PdfConverter.ConvertAndGetPdfDocument(String url, String htmlString, String baseUrl, String internalLinksDocUrl, Boolean fromUrl) at ExpertPdf.HtmlToPdf.PdfConverter.ConvertAndSaveToStream(Stream outStream, String url, String htmlString, String baseUrl, String internalLinksDocUrl, Boolean fromUrl) at ExpertPdf.HtmlToPdf.PdfConverter.GetPdfBytes(String url, String htmlString, String baseUrl, String internalLinksDocUrl, Boolean fromUrl) at ExpertPdf.HtmlToPdf.PdfConverter.GetPdfBytesFromUrl(String url) at SourceCode.SmartObjects.Services.PdfConverter.K2PdfConverter.CreatePDFString() at SourceCode.SmartObjects.Services.PdfConverter.K2PdfConverter.CreatePDF(Property[] inputs, ServiceObject serviceObject) at SourceCode.SmartObjects.Services.PdfConverter.DataConnector.Execute(Property[] inputs, RequiredProperties required, Property[] returns, ServiceObject serviceObject, String methodName) at SourceCode.SmartObjects.Services.PdfConverter.PdfConverterService.Execute()"
Troubleshooting Steps
The issue can occur if any of the following assemblies are of the wrong file version based on your version of K2 installed.
- Program Files (x86)K2 blackpearlHost ServerBinepengine.dll
- Program Files (x86)K2 blackpearlHost ServerBinephtmltopdf.dll
- Program Files (x86)K2 blackpearlServiceBrokerSourcecode.SmartObjects.Services.PDFConverter.dll
To resolve this, kindly follow these steps:
1. If you have another environment on the same K2 version (including any CU or FP installed) where PDF conversion is working fine, please compare the versions of the above-mentioned assemblies between both environments.
2. If any discrepancies with the versions are identified, replace the assembly with the correct one from the non-issue environment.
3. Perform a restart of the K2 service. Then, test the PDF conversion again.