Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1240
  • Last Modified:

how to print html file in C#

would like to print file using PrintDocument in c# The file is simple html ( i need it because i need the text in the file will be located in specific location in the page) my question is how do I print the file so it will not print the html itself (tag etc.) but the html like it will show in web browser
1 Solution
Easwaran ParamasivamCommented:
You have one more option. Open the html page using Process.Start method http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start(v=vs.71).aspx

In the html page  have window.print() method in any of the buttonclick event or in pageload method.

That will print the html page itself.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now