开发者

Printing content of WebBrowser Control in C#

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜