C# print html document from html string -


string s="<html><body>..some html code..</body></html>"; 

how print document without printdialog?

output: ...some html code...

as understood correctly, need webbrowser class:

webbrowser webbrowser = new webbrowser(); void print(string str) {    webbrowser.documenttext = str;    webbrowser.documentcompleted += webbrowser_documentcompleted; } void webbrowser_documentcompleted(object sender, webbrowserdocumentcompletedeventargs e) {    webbrowser.print(); } 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -