Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: PrintDocument with a network printer


Message #1 by "Brian Dimarucot" <adimarucot@s...> on Thu, 18 Apr 2002 10:43:40
I wanna Print a certian document using 
a network printer, is this even possible?
I always get a "no printer installed" error.
What should I add to make this work?
Thanks in advance....

Here's my code...

streamToPrint = new System.IO.StreamReader("C:\\table.html");
try 
   {
     printFont = new System.Drawing.Font("Arial", 10);
     PrintDocument pd = new PrintDocument();
     pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);
     pd.Print();
   }  
finally 
   {
     streamToPrint.Close();
   }
	

  Return to Index