因此,我正在通过服务发送的命令在Escpos打印机中打印一个程序。我管理了所有内容,文字,对齐,字体大小等。现在我需要打印一个以八位字节发送的图像我怎么做?我尝试了一切
图像字符串是///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////waaaaaaaaaaaaaaaaaaaaaaaaa//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "material material ..."//4aaaaaab//waaaaaaaaaaaaaaaaaaaaaaaaa//4aaaaaab//waaaaaaaaaaaaaaaaaaaaaaaaa//4aaaaaab//waaaaaaaaaaaaaaaaaaaaaaaaa//4aaaaaab//waaaaaaaaaaaaaaaaaaaaaaaaaaaaa Aaaaaaaaaaaaaaaaaaaaaaa//4p/////B//waaaaaaaaaaaaaaaaaaaaaaaaa//4p/////b//waaaaaaaaaaaaaaaaaaaaaaaaa//4p/////b//wah///8aaaaaaaaaaaaaaaaaaaaaaa///////b//wah///8aaaaaaaaaaaaaaaaaaa///////b//wah///8aaaaaaaaaaaaaaaaaaa////////b//wah///8aaaaaaaaaaaaaaaaaaaaa/////////b//wah///8aaaaaaaaaaaaaaaaaaa/////////b//wah///8aaaaaaaaaaaaaaaaaaa////////b//wah8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .. 4AA///ga//4AAD//B//WAH8AAAAAAAAAP/AA//GA//4AAD//B//B//WAH8AAAAAAAAAAAAAAF//aa//aa//a//ga//ga//b//wah8aaaaaaaapgaaaaaaaaaaaaaapgaaaaa a/pa/////B//WAH8AAAAAFGAAB/G/AAAFAAA//4P/////B//WAH8AAAAAFWAAD AOAAAAFAAA//4P/////B//WAH8AAAAA/waad8aaaaaafaaa//4p////b//wah//aaa/4aah4aaaaaaaafa//4p///////////b//wah//aab/aab/4aahwaaaaaaaaafa//4ap//4ap///////////////////////////wah//wah/aab98aapwaaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaafa//wah//aad58aapwaaaaaaaaaa//4Ah//////////////wah//aad5 aapwaaaaaaaaaaaaaa///////////////////////////////////////wah8aaaaaaahw/aapwaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa B//WAH8AAAAPGFAAPWAAAAAAFAAA//4P///////////////wah8aaaaaf//gah4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaf//4p/////////////////////////////////////////wah8aaaaf/gah4aaaaaaaafaaaaaaaaaaaaaaaf//gah4aaaaaaafaaaaaa////////////////////////////////b//wah8aaab///4ab/w/w/aaafaaa//4p/////////b//wah8aaaab8ad4aaa///gaafaaaa a/gaafaaa//4p//4p///////////////////////////////////wah8aaaad8aab8aaaf////waaaaaaaaaaaaaaaaaaaaaaaaa////////b//waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa because/Aaaaaaaaaaaaaaaaaaa//4aaaaaab//waaaaaaaaaaaaaaaaaaaaaaaaa///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////waaaaaaaaaaaaaaaaaaaaaaaaa///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////waaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
I was trying this
oby = new List<byte>();
oby.Add(Convert.ToByte(0x1B));
oby.Add(Convert.ToByte(0x2A));
oby.Add(Convert.ToByte(33));
Bytes = PrintExtensions.AddBytes(Bytes, oby.ToArray());
Bytes = PrintExtensions.AddBytes(Bytes, System.Text.Encoding.ASCII.GetBytes("////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA//4AAAAAAB//wAAAAAAAAAAAAAAAAAAAAAAA//4AAAAAAB//wAAAAAAAAAAAAAAAAAAAAAAA//4AAAAAAB//wAAAAAAAAAAAAAAAAAAAAAAA//4AAAAAAB//wAAAAAAAAAAAAAAAAAAAAAAA//4AAAAAAB//wAAAAAAAAAAAAAAAAAAAAAAA//4P/////B//wAAAAAAAAAAAAAAAAAAAAAAA//4P/////B//wAAAAAAAAAAAAAAAAAAAAAAA//4P/////B//wAAAAAAAAAAAAAAAAAAAAAAA//4P/////B//wAH///8AAAAAAAAAAAAAAAAA//4P/////B//wAH///8AAAAAAAAAAAAAAAAA/////////B//wAH///8AAAAAAAAAAAAAAAAA/////////B//wAH///8AAAAAAAAAAAAAAAAA/////////B//wAH///8AAAAAAAAAAAAAAAAA/////////B//wAH///8AAAAAAAAAAAAAAAAA/////////B//wAH8AAAAAAAAAAAAAAAAAAAA//4AAH///B//wAH8AAAAAAAAAAAEAAAAAAAA//4AAD///B//wAH8AAAAAGAAAAD/4AA///gA//4AAD///B//wAH8AAAAAHAAAAP/+AA///gA//4AAD///B//wAH8AAAAAPAAAAf//AA///gA//4AAD///B//wAH8AAAAAPgAAA///gA///gA//4P/////B//wAH8AAAAAfgAAB/g/AAAfAAA//4P/////B//wAH8AAAAAfwAAD+AOAAAfAAA//4P/////B//wAH8AAAAA/wAAD8AAAAAfAAA//4P/////B//wAH//+AAA/4AAH4AAAAAfAAA//4P/////B//wAH//+AAB/4AAHwAAAAAfAAA//4AP////B//wAH//+AAB98AAPwAAAAAfAAA//4AH////B//wAH//+AAD58AAPwAAAAAfAAA//4AH////B//wAH//+AAD5+AAPwAAAAAfAAA//4AH////B//wAH8AAAAHw+AAPgAAAAAfAAA//4AH////B//wAH8AAAAHw/AAPwAAAAAfAAA//4AP////B//wAH8AAAAPgfAAPwAAAAAfAAA//4P/////B//wAH8AAAAPgfAAPwAAAAAfAAA//4P/////B//wAH8AAAAf//gAH4AAAAAfAAA//4P/////B//wAH8AAAAf//gAH4AAAAAfAAA//4P/////B//wAH8AAAA///wAH8AAAAAfAAA//4P/////B//wAH8AAAA///wAD+AOAAAfAAA//4P/////B//wAH8AAAB///4AB/w/AAAfAAA//4P/////B//wAH8AAAB8AD4AA///gAAfAAA//4P/////B//wAH8AAAD8AB8AAf//AAAfAAA//4P/////B//wAH8AAAD4AB8AAP/+AAAfAAA//4P/////B//wAH4AAAD4AA+AAD/4AAAfAAA/////////B//wAAAAAAAAAAAAAAPAAAAAAAA/////////B//wAAAAAAAAAAAAAAAAAAAAAAA/////////B//wAAAAAAAAAAAAAAAAAAAAAAA/////////B//wAAAAAAAAAAAAAAAAAAAAAAA//4AAAAAAB//wAAAAAAAAAAAAAAAAAAAAAAA//4AAAAAAB//wAAAAAAAAAAAAAAAAAAAAAAA//4AAAAAAB//wAAAAAAAAAAAAAAAAAAAAAAA//4AAAAAAB//wAAAAAAAAAAAAAAAAAAAAAAA//4AAAAAAB//wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA////////////wAAAAAAAAAAAAAAAAAAAAAAA"));
不起作用:D我尝试了很多,但我认为它不适合此文本:D
您必须指定oby.Add (Convert.ToByte (33));
和图像数据之间2个字节中位图像的宽度。
请参阅以下内容。
相应的页面用日语。
ESC *
ESC * M NL NH D1 ... DK
例如,假设变量imageWidth包含宽度值,则如下。
oby.Add(Convert.ToByte(0x1B));
oby.Add(Convert.ToByte(0x2A));
oby.Add(Convert.ToByte(33));
oby.Add(Convert.ToByte(ImageWidth & 0xFF));
oby.Add(Convert.ToByte((ImageWidth & 0xFF00)>>8));
Bytes = PrintExtensions.AddBytes(Bytes, oby.ToArray());