Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies within .NET ( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Thu May 10, 2012 7:09 pm


When I try to use LoadFromHtml() or LoadFromBytes() to convert from HTML to a PDF, I get the following error:

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

I am new to your components, so I tried your samples, and they are returning the exact same thing.

We are under a very tight deadline, and are evaluating your components, but if this does not get resolved fast, I have to find a different solution (we have used some that convert from HTML to PDF, but we would also like the option of converting to word and other formats, and from reading, you components are what we are looking for.

I am not sure what to try or even to look at, I don't see anything about this error in your help documents.


Posts: 2
Joined: Thu May 03, 2012 5:26 pm

Fri May 11, 2012 2:54 am

Hi glenko,

We are so sorry for the unconvenience caused for you and have set about to handling it, however we are unable to reproduce this issue without your original html or bytes data. So could you please send us part of your original data information to help us reproduce this issue?

e-iceblue support

Posts: 17
Joined: Tue Apr 24, 2012 4:53 am

Fri May 11, 2012 1:39 pm

Just use your sample. I get the exact same error trying to run your FromHTML-VS2010 sample project.

Dim doc As New PdfDocument()

Dim url As String = "http://www.e-iceblue.com/"
doc.LoadFromHTML(url, False, True, True) 'This is the line with the exception

'Save pdf file.

'Launching the Pdf file.

Exception Details:
System.Runtime.InteropServices.COMException crossed a native/managed boundary
Message=Error HRESULT E_FAIL has been returned from a call to a COM component.
at System.Windows.Forms.UnsafeNativeMethods.IWebBrowser2.Refresh()
at System.Windows.Forms.WebBrowser.Refresh()

Posts: 2
Joined: Thu May 03, 2012 5:26 pm

Mon May 14, 2012 9:20 am

Hello glenko,

Thanks for your feedback.

This issue maybe caused by the configuration of your computer as we can run the sample fine. So would you please tell us more information(what is your operating system, 64bit/32bit? The version of the IE you used, which target framework you used etc) to help us better resolve this issue?

Thanks for your patience and cooperation.

Have a nice day.

Kind Regards.
e-iceblue support
User avatar

Posts: 154
Joined: Thu Oct 20, 2011 2:53 am

Return to Spire.PDF