Capture an HTML document as an image

K

kelly

I posted this question in the interop forum but am not getting any
answers and my deadline is quickly approaching.

I need my Web Application to be able to create a full page image of a
given web page. This will be used to perform a fax. I have located
several articles about this giving sample code using shdocvw.WebBrowser
to navigate to the target html and then grabbing the render object to
paint onto the device context of our choice.

I am currently attempting to use this method, but my problem is that I
can't get a valid
IHTMLElementRender object so i can perform the render. It gives me an
invalidcastexception.

Here's the offending line:
Dim render As IHTMLElementRender = CType(elmnt, IHTMLElementRender)

Can anyone help me with this?

(Any VB or C# responses are welcome.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top