I am working on C# POS. I am using raw printing helper and I am trying to print an image using ESC/POS commands with the command: ESC *.
So far I am able to:
string carriageReturn = Convert.ToString((char)13);
string lineFeed = carriageReturn + Convert.ToString((char)10);
string cutPaper = Convert.ToString((char)27) + Convert.ToString((char)105);
string horizontalTab = Convert.ToString((char)9);
string fontSize4 = Convert.ToString((char)29) + Convert.ToString((char)33) + Convert.ToString((char)51);
And I send the data to print with this:
printWithStringAndPrinter(fontSize4 + "this" + lineFeed + "is" + lineFeed + fontSize2 + "test" + lineFeed + cutPaper, p.name);
The only problem is with the image, I can not get it to print. I have tried this:
Bitmap bmp = new Bitmap("C:\\test.bmp");
string image = Convert.ToString((char)27) + Convert.ToString((char)42) + Convert.ToString((char)33) + Convert.ToString((char)0) + Convert.ToString((char)86) + bmp.ToString();
But nothing works. Can someone give an advice or an example of how to print an image?
Even though there are a lot of questions about the same topic, any of them has helped me.