Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

print html with vb.net

Posted on 2011-09-02
3
Medium Priority
?
385 Views
Last Modified: 2012-05-12
I have created a report that is formatted as html.  I need to print this using vb.net 2008.  The report is in memory, not a file or in a browser control.  Any guidance appreciated.

0
Comment
Question by:dhenderson12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
Ambusy earned 2000 total points
ID: 36477210
Create a System.Windows.Forms.WebBrowser.
Write the HTML to a file (in your temp directory).
specify the file as the source for the webbrowser.  
WebBrowser.Url = New Uri(wrkFileName)

Open in new window

print it using:
 WebBrowser.ShowPageSetupDialog()
WebBrowser.Print()

Open in new window

0
 

Author Comment

by:dhenderson12
ID: 36477798
good call.  actually you can just use the webbrowser.documenttext to load memory html and then just call the print() method.  

thx for the help
0
 
LVL 4

Expert Comment

by:Ambusy
ID: 36478163
did not know about the documenttext, will try it. I saved my text first! thank you too.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

715 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