Reputation: 375
Is there a way to parse html content which contains css and javascript, and then print it without having the computer to display the print dialog using c# desktop program?
The html may contain javascript that manipulate the DOM. For example :
<html><body><h1>Title</h1><script>document.write(Math.random())</script></body></html>
Upvotes: 0
Views: 115
Reputation: 624
You want to load it into a WebBrowser object and then call the Print method
Although if you don't like IE you might want to look at Replacing .NET WebBrowser control with a better browser, like Chrome? for alternatives.
Upvotes: 1