Windows Develop Bookmark and Share   
 index > Windows Forms General > How to print to an ip address?
 

How to print to an ip address?

We have a printer connected to an HP JetDirect. The printer has it's own ip address.

What is the correct method to print to the printer?

Do I just set the PrinterName to the ip address of the printer?

Private WithEvents myDocument As New System.Drawing.Printing.PrintDocument

myDocument.PrinterSettings.PrinterName = "192.168.0.250"

myDocument.Print()

Kyle J.  Thursday, March 22, 2007 3:32 PM

Hi Kyle

I generally use the PrintDialog to let the user pick a printer rather than hard coding the name. That being said, the way to find out the printer name is to pop up a PrintDialog, pick the HP Jet Direct printer, and see what the Printer Name comes back as. I'd bet it's a user-friendly network name that's being broadcast over the network by the printer in a UDP packet of some sort.

HTH

Alan Robbins  Thursday, March 22, 2007 3:39 PM

Hi Kyle

I generally use the PrintDialog to let the user pick a printer rather than hard coding the name. That being said, the way to find out the printer name is to pop up a PrintDialog, pick the HP Jet Direct printer, and see what the Printer Name comes back as. I'd bet it's a user-friendly network name that's being broadcast over the network by the printer in a UDP packet of some sort.

HTH

Alan Robbins  Thursday, March 22, 2007 3:39 PM

You can use google to search for other answers

Custom Search

More Threads

• real time processing of messages sent using events
• Bitmap array.
• Opening a child app - kidnap
• items in top level of the Listview
• MessageBox in c#
• Strange Invocation Exception...?
• Moving a borderless form that contains child controls
• Problem in Windows service in c#
• Improve TableLayoutPanel with large amount of controls
• User Control Click to Parent