-2

I was curious if you could print wirelessley using printDialog? I did a bit of research but could not find any articles relating to this issue. I am rolling with a windows 7.

Here is my code is it helps:

public void DVPrintDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
        Bitmap r3tsLogo = Properties.Resources.rt3slogo;
        System.Drawing.Image image1 = r3tsLogo; //image 1 is r3tsLogo
        e.Graphics.DrawImage(image1, 350, 0, image1.Width, image1.Height);

        //change the new point to put text on different part of paper.
        e.Graphics.DrawString("Address:", new System.Drawing.Font("Impact", 12, FontStyle.Regular), Brushes.Black, new Point(300, 90));

        //This line of code connects to Code line 151   
        e.Graphics.DrawString("North Building Room 61", new System.Drawing.Font("Arial", 10, FontStyle.Regular), Brushes.Black, new Point(370, 94)); 
}
Hakan Fıstık
  • 16,800
  • 14
  • 110
  • 131
MSD
  • 87
  • 2
  • 5
  • 14
  • 4
    It's bit of an odd question. Why would you _not_ be able to print wirelessly? The print dialog doesn't care what type of printer you have. Have you tried and encountered a problem? This code snippet doesn't seem to have anything to do with printing... – Equalsk Sep 06 '17 at 16:21
  • 3
    There's no documentation because your question makes no sense. The print dialog has nothing to do with how the printing is actually carried out, that is the responsibility of the driver as specified in the answer. If you can't install the printer driver then you'd be unable to print from that machine from any application. – Equalsk Sep 06 '17 at 16:33
  • You you see the printer in your system? Then you can use it. – TaW Sep 06 '17 at 17:34

1 Answers1

1

Yes - I do wireless printing to a Brower QL-710W label maker. In this case, if the driver is installed to connect to the printer, then it will work as a normal printer (directly connected to machine or network). All the complexities of wireless printing are handled by the driver, transparent to your code.

David Kujawski
  • 319
  • 1
  • 7
  • Thank you for the answer, are you saying the driver has to be installed on the computer from which it is being printed? if yes then I am in a school where their are multiple printers and the drivers are not installed on the PC which is going to print the paper. – MSD Sep 06 '17 at 16:29
  • That is the simplest of all cases, yes. If your question is how to print to a printer without a driver, then there are multiple ways of doing that and will depend greatly on the actual printer (LDP, FTP, etc). But that is unrelated to whether it is wireless or not (and just if it is reachable via the network) – David Kujawski Sep 06 '17 at 16:32
  • Is there any documentation which could help me achieve the wireless printing from winforms. I am new to this and am trying to learn for a class. Thanks! – MSD Sep 06 '17 at 16:34