- Home
- Forum
- ASP.NET Web Forms (Classic)
- ConvertToImage error
ConvertToImage error
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);
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);
SIGN IN To post a reply.
3 Replies
BP
Bhuvaneswari 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
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
AD
Administrator
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?
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?
BP
Bhuvaneswari P
Syncfusion Team
December 19, 2008 04:34 AM UTC
Hi AdamR,
Thanks for the update.
We have provided article for HTML to PDF conversion. There we mentioned some solution for these kind of issues. Please have a look into the article and try using and let us know if this helps you.
http://www.syncfusion.com/products/PDF/Backoffice/Articles/html_to_pdf.aspx
Best Regards,
Bhuvana
Thanks for the update.
We have provided article for HTML to PDF conversion. There we mentioned some solution for these kind of issues. Please have a look into the article and try using and let us know if this helps you.
http://www.syncfusion.com/products/PDF/Backoffice/Articles/html_to_pdf.aspx
Best Regards,
Bhuvana
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
AD Administrator
- Dec 9, 2008 07:09 PM UTC
- Dec 19, 2008 04:34 AM UTC