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.
Unfortunately, activation email could not send to your email. Please try again.

ConvertToImage error

Thread ID:

Created:

Updated:

Platform:

Replies:

78339 Dec 9,2008 02:09 PM Dec 18,2008 11:34 PM ASP.NET Web Forms (Classic) 3
loading
Tags: PDF
Administrator [Syncfusion]
Asked On December 9, 2008 02:09 PM

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 06:06 AM

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



Administrator [Syncfusion]
Replied On December 18, 2008 03:31 PM

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 18, 2008 11:34 PM

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


CONFIRMATION

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.

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.

;