Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to print an HTML file from a VB.Net app?

Status
Not open for further replies.

PPettit

IS-IT--Management
Sep 13, 2003
511
US
I need to be able to print an html document from my VB.Net app.

I tried using this:
Code:
WebBrowser1.Navigate("c:\windows\temp\MSWOBReport.html")
WebBrowser1.Print()

The page shows up in the browser control, but it lacks some formatting elements (via CSS) and doesn't appear to even attempt to print.

Am I missing something? Is there a better way to print the document?

 
Do you have control over the content of your html page? Can you add a
Code:
 <a href='Javascript:Print()'>Print</a>
link to that page?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top