how to print html file in C#

Posted on 2011-10-06
Last Modified: 2013-12-14
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
Question by:dpatel_team
    LVL 29

    Expert Comment

    LVL 16

    Accepted Solution

    You have one more option. Open the html page using Process.Start method

    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

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project ( automates most of the tasks discussed in this article. You can even fin…
    How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from ( Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
    The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now