The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am trying to create a PDF by using the HTML image solution. This works for a while, and then sometimes it will randomly throw an "HRESULT E_FAIL" error message, and it won't work again until I re-upload the DLL.
Any suggestions?
This is the error message:
Error HRESULT E_FAIL has been returned from a call to a COM component.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
Here is my code:
// Convert the HTML to an image System.Drawing.Image htmlImage = html.ConvertToImage("URL", ImageType.Metafile, 800, -1);
BPBhuvaneswari P Syncfusion Team December 10, 2008 11:06 AM UTC
Hi AdamR,
Thank you for your interest in Syncfusion products.
Could you please drag and drop the interop dlls [AxSHDocVw.dll and SHDocVw.dll ]to the GAC[C:\windows\assembly] and try to run the application and let us know if this helps you to resolve exception issue.
Best Regards, Bhuvana
ADAdministrator Syncfusion Team December 18, 2008 08:31 PM UTC
Hi Bhuvana,
Thanks for your support. I'm still getting the error after moving those files into the specified directory.
The error is occurring on a daily basis now. Even if I re-upload the DLLs to the \bin directory, I still get the error. I have a try{} catch{} around my code block that attempts to create the PDF, but I would really like this to be a consistent component.
Any other suggestions I might try?
BPBhuvaneswari P Syncfusion Team December 19, 2008 04:34 AM UTC