views:

27

answers:

1

I want to print data present in Webbrowser Control. My data is loaded from datatable which contains HTML formatted text. When I tried to print it with RichTextBox it was not able to recognize HTML controls and was not able to render.

But when I tried to print using webbrowser control, noting gets printed. How to achieve this.

webBrowser1.DocumentText = dt.Rows[0].Field<string>("WAIVER_TERMS");
webBrowser1.Print()
A: 

Did you try IWebBrowser2.ExecWB(OLECMDID_PRINT)? It should work, I've used succesully many time.

Dmitry Karpezo
No, I didnt used it. How does it works.
Shantanu Gupta