I have a bitmap I want to print on a network printer using a network
stream.
This is the code I'm currently using:
chartBmp.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
byte[] printChart = ms.GetBuffer();
TcpClient client = new TcpClient("10.0.0.18", 9100);
NetworkStream printStream = client.GetStream();
printStream.Write(printChart, 0, printChart.Length);
printStream.Flush();
printStream.Close();
This method is working fine when I use text, but printing a bitmap will
give me one line with all kinds of characters.
I read about having to use special characters to let the printer know
it has to print a bitmap. Is that something I have to set in here, or
am I missing something else?