neodammer Posted April 12, 2005 Posted April 12, 2005 Synopsis: I have successfully gotten a .txt file from my site and displayed in a text box. Now i need to print that .txt file in my default printer. Code: Dim printFont As System.Drawing.Font Dim sr As System.IO.StreamReader Dim wc As New System.Net.WebClient Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage readmeh = New System.IO.StreamReader(wc.OpenRead ("http://mysite/text.txt")) printFont = New System.Drawing.Font("Arial", 10) e.Graphics.DrawString(SR, printFont, Brushes.Maroon, 1, 1) End Sub Question: Everything is ok except it seems only strings can be printed this way with e.graphics etc.. anyway of storing that streamreader to a string? :cool: Quote Enzin Research and Development
neodammer Posted April 12, 2005 Author Posted April 12, 2005 nevermind figured it out using msdn library ..thats a good resource..i might start using it rofl Quote Enzin Research and Development
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.