I want to print data present in Webbrowser Control. My data is loaded from datatable which contains HTML formatted text. When I tried t开发者_Python百科o 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()
Did you try IWebBrowser2.ExecWB(OLECMDID_PRINT)
? It should work, I've used succesully many time.
精彩评论