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

Hi,

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.

Thanks!

glenko
 
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?

Regards
Eric
e-iceblue support

Eric
 
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.
doc.SaveToFile("FromHTML.pdf")
doc.Close()

'Launching the Pdf file.
PDFDocumentViewer("FromHTML.pdf")

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

glenko
 
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.
Suvi
e-iceblue support
User avatar

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

Return to Spire.PDF