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. Image for the cookie policy date
close icon

Subject: Error HRESULT E_FAIL has been returned from a call to a COM component

Hi,

I have been running Syncfusion Essential PDf version 6.4.0 on a Windows 2003 64 bit server for some months without any problems.

Now, however, calls to the HtmlConverter.ConvertToImage() or Convert() functions fail with the message 'Error HRESULT E_FAIL has been returned from a call to a COM component'

The program and components are unchanged and still work perfectly on the developement machine (Windows XP). The server has had the usual updates and presumably one of these has caused the problem. The Internet Explorer version is 7.0.5730.13 64 bit.

Any help you can give will be appreciated.

Peter Mitchison

12 Replies

TE Thiruvenkadam E Syncfusion Team October 14, 2009 10:55 AM UTC

Hi Peter,

Thank you for your interest in Syncfusion products.

HRESULT E_FAIL error

I am afraid that I was not able to reproduce the reported issue in our side.

The conversion from HTML to PDF is achieved as follows :

1) HTML Pages specified in the URL is first imported to PDF with the help of "HtmlConverter.Base.dll".
2) The HtmlConverter uses the MSHTML (Is a engine used to drive the browser) library which renders the HTML page.
3) HTMLConverter converts the HTML page to bitmap image or as a metafile image.
4) The Image is then rendered into the PDF document.

Please do find the sample from the below specified location which demonstrates the Html To PDF feature.

http://files.syncfusion.com/support/pdf.Windows/I58121/HtmlToPdf.zip

Can you check whether you have the Microsoft.MsHTML.dll present in the webserver GAC. If you could not find there, Please drag and drop this assembly from the below location on
to GAC.

[Default Drive] or C:\Program Files\Microsoft.NET\Primary Interop Assemblies

Basically, the Microsoft.MSHTML.dll should be present in the GAC.

Also can you add the AspCompact="true" attribute to the page directive in Default.aspx file.

Could you please look at the below location if you need more information about HtmltoPDF conversion.

http://help.syncfusion.com/UG/Reporting/PDF/ASP.NET/Documents/441htmltopdf.htm

Please have a look at the above sample and if still the issue exists,

Could you please try to reproducing it in the above sample or send us html files so that we could sort out the cause of the issue and provide you a solution?

Please let us know if you need any further information.

Regards,
Thiru


PM Peter Mitchison October 14, 2009 03:31 PM UTC

Attached is the code that fails. This is just one of the problem files. I have simplified it down to the minimum and checked that it still works on the devlopement machine. It is on the server at http://www.gsfw.co.uk/outline.aspx where it does not work. At the moment it just hangs.

I have uploaded and installed version 7.3.0.20 of the Essential PDF software after uninstalling the previous version. The program files and the assemblies from the developement machine have been uploaded to the server. All the current updates have been applied to the server including IE8.

I have run CCleaner on it and it corrected some problems with .Net framework 1.1. The site in question uses .Net 2.0

Microsoft.mshtml version 7.0.3300.0 is in the windows\assembly folder. there is no .dll in the name.

I can't think of anything else to do. Please help.

Regards

Peter





outline_d8aac06.zip


PM Peter Mitchison October 15, 2009 09:37 AM UTC

Attached is the event viewer log from the Essential PDF setup. It shows an error even though the process appeared to complete normally.

Regards

Peter Mitchison




install log_cbef7134.zip


TE Thiruvenkadam E Syncfusion Team October 15, 2009 12:32 PM UTC

Hi Peter,

Could you please find the sample application from the below location and let us know if this helps.

http://files.syncfusion.com/support/pdf.Web/F90723/outline_d8aac06.zip

Please try with this and let us know if you need any further information.

Regards,
Thiru


PM Peter Mitchison October 15, 2009 01:48 PM UTC

Hi,

I set up your files as a new application at an unused domain on the same server. The address is

http://www.hypashots.net/outline.aspx

The result is the same as before. There is also a modified file called outline_2.aspx that has the pdf conversion remmed out to prove that the .net is working.

I have set up an FTP account at www.hypashots.net with a user name of 'hypashots' and password 'pdf' so you can make any changes you want to.

Rgards

Peter Mitchison


KM Karthik M Syncfusion Team October 16, 2009 07:15 AM UTC

Hi Peter,

We suspect that this issue could be related due to some sort of security related issue. Basically, Windows 2003 server has a another layer of security which will not present in the XP machines.

Could you please try disabling Internet Explorer's Enhanced Security as described in the following link and let us know if this helps.

http://www.visualwin.com/IE-enhanced-security/

Regards,
Karthik


PM Peter Mitchison October 16, 2009 09:51 AM UTC

Karthik

I have uninstalled IE enhanced security but with no effect. Is ther anything else I can try?

Regards

Peter


PM Peter Mitchison October 19, 2009 08:45 AM UTC

Problem solved. I had a look at the security settings for the bin folder. The web user did not read/write/execute permissions. I set them up and everything worked.

I do not remember having to do this before. Are bin folders normally set up this way or is this a new requirement?

Regards

Peter Mitchison


TE Thiruvenkadam E Syncfusion Team October 19, 2009 01:13 PM UTC

Hi Peter,

We are currently working on this and we will update the status of the same on or before 20-oct-2009.

Please let us know if you need any further infomrmation.

Regards,
Thiru


DM Dan Mu October 21, 2009 10:56 AM UTC

hi,
I have the same problem, but on my Windows XP (+ Visual Studio 2008) development virtual machine.

i have a page with 'generate report' button, when in the click event, i want to pdf another page (eg. http://localhost/report.aspx).

it works when i give an external url (eg. http://www.google.com) but fails with an exception when i give my internal URL.

any help much appreciated,
dan


DM Dan Mu October 23, 2009 10:42 AM UTC

ok i dont know how (maybe a reboot solved it), but it works now. probably a microsoft special :)
thanks.
dan


TE Thiruvenkadam E Syncfusion Team October 29, 2009 07:12 AM UTC

Hi Dan

Thanks for the update.

We are glad to hear that your problem has been resolved. Please do not hesitate to contact us if you ever need further assistance from us.

Please let us know if you have any queries.

Regards,
Thiru

Loader.
Live Chat Icon For mobile
Up arrow icon