We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ConvertToImage error

Thread ID:





78339 Dec 9,2008 07:09 PM UTC Dec 19,2008 04:34 AM UTC ASP.NET Web Forms (Classic) 3
Tags: PDF
Administrator [Syncfusion]
Asked On December 9, 2008 07:09 PM UTC

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);

Bhuvaneswari P [Syncfusion]
Replied On 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,

Administrator [Syncfusion]
Replied On 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?

Bhuvaneswari P [Syncfusion]
Replied On 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.

Best Regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon